Assessment reports>Mantle>Threat Models>migrateAllBIT

Function: migrateAllBIT()

Swaps all of the caller's BIT tokens for MNT tokens.

Branches and code coverage (including function calls)

Intended branches

  • Successfully migrates all of caller's BIT tokens if the contract is not halted and the other conditions are met.

Negative behavior

  • Reverts if the contract is not sufficiently funded.

  • Reverts if the caller does not have enough BIT balance.

  • Reverts if the contract is halted.

Function call analysis

  • migrateAllBIT -> ERC20(BIT_TOKEN_ADDRESS).balanceOf(msg.sender);

    • What is controllable? The BIT balance held by the caller.

    • If return value controllable, how is it used and how can it go wrong? Discarded.

    • What happens if it reverts, reenters, or does other unusual control flow? Discarded.

Zellic © 2024Back to top ↑