xUSDL
Token contract for xUSDL (staked USDL)
Contract
This is the main ERC20 token contract for xUSDL, the staked version of USDL. xUSDL represents a pool of USDL that increases or decreases with funding payments on integrated derivative dexes.
Public Write Functions
deposit
Function purpose: msg.sender mints xUSDL by depositing USDL.
amount
Amount of USDL to be deposited.
USD, 18 decimals
shares
Amount of xUSDL minted.
xUSDL, 18 decimals
withdraw
Function purpose: msg.sender claims USDL by burning xUSDL.
shares
Amount of xUSDL to be burned.
xUSDL, 18 decimals
amount
Amount of USDL claimed.
USD, 18 decimals
withdrawTo
Function purpose: msg.sender claims USDL to a given address by burning xUSDL.
to
Address where claimed USDL will be sent to.
Address
shares
Amount of xUSDL to be burned.
xUSDL, 18 decimals
amount
Amount of USDL claimed.
USD, 18 decimals
Public View Functions
pricePerShare
Function purpose: view amount of USDL that can be claimed for 1 xUSDL.
price
Amount of USDL that can be claimed for 1 xUSDL.
USD, 18 decimals
balance
Function purpose: view amount of USDL that is held in the xUSDL staking contract.
balanceAmount
Amount of USDL that is held in the xUSDL staking contract.
USD, 18 decimals
Restricted Functions
Restricted functions can only be called by owner of contract, which will be a multi sig.
updatePeriphery
This function allows Lemma to update the periphery contract address. The periphery contract is used for actions like minting and staking USDL in the same transaction when users deposit assets in the basis trading vault. This contract is immutable. It has the privilege to bypass the wait time required to unstake xUSDL without waiting.
updateLock
This function allows Lemma to update the duration of the time lock for unstaking. The time lock is calculated by looking at the number of blocks produced after a user deposits.
Last updated