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
  • Source Code
  • Protocol Contracts
  • Controller
  • VaultFactory
  • Deposit
  • Withdraw
  • Carousel
  • Rollovers
  • CarouselFactory
  • Queue Deposits
  1. Products
  2. Earthquake
  3. Contracts

Developer Info

PreviousContractsNextAddresses

Last updated 1 year ago

Source Code

Protocol Contracts

Controller

Used by Keepers to trigger the events that condition the Vaults.

TriggerEndEpoch => function that if the epoch has ended, will transfer the Premium Vault deposit to Collateral Vault, and close that epoch.

TriggerDepeg => function that if the epoch has not ended and the oracle reports a price lower than the Vault Market strike price, will swap Collateral vault deposits with Premium vault, and close that epoch.

TriggerNullEpoch => function that if, after the insurance epoch has begun and one of the Vault Markets has zero deposits, will allow everyone to withdraw their deposits has there is no possibility to resolve this Market.

VaultFactory

Deposit

Withdraw

Withdraw fee in V2 is deducted when the vault is settled. The user's entitlement is then calculated based on the percentage of shares they had in the Vault before the insurance epoch began.

Carousel

Rollovers

CarouselFactory

Queue Deposits

is a token based on the ERC1155 standard. The position Id or epochId is now a hash composed of (marketId, epochBegin, epochEnd), which can be deterministically computed using the function on the contract.

Shares are minted 1 to 1, while depositAsset can be any ERC20 token as defined by the .

inherits the contract and introduces new functionalities: Rollovers, Queue Deposits, and Linear Information Tax.

Users can opt to rollover existing positions into the next available epoch using the function, specifying the epochId, shares, and receiver. To cease rollovers, users can invoke the function. Pending rollovers can be minted by anyone calling the function during an active deposit window.

is an extension of the VaultV2Factory contract. It differs in the creation of markets and configuration of epochs which are handled through and respectively.

A significant improvement is that y2k emissions can now be configured and distributed within each epoch, eliminating the need for deploying an extra contract.

V2 permits users to deposit at any time using the deposit function with an id of 0. A QueueItem is minted and later redeemed for a position in the next epoch deposit window. Any party can call the function during an active deposit window to redeem all stored QueueItems.

πŸ’₯
VaultV2
SemiFungibleVault
getEpochId
VaultFactoryV2
VaultFactoryV2
Carousel
VaultV2
enlistInRollover
delistInRollover
mintRollovers
CarouselFactory
createNewCarouselMarket
createEpochWithEmissions
StakingRewards
mintDepositInQueue
https://github.com/Y2K-Finance/Earthquake
LogoExcalidraw β€” Collaborative whiteboarding made easyExcalidraw
INTERACTIVE ARCHITECTURE DIAGRAM