Staking Pool

stake

stake(uint256 amount)

Users can pledge funds in a contract to be used as proof of subscription.

Parameters:

nametypedescription

amount

uint256

Number of tokens applied for

unstake

unstake()

Users can withdraw their funds in full at any time before the end of the collection cycle.

getStakingInfo

getStakingInfo() returns(Issue[] memory)
    struct Issue {
        address user;
        uint issueAmount;
        uint issueTime;
        bool isStaking;
    }

Query the valid subscription information of the user's current turn

Parameters:

nametypedescription

user

address

User address for subscription

issueAmount

uint

Number of tokens spent by the user to subscribe for tokens

issueTime

uint

Time for users to subscribe

isStaking

bool

Whether or not the funds were raised

swap (removed during audit)

swap(uint256 amount)

Users of historical batches can sell their RWA shares to those who want to buy them at the moment by using this function, which can be executed if there are enough funds for the current round of subscriptions and they have not been withdrawn.

Parameters:

nametypedescription

amount

uint

Number of RWA assets to be converted

setRate

setRate(uint _rate)

Set the exchange ratio of swap, 10000 is 100%, only administrator can set it.

Parameters:

nametypedescription

_rate

uint

Trading rate,10000 = 100%

withdraw

withdraw() 

Calling this function extracts the issueToken from the contract and can only be called by administrators.

Query method

nametypedescription

issueToken

address

Token used for user subscription

redeemToekn

address

RWA tokens available to users

issues

Issues

Requisition Record

pendingLiquidation

uint

Number of subscription tokens to be cleared

rate

uint

swap exchange rate,10000==100%

Last updated