π©βπ»Builder Info
Last updated
Last updated
The architecture can be visualized with the help of the diagram linked below: Architecture Diagram
Source Code The architecture consists of three main components:
SelfInsuredVault (SIV): The SIV functions as a depository for a variety of yield-bearing assets, leveraging their yield to purchase insurance. In the occurrence of an earthquake event, the ensuing payout are distributed back to the users.
YieldSource: This encapsulates the implementation of IYieldSource and other actual yield sources like farming shares and other yield-bearing assets.
InsuranceProviders: These contracts serve as bridges between the SIV and earthquake vaults, facilitating deposit and withdrawal into an earthquake epoch.
Interacting with the contracts requires understanding and familiarity with the structure and function of each contract. Before you proceed, we recommend familiarizing yourself with our documentation on Vaults, Markets, and Epochs.
Here's a step-by-step guide to using these contracts:
Configuring Markets: As an admin of the SIV, you can add multiple markets with custom weights. The weights help calculate the purchase amount for insurance.
Depositing into the SIV: To mint shares in the SIV, you must deposit yield-bearing assets into the vault. This deposit operation transfers the assets to the YieldSource contract.
Purchasing Insurance: The process is initiated by the admin. It involves claiming the yields from the Yield Source and depositing them into the next provided epoch.
Claiming Earthquake Payout: Once the epoch is resolved, the yields can be claimed by anyone and will be allocated to the users entering the vault before the epoch started.