StableSwap Router
Getter for the swap instance for the given token pair.
>>> swapRouter.getSwap()
outQ: '1680635143255664'
feeQ: '1682317460716'
Calculate all subsequent maximum output amounts of the asset given reserves following the
path
of token addresses given an input asset amount
.Calculate all subsequent minimum input amounts of the asset given reserves following the
path
of token addresses given an output asset amount
.Deposit
baseIn
amount of baseAddress
and quoteIn
amount of quoteAddress
to StableSwap pool of baseAddress
and quoteAddress
. It enforces the resulting LP token to be at least minLpOut
, the version
to be the current rebalance version, and the Unix timestamp deadline
after which the transaction will revert.Swap the exact
amountIn
of input tokens for as many output tokens as possible for recipient
, along the route determined by path
. The first element of path
is the input token, the last is the output token, and any intermediate elements represent intermediate pairs to trade through. If staking
is non-zero address, it further stakes the resulting output token to staking
contract for recipient
. It enforces the resulting output token to be at least minAmountOut
, every versions
to be the current rebalance version, and the Unix timestamp deadline
after which the transaction will revert.Receive the exact
amountOut
of output tokens for as few input tokens as possible for recipient
, along the route determined by path
. The first element of path
is the input token, the last is the output token, and any intermediate elements represent intermediate pairs to trade through. If staking
is non-zero address, it further stakes the resulting output token to staking
contract for recipient
. It enforces the resulting input token to be at most maxAmountIn
, every versions
to be the current rebalance version, and the Unix timestamp deadline
after which the transaction will revert.Swap the exact
amountIn
of input tokens for as many output tokens as possible andunwrap the output tokens for recipient
, along the route determined by path
. The first element of path
is the input token, the last is the output token, and any intermediate elements represent intermediate pairs to trade through. It enforces the resulting output token to be at least minAmountOut
, every versions
to be the current rebalance version, and the Unix timestamp deadline
after which the transaction will revert.Receive the exact
amountOut
of output tokens for as few input tokens as possible and unwrap the output tokens for for recipient
, along the route determined by path
. The first element of path
is the input token, the last is the output token, and any intermediate elements represent intermediate pairs to trade through. It enforces the resulting input token to be at most maxAmountIn
, every versions
to be the current rebalance version, and the Unix timestamp deadline
after which the transaction will revert.Last modified 15d ago