When the users are dividing to same NFT address, without checking the exist NFT address, so balances, nftToErc20Info variable is initiated every time
In the divideNft()
function, there is not checking part for existing NFT address.
So the nftToErc20Info
' ERC20 address is replaced with new address.
Prev User who divided the same NFT address cannot claim his NFT permanantly.
Foundry
Manual code review
You should update the type of nftToErc20Info
variable to
mapping(address nft => mapping(uint256 tokenID => address erc20Address))
;
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.