CrocSwap / sdk

🛠🐊🛠 An SDK for building applications on top of CrocSwap
MIT License
12 stars 22 forks source link

Calculate amount out offchain #42

Open johnny-vu opened 6 months ago

johnny-vu commented 6 months ago

I tried to wrote CrocImpact (using typescript) to calculate baseFlow & quoteFlow offchain but stuck at readSlot method because we have to read onchain data in here.

The idea is that I want to query some on-chain information (like curve, pool, etc,...), then use them as input data to calculate offchain.

Any suggestions for calculating amount out offchain?

WuBruno commented 4 months ago

I am currently also trying to integrate crocswap off-chain on our smart order router. And this capability mentioned above would be greatly appreciated.