IMakerRouter
Methods
swapAllFeiForDai
function swapAllFeiForDai(address to) external nonpayable
Function to swap all of FEI balance to DAI
Parameters
Name | Type | Description |
---|---|---|
to | address | the address the DAI should be sent to once swapped |
swapAllFeiForUsdc
function swapAllFeiForUsdc(address to) external nonpayable
Function to swap all of FEI balance to USDC
Parameters
Name | Type | Description |
---|---|---|
to | address | the address the USDC should be sent to once swapped |
swapAllFeiForUsdcAndDai
function swapAllFeiForUsdcAndDai(address usdcTo, address daiTo, uint256 ratioUSDC) external nonpayable
Function to swap all FEI balance for both DAI and USDC
Parameters
Name | Type | Description |
---|---|---|
usdcTo | address | the address the USDC should be sent to once swapped |
daiTo | address | the address the DAI should be sent to once swapped |
ratioUSDC | uint256 | the ratio of the DAI received we would like to swap to USDC - in basis point terms |
swapFeiForDai
function swapFeiForDai(uint256 amountFeiIn, uint256 minDaiAmountOut, address to) external nonpayable
Function to swap from FEI to DAI
Parameters
Name | Type | Description |
---|---|---|
amountFeiIn | uint256 | the amount of FEI to be deposited |
minDaiAmountOut | uint256 | the minimum amount of DAI expected to be received |
to | address | the address the DAI should be sent to once swapped |
swapFeiForUsdc
function swapFeiForUsdc(uint256 amountFeiIn, uint256 minDaiAmountOut, address to) external nonpayable
Function to swap from FEI to USDC
Function will swap from FEI to DAI first then DAI to USDC
Parameters
Name | Type | Description |
---|---|---|
amountFeiIn | uint256 | the amount of FEI to be deposited |
minDaiAmountOut | uint256 | the minimum amount of DAI expected to be received from FEI PSM |
to | address | the address the USDC should be sent to once swapped |
swapFeiForUsdcAndDai
function swapFeiForUsdcAndDai(uint256 amountFeiIn, uint256 minDaiAmountOut, address usdcTo, address daiTo, uint256 ratioUSDC) external nonpayable
Function to swap for both DAI and USDC
Function will swap from FEI to DAI first then DAI to USDC
Parameters
Name | Type | Description |
---|---|---|
amountFeiIn | uint256 | the amount of FEI to be deposited |
minDaiAmountOut | uint256 | the minimum amount of DAI expected to be received |
usdcTo | address | the address the USDC should be sent to once swapped |
daiTo | address | the address the DAI should be sent to once swapped |
ratioUSDC | uint256 | the ratio of the DAI received we would like to swap to USDC - in basis point terms |
withdrawERC20
function withdrawERC20(address token, uint256 amount, address to) external nonpayable
Function to withdraw tokens to an address
Parameters
Name | Type | Description |
---|---|---|
token | address | the token to withdraw |
amount | uint256 | the amount to send |
to | address | the address the token should be sent to |