What you can do
| mint-usdai | Deposit a supported stablecoin to mint USDai | approve the deposit token to USDai, then USDai.deposit(depositToken, amount, minUsdai, recipient) |
| redeem-usdai | Burn USDai for a supported stablecoin | USDai.withdraw(withdrawToken, usdaiAmount, minOut, recipient) |
| stake-susdai | Stake USDai to earn sUSDai yield | approve USDai to sUSDai, then sUSDai.deposit(usdaiAmount, receiver) |
| unstake-susdai | Withdraw staked USDai (asynchronous) | sUSDai.requestRedeem(shares, controller, owner), wait until claimableRedeemRequest shows shares, then sUSDai.redeem(shares, receiver, controller) |
sUSDai redemption is asynchronous. A request is queued and can only be claimed after it is serviced, so funds are not available right away.
USDai and sUSDai are upgradeable ERC-1967 proxies. Implementations can change, and the contracts have pause and role-based admin functions.
Yield comes from GPU-backed loans. Borrower default, collateral loss and liquidation can reduce returns.
The docs describe USDai as backed by PYUSD. Peg and reserve risk apply to the stablecoin.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).USDaitoken on arbitrum0x0A1a1A107E45b7Ced86833863f482BC5f4ed82EF
write deposit(address,uint256,uint256,address)
Mint USDai by depositing a supported stablecoin (PYUSD per the docs). Arguments: depositToken (the token address), depositAmount in its smallest unit, usdaiAmountMinimum (the call reverts below this USDai amount), recipient. Approve USDai to spend depositAmount of the deposit token first.
write withdraw(address,uint256,uint256,address)
Burn USDai and receive a supported stablecoin. Arguments: withdrawToken, usdaiAmount to burn, withdrawAmountMinimum (revert protection), recipient.
read balanceOf(address)
USDai balance of an address, in 18 decimals.
write approve(address,uint256)
Standard ERC-20 approval. Approve the spender before deposit or stake calls that pull USDai.
sUSDai (staked USDai)vault on arbitrum0x0B2b2B2076d95dda7817e785989fE353fe955ef9
write deposit(uint256,address)
Stake USDai and receive sUSDai shares. Arguments: amount of USDai in its smallest unit, receiver of the shares. Approve sUSDai to spend the USDai first. Use previewDeposit first to see the shares.
read previewDeposit(uint256)
Shares that a deposit of this many USDai would mint.
read convertToAssets(uint256)
USDai value of a number of sUSDai shares.
read totalAssets()
Total USDai assets backing sUSDai.
read maxRedeem(address)
Maximum shares the controller can redeem right now.
write requestRedeem(uint256,address,address)
Start an asynchronous redemption. Arguments: shares to redeem, controller (the address that can claim the redemption), owner (the address whose shares are used). The shares are queued, not paid out immediately.
read pendingRedeemRequest(uint256,address)
Shares still waiting in a redemption request, by redemption id and controller.
read claimableRedeemRequest(uint256,address)
Shares in a redemption request that are ready to claim now, by redemption id and controller.
write redeem(uint256,address,address)
Claim a serviced redemption. Arguments: shares to claim, receiver of the USDai, controller. Check claimableRedeemRequest first; this reverts if nothing is ready.