How Does Compound Work?
Like most decentralized finance (DeFi) protocols, Compound is a system of openly accessible smart contracts built on the Ethereum blockchain. It allows borrowers (in green) to take out loans by depositing collateral.
At the same time, it allows lenders (Compound refers to these users as “suppliers”) to earn interest on their loan.
Both parties can trust the code to enforce the payment of interest by the borrowers to the lenders. So unlike traditional finance, in DeFi there is no KYC, no sign-up,and no middleman.
Compound also allows lenders to actively trade their interest earned, without taking out their deposited liquidity. This means lenders can continue to earn interest while trading that interest in other protocols and earn more.
Compound does this by tokenizing your deposit into cTokens.
When a supplier (in blue) provides liquidity to Compound, in the form of USDC for example, they receive an equivalent amount of cUSDC. While the USDC has to stay locked in Compound, the cUSDC can be transacted and staked elsewhere.
The exchange rate between the token deposited and the cToken will only get more favorable over time, as a way to incentivize liquidity providers to keep their funds in Compound longer. It starts at 0.020000 for all markets, meaning 1 cUSDC is worth 0.020000 USDC when you first deposit liquidity. After 100 days the exchange rate gets more favorable, at which point exchanging 1 cUSDC might get you 0.021591 USDC for example.
Liquidators are the users who seize assets from other users who have taken on more of a loan balance than Compound considers them entitled to.
This is most often tied to the amount of collateral the user has supplied, which determines how much they can borrow. If a borrower ends up going over their limit, liquidators can seize a portion of their collateral for good.
Compound constantly checks what the borrowers’ loan balances are. Compound accrues interest on loan balances which are expected to go up over time.
The Comptroller creates and maintains markets on Compound. It is this contract that controls the supply of the cTokens available to each market.
COMP is Compound’s governance token, which means users who own it have a right to vote on governance proposals. COMP owners can also delegate their right to vote to any other wallet address.
Fun Fact: 441 million USDC has been deposited in Compound so far.