AllocPool

Alloc8 provides a sophisticated liquidity pool framework that supports the platform's leverage functionality. These Liquidity Pools (LPs) serve as the source of capital for traders and borrowers while offering passive income opportunities for liquidity providers (LPs) through dynamic interest mechanisms and Diesel tokens.


Liquidity Pools: Key Features

  1. Capital Provision:

    • Liquidity pools are open to anyone who wants to deposit funds, providing capital for traders to access leverage.

    • LPs are rewarded with Diesel tokens (ERC4626), representing their stake in the pool.

  2. Profitability:

    • LP profitability is directly tied to the utilization ratio:

      • Higher utilization (more funds borrowed) leads to higher interest rates, boosting LP returns.

    • Pools have risk parameters to ensure security and efficiency:

      • Allowed trading tokens.

      • Supported decentralized exchanges (DEXes).

      • Stablecoin-specific pools for reduced volatility.

  3. Dynamic Interest Rates:

    • Alloc8 uses a two-point linear extrapolation model to calculate the base interest rate.

    • The borrow rate increases as utilization rises, incentivizing repayments when liquidity is scarce.


Key Pool Parameters

  1. Expected Liquidity (EL(t)):

    • The theoretical amount of funds available in the pool if all borrowers repay their debts.

    • Updated dynamically as users add or remove liquidity or borrow/repay funds.

    EL(tn)=EL(tn−1)+B(tn−1)⋅r(tn−1)⋅(tn−tn−1)EL(t_n) = EL(t_{n-1}) + B(t_{n-1}) \cdot r(t_{n-1}) \cdot (t_n - t_{n-1})EL(tn​)=EL(tn−1​)+B(tn−1​)⋅r(tn−1​)⋅(tn​−tn−1​)

  2. Total Borrowed (B(t)):

    • Sum of all outstanding loans in the pool, excluding accrued interest: B(t)=∑biB(t) = \sum b_iB(t)=∑bi​

  3. Borrow Rate (r(t)):

    • The annual percentage yield (APY) paid by borrowers.

    • Determined by the interest rate model, which factors in:

      • Expected liquidity (EL(t)EL(t)EL(t)).

      • Available liquidity.

  4. Diesel Rate (d(t)):

    • Reflects the value of Diesel tokens, which LPs receive for their deposits.

    • Diesel tokens grow in value as the pool earns interest: d(t)={EL(t)Diesel Supply(t),if Diesel Supply>01,if Diesel Supply=0d(t) = \begin{cases} \frac{EL(t)}{\text{Diesel Supply}(t)}, & \text{if Diesel Supply} > 0 \\ 1, & \text{if Diesel Supply} = 0 \end{cases}d(t)={Diesel Supply(t)EL(t)​,1,​if Diesel Supply>0if Diesel Supply=0​

  5. Cumulative Index (CI(t)):

    • Tracks the value of borrowed money over time, accounting for interest accrual: CI(tn)=CI(tn−1)⋅(1+r(tn−1)⋅(tn−tn−1))CI(t_n) = CI(t_{n-1}) \cdot (1 + r(t_{n-1}) \cdot (t_n - t_{n-1}))CI(tn​)=CI(tn−1​)⋅(1+r(tn−1​)⋅(tn​−tn−1​))


Dynamic Rate Updates

The borrow rate (r(t)r(t)r(t)) and cumulative index (CI(t)CI(t)CI(t)) are updated dynamically whenever the pool state changes:

  1. Events That Trigger Updates:

    • Add Liquidity: Increases the pool's available liquidity.

    • Remove Liquidity: Reduces available liquidity.

    • Borrow Funds: Allocates liquidity to borrowers.

    • Repay Debt: Returns liquidity to the pool.

  2. Borrow Rate Calculation:

    • The borrow rate is recalculated based on pool utilization: r(tn)=calcInterestRate(EL(tn),Available Liquidity(tn))r(t_n) = \text{calcInterestRate}(EL(t_n), \text{Available Liquidity}(t_n))r(tn​)=calcInterestRate(EL(tn​),Available Liquidity(tn​))


Example: Pool Mechanics

Step-by-Step Pool Dynamics:

  1. Adding Liquidity:

    • An LP deposits 1,000 DAI into the pool.

    • Diesel tokens are minted based on the current Diesel rate (d(t)=1d(t) = 1d(t)=1).

    • Expected liquidity (ELELEL) increases.

  2. Borrowing Funds:

    • A borrower takes out a loan of 500 DAI.

    • B(t)B(t)B(t) increases to 500, and available liquidity decreases.

    • Borrow rate (r(t)r(t)r(t)) rises due to reduced liquidity.

  3. Accruing Interest:

    • Over time, interest accrues on borrowed funds: EL(tn)=EL(tn−1)+B(tn−1)⋅r(tn−1)⋅(tn−tn−1)EL(t_n) = EL(t_{n-1}) + B(t_{n-1}) \cdot r(t_{n-1}) \cdot (t_n - t_{n-1})EL(tn​)=EL(tn−1​)+B(tn−1​)⋅r(tn−1​)⋅(tn​−tn−1​)

  4. Repaying Debt:

    • The borrower repays 500 DAI plus interest.

    • B(t)B(t)B(t) decreases, and available liquidity increases.

    • The diesel rate grows, reflecting LP earnings.


Diesel Tokens: LP Rewards

  • LPs earn through Diesel tokens, which grow in value as the pool earns interest.

  • Tokens can be redeemed for the underlying asset, including accrued interest.

  • Diesel rate stability is maintained through the insurance and rebalancing mechanism:

    • Positive PnL: Excess funds are added to the pool, increasing the Diesel token value.

    • Negative PnL: The treasury burns Diesel tokens to cover losses and maintain stability.


Conclusion

Alloc8’s liquidity pools are designed to maximize rewards for LPs while ensuring robust borrowing capabilities for traders. The dynamic rate updates, insurance mechanisms, and Diesel token model create a stable and efficient system for capital management in decentralized finance. 🚀

Last updated