hats-finance / Thorn-protocol-0x1286ecdac50215a366458a14968fbca4bd95067d

GNU General Public License v3.0
0 stars 0 forks source link

user can steal all the funds using exactInputStableSwap #19

Open hats-bug-reporter[bot] opened 1 month ago

hats-bug-reporter[bot] commented 1 month ago

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

Description: Description\ refer the attack scenario,i wll provide details in the comments later

Attack Scenario\

Function Execution

Determine Amount In:

Skip Payment Logic:

Perform Swap:

Determine Amount Out:

The function transfers 950 units of dstToken to the specified recipient address.

Attachments

  1. Proof of Concept (PoC) File

  2. Revised Code File (Optional)

omega-audits commented 1 month ago

The title is a bit misleading here - the user can not "steal all the funds", the user can sweep the balance of the Router contract, which is not expected to hold any funds

Ghoulouis commented 1 month ago

Just clean up the contract assets supporting the Router, the assets in the pool are still safe, I think it's not important enough to become a vulnerability

AresAudits commented 1 month ago

I've resubmitted the issue; please refer to #70