MetaCartel - Dragon Quest : Compound Finance Borrow Bounty
The majority of cryptocurrencies sit idle on exchanges and in wallets, without yielding interest. The Compound Protocol is an algorithmic, autonomous interest rate protocol built for developers, to unlock a universe of open financial applications.
🎉750 DAI prize to the most original use of Compound protocol’s “borrow” in a project. The other Compound bounty is "MetaCartel - Dragon Quest : Compound Finance Governance Bounty" https://explorer.bounties.network/bounty/3946
Build an application, SDK, or API that uses the Compound protocol’s cToken borrow function. The project’s code must use at least 1 cToken contract borrow. There are 7 cToken contracts to choose from. Users can borrow any of these assets from a liquidity pool.
The Compound Protocol is deployed to all Ethereum test nets, so your project can utilize the contracts on your test net of choice. In order to borrow, users need to first supply an asset as collateral. You’ll need to acquire crypto from a faucet on your test net before you supply. Here are the contract addresses for each network: https://compound.finance/docs#networks
To learn each of the steps for borrowing assets from the Compound Protocol, see this borrow developer quick start guide. The guide references a GitHub repository with open source code examples for implementing borrow.
Go here for more Compound developer guides https://compound.finance/docs#guides.
Examples of use cases for borrowing assets from the Compound Protocol:
Join the Compound Discord #development channel for technical help. Someone is always online. 750 DAI will go to the team with the most original and practical project that implements Compound borrowing.
App users of Favela sem Corona will be able to interact with Compound's cDAI and use it like fiat . Users will receive donations from all over the world in crypto currencies and the App will allow them to leverage the donations by transferring cDAI from Compound to other peers. An escrow contract was created to earn interest from compound and allocate the funds in equal parts to wallet addresses from the favela users. Our escrow contract takes donations in ETH and invests all of that to Compound ETH as collateral. Then we borrow DAI against ETH collateral leveraging compound's liquidity. The DAI is then flipped into cDAI which is then distributed to Users. The contract is Deployed on Kovan at 0x41B76A41d7b5C9cc7316645C0676Ae56328BC11E
The App will not have "pre-loaded" currency in it, as, each new account will be registered to receive charity via the escrow smart contract.
We picked cDAI as a choice for its good community engagement, liquidity and the transparent communications with the general public and governance mechanisms.
Implementation: For mobile applications the team build Favela sem Corona using flutter, which builds for both Android and iOS. There is an escrow smart contract that receives donations and distributes it among favelas and it uses Compound and Kyber.
Deployment: The contracts are deployed on Kovan and can be checked at https://github.com/itsencrypted/favela_sem_corona_smartcontract/blob/master/contracts/CFavelaCrowdFunding.sol
The BUIDLer will need to have flutter installed, and Android/iOS sdks for the app and truffle for deploying the contracts.
The UI repository can be found: https://github.com/itsencrypted/favela_sem_corona (the repo is currently private, Judges, please ask email@example.com for access, we had to put it private as we are currently releasing it into Google Play Store and other developers in Brazil are looking to clone the repo before we launch it).
This app ultilizes Compound's supply/borrow, Aave's flashloans, and Uniswap's DEX to allow users to leverage on any asset with the ability to hedge against liquidation risks. I.e. It allows users to transform their assets (debt OR collateral) from A to B, within a single transaction regardless of their borrowing power.
The contracts are deployed on mainnet https://github.com/studydefi/dedge/releases/tag/v1.0.3 and accessible on http://dedge.exchange/ today
The app uses Next.js and React for the frontend and Solidity for the contract logic - https://github.com/studydefi/dedge/tree/master/packages/smart-contracts/
Swapping Compound Debt from DAI to BAI - https://gfycat.com/livelyfancyirishterrier
Swapping Compound Collateral from ETH top USDC - https://gfycat.com/identicalweeklycaracal
This app is made to minimize the process for an user to earn interest and borrow dai using his/her ether without getting into more complex details about other markets and stuff.
I have made use of React and Material UI as my frontend frameworks. The app currently uses Kovan test network for the functionalities provided by Compound finanace.
The app is deployed to IPFS using Fleek to keep everything decentralized. It's live on https://minimal-finance.on.fleek.co/
EDIT: Here's my submission details in hackmd, https://hackmd.io/@saimano/compound_finance