hats-finance / Fenix-Finance-0x83dbe5aa378f3ce160ed084daf85f621289fb92f

0 stars 0 forks source link

No slippage protector #9

Open hats-bug-reporter[bot] opened 4 months ago

hats-bug-reporter[bot] commented 4 months ago

Github username: -- Twitter username: Buggsy Submission hash (on-chain): 0x11430057908f55e3748154424d6078e3e1426d724ffbc5c1d9afe58299c2a748 Severity: high

Description: Description\ There is no slippage protection (minOut parameter) in AlgebraPool.sol in function swap - this will lead to fund loss via MEV bots .

Attack Scenario\ When transaction is seen in the mempool, MEV bots will sandwich the transaction and fund loss will occur.

Attachments

  1. Proof of Concept (PoC) File

  2. Revised Code File (Optional) consider adding ''minOut'' parameter to function swap .

BohdanHrytsak commented 4 months ago

Thank you for the submission.

limitSqrtPrice - is responsible for preventing price slippage as described by you