Assessment reports>Anzen and protocol-v2>Threat Model>Function: cancelOffer(uint256 offerId)

Function: cancelOffer(uint256 offerId)

The function allows the creator or a pool manager to cancel an offer that has expired, returning the locked tokens to the creator.

Inputs

  • offerId

    • Control: Arbitrary.

    • Constraints: Must be an existing offer.

    • Impact: The parameter identifies which offer to cancel.

Branches and code coverage

Intended branches

  • Return the locked tokens to the creator, update state variables, and delete the offer.

Negative behavior

  • Revert if the caller is not the creator or a pool manager.

  • Revert if the offer has not yet expired.

Zellic © 2025Back to top ↑