Single-Sided Staking
Single-sided staking operations for the SAUCE HTS token
Outlined below are the common operations associated with single-sided staking:
- Get xSAUCE amount from SAUCE
- Stake SAUCE tokens for xSAUCE
- Get SAUCE amount from xSAUCE
- Unstake xSAUCE tokens for SAUCE
Contract ID: Mothership
Refer to Single-sided staking for a more detailed documentation.
Get xSAUCE Amount from SAUCE
Get the calculated xSAUCE amount from a given SAUCE amount.
Function name: sauceForxSauce ⛽ No gas cost
Parameter Name | Description |
---|---|
uint256 _sauceAmount | SAUCE amount in its smallest unit |
Code Overview
Stake SAUCE Tokens for xSAUCE
Stake any amount of SAUCE tokens in exchange for xSAUCE tokens.
Function name: enter ⛽ Recommended gas: 100,000 gwei (~ $0.009 USD)
Parameter Name | Description |
---|---|
uint256 _amount | The amount of SAUCE to stake in its smallest unit |
A spender allowance for the Mothership contract is required for the SAUCE token.
Ensure that the client has the xSAUCE token ID associated beforehand.
To calculate the amount of xSAUCE tokens a user will receive from a given SAUCE amount, use the sauceForXSauce() Solidity function in MotherShip.sol. Alternatively calculate the amount using the current SAUCE/xSAUCE ratio value.
Code Overview
Get SAUCE Amount from xSAUCE
Get the calculated SAUCE amount from a given xSAUCE amount
Function name: xSauceForSauce ⛽ No gas cost
Parameter Name | Description |
---|---|
uint256 _xSauceAmount | xSAUCE amount in its smallest unit |
Code Overview
Unstake xSAUCE Tokens for SAUCE
Unstake any amount of xSAUCE tokens in exchange for SAUCE tokens.
Function name: leave ⛽ Recommended gas: 100,000 gwei (~ $0.009 USD)
Parameter Name | Description |
---|---|
uint256 _share | The amount of xSAUCE to unstake in its smallest unit |
To calculate the amount of SAUCE tokens a user will receive from a given xSAUCE amount, use the xSauceForSauce() Solidity function in MotherShip.sol. Alternatively calculate the output amount using the current SAUCE/xSAUCE ratio value.
Ensure that the client has the SAUCE token ID associated beforehand.