Assessment reports>Nukem Loans>Threat Model>checkSignature

Function: checkSignature(address authorizer, address market, uint256 price, uint256 deadline, uint8 v, bytes32 r, bytes32 s)

This checks a signature.

Inputs

  • authorizer

    • Control: Fully controlled by the caller.

    • Constraints: Checked to be the owner of the contract and part of a valid signature.

    • Impact: Authorizer of the signature.

  • market

    • Control: Fully controlled by the caller.

    • Constraints: Checked to be the address of the contract.

    • Impact: Market address.

  • price

    • Control: Fully controlled by the caller.

    • Constraints: Checked to be a valid price.

    • Impact: Price of the signature.

  • deadline

    • Control: Fully controlled by the caller.

    • Constraints: Checked to be in the future and part of a valid signature.

    • Impact: Deadline of the signature.

  • v

    • Control: Fully controlled by the caller.

    • Constraints: Checked to be a valid signature.

    • Impact: Signature v.

  • r

    • Control: Fully controlled by the caller.

    • Constraints: Checked to be a valid signature.

    • Impact: Signature r.

  • s

    • Control: Fully controlled by the caller.

    • Constraints: Checked to be a valid signature.

    • Impact: Signature s.

Branches and code coverage (including function calls)

Intended branches

  • Verify that the signature constructed from authorizer, market, price, deadline, v, r, and s is valid.

Negative behavior

  • Should not allow the replay of a signature. This is not enforced, as there is no nonce put in place.

Zellic © 2024Back to top ↑