Skip to main contentModule protocol_sim
Source - Balances
- GetAmountOutResult
- GetAmountOutResult struct represents the result of getting the amount out of a trading pair
- PoolSwap
- Represents a pool swap between two tokens at a given price on a pool.
- Price
- Represents a price as a fraction in the token_in -> token_out direction with units
[token_out/token_in]. - QueryPoolSwapParams
- Represents the parameters for ProtocolSim::query_pool_swap.
- SwapConstraint
- Options on how to constrain the pool swap query.
- ProtocolSim
- ProtocolSim trait
This trait defines the methods that a protocol state must implement in order to be used
in the trade simulation.