func AmountIn
AmountIn is the ugnot/token that must be paid so AmountOut >= amountOut. Rounded up so ExactOut does not underpay.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
AmountIn is the ugnot/token that must be paid so AmountOut >= amountOut. Rounded up so ExactOut does not underpay.
AmountOut is Uniswap-v2 getAmountOut against effective (real+virtual) reserves. Payout is capped by the real reserveOut — virtual offsets only affect price.
MulDiv returns floor(a * b / d) for non-negative a, b and d > 0. Fast path uses int64 product. Overflow path is 128-bit (a*b)/d — same as int64((bigint(a)*bigint(b))/bigint(d)) — and panics only if the quotient does not fit int64. Gno has no typed bigint(int64) conversion.
MulDivCeil is ceil(a * b / d) for non-negative a, b and d > 0. Ceil only when remainder != 0.
Sqrt returns floor(sqrt(n)) for n >= 0 (Babylonian method).