Assessment reports>Y2K Finance>Threat Model>updateActiveList

Function: updateActiveList(address[] vaults, UpdateAction updateAction)

A restricted onlyOwner function.. Allows to update, delete vaultList, add new vaults, and remove vaults.

Inputs

  • vaults

    • Constraints: The vault's list will be checked by the checkVaultsValid function. The vault addresses, _vault.asset(), _vault.controller(), _vault.treasury(), _vault.emissionsToken(), and _vault.counterPartyVault() should not be zero.

    • Impact: The new vault's addresses.

  • updateAction

    • Constraints: Can be one of type --- DeleteVaults, AppendVaults, ReplaceVaults, or DeleteVaults.

    • Impact: The type of action.

Branches and code coverage (including function calls)

Intended branches

  • Check that the vaultList has updated properly after every type of action.

Negative behavior

  • Check a vaults list that contains, in addition to the valid vault addresses, also zero addresses.

Function call analysis

  • _appendVaults(vaults)

    • What is controllable? vaults.

    • If return value controllable, how is it used and how can it go wrong? Return the new vault list with appended elements.

    • What happens if it reverts, reenters, or does other unusual control flow? There is no problem.

  • _replaceVaults(vaults)

    • What is controllable? vaults.

    • If return value controllable, how is it used and how can it go wrong? Return the new vault list with new elements.

    • What happens if it reverts, reenters, or does other unusual control flow? There is no problem.

  • _removeVaults(vaults)

    • What is controllable? vaults.

    • If return value controllable, how is it used and how can it go wrong? Return the new vault list without removed elements.

    • What happens if it reverts, reenters, or does other unusual control flow? There is no problem.

Zellic © 2024Back to top ↑