Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Integrate Batched Calls in v3 Swap simulation #54

Open
0xOsiris opened this issue Jan 20, 2023 · 0 comments
Open

Integrate Batched Calls in v3 Swap simulation #54

0xOsiris opened this issue Jan 20, 2023 · 0 comments
Labels

Comments

@0xOsiris
Copy link
Collaborator

0xOsiris commented Jan 20, 2023

simulate_swap and simulate_swap_mut both require two external calls to the node to retrieve the Tick.Info and the word corresponding to tickBitmap[currentTick] during simulation. Two separate calls are made each time an initialized tick in crossed.

This can be optimized by batching the two calls into a single call to the node as both calls can happen in parallel. I think this will be most easily accomplished by abstracting the calls to the node outside of uniswap_v3_math into cfmms-rs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant