Module stablecoin_exchange

Module stablecoin_exchange 

Source
Expand description

Stablecoin DEX types and utilities.

Re-exports§

pub use order::Order;
pub use orderbook::MAX_TICK;
pub use orderbook::MIN_TICK;
pub use orderbook::Orderbook;
pub use orderbook::PRICE_SCALE;
pub use orderbook::TickLevel;
pub use orderbook::tick_to_price;

Modules§

IStablecoinExchange
StablecoinExchange interface for managing orderbook based trading of stablecoins.
dispatch
Stablecoin DEX precompile
error
order
Limit order type for the stablecoin DEX.
orderbook
Orderbook and tick level management for the stablecoin DEX.
slots

Structs§

StablecoinExchange

Enums§

StablecoinExchangeError
Container for all the IStablecoinExchange custom errors.
StablecoinExchangeEvents
Container for all the IStablecoinExchange events.

Constants§

MIN_ORDER_AMOUNT
Minimum order size of $10 USD
TICK_SPACING
Allowed tick spacing for order placement

Functions§

calculate_quote_amount_ceil 🔒
Calculate quote amount using ceiling division (rounds up) Post-Moderato behavior
calculate_quote_amount_floor 🔒
Calculate quote amount using floor division (rounds down) Pre-Moderato behavior

Type Aliases§

BookKeys 🔒
Helper type to easily interact with the stream_ending_at array