Inspiration

There are many inspiring people and projects we love and want to support, but we are not always willing to fund them directly with our money and take any kind of risk.

What it does

It is a Patreon-like service which enables people to deposit Dai and pays out the interest earned from Compound to creators or projects they love and support.

How we built it

We've built it mainly relying on the cTokens and DAI characteristics. We wanted to provide the best UX as possible, so we had an attempt to provide a metatransactions powered Dapp. That would charge just the users DAI as a gas token, to do the underlying calculations we used the uniswap trading pairs. We also have a small backend for storing offchain data such as storing campaigns pictures and descriptions. On client side we use React with ethers to make it work. In terms of users on-boarding we used Torus (or Metamask) and Ramp Network to provide the best UX and a non user-aggressive experience.

Challenges we ran into

The main challenge was to learn how to use the cDai, calculate compound balances we need to subtract. An evil "plus" sign, in brief it was about a good understanding of the math that stays behind Compound.

Accomplishments that we're proud of

  • Compound integration.
  • Great gas optimisation.
  • We worked out a very sustainable and socially useful model.
  • Our UX flow is really great even if we didn't manage to integrate metatransactions.

What we learned

  • BUIDLing on top of Compound!!!
  • How to properly use OpenZeppelin SDK.
  • How to interact with uniswap from solidity.
  • How the CREATE2 opcode works.
  • We really appreciated the power of ethers.js
  • Signing and recovering ethereum messages using ethers.js
  • Using Torus!!!

What's next for PatronDai

  • Metatransactions!
  • DAI to FIAT cashouts.
  • UI and UX improvement

Built With

Share this project:
×

Updates