Contract Storage

Global Storage

The global storage of the dVOI contract stores the following values:

fieldtypedescription
updatable_byByte (address)Administrator address field. Power to update the contract code. When set to the zero address: the code is immutable. While this is set: the admin can rug.
fee_adminByte (address)Operator address field. Has the power to 1) withdraw collected fees 2) update fee_rate and mint_time_lock parameters (with a 1 week time lock and 3) change the fee_admin
next_params_updateByteScheduled time-locked updates of fee_rate and/or mint_time_lock parameters. Structure documented here.
fee_rateNumberFee rate in permille. E.g. 185 means fees of 18.5% on all distributed rewards
mint_time_lockNumberMint vesting period in seconds
init_balanceNumberInitial seed balance of contract escrow. 1 VOI. Used to calculate balances and rewards.
circulatingNumberCirculating dVOI (including vesting dVOI). Used in rate calculations.
withdrawable_balanceNumberVOI balance available to withdraw by redeeming dVOI. Used in rate calculations.
fees_balanceNumberAccumulated protocol fees. Withdrawable by "fee admin".
last_known_balanceNumberThe last escrow balance seen by the contract. Used to calculate when rewards have been distributed before a mint or a redeem.

Box Storage

Boxes are used to store users' vesting dVOI.

The box name is the user's address. The value is a concatenation of:

  • [uint32] vesting timestamp
  • [uint64] dVOI amount
  • [uint64] amount of VOI paid. Used for cancelling vesting & refunding.