Some tokens have transfer callback, eg, ERC777 tokens. Hackers can make use of this characteristic to earn profit.
T-Swap protocol can support any ERC20 tokens. It means some tokens with transfer callback are expected to be supported, for example, some ERC777 tokens. And the whole protocol does not avoid the possible reentrancy issues. Hackers may make use of this to make profits.
When users want to add some liquidity in pools, assume i_poolToken
is one ERC777 token, poolToken's safeTransferFrom() is one reentrancy risk. Now Lp shares have already minted, and related weth tokens have transferred to the contract, but we have not tranferred poolToken until now. This will lead that current LP share's price is low than expected. We can mint LP share with lower price. And current pool token's price is larger than expected. Hackers can earn profit via this vulnerability.
Hackers can earn profit via this reentrancy issue.
Manual
Add reentrancy protection.
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.