System Architecture
The Y2K Markets operate in the Arbitrum Ethereum Network environment.

Used by Keepers to trigger the events that condition the Vaults.
TriggerEndEpoch => function that if the epoch has ended, will transfer the Hedge Vault premium to Risk 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 the Hedge Vault premium with Risk 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.
Used by Users to mint Erc1155 positions where the ID of said token is represented by the Unix Timestamp of the last second of an Insurance Epoch.
Deposit => Transfers WETH and mints 1 to 1 an ERC1155 token corresponding to that epoch.
Withdraw => Takes a fee if there is profit in this position. And calculates how much the user is entitled to, correspondent to, how many % shares that user had of this Vault, before the insurance epoch began.
Used by Y2K admins to create Markets and correspondent Vaults. And deployment of new epochs for already created Markets.
Users after minting Vault Market tokens (ERC1155 tokens) can deposit these tokens inside StakingRewards to earn Y2K tokens. This is made to incentivize deposits in certain Vault Market Positions, and Y2K token rewards will vary depending on the Market conditions.
Last modified 7mo ago