Vaults

Formation (Formation.sol)

Formation contract is the starting point of Vault, investors can deposit stable coin and mint synthetic asset (nUSD) through this contract. The operation has the following steps:

function deposit(uint256 _amount)

Deposit stable coin into the Vault. The deposited stable coin will be put into yearn.finance (ETH) and Alpaca Finance (BSC) to generate yield.

function mint(uint256 _amount)

Mint nUSD up to 50% of deposited collateral.

function harvest(uint256 _vaultId)

Harvest from yearn.finance to reduce the loan in nUSD. If one deposits stable coins and did not take out nUSD, the borrowing limit for nUSD will increase proportionally to the yield generated.

function repay(uint256 _parentAmount, uint256 _childAmount)

Stable coins and nUSD have 1:1 pegging ratio. You can choose to pay down the nUSD with either currencies.

function withdraw(uint256 _amount)

Withdraw deposited stable coins in amounts up to 200% collateralization ratio.

function liquidate(uint256 _amount)

Liquidate the asset at any time. Formation will repay the nUSD debt with deposited stable coins and return any remaining collateral.

Last updated