Learn how prices are determined in Shibaswap v1 and how to calculate exact input and output amounts for trades.
x
% worse than the observed intra-block rate, where x
is a user-specified slippage tolerance (0.5% by default).
There are, of course, other options for oracles, including native V2 oracles.
getAmountsOut
. The equivalent SDK function is getOutputAmount
, or minimumAmountOut
for slippage calculations.
getAmountsIn
. The equivalent SDK function is getInputAmount
, or maximumAmountIn
for slippage calculations.