Omniscia Redacted Cartel Audit

BTRFLYV2 Manual Review Findings

BTRFLYV2 Manual Review Findings

BTR-01M: Deviation From BTRFLY V1

Description:

The new BTRFLY V2 token implementation lacks important functions that were present in the previous implementation, such as the burn and burnFrom functions that make the current V1 -> V2 migration possible.

Example:

contracts/core/BTRFLYV2.sol
15contract BTRFLYV2 is AccessControl, ERC20("BTRFLY", "BTRFLY", 18) {
16 bytes32 public constant MINTER_ROLE = "MINTER_ROLE";
17
18 constructor() {
19 _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
20 }
21
22 /**
23 @notice Mint tokens
24 @param to address Address to receive tokens
25 @param amount uint256 Amount to mint
26 */
27 function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) {
28 _mint(to, amount);
29 }
30}

Recommendation:

We advise the missing features to be carefully evaluated and potentially re-introduced depending on the business use case of BTRFLYV2. Additionally, we would like to note that the new BTRFLYV2 token contains 18 decimals whilst the original token contained 9 decimals, a discrepancy which may case any previous implementations being upgraded to misbehave.

Alleviation:

The burn function that was present in the original implementation has been re-introduced permitting future upgrades to be seamless similarly to the V1 -> V2 conversion and thus alleviating this exhibit.