Assessment reports>AccountRecoveryModule>Threat Model>addGuardian

Function: addGuardian(byte[32] guardian, uint48 validUntil, uint48 validAfter)

This function can be invoked to add a guardian to a smart account.

Inputs

  • guardian

    • Control: Arbitrary.

    • Constraints: Must not be zero or already present.

    • Impact: The guardian to be added.

  • validUntil

    • Control: Arbitrary.

    • Constraints: Must not be in the past and before validAfter.

    • Impact: Time until the guardian will be active.

  • validAfter

    • Control: Arbitrary.

    • Constraints: Must be in the future (respecting the security delay).

    • Impact: Time from which the guardian will be active.

Branches and code coverage

Intended branches

  • Adds the guardian to the smart account.

Negative behavior

  • Reverts if guardian is zero.

  • Reverts if guardian is already set.

  • Reverts if the time frame is invalid.

Zellic © 2024Back to top ↑