Skip to main content

Technical Specifications

State Variables​

EMPXRouter​

The router maintains the list of trusted adapters and tokens, as well as core configuration.

LimitOrderEscrow​

The escrow contract stores struct mappings for all Orders, user balances, and configuration for fees and bot authorization.

Events​

Both contracts emit comprehensive events for off-chain monitoring and indexing.

EMPXRouter Events​

  • EmpXswap: Emitted on every successful swap with input token, output token, amount in, and amount out.

LimitOrderEscrow Events​

  • OrderCreated: Emitted when a new order is created with all order parameters.
  • OrderPartiallyFilled: Emitted on partial fills with fill number, amount filled, and remaining amount.
  • OrderFullyFilled: Emitted when order is completely filled.
  • OrderCancelled: Emitted when user cancels their order.
  • OrderExpired: Emitted when order expires past deadline.
  • FeeCollected: Emitted when protocol or bot fees are collected.