Vault
Overview
The Vault is the primary smart-contract deployed across all networks supported by Enjoyoors. It's main function is to collect tokens allowed for deposits into the protocol from users. Users who have staked their tokens can request withdrawals at any time.
The Withdrawal Approver is a smart-contract responsible for managing the withdrawal logic of tokens staked in the Vault. The address of this contract is provided to the Vault and can be updated to any other implementation that adheres to the required interface. In the current implementation, the contract administrator sets the withdrawal delay period (in seconds), which defines the time required to complete a withdrawal after it has been requested.
Methods
deposit
- this method allows stakers to stake tokens supported by the protocol. It accepts the token address and the amount as parameters.requestWithdrawal
- this method must be called to initiate the withdrawal of staked tokens. It requires the token address and the amount as parameters. In response, aWithdrawalRequested
event containing therequestId
will be emitted.claimWithdrawal
- after a specified period (configurable parameter) has passed since callingrequestWithdrawal
, the tokens can be claimed by providing the correspondingrequestId
as a parameter.
Contract addresses
Monad (Testnet)
0x9FacfE94E5f0AD42672eC75a348a376B13Da86e1
0x96f47f31Ac297Ab6CFc2d9aC066c631efcB7c65B
ABI
GitHub Repository
Last updated