Contracts
A collection of smart contracts for the Stackup platform.
Dev Blog
Deployed Contracts
See releases for deployed contracts of previous versions.
Savers Vault V1
Savers V1 is a smart contract for getting the optimal low-risk APY for stablecoins. Read more about it here.
TOKEN below can mean either DAI or USDC depending on the vault.
Deposit
function deposit(uint256 amount) external
This function allows an account to deposit a given amount
of TOKEN into Savers and receive interest accruing sTOKEN in return.
Before calling this function, make sure the relevant SaversVault
is approved as a spender for the correct amount on the TOKEN ERC20 contract.
Withdraw
function withdraw(uint256 amount) public
This function allows an account to burn a given amount
of their sTOKEN and receive TOKEN from the vault in return.
Withdraw Max
function withdrawMax() external
This is a helper function to allow an account to withdraw the full amount available. It is equivalent to calling withdraw(saversToken.balanceOf(msg.sender));
Savers Token
Savers Token (i.e sDAI and sUSDC) is an ERC20 token and represents an account's share of either the DAI or USDC vaults. It can be transferred to another account or redeemed at the relevant vault for an equivalent amount of DAI or USDC.