Module curve

Source
Expand description

Swap calculations and curve invariant implementation

Structs§

StableSwap
The StableSwap invariant calculator.
SwapResult
Encodes all results of swapping from a source token to a destination token.

Constants§

MAX_AMP
Maximum amplification coefficient.
MAX_TOKENS_IN
Maximum number of tokens to swap at once.
MIN_AMP
Minimum amplification coefficient.
MIN_RAMP_DURATION
Minimum ramp duration, in seconds.
N_COINS
Number of coins in a swap. The Saber StableSwap only supports 2 tokens.
ZERO_TS
Timestamp at 0