Decentralised Finance (DeFi) is the most promising killer app on Ethereum right now. DeFi services give users access to various financial services that customers were previously only familiar with from banks and other traditional financial institutions. However, DeFi platforms use smart contracts to offer accessible decentralised alternatives. This is why these services are often referred to as Open Finance. The best known DeFi use cases are stable coins, lending protocols, decentralised exchanges and payment networks. Compound Finance is a lending protocol running on Ethereum. It managed to raise $25 million Series A round in November 2019 from venture capital firm Andreessen Horowitz.

The majority of cryptocurrencies sit idle on exchanges and in wallets, without yielding interest., Robert Leshner, Founder of Compound

Compound is, in short, a pooled algorithmic money market protocol running on Ethereum. The founder Robert Leshner started developing the protocol in 2017. Compound is entirely open; hence the lending process involves neither paperwork πŸ“ nor intermediaries. Anyone in the world with an Ethereum-enabled wallet can participate in the market. The protocol uses interest rates set by the demand for borrowing and lending activities. The main design goals of Compound are:

  • providing liquidity,
  • avoiding credit risk and
  • frequent adjustment of interest rates (see image)
Dai three month  interest rate on Compound and dYdX
Dai three month lending interest rate on Compound vs. dYdX (Nov 19 - Jan 20)

Dai is a stable coin pegged to the USD value developed by MakerDAO, and it is one of the most desired assets on Compound. Since the demand for Dai is still high, the interest rates are also high. Users can choose between several assets, including Ethereum. However, the interest rates for ETH are currently not very attractive.

Compound markets (02.03.2020)
Compound Markets; Source:

Market players are never guaranteed a fixed interest rate because there is no duration to the participation. Users are taking the best-prevailing terms every 15 seconds (the average time a new Ethereum block gets mined). Lenders and borrowers can only know what the current interest rate is, but this rate could change at any time. Usually, individuals are exposed to default risk in all forms of credit extensions. The Compound market is designed to have no counterparty risk whatsoever. Don't forget; there is always the risk of code vulnerabilities. Anyone can lend or borrow tokens at any time without setting any duration for the deposit or sticking to an instalment plan. Compound is not peer-to-peer because users are not lending directly to other users. Essentially lenders are supplying a bunch of assets to the protocol and borrowers have access to the pooled tokens. This way, nobody has to wait for a counterparty to repay what they have borrowed.

Looking at the Compound interest rates, we can definitely identify a pattern. It is very attractive to supply Dai, Sai or USDC stable coins compared to other assets. Supplying Dai could earn you today around 8% interest per annum. When compared to the Ethereum interest of 0.01%, it becomes evident that stable assets are the more desirable assets. If you borrow volatile assets it becomes even more uncertain how much you would need to repay later. You would need to consider not only the unstable interest rates but also the volatile value of the asset. Making any predictions on your repayment would be very difficult.

Who needs a blockchain-based money market πŸ€”? - every asset not invested in any long term goals can be invested in a money market. The equivalent would be a cash account at your bank not earning any interest. It would be best if the money makes some interest. In the case of crypto, users could lend their tokens to the Compound protocol. The way Compound's design limits the use cases one could use it for borrowing. Variable-rate financing is not great for long term purchases like, for example, a car or a house. Compound is excellent for short term financing; developers even believe that the greatest use case for the protocol is not humans but machines and other dApps where applications would either borrow money on a short term basis or lend their excess funds for extra profit. Experienced users use Compound for margin trading, where they borrow Dai stable coins with the idea of buying other assets at exchanges, and if the price of these assets rises, they make profits and then repay their loan. If they are looking to short a token, they can borrow it, send it to an exchange and sell the token, profiting from declines in overvalued tokens.

Borrowing on Compound

Since the aim of Compound is to have zero counterparty risk, borrowers would need to deposit collateral in order to borrow from Compound. Maintaining excess collateral ensures that there is near to zero risk of a borrower defaulting. For example, if a user wants to borrow Dai she would need to deposit ETH as collateral. Each borrowing position needs to be over collateralised; hence the value you borrow is less than what you deposit. Since the underlying collateral is also volatile, it could drop below a certain threshold which would trigger the smart contract to close the position (also called liquidation). In these circumstances, the borrower gets to keep the borrowed amount but loses the collateral. In order to get back your locked collateral, you would need to repay the credit, including the outstanding interest, which of course is also volatile. Once a position gets liquidated there is no way of getting back your collateral.

Lending on Compound

Lending looks similar like a typical cash account where bank customers used to get paid for leaving their money at the bank. In Compound, one needs to deposit her assets to earn interest. The good thing is that users can withdraw their assets at any time since there is no duration lock neither for deposits nor credits. There are no penalties involved.

Compound Liquidity

As mentioned at the beginning Compound incentivises liquidity. It does not 100% guarantee it though. It is theoretically possible to borrow more assets than the available pooled amount. The protocol uses a simple rule; the less liquidity there is, the higher the interest rate will be, discouraging excess borrowing. The interest rate aims to find an equilibrium where there is a balance between pooled assets and borrowed amount.

The role of cTokens

Compound introduced the cTokens which act as twins of the original token. When users supply Dai (or any of the other assets) to the Compound protocol, their balance is represented in cTokens. This is how Compound represents and calculates the interest rates. The graph below shows an example where Dai gets supplied to the Compound protocol and the wallet balance is represented in cDai. The earned interest is represented by the Dai token increasing in price relative to Dai. All received Dai tokens are pooled together by the Compound smart contract. The exchange rate between cDai and Dai increases over time as the market's total borrowing balance increases.

Supply DAI tokens to Compound

When users withdraw their balance from the protocol, the cDai is automatically converted into Dai at the current rate, which includes the additional interest. cTokens are designed to always appreciate against their counterparts.

Compound Governance

Unlike legacy finance systems, the name DeFi implies that there is no single point of failure. Is this the case for DeFi? Not exactly, because DeFi projects are developed by companies who also retain full control of the smart contract development. By the flip of a switch🎚, these protocols can be turned off. This is also the case for Compound. The rationale behind this is to have a piece of mind (failsafe) in extreme situations such as unexpected blockchain forks, smart contract hacks or black swan events. Nevertheless, DeFi, with all its flaws, is a much more decentralised system than any legacy system 🏦.

Compound recently announced a new governance token (COMP) for the protocol. The aim is to remove the largest single point of failure - the Compound team. In essence, anyone who owns at least 1% of the total COMP supply can vote for proposals. One token would represent one vote. The proposals are executable code which is subject to a three-day voting period. If voted yes by the community proposals get deployed. In this way, the Compound team wants to open the protocol to the community with the ultimate goal of becoming self-governed.

Compound protocol voting flowchart

The governance token is currently being testnet on Ethereum testnet. Initially Compound will distribute the COMP tokens among its shareholders. It is unclear what percentage of the total amount the shareholders will get and what percentage will be left to the public. It is to be expected that Compound would not want to give up its governance to some unknown whale. We are yet to see the first live implementation of the token.