Pool
/// Pool itself.
struct Pool<phantom X, phantom Y, phantom BinStep> has key {
// Current active bin id.
active_bin_id: u32,
// Current bin step.
bin_step: u32,
// Bins tree and table.
tree: BinsTree,
bins: Table<u32, Bin>,
// Current coin reserves.
coins_x: Coin<X>,
coins_y: Coin<Y>,
// Gas optimization, just store instead of generating.
collection_name: String,
// The pool must be locked for swap/mint/burn operations during flashloan.
is_locked: bool,
// Fees.
fee_params: StaticFeeParams,
// Events.
swap_event_handler: event::EventHandle<SwapEvent>,
mint_event_handler: event::EventHandle<MintEvent>,
composition_fees_event_handler: event::EventHandle<CompositionFeesEvent>,
burn_event_handler: event::EventHandle<BurnEvent>,
flashloan_event_handler: event::EventHandle<FlashloanEvent>,
change_fee_params_event_handler: event::EventHandle<ChangeFeeParamsEvent>,
}Bins
Functions
Pool Creation
Add Liquidity
Remove Liquidity
Swap
Flashloans
Getters
Events
Last updated