Assessment reports>Avantis>Threat Model>registerCode

Function: registerCode(byte[32] _code)

This registers a referral code for the sender — to be called by referrer.

Inputs

  • _code

    • Control: Fully controlled by caller.

    • Constraints: The _code should not be bytes32(0) and codeOwners should not be already registered.

    • Impact: The referral code to register.

Branches and code coverage

Intended branches

  • The codeOwners, codes, and referrerTiers is correctly updated.

Negative behavior

  • Revert if _code is bytes32(0).

  • Revert if codeOwners[_code] != address(0).

Function call analysis

No external function calls found.

Zellic © 2025Back to top ↑