code-423n4 / 2021-04-meebits-findings

0 stars 0 forks source link

event Mint parameter minter #56

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

paulius.eth

Vulnerability details

Impact

event Mint(uint indexed index, address indexed minter, uint createdVia); I assume parameter named 'minter' should indicate the address that minted the token, not the recipient, however, when this event is emitted it uses _to which is not always the case, e.g. when _mint is invoked from devMint, the minter is the deployer.

Recommended Mitigation Steps

Solution: either change the name of the parameter to 'recipient' or 'owner' or something like that or use msg.sender when emitting this event.