sherlock-audit / 2023-05-perennial-judging

12 stars 9 forks source link

ashirleyshe - Mint token event does not follow the ERC20 token standard #218

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

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

    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.

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).