Instructions
For users, there are several types of instructions available. Instructions allow users to manage liquidity and protect themselves from attacks related to swaps, minting, and burning LP tokens.
The following instructions exist:
SWAP - token exchange using the 1inch router.
tokenIn
address
Address of the input token for the swap
tokenOut
address
Address of the output token for the swap
amountIn
uint256
Amount of the input token
minAmountOut
uint256
Slippage protection
routerCalldata
bytes
Calldata for the 1inch router
BRIDGE - token bridging instructions from or to the Vault network.
token
address
Token for the bridge
amount
uint256
Amount of tokens
slippage
uint256
Slippage protection
bridgeAdapter
address
Bridge adapter address
value
uint256
Fee value
bridgeParams
bytes
Bridge parameters
SWAP_BRIDGE - a combination of SWAP and BRIDGE instructions.
tokenIn
address
Address of the input token for the swap
tokenOut
address
Address of the output token for the swap
amountIn
uint256
Amount of the input token
minAmountOut
uint256
Slippage protection
routerCalldata
bytes
Calldata for the 1inch router
bridgeAdapter
address
Bridge adapter address
value
uint256
bridgeParams
bytes
Bridge parameters
MIN_LIQUIDITY_DELTA - slippage protection. Specifies how much DEFII LP should be minted in exchange for the provided DEFII liquidity.
MIN_TOKENS_DELTA - specifies how many ERC20 tokens should be received. Indicates how many tokens should be received in exchange for DEFII LP. To use this instruction, you need to pass 2 arrays: 1) a list of all tokens for which you need to check the minimum token amount; 2) a list of all min liquidity delta values.
Last updated