What you can do
| save-usds | Deposit USDS to earn the Sky Savings Rate | USDS.approve(sUSDS, amount), then sUSDS.deposit(amount, receiver) |
| withdraw-usds | Withdraw USDS from sUSDS | sUSDS.withdraw(assets, receiver, owner) for an exact USDS amount, or sUSDS.redeem(shares, receiver, owner) for an exact share amount |
| check-yield | Read the current rate and a position value | convertToAssets(1e18) gives USDS per sUSDS; multiply the sUSDS balanceOf by that rate for the USDS value |
The savings rate is set by Sky governance and can change at any time.
sUSDS is issued by Sky, not Spark. Spark documents the token, but Sky controls the contract and its parameters.
sUSDS value rises against USDS over time. Track value with convertToAssets rather than by the raw token balance.
Only the Ethereum sUSDS contract has the ERC-4626 functions. The cross-chain sUSDS tokens on other chains are bridged tokens without them.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).sUSDS (Savings USDS)vault on ethereum0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD
write deposit(uint256,address)
ERC-4626 deposit. Arguments: USDS amount in wei, receiver. Approve sUSDS for the amount first. Mints sUSDS shares to the receiver and returns the shares minted.
write deposit(uint256,address,uint16)
Same as deposit with a referral code as the third argument (0 for none).
write mint(uint256,address)
ERC-4626 mint of an exact share amount. Pulls the USDS needed for those shares. Approve sUSDS for enough USDS first.
write withdraw(uint256,address,address)
ERC-4626 withdraw of an exact USDS amount. Arguments: assets, receiver, owner. Burns the owner's shares. Caller needs an allowance if it is not the owner.
write redeem(uint256,address,address)
ERC-4626 redeem of an exact share amount. Arguments: shares, receiver, owner. Returns the USDS sent. Caller needs an allowance if it is not the owner.
read convertToAssets(uint256)
USDS value of a share amount. Use it to read the current sUSDS to USDS rate.
read convertToShares(uint256)
sUSDS shares for a USDS amount.
read previewDeposit(uint256)
Shares that a deposit of the given USDS amount would mint right now.
read previewRedeem(uint256)
USDS that redeeming the given shares would return right now.
read maxWithdraw(address)
Largest USDS amount the owner can withdraw right now.
read totalAssets()
Total USDS held by the vault, in wei.
read asset()
Underlying asset address (USDS).
read balanceOf(address)
sUSDS share balance of an address. Multiply by convertToAssets to get the USDS value.
write approve(address,uint256)
Approve a spender for an sUSDS amount. Needed before withdraw or redeem by a third party.
write permit(address,address,uint256,uint256,uint8,bytes32,bytes32)
EIP-2612 signed approval for sUSDS: owner, spender, value, deadline, v, r, s.
USDStoken on ethereum0xdC035D45d973E3EC169d2276DDab16f1e407384F
read balanceOf(address)
USDS balance of an address in wei.
write approve(address,uint256)
Approve a spender for a USDS amount. Needed before sUSDS.deposit or mint.
write transfer(address,uint256)
Transfer USDS to a recipient.