πŸ€–XaiService

Overview

This contract used as accountant and manager of stake.

This contract uses EIP-7201 to ensure storage integrity using a transparent proxy pattern

Structs

Misc

enum LockAction {
    Delegate,
    DelegateAndStake
}

State

struct State {
    address locker;
    address shareToken;
    address liquidToken;
    address strategist;
    uint64 feePercent;
    bytes32[15] __gap;
}

Service Pool

Views

Views

Preview token conversion

Liquidity

Used in case of conversion of XAI/alXAI to stXAI

Shares

Used in case of conversion of stXAI to XAI/alXAI

User Info

This function returns information about redemptions.

Functions

Locking

Both functions require pre-approved XAI or esXAI respectively.

Swap Delegation type

Both functions require pre-approved stXAI or alXAI respectively.

Redemption

Start Redemption

This function creates pending redemption request from stXAI/alXAI.

Function require pre-approved stXAI or alXAI respectively to fromLiquid flag.

Cancel Redemption

Pending

Fulfilled

In both cases, you can get data from userInfo view.

The toLiquid flag specifies the type of output token.

Redeem

You can get data from userInfo view.

Last updated