SolverComponent
The following events are shared across all Solver implementations, which inherit from SolverComponent
.
CreateMarket
CreateMarket
This event is emitted when a new pool / market is created. Markets are identified by market_id
.CreateMarket
events should be indexed to track the active markets in a solver.
market_id
is the Poseidon chain hash of the market parameters below (base_token
,quote_token
,owner
,is_public
,vault_token
)base_token
is the address of the base token for the marketquote_token
is the address of the quote token for the marketowner
is the address of the market owneris_public
is a boolean indicating if the market is open to third party LPs / depositorsvault_token
is the address of the token used to track LP shares in the market
Swap
Swap
This event is emitted when a swap is executed through a solver market. These events can be indexed along with Deposit
and Withdraw
events to track the total liquidity in a solver market.
market_id
is the unique id of the market (seeCreateMarket
above)caller
is the address of the user executing the swapis_buy
is a boolean indicating if the swap is a buy or sellexact_input
is a boolean indicating if the swap amount was specified as input or outputamount_in
is the amount of the input token swapped inamount_out
is the amount of the output token swapped out
Deposit
/ Withdraw
Deposit
/ Withdraw
These events are emitted whenever a user / LP deposits or withdraws liquidity from a solver market. These events can be indexed along with Swap
events to track the total liquidity in a solver market.
caller
is the address of the user / LP depositing liquiditymarket_id
is the unique id of the market (seeCreateMarket
above)base_amount
is the amount of base tokens depositedquote_amount
is the amount of quote tokens depositedshares
is the amount of LP shares minted or burned
Pause
/ Unpause
Pause
/ Unpause
These events are emitted when a market is paused and unpaused. Paused markets should not accrue rewards as they will reject incoming swaps. These events can be indexed to track the paused state of solver markets.
Last updated