joshstevens19 / simple-uniswap-sdk

Uniswap SDK which handles the routes automatically for you, changes in trade quotes reactive subscriptions, exposure to formatted easy to understand information, bringing back the best trade quotes automatically, generating transactions for you and much more.
MIT License
188 stars 95 forks source link

Adding priceImpact property #12

Open lamman1820 opened 3 years ago

lamman1820 commented 3 years ago

Dear Author,

Can you add the priceImpact property into the Trade information?

Regards

joshstevens19 commented 3 years ago

it's on the list will get round to this when I can! thanks

niZmosis commented 2 years ago

I'd love this. It would allow me to assist the users with slippage for deflationary/fee tokens to prevent failed swaps as they require a higher slippage than normal.

yalamber commented 2 years ago

Thank you for this nice library, was price impact added to it, could not find it in examples.

vm06007 commented 2 years ago

Also curious if price impact is available @joshstevens19 / @liu-zhipeng or is planned by any chance? Most likely its not implemented yet if I'm not mistaken

vm06007 commented 2 years ago

Alternatively if the trade object could return reserves for each pool involved (depending on the route) this could be calculated accordingly to user input without refetching data?