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

  1. deposit - this method allows stakers to stake tokens supported by the protocol. It accepts the token address and the amount as parameters.

  2. 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, a WithdrawalRequested event containing the requestId will be emitted.

  3. claimWithdrawal - after a specified period (configurable parameter) has passed since calling requestWithdrawal, the tokens can be claimed by providing the corresponding requestId as a parameter.

Contract addresses

Vault
Withdrawal Approver

Monad (Testnet)

0x9FacfE94E5f0AD42672eC75a348a376B13Da86e1

0x96f47f31Ac297Ab6CFc2d9aC066c631efcB7c65B

ABI

Enjoyoors Vault ABI
Withdrawal Approver ABI

GitHub Repository

https://github.com/eq-lab/enjoyoors-evm-contracts

Last updated