Skip to main content

Module swap_cache

Module swap_cache 

Source
Expand description

Remembers what a pool paid, so one solve asks it once per amount.

Structs§

PoolDirection
A pool and the direction taken through it. Both token addresses are part of it — a pool trading three tokens answers USDC -> DAI and USDT -> DAI differently for the same amount.
SwapCache
Swaps already made, so a pool asked the same question twice is only simulated once.
SwapResult
What a swap paid: what came out, and the gas it cost.
SwappedAmounts
What one pool paid at each amount it was asked, ascending by amount. A missing outcome is an amount it refused.

Enums§

Refusal
Why a pool paid nothing for an amount.