XaiLocker Contract
Overview
This contract facilitates basic interactions with the XAI infrastructure, incorporating additional integrity checks to ensure secure operations.
All functions are designed to be invoked exclusively by the service contract.
The XaiLocker contract implements EIP-7201 to guarantee storage integrity through the transparent proxy pattern.
Structures
Misc
UnstakeRequest
RedemptionRequest
LockerInfo
UserInfo
Views
service
balance
This value is used to check the solvency of the contract to perform basic actions.
getUnstakeRequest
getRedemptionRequest
This view returns data from esXAI contract.
getUserRedemptionRequest
Functions
Locking
The lock functions are designed to interact exclusively with the service contract. They assume that the required amount of tokens will be sent beforehand when invoking the function. The function signatures include an unused address parameter to maintain potential backward compatibility.
lockXaiFor
Solvency check performed inside the XAI infrastructure.
lockEsXaiFor
The function checks that enough tokens have been received by the contract by comparing with the stored internal balance.
Redeeming
Start redemption
This function sends esXAI to the factory contract and initiates the redemption process for the specified duration.
Cancel redemption
This function cancels the specified request and returns the esXAI to the locker.
Complete redemption
This function completes the redemption process by transferring the output XAI to the specified user.
Staking
Staking
Start unstake
Complete unstake
Claim rewards
Last updated