Y2K Finance
  • 🎬Overview
  • Products
    • πŸ’₯Earthquake
      • Mechanics
      • Determining Strike Prices
      • Hedge Pricing
      • Contracts
        • Developer Info
        • Addresses
        • Subgraph
    • Developer Info
    • πŸ‘·β€β™‚οΈEarthquake Builder program
      • πŸ‘©β€πŸ’»Builder Info
        • Technical Overview Self-Insured Vault (SIV) Contract
        • Technical Overview of the Yield Source Contract
        • Technical Overview of the InsuranceProvider Contract
      • πŸ“šGuides
        • YieldSource examples
    • πŸ”₯Wildfire
    • πŸ—ΊοΈRoadmap
  • Tokenomics
    • πŸ™‚Y2K
    • πŸ”“vlY2K
    • πŸ’£Vault Tokens
    • πŸͺ™Tokenomics/Distribution
  • HOW-TO GUIDES
    • 🏎️Turbo Options
    • 🧠Vault Strategies
      • ❓FAQ's
      • πŸ—ΊοΈHow To Use
      • πŸ—οΈUI Breakdown
    • πŸ’°Claiming Rewards
    • πŸ’₯V2 User Guide
    • 🧯Y2K App - UI V2
      • πŸ’ΉMarkets Page
      • πŸ†ŽMarket Type Page
      • πŸ“ΌAsset Page
      • 🧚Quick Mint
      • πŸ…My Portfolio
  • Learn More
    • πŸ”Audits
    • πŸ“©Borrowing & Lending Using $Y2K
    • πŸ’±Change log
    • πŸ”΄Disclaimers
    • ⬆️Earthquake V2 FAQ
    • πŸ‘Useful Links
Powered by GitBook
On this page
  1. Products
  2. Earthquake Builder program
  3. Builder Info

Technical Overview of the Yield Source Contract

PreviousTechnical Overview Self-Insured Vault (SIV) ContractNextTechnical Overview of the InsuranceProvider Contract

Last updated 1 year ago

Yield Source

We have introduced the IYieldSource interface as a standardized approach to managing yield sources. The interface acts as a conduit between the SIV and the actual yield source. Typically, the IYieldSource operates on behalf of the SIV; hence, it's crucial for the SIV to hold ownership of the IYieldSource implementation.

One critical feature of the IYieldSource implementation is the ability to convert the generated yield into a payment token and transfer it back to the SIV. Our goal is to give developers flexibility in managing this implementation. They can choose suitable yield aggregators and determine the allocation of yield for insurance purchases.

yieldToken

address of reward token

sourceToken

address of yield-bearing asset

function pendingYield()

returns the pending yield, which is the amount of yieldToken currently available to be claimed by the contract.

function pendingYieldInToken(address outToken)

estimates the amount of outToken that can be obtained by harvesting the yield.

function totalDeposit()

retrieves the total amount of sourceToken currently deposited.

function deposit(uint256 amount)

is used to transfer sourceToken from the SIV to the Yield Source contract, where yield strategy can be implemented like staking.

function withdraw(uint256 amount, bool claim, address to)

can only be called by owner (SIV), used to withdraw sourceToken.

function claimAndConvert( address outToken, uint256 amount)

is used to claim yield and execute yield harvesting strategy and then transferred to the SIV.

Example implementation:

πŸ‘·β€β™‚οΈ
πŸ‘©β€πŸ’»
Stargate LP staking rewards