A Deep Dive Into Compound

Justin Gregorius
CoinList
Published in
6 min readJan 29, 2020

One of the most exciting developments in crypto over the past year was the growth of decentralized finance. DeFi has gained traction because it actually improves the user experience when compared to traditional financial products; DeFi applications make it very easy to engage in lending, borrowing, bundling, trading, and more. Not only is DeFi important for the growth of crypto, but DeFi projects provide useful tools to investors and token holders seeking yield on their investments.

We did our first deep dive into DeFi a few months ago with our profile of Set Protocol. Today, we’re excited to provide insight into Compound, a decentralized lending protocol built on top of Ethereum. Our goal is to help you understand how these protocols actually work and how you could use them.

Compound allows anyone to lend and borrow cryptoassets such as ETH, DAI, USDC, WBTC, and more, without an intermediary. Compound has over $150M worth of assets in its money markets and recently raised a $25m series A from Andreessen Horowitz, Polychain Capital, Paradigm, and Bain Capital Ventures.

I recently spoke with Compound’s Strategy Lead, Calvin Liu, to learn more about the project.

Justin Gregorius: Thanks for taking the time out to join us today, Calvin. To start, what is Compound?

Calvin Liu: Compound is an autonomous, transparent money market protocol for Ethereum-based assets. The protocol creates a floating, short-term interest rate for each asset, which adjusts in real-time based on supply and demand.

JG: Compound is different from traditional lending platforms in that it aggregates the supply of assets being lent out and acts as a money market for a given asset. How do lenders receive interest on the assets that they are lending?

CL: Suppliers of an asset to a Compound market receive a pro-rata share of the interest expense that borrowers of the same asset accrue and owe back to the market.

JG: Right, and cTokens are the mechanism in which lenders capture their share of the interest expense incurred on borrowers. Could you describe the concept of cTokens in more detail?

CL: When assets are supplied into the Compound protocol, suppliers receive cTokens, which are essentially fungible receipts that represent a claim on a share of the supply pool; each cToken represents a claim on some amount of supplied assets, determined by an exchange rate.

JG: So the interest being captured manifests itself in the exchange rate between the underlying asset and the cTokens issued to lenders. How is the exchange rate between cTokens and the underlying asset calculated?

CL: The exchange rate of Tokens-to-cTokens only ever increases, and increases at a rate that exactly accounts for the interest earned by suppliers of the underlying “Tokens”. If on Day 1 you supply 100 stablecoins and receive 100 cStablecoins, for example, and the average supply interest rate for those stablecoins over a one-year period is 10%, then while on Day 1 the cStablecoin:stablecoin exchange rate is 1:1, one year later the exchange rate will be 1 cStablecoin:1.1 stablecoins, and your 100 cStablecoins will enable you to receive 110 stablecoins.

(These numbers are illustrative; the actual numbers implemented in the protocol are slightly different but the concept is identical).

JG: Clearly cTokens are core to the Compound experience not only for lenders, but also for borrowers, as borrowers must put up cTokens as collateral for their loan. How does this work on the borrowers end and what determines their borrowing capacity?

CL: Users interested in borrowing from Compound must be holding some cTokens, which proves they have collateral supplied to Compound.

cTokens can be acquired either by directly supplying assets to Compound, or on exchanges such as Uniswap.

The amount and type of cTokens a user holds determines the amount of assets they can borrow, based on how much and what type of collateral they have secured in Compound.

JG: Compound uses a “collateral factor” to help determine how much collateral a borrower will have to put up in order to secure their loan. Can you explain the concept of a “collateral factor” in more detail?

CL: Different crypto assets have different price volatility, trading volume, and other characteristics — they can be more or less valuable as collateral securing borrowed assets on Compound, based on those characteristics.

The collateral factor of an asset indicates the % of that asset’s value a user may borrow. Collateral factors are always < 1.0, which means all borrowing is required to be over-collateralized.

JG: How does the liquidation of under-collateralized or past due loans work on Compound and who are the market participants involved?

CL: When a borrower’s borrow-to-collateral position no longer satisfies the amount of over-collateralization required by the collateral factor(s), due to price movements of the collateralized or borrowed asset(s), the borrower’s position is immediately available to be liquidated, by anyone.

Anyone may repay some portion of the borrower’s open loan, and receive an equivalent value of the borrower’s supplied collateral, plus 5%. This creates an arbitrage opportunity that has incentivized a vibrant community of individuals, crypto hedge funds, and programmatic bots to act as liquidators of inappropriately collateralized loans.

There is no concept of a past-due loan on Compound — borrowers may keep their loans open for as long as they want, so long as they continue to have sufficient collateral supplied to Compound. Here is a manual liquidation dashboard one of our community members built, and here is a guide to building a bot written by another community member.

JG: How does Compound calculate interest rates on available money markets and how often do they change?

CL: Each market’s interest rate is determined by an algorithm that looks at the % of liquidity that is available in the market, and adjusts interest rates in real-time to make borrowing more expensive and supplying more profitable when liquidity is low, or to make borrowing cheaper and supplying less profitable when liquidity is high.

These interest rates can adjust as often as every Ethereum block transaction — every 15 seconds. Here is a dashboard that shows the interest rate algorithms implemented for each market.

Thank you to Calvin for answering our questions. If you are interested in learning more about Compound, you can visit their website here. Stay up to date on all things Compound by following them on Twitter.

Any correspondence relating to regulated securities products or services will be deemed to be sent by, addressed to, or related to the activities of EC Securities LLC (“ECS”), a registered broker-dealer, member FINRA/SIPC. Any correspondence relating to cryptocurrency products or related services will be deemed to be sent by, addressed to, or related to the activities of CoinList Markets LLC (“CLM”). Any correspondence relating to token sale technology services will be deemed to be sent by, addressed to, or related to the activities of CoinList Services LLC (“CLS”). ECS, CLM and CLS are wholly owned subsidiaries of Amalgamated Token Services, Inc. (together with its subsidiaries, “CoinList”). This email is subject to terms available here.

Investments are risky and may lose value. Privately placed securities and investments are not FDIC or SIPC insured. EC Securities LLC does not offer legal or tax advice; consult your own advisors.

Certain services may be limited to residents of certain jurisdictions, and certain disclosures are required in certain jurisdictions, available here.

Potential investors must conduct their own due diligence of any issuer, cryptocurrency, token or token-based security. Investing in cryptocurrencies, tokens and token-based securities is highly risky and may lead to total loss of investment. Use of the site is subject to certain risks, including but not limited to those listed here.

This email contains external links to third-party content and information provided by token issuers (content hosted on sites unaffiliated with CoinList). While CoinList uses reasonable efforts to obtain information from token issuers which it believes to be reliable, CoinList makes no representations whatsoever regarding any third-party content/sites that may be accessible directly or indirectly from this email. Linking to these third-party sites in no way implies an endorsement or affiliation of any kind between CoinList and any third party. The information and opinions contained in this post are subject to change without notice.

Confidentiality Notice: This email transmission, including any documents accompanying it, may contain confidential information belonging to the sender which is protected by privilege. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this transmission in error, please immediately notify us. Thank you for your assistance.

--

--

Justin Gregorius
CoinList

Business Operations @CoinList. Founder of the Cryptocurrency Club at Boston College