Inspiration

We wanted a way to be able to invest in a company based on its performance, not through stock speculation.

Defi products are the perfect use case for it as now with Defidy people can invest in protocols and performance rather than just assets, just like stocks but which are only affected by internal performance.

And so, we created a synthetic asset who's price is determined by several factors on compound. (e.g. borrowing power, supply power, etc), fed in data using chainlink oracles, performed computations at smart contract level and deployed our asset on 0x relayer.

What it does

It can act as a future for people who want to long/short against the popularity/usage/collatorization ratio/borrowing power/supply power of the various financial protocols, for this hackathon we focused on compound.

How we built it

  1. We started hacking on the UMA, had to extend and hack on it due to the way we were retrieving most of our data (on chain, instead of from an oracle written by the UMA team).
  2. Deployed a Synthetic token on Ropsten network using 0x relayer.
  3. Integrated with Fortmatic for easy user interface and experience.
  4. Deployed chainlink oracles for even more data sources and performed our computation algorithm to determine the performance of the compound protocol.
  5. Generated subgraph from our smart contract generated computations after each event is fired so we can query it easily from our frontend and display it our users.
  6. Deployed a TokenSale contract to sell the tokens, and 0x as a marketplace for holders to freely trade them.
  7. Wrote a frontend to interact with TokenSale and the deployed synthetic asset token.

Challenges we ran into

  1. Reading solidity Interfaces and converting data types(lack of examples)
  2. Getting MetaMask to work reliably
  3. Inspecting old javascript code (with only callbacks)
  4. Getting Synthetic Token Builder to work (UMA docs were outdated)

Accomplishments that we're proud of

  1. Completed our MVP at our weekend which finally works
  2. Worked as a team, everyone pulled their own weights
  3. Learnt some new truffle and solidity tricks
  4. Fixed a bug in UMA's repository, created PR

What's next for Defi-dy

Implement more synthetic assets for other Defi protocols e.g. Maker, NUO, dy/dx, Aave Launch our first alpha live on defidy.co

Built With

Share this project:
×

Updates