Token Accounts
Important SPL token accounts in the Nezha smart contract
Pending deposit account
When a user creates an increase-stake request, they deposit the stake increase to this account. Later, when the request is approved and executed, the value is moved to the deposit vault.
Deposit account
This is where the total staked funds reside. These funds are used for farming according to the cycle of the epoch.
Treasury account
If an investment (farming) cycle ends with profit, a share of the profit is moved to this vault. The amount is determine by a parameter submitted into the contract but bounded within the smart contract. The funds here can be directly withdrawn by an admin, and can be thought of as a protocol profit share.
Insurance account
When a yield farming cycle ends with profit, a share of the profit is moved to this vault. The amount moved to the insurance account is determined based on a formula in the smart contract with an input parameter called the risk factor. The risk factor is bounded in the smart contract so the insurance cost cannot exceed an agreed amount. The funds are used to pay and insurance provider for insuring the jackpot. An admin may directly withdraw the value and use it to pay to the insurer outside the scope of the contract.
Prize accounts
There are three prize accounts, one for each of the prize tiers, including tier 1 (the Jackpot). When a yield farming cycle ends with profit, a share of the profit is split between the tier 2 and tier 3 accounts. Tier 1 (the Jackpot) is funded directly from the insurer. The funds in these accounts can then be allocated to winners according to the ticket matching rules. Winners and the amount of their winnings are recorded in a winner state account and they are marked as claimed when appropriate.
Last updated