⬜️ Terminologies & Calculation Methodology

There are many terminologies specific to DeFi and leveraged yield farming protocols that many users might not be very familiar with. Even amongst DeFi protocols, terminologies and calculations used can still vary greatly. As such, we believe it's worthwhile to explain the meanings of the key terms and calculations in Camel Finance, which we do below.

Total Value Locked

Total Value Locked (TVL) is a common metric within DeFi. It measures the total value of the capital invested into a protocol at a current time. For Camel Finance, we count the following elements within our TVL

  • Value of total LP tokens locked in the farms

  • Value of deposits that are not borrowed (the borrowed amount is already accounted for in the LP value)

Lending

Lending APR

  • The lending interest rate is a floating rate based on the utilization of the pool. We use a triple-slope interest model to optimize the borrowing rate. You can see our interest rate model here.

  • Lending APR accrues and auto-compounds in your ibToken. When withdrawing, you will see their value has grown above the base token, Learn more here.

  • Lending interest is compounded every second.

Protocol APR

  • Protocol APR comes from the performance fees of leveraged farms.

  • It accrues and auto-compounds into your ibToken just like lending interest.

Total APR/APY

  • The total APR is calculated by adding the APRs of Lending APR and Protocol APR.

  • The total APY is calculated based on the total APR assuming daily compound.

APY=(1+APR/365)3651APY = (1+APR/365)^{365}-1

ibToken

  • Please refer to ibToken section for more information.

Yield Farming

Yield Farming:

  • This part of the yield refers to income from liquidity incentives provided by AMM platforms. For example, QuickSwap provides QUICK token rewards for LPs in selected pools.

  • For example, we compound QUICK rewards for you by selling QUICK into MATIC/USDC and adding that back into your position as LP tokens. This yield will reflect in your position value rising over time.

  • The frequency of auto-compounding is not set. Our protocol will adjust the reinvest frequency using some heuristic method.

  • APR is calculated based on the value of QUICK rewards being distributed per block divided by the total value of reserves in the liquidity pool.

  • Given the high frequency of auto-compounding, farming yield APY is calculated using a continuous compounding formula.

Trading Fees:

  • QuickSwap charges 0.3% fees for every trade, which accrues to liquidity providers.

  • Trading fees APY is calculated using the average of the previous 7-days' actual trading volume.

Note: Data shown for trading fees is delayed due to a block sync issue on QuickSwap and may not reflect real APY.

Borrowing Interest:

  • Borrowing interest is the Lending APR multiplied by the utilization level of the pool, after taking out the 20% of Lending APR for protocol fees.

  • Hence, borrowing interest APR is a floating rate based on the utilization of the lending pool. We use a triple-slope interest model to optimize the borrowing interest. You can see our interest rate model here.

  • Interest is calculated and compounded every second.

  • APY shown is based on a continuous compounding formula.

Position Value

  • The total value of your farming position.

  • This shows the value of the underlying assets in your position if they were converted into your borrowed primitive (MATIC/USDC). This is what this position size would give you in the borrowed primitive after price impact and trading fees (though it includes debt value).

Debt Value

  • Total debt value of your farming position.

  • This value is the sum of your borrowed principal and accrued interest.

Equity Value

  • Equity Value is what you can expect to receive back if you close your position and choose to receive all the assets back in borrowed primitive.

  • Equity Value = Position Value - Debt Value.

Current APY

  • APY calculation follows the same formula discussed above and is based on the current leverage level.

Debt Ratio

  • Debt Ratio = Debt Value / Position Value

Liquidation Threshold

  • This is the Debt Ratio threshold for your position. Beyond this limit, your position could be liquidated.

Safety Buffer

  • This is the buffer between the current Debt Ratio and the Liquidation Threshold, aka your safe space.

Last updated

Was this helpful?