Pieces Protocol

First Flight #32
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing vital parameters in the `TokenDivider::TokensTransfered` event

Summary

The TokensTransfered event in the transferErcTokens function is missing the from and to addresses

Vulnerability Details

The TokenTransferred event in the TokenDivider::transferErcTokens function does not emit the from and to addresses.

function transferErcTokens(address nftAddress, address to, uint256 amount) external {
...
if (to == address(0)) {
revert TokenDivider__CantTransferToAddressZero();
}
if (balances[msg.sender][tokenInfo.erc20Address] < amount) {
revert TokenDivider__NotEnoughErc20Balance();
}
balances[msg.sender][tokenInfo.erc20Address] -= amount;
balances[to][tokenInfo.erc20Address] += amount;
@> emit TokensTransfered(amount, tokenInfo.erc20Address);
IERC20(tokenInfo.erc20Address).transferFrom(msg.sender, to, amount);
}

Impact

  • It reduces traceability for off-chain monitoring tools.

  • Makes event logs less informative for users and developers.

Tools Used

Manual review

Recommendations

The event should be updated to include thes from and to addresses.

Updates

Lead Judging Commences

fishy Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.