Closed sherlock-admin closed 1 year ago
ashirleyshe
medium
Mint token event does not follow the ERC20 token standard.
function _delayedMintAccount(address to, UFixed18 amount) private { _balanceOf[to] = _balanceOf[to].add(amount); emit Mint(to, amount); }
In _delayedMintAccount(), it does not emit the Transfer event when the token transfer.
_delayedMintAccount()
If a minting has occurred, blockchain explorer such as etherscan will not display the ERC20 token transfer event.
https://github.com/sherlock-audit/2023-05-perennial/blob/main/perennial-mono/packages/perennial-vaults/contracts/balanced/BalancedVault.sol#L561
Manual Review
Add emit Transfer(from, to, amount).
emit Transfer(from, to, amount)
ashirleyshe
medium
Mint token event does not follow the ERC20 token standard
Summary
Mint token event does not follow the ERC20 token standard.
Vulnerability Detail
In
_delayedMintAccount()
, it does not emit the Transfer event when the token transfer.Impact
If a minting has occurred, blockchain explorer such as etherscan will not display the ERC20 token transfer event.
Code Snippet
https://github.com/sherlock-audit/2023-05-perennial/blob/main/perennial-mono/packages/perennial-vaults/contracts/balanced/BalancedVault.sol#L561
Tool used
Manual Review
Recommendation
Add
emit Transfer(from, to, amount)
.