Save Wrapper

The Save Wrapper bundles utility functions together to simplify multiple interactions with mStable's smart contract calls into one single call. This contract is immutable.

Functions

saveAndStake()

function saveAndStake (address _mAsset, address _save, address _vault, uint256 _amount) external

Simply saves an mAsset and then into the vault

saveAndStake()

function saveAndStake (address _mAsset, address _save, address _vault, uint256 _amount, address _referrer) external

Simply saves an mAsset and then into the vault

saveViaMint()

function saveViaMint (address _mAsset, address _bAsset, address _save, address _vault, uint256 _amount, uint256 _minOut, bool _stake) external

Mints an mAsset and then deposits to Save/Savings Vault

saveViaMint()

function saveViaMint (address _mAsset, address _bAsset, address _save, address _vault, uint256 _amount, uint256 _minOut, bool _stake, address _referrer) external

Mints an mAsset and then deposits to Save/Savings Vault

saveViaSwap()

function saveViaSwap (address _mAsset, address _save, address _vault, address _feeder, address _fAsset, uint256 _fAssetQuantity, uint256 _minOutputQuantity, bool _stake) external

Swaps fAsset for mAsset and then deposits to Save/Savings Vault

saveViaSwap()

function saveViaSwap (address _mAsset, address _save, address _vault, address _feeder, address _fAsset, uint256 _fAssetQuantity, uint256 _minOutputQuantity, bool _stake, address _referrer) external

Swaps fAsset for mAsset and then deposits to Save/Savings Vault

saveViaUniswapETH()

function saveViaUniswapETH (address _mAsset, address _save, address _vault, address _uniswap, uint256 _amountOutMin, address[] _path, uint256 _minOutMStable, bool _stake) external

Buys a bAsset on Uniswap with ETH, then mints imAsset via mAsset, optionally staking in the Boosted Savings Vault

saveViaUniswapETH()

function saveViaUniswapETH (address _mAsset, address _save, address _vault, address _uniswap, uint256 _amountOutMin, address[] _path, uint256 _minOutMStable, bool _stake, address _referrer) external

Buys a bAsset on Uniswap with ETH, then mints imAsset via mAsset,optionally staking in the Boosted Savings Vault

estimate_saveViaUniswapETH()

function estimate_saveViaUniswapETH (address _mAsset, address _uniswap, uint256 _ethAmount, address[] _path) external returns (uint256 out)

Gets estimated mAsset output from a WETH > bAsset > mAsset trade

Last updated