Token-0x

First Flight #54
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Severity: low
Valid

Missing mint/burn Transfer events

Description

The documentation states token will behave like an OpenZeppelin ERC20, but its implementation does not emit Transfer events on _mint() and _burn(), whereas OpenZeppelin’s _mint() and _burn() always emit Transfer(address(0), to, amount) and Transfer(from, address(0), amount)`

Recommended Mitigation

Updating the token’s mint and burn to follow the OpenZeppelin ERC20

function _mint(...) internal {
//...
mstore(ptr, value)
log3(
ptr,
0x20,
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef,
mload(0x60),
account)
}
function _burn(...) internal {
//...
mstore(ptr, value)
log3(
ptr,
0x20,
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef,
account,
mload(0x60))
}
Updates

Lead Judging Commences

gaurangbrdv Lead Judge 19 days ago
Submission Judgement Published
Validated
Assigned finding tags:

missing event

missing event emission

Support

FAQs

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

Give us feedback!