valamidev/web3-defi-honeypot-and-slippage-checker

Didn't see how you checked the slippage. Are you able to elaborate on that?

Ptaliu opened this issue · 1 comments

Didn't see how you checked the slippage. Are you able to elaborate on that?

It is calculated on the "client":

https://github.com/valamidev/web3-defi-honeypot-and-slippage-checker/blob/main/example/index.ts#L152

Basically the tax is artificial trading fees + slippage, while artificial trading fees are constant values we and slippage is based on the swap quantity, with low quantity we can get the exact value of the artificial trading fees.

Once you know the constant trading fee, you can estimate the required slippage limit with ease.

(This contract is made for analytics purposes, for an exact one-way Swap transaction there are other methods to calculate the slippage)