Understanding the Compound Finance Formula
Compound Finance is a decentralized lending protocol built on the Ethereum blockchain. It allows users to earn interest on their cryptocurrency holdings by supplying them to a lending pool, and to borrow cryptocurrencies by providing collateral. A key element in understanding Compound is the formula that governs interest rates and how interest accrues.
The Core Formula: Interest Rate Calculation
Compound’s interest rates are algorithmically determined by the supply and demand for each asset within its lending pools. The utilization ratio is the primary driver of interest rate changes. The formula, at its heart, uses a piecewise function based on this utilization ratio. Utilization ratio, denoted as U, is defined as:
U = Total Borrows / (Total Cash + Total Borrows)
Where:
- Total Borrows: The total amount of the asset currently borrowed from the pool.
- Total Cash: The amount of the asset currently supplied to the pool but not yet borrowed.
The interest rate model then uses this utilization ratio, U, to calculate the borrow rate. A simplified representation of this calculation might look like this (note that the actual formula can be more complex and is subject to governance changes):
Borrow Rate = Base Rate + Multiplier * U
Where:
- Base Rate: A minimum interest rate applied regardless of utilization.
- Multiplier: A factor that determines how much the interest rate increases as utilization increases.
A higher utilization rate (closer to 1) indicates higher demand for borrowing and lower supply, which results in a higher borrow rate. This higher borrow rate incentivizes more users to supply their assets to the pool, increasing the supply and eventually lowering the utilization rate and the borrow rate. The supply rate is typically a fraction of the borrow rate, reflecting the platform’s margin and incentives to borrowers.
Accruing Interest: Continuous Compounding
A key feature of Compound Finance is the near-continuous compounding of interest. Interest accrues with every Ethereum block, which is approximately every 12 seconds. While the specific implementation might vary, conceptually, Compound uses a continuous compounding model. The change in the exchange rate (between cTokens and the underlying asset) happens with each block. This rate represents the interest rate accrued during this short interval.
This continuous compounding is reflected in the increasing value of the cToken. When you supply an asset to Compound, you receive cTokens representing your share of the lending pool. The value of these cTokens gradually increases over time as interest accrues. You can redeem these cTokens for the underlying asset plus the accumulated interest.
Because interest accrues at a high frequency, it effectively mimics continuous compounding. This leads to an exponential growth in the value of your deposited assets over time. The power of compounding becomes particularly evident over longer periods.
Implications and Considerations
The algorithmic interest rate model in Compound Finance provides transparency and dynamism. It adjusts to market conditions in real-time, aiming to maintain a balance between supply and demand. However, it’s important to note that interest rates can fluctuate significantly, especially during periods of high volatility or market stress. Understanding these formulas is crucial for users to make informed decisions about supplying and borrowing assets on the Compound platform. Furthermore, governance proposals can alter parameters within these equations, impacting interest rates and ultimately, profitability.