The Compound Protocol is a group of smart contracts deployed on the Ethereum blockchain that enable borrowing from pools of supplied assets instead of a centralized exchange or peer-to-peer platform.
Compound Interface is a user-facing application that allows suppliers and borrowers to interact directly with The Compound Protocol’s smart contracts. This tutorial will cover Compound Interface but there are many other front-facing applications which you can use to interact with the protocol.
What makes Compound unique? Programable Money Markets.
- Each asset pool is a money market with a floating interest rate which is algorithmically adjusted based on the supply and demand for that asset. Meaning as more people borrow from a pool of supplied assets, the floating interest rate will increase based on the demand curve (centrally codified by Compound). Higher interest will incentivize suppliers to add more liquidity to that asset pool, bringing interest rate down until market equilibrium.
- Because the interest rate is algorithmically derived and the supply is aggregated, users do not have to negotiate terms such as maturity, interest rate, or collateral with a peer or counter-party.
- Interest accrues every block (~15 seconds).
- Suppliers are able to withdraw supplied assets and accrued interest at anytime.
Interest to borrow always higher than to earn. Many might ask: why would anyone be willing to take out a loan and how does the system make sure interest is getting paid?
There are 3 general types of Compound users: (1) those that just want to generate interest by supplying, (2) those who want to increase their exposure to crypto assets, and (3) those who want to short crypto assets. People who are taking out loans by collateralizing their assets are most likely going to use borrowed funds to buy more crypto assets, therefore increasing their exposure to them overall. Alternatively, if investors believe a particular crypto asset will be decreasing in value, they are able to borrow that asset->sell it->buy back after price decreases -> return borrowed asset which you have repurchased for less value.
When it comes to repaying: in order to take out a loan (Dai) you need to put up collateral (ETH). This collateral is always worth more than the loan (aka overcollateralized). For borrowers to get their collateral back, they need to repay their loan + accrued interest up until that point OR if the value of their collateral drops below a set threshold - the collateral will be automatically liquidated to pay back the loan + interest owed. So as you can see suppliers will always be compensated by borrowers and borrowers are willing to pay higher fees because most likely they believe will appreciate more than what they are paying to borrow.