Assessment reports>Nukem Loans>Threat Model>xapprove

Function: xapprove(address _token, address _spender, uint256 _value)

This is a function to be used by XApprove role. Approves a spender to spend tokens from the contract.

Inputs

  • _token

    • Control: Fully controlled by XApprove role.

    • Constraints: None.

    • Impact: The token to be approved.

  • _spender

    • Control: Fully controlled by XApprove role.

    • Constraints: None.

    • Impact: The address of the spender.

  • _value

    • Control: Fully controlled by XApprove role.

    • Constraints: None.

    • Impact: The amount of tokens to be approved.

Branches and code coverage (including function calls)

Intended branches

  • Approve the spender to spend the tokens.

Negative behavior

  • Should only be callable by XApprove role or owner.

  • Should not allow approving address(this) tokens. Currently not checked.

Zellic © 2024Back to top ↑