Track Pool Updates
Near real-time monitoring of liquidity reserve balance changes.
Last updated
Near real-time monitoring of liquidity reserve balance changes.
Last updated
Below are the common methods to track updates in liquidity reserve balances:
Subscription using eth_subscribe (coming later - )
⛽ No gas cost
Whenever the reserve values for a pool contract are updated, either due to liquidity changes or a swap, a Sync event is emitted from the contract, containing the updated reserve values for the token pair. The following code demonstrates how to listen for Sync events for all pools using REST API or JSON RPC.
Listening to 'Sync' events without specifying an address in the filter data will return logs for all pools on SaucerSwap, as well as other DEXs on Hedera that share the same 'topic0' hash signature for the 'Sync' event. To identify and filter specific pools, extract the pool's EVM address from the log.
Resources:
⛽ No gas cost
Whenever the reserve values for a pool contract are updated, either due to liquidity changes or a swap, a Sync event is emitted from the contract, containing the updated reserve values for the token pair. The following code demonstrates how to listen for Sync events for a specific pool using REST API or JSON RPC.
Resources: