A reentrancy vulnerability has been identified in the _swap function of the TSwapPool smart contract. This allows an attacker to repeatedly call the function before previous executions are completed, potentially leading to unauthorized fund transfers.
Single Function Reentrancy: The function _swap makes an external call to outputToken.safeTransfer, which can trigger a reentrant call back into the contract.
Vulnerable Function: _swap
Vulnerable Line: outputToken.safeTransfer(msg.sender, 1_000_000_000_000_000_000);
Issue: The external call can trigger the fallback function of msg.sender, allowing it to call back into the TSwapPool contract, exploiting the contract's state before it is securely updated and emit.
Repeated reentrant calls can deplete the contract’s funds, causing financial loss.
Slither
Adopt the Checks-Effects-Interactions Pattern
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.