GainsNetwork-org / nft-bot-v3

Bot that executes limit orders of gTrade v6, the decentralized leveraged trading platform on Polygon.
46 stars 39 forks source link

Migrated to SDK for fetching all open trades for performance improvement #25

Closed thebuidler closed 1 year ago

thebuidler commented 1 year ago

NOTE: Would like stronger confirmation from a bot runner that this works as expected.

Majority of RPC volume is for fetching open trades which is currently inefficient and prone to errors. This PR upgrades to use the SDK's multicall API for a 99% reduction in calls. This is one of several QoL improvements for bot runners we're making to make it simpler to join the network.