Loans

Borrowing:

  • Mechanism: Users can borrow USDC using YOLK as collateral.

  • Loan Terms:

    • Collateral Requirement: Users can borrow up to 99% of their YOLK's value in USDC (99% Loan-to-Value Ratio).

    • Duration: Minimum 1 day, Maximum 365 days.

    • Interest: Interest rates are calculated on a linear scale with a base rate of 0.05%. Interest is collected up front, or upon initiation of a loan, from the borrowed amount.

    • Liquidation: If a loan defaults, then the YOLK collateral is burned. Since loans are over-collateralized, burning the collateral causes the ratio of USDC per YOLK to increase. YOLK collateral from liquidated positions are burned collectively, every day, at 00:00 UTC.

Interest Rate Calculation and Example in Python:

def linear_interest_rate(days, slope, base_rate):
    """
    Calculate interest rate based on a linear model.
    
    :param days: Number of days for the loan term
    :param slope: Slope of the interest rate increase per day
    :param base_rate: Base interest rate (for 1 day or 0 days)
    :return: Interest rate in percentage
    """
    return slope * (days - 1) + base_rate  # Adjusting for 1-day base

# Example usage:
slope = 0.0548  # from our calculation above
base_rate = 0.05  # 0.05% for 1 day as an example
days = 10
interest_rate = linear_interest_rate(days, slope, base_rate)
print(f"The interest rate for a {days}-day loan is approximately {interest_rate:.2f}%")

Burning Example (Liquidation):

  • Let's say there is 100 YOLK tokens in existence, and there is 100 USDC tokens backing them on the contract. That means the price of 1 YOLK is 1 USDC. A user can take a loan that is 99% of their YOLK's value. In this case, they use 100 YOLK to borrow 99 USDC. The user fails to repay their loan on time, leading the position to be liquidated. 99.7% of the collateral, or 99.7 YOLK, is burned and the remaining 0.3%, or 0.3 YOLK, is distributed to LP incentives and the team. Since the user's collateral was all of the YOLK tokens in existence, the only YOLK tokens that remain are the 0.3 YOLK that were distributed. The user failed to repay the loan of 99 USDC, so there is now 1 USDC in the contract's backing. We can calculate the new price of YOLK by doing 1 USDC / 0.3 YOLK = 3.333... USDC. The price of every YOLK token has increased!

    • For simplicity, this example does not account for interest, which further increase USDC backing per YOLK.

Instant Default (Redeem YOLK for USDC):

  • Similar to how YOLK can be minted from the contract by depositing USDC, YOLK can also be burned for the underlying USDC:

    • The redemption process involves taking a single day loan against your YOLK and purposefully defaulting. This allows you to walk away with the underlying USDC while your YOLK is burned.

    • Instant defaults are subject to same 1% collateral premium and interest rates as other loans.

Last updated