Description
The contract implements mapping(address user => mapping(address erc20Address => uint256 amount)) balances
for internal accounting of minting, burning, and transfer of ERC20 tokens created when dividing an NFT.
Impact
Users can transfer ERC20 tokens using the default .transfer() function, instead of using the TokenDivider::transferErcTokens
. This will lead to the TokenDivider
not having the updated and actual balance of tokens for the users.
Proof of Concepts
Add the following test to TokenDividerTest.t.sol
file:
Foundry, Manual analysis
Recommended mitigation
Remove the balances
mapping and implement the ERC20 balanceOf() default function instead.
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.