Assessment reports>WOOFi Swap>Threat Model>migrateToNewPool

Function: migrateToNewPool(address token, address newPool)

Allows the owner to migrate the pool to a new pool contract.

Inputs

  • token

    • Control: Full control.

    • Constraints: Must be a valid token address.

    • Impact: The token will be migrated to the new pool.

  • newPool

    • Control: Full control.

    • Constraints: Must be a valid pool address.

    • Impact: The pool will be migrated to the new pool.

Branches and code coverage

Intended branches

  • Assumes that the all the tokens have been withdrawn from the previous pool.

  • Assumes the other pool has the corresponding tokenInfos of this pool. Otherwise, all the reserves calculations will be wrong.

  • Should make this contract not usable after migration. Currently not implemented.

Negative behavior

  • Should not be callable by anyone other than the owner.

Zellic © 2024Back to top ↑