Assessment reports>Ethena>Threat Models>registerAllowedRole

Function: registerAllowedRole(Role role, address account, address signer, bool allowed)

Allows owner of contract to grant role for an account and also add a trusted signer.

Inputs

  • role

    • Constraints: The Minter or Redeemer role.

    • Impact: An account with a role will be able to mint and redeem eUSD tokens.

  • account

    • Constraints: Account != address(0).

    • Impact: The receiver of the role.

  • signer

    • Constraints: Signer != address(0).

    • Impact: The trusted signer for an account.

  • allowed

    • Constraints: No.

    • Impact: The owner can set and remove the allowance for the signer.

Branches and code coverage (including function calls)

Intended branches

  • The account has the role.

Negative behavior

  • The caller is not an owner.

  • The account already has a role.

  • The account with the role already has the signer.

Zellic © 2024Back to top ↑