What is Compound?
Compound Finance is a decentralized lending protocol where interest rates are formed algorithmically based on supply and demand. Let’s find out about its development and its algorithms.
It can be viewed as an open money market where users deposit crypto assets and also borrow funds.
Who created Compound Finance?
Robert Leshner, a web developer and financial market analyst, is the creator of the Compound Finance protocoland the CEO of Compound Labs.
Geoffrey Hayes, a programmer, is the co-founder and CTO of Compound Labs.
How did Compound Finance originate and develop?
University of Pennsylvania alumni Leshner and Hayes collaborated for several years on various projects (Britches, Postmates, and others). In 2013, Leshner, who has worked as a certified auditor, portfolio manager and banker, became interested in cryptocurrencies.
On August 28, 2017, Leshner and Hayes incorporated Compound Labs, Inc. headquartered in San Francisco.
On January 31, 2018, Leshner published an article on the development of the Compound protocol.
On May 7, 2018, the company raised $8.2 million in seed funding. Bain Capital Ventures, Andreessen Horowitz, Polychain Capital, Transmedia Capital, Compound Ventures, Abstract Ventures, Danhua Capital, and Coinbase Ventures participated in the round.
In September 2018, Compound Labs introduced the first version of a protocol that allows you to borrow five crypto assets — ETH, TUSD, ZRX, BAT and REP.
In February 2019, the white paper of the project was published. On May 23, 2019, Compound Labs released the second version of the protocol with the release of cToken tokens representing rights to underlying money market assets in Compound Finance.
In November 2019, Compound Labs raised $25M in a Series A funding round led by Andreessen Horowitz. Bain Capital Ventures, Polychain Capital and Paradigm also participated in the round.
Even in the early stages, Robert Leshner announced his intention to gradually decentralize the protocol, depriving the Compound Labs developers of administrative privileges in favor of the community.
In February 2020, Compound Labs launched COMP governance tokens to encourage community participation in the project.
On April 16, 2020, Compound’s governance issues were transferred from administrators to COMP token holders, who could change the list of supported coins, influence risk parameters, interest rate curves, and so on.
How does Compound work?
Compound operates in the same way that a bank does: the user deposits various cryptocurrencies and receives interest income. However, unlike a bank, Compound does not keep deposits: the funds are placed in smart contracts with which the user directly interacts.
Terms do not need to be negotiated between lenders and borrowers. The parties engage in direct interaction within the framework of a protocol that governs the size of the interest rate and collateral. Funds are not held by any counterparties.
Anyone with a Web3 wallet like MetaMask can access the platform.
The user gains access to a dashboard displaying the supported assets after confirming the request to interact with the Web3 wallet. To deposit or borrow an asset, you must first unlock it by clicking on its page.
The user can lend an asset at a predetermined annual percentage rate after unlocking it, which involves allowing the smart contract to interact with the funds (APR). Each asset has its own annualized percentage yield (APY).
To borrow an asset, the user must first place funds on the platform and obtain the so-called borrowing power. This metric represents the amount that can be borrowed. It increases with the growth of the collateral provided.
This is how the depositing user’s balance looks like after the transaction is processed:
After placing assets on the platform, so-called c-tokens appear in the user’s wallet — in this case, Compound Dai (cDai).
To withdraw placed assets with accumulated interest income, you need to click on the Withdraw button.
The platform’s loan-obtaining function
Obtaining a loan is as simple as making a deposit. If the user has already received the right to borrow, he can borrow assets by using the appropriate panel.
To interact with smart contracts, Compound must obtain permission from the Web3 wallet. Permission is granted only once. This will necessitate an on-chain transaction involving the payment of a fee on the Ethereum network.
The user can borrow money by selecting a supported asset on the right side of the panel. The Safe Max value represents the maximum amount of borrowed funds with a low risk of liquidation when the underlying asset’s price falls.
After the transaction is initiated, the loaned asset (in this case, ETH) is deposited into the Web3 wallet.
Loan interest accrues according to a predetermined interest rate. The debt can be paid at any time by clicking the Repay button.
How does the system of two types of Compound tokens work?
cToken
Tokens represent the balances of users interacting with Compound’s liquidity pool. The underlying asset presented by cToken allows you to receive interest income and serves as collateral.
These tokens are ERC-20 assets and can be viewed on the Etherscan blockchain explorer, stored in a wallet, and sent to other users. Compound currently supports 14 crypto assets.
Example.
The user deposits 1,000 BAT in the liquidity pool, with an exchange rate of 0.02. In this case, the user receives 50,000 (1000/0.02) cBATs. If a few weeks later, when the exchange rate is equal to 0.021, the user withdraws funds, 50,000 cBAT will equal 1050 BAT (50,000 * 0.021).
Features of cTokens:
● You can borrow up to 50–75% of the value of cTokens, depending on the market characteristics of the underlying asset. You can add or withdraw tokens at any time.
● If the collateral coverage of the user’s debt is insufficient, the debt position may be subject to liquidation.
● Liquidators receive 5% of liquidated assets.
● cTokens are available for viewing on Etherscan.
How to get cEther?
The procedure for obtaining cETH differs from that of obtaining cBAT or cDAI.
When a user deposits ETH, the app transfers the tokens directly to the paid cEther contract creation function. cEther appears in the wallet after you enable the option.
As a result, the cToken contract removes the specified amount in base tokens from the sender’s address as a result of the request (invocation).
COMP
Another asset in the Compound ecosystem is the COMP native governance token.
Features of the COMP token:
● COMP has a total supply of 10 million. The remaining 55.71% will be distributed among project team members, founders, investors, and partners. Within four years, the remaining 42.29% will be distributed to users.
● Liquidity mining rate : 0.5 COMP/block (~2312 COMP/per day).
● The dynamics of coin accrual are determined by market interest rates. For instance, if USDT has the highest rates, those who deposit and borrow in Tether’s stablecoin will receive more COMP tokens.
● In each asset market, the available COMP tokens are divided equally between lenders and borrowers.
● Users can check the interest rate on the User Distribution page .
● COMP holders can earn additional COMP native tokens by voting on the governance of the system.
● COMP tokens are available on many exchanges, including Coinbase and FTX.
How is the compound interest rate determined?
● The interest rate depends on the liquidity available in a particular market.
● The rate fluctuates based on supply and demand in real time.
● When liquidity is high, the interest rate is low.
● When liquidity is low, the interest rate rises.
How is the interest rate calculated?
Based on supply and demand, each asset in the Compound markets has its own annual interest rate (APR) for lending and depositing. Interest income is generated every 15 seconds when a new Ethereum block is mined.
Excess liquidity exists only when the number of assets listed on the platform exceeds the amount borrowed. When the number of lenders in the market exceeds the number of borrowers, lenders’ interest income falls. The level of income is determined by the utilization rate of an asset.
How is the secured loan rate calculated?
A user’s borrowing power is directly proportional to the amount of collateral. Each asset has a unique collateral factor that is determined by its volatility.
The Basic Attention Token (BAT), for example, has less borrowing power than the Dai stablecoin due to its collateral factor of 50%. Because it is a less risky asset, the latter has a higher collateral factor of 75%. As a result, staking $100 of BAT tokens on the platform grants a borrowing right of $50, whereas staking $100 of DAI grants a borrowing right of $75.
The collateral factors of all assets placed on the platform are considered when calculating the secured loan rate. The maximum amount of funds that can be borrowed in relation to the amount of assets deposited is set at a base rate.
The governance mechanism of Compound Finance is determined by the collateral factor for each asset.
How is the liquidation of assets carried out?
If the amount owed exceeds the user’s maximum borrowing limit, Compound exchanges the reborrowed asset for collateral provided by the borrower at a slightly below market rate. As a result, the user is motivated to effectively manage debts.
Compound empowers community members to act as liquidators by providing tools such as the Compounder Liquidator. Members can redeem other users’ loans for ETH at the best market rate.
A loan of 10 ETH, for example, can be repaid (re-mortgaged) by another user if the collateral is no longer sufficient. This user receives the loan’s base collateral at a discount of 5% or more (paid in ETH).
To prevent liquidations, Compound also provides an Account Service API to monitor addresses at risk.
How does the governance mechanism of Compound Finance work?
● Any user who owns more than 1% of the COMP emission volume can make offers .
● The voting period for any proposal is three days.
● Any address with the right to vote can vote “for” or “against” a particular proposal.
● If a proposal receives at least 400,000 votes, it is queued and implemented after two days.
● The proposal is rejected if the required number of votes is not obtained.
Examples of issues on which COMP token holders vote :
● Support for the new cToken Market.
● Changing the interest rate model.
● Oracle address update.
● Withdrawal of cToken reserve.
● Selection of new administrators.
Compound uses the Timelock mechanism to update the risk parameters of the Compound Finance system, such as the annual interest rate or the collateral factor. It delays parameter changes, ensuring security: any attempts by intruders to interfere with the system can be tracked and prevented.
Compound.finance website elaborates:
“Any proposal to govern the system is published with a delay of at least two days. For proposals for important updates, such as changing risk settings, the delay can be up to 14 days. Timelock is currently managed by an address administrated by members of the Compound team.”
Thus, the company now controls the platform’s risk parameters, albeit with a time lag. However, Compound, which uses smart contracts for control, may eventually grant access to Timelock to a distributed committee of community members. This will allow Compound Finance to become a Decentralized Autonomous Organization (DAO) similar to MakerDAO.
In terms to track the updates, subscribe to our Medium feed. Stay tuned!
You can also try your hand at working with cryptocurrency on our platform Sunflower Corporation.
Why use Compound Finance?
● Interest income on funds placed on the platform.
● Decentralized applications and exchanges can use Compound as a source of monetization in the Ethereum ecosystem
● Traders can borrow ETH from the liquidity pool and place these assets in their portfolios as collateral to participate in crowdsales.
● Traders interested in shorting a particular token can borrow it from the liquid pool and sell it.
How is Compound developing?
In August 2020, Compound joined the Global DeFi Alliance, an international consortium of centralized and decentralized financial service providers and platforms formed by cryptocurrency exchange Huobi.
In August 2020, as part of the transition to the free-access price feed channel Open Price Feed, the project launched its own cryptocurrency price oracle.
The developers also created an aggregator of information about the declared prices. The data is available directly from each publisher through their API.
In September 2020, the MakerDAO community voted to add COMP tokens as a new option to enable the issuance of the DAI stablecoin.
Compound currently only works with Ethereum ecosystem coins. Tokenized versions of real-world assets such as the US dollar, Japanese yen, and Google shares will be supported in the future.
On December 17, 2020, Compound presented a white paper with a detailed description of Compound Chain, a new protocol designed to ensure the interaction of assets from various blockchains.
Subsequently, Compound Chain was renamed Gateway . The protocol testnet went live on March 1, 2021. The main network will be launched in the summer or towards the end of 2021.
Gateway functions similarly to Compound protocol on Ethereum. However, there are some differences:
● Gateway allows you to borrow and lend assets on any blockchain.
● Interest is paid in dollars (stablecoins) via CASH, Gateway’s native unit of account.
● Gateway has a more efficient risk assessment mechanism. It is based on the volatility of secured and borrowed assets. Using fewer volatile coins improves capital efficiency.
Gateway is a cross-chain interaction platform with functionality similar to THORChain.
Using a network of peer-to-peer chains, Gateway users can download supported assets from various independent blockchains. Each chain is linked to a Starport contract. It gives you the ability to lock and unlock assets on the Gateway.
Users can deposit and borrow assets from various blockchains once they have uploaded them to the Gateway. You can, for example, lend Ethereum tokens using Solana as collateral, or borrow Celo assets using Polkadot assets, etc.
Gateway is designed to enable blockchains to interact directly, without wrapping tokens.
For example, in order to wrap Bitcoins (WBTC), DeFi users are forced to turn to intermediaries in the person of BitGo or Ren . Because of this, they lose control over their private keys. Gateway offers a solution that allows bitcoin holders to interact with other blockchains without resorting to third parties.
By switching to Gateway, Compound users will be able to avoid paying high Ethereum fees.
Gateway’s native unit of account is CASH. It is used to cover transaction costs. This token, like MakerDAO’s Dai stablecoin, is created through a loan. The number of coins borrowed equals the amount of CASH in circulation.
It is assumed that at first, CASH will equal one US dollar. Following that, the community can change this parameter through a collective decision. CASH has the potential to compete with DAI and USDC.
All users and validators who hold CASH tokens receive income that rises in line with the interest rate index. When a user/validator generates, redeems, borrows, returns, or liquidates CASH, this occurs.
The Proof-of-Authority (PoA) algorithm is used by the Gateway. Trusted validators run the network. Even if one-third of the nodes violate the rules, consensus is still possible. When at least two-thirds of the nodes agree to add a block to the chain, block finalization occurs. Borrowers pay validators a percentage of the value of each block validated. Validators are also compensated for asset transfers.
The Proof-of-Authority model allows banks and centralized crypto exchanges to become Gateway validators.
COMP token holders will manage the Gateway through the Compound Governance system on Ethereum.
At first, Gateway will be primarily an interest income market based on interconnected blockchains. Over time, other dapps may integrate with this system, such as decentralized exchanges.
On June 28, 2021, Compound Treasury, a new company under the auspices of Compound Labs, began operations.
Compound Treasury enables non-banks and other fintech companies to convert US dollars into USDC stablecoin. USDC tokens will be used in Compound at a 4% guaranteed interest rate. This is much more than what companies can receive within the framework of traditional bank savings accounts (0.55%-0.7% per annum).