Assessment reports>Bond Protocol>Threat Models>setIntervals

function setIntervals(uint256 id_, uint32[3] calldata intervals_) external

  1. Intended behavior.

    • Set market intervals to different values than the defaults

  2. Negative behavior.

    • shouldn’t update metadata for an INEXISTENT ID (this is covered since uint256(terms[id_].conclusion) - block.timestamp would fail otherwise)

  3. Preconditions.

    • assumes that a market exists for the id (including its metadata mapping)

    • shouldn’t tuneBelowCapacity also be updated?

    • assumes that the owner calls the function( checked here if (msg.sender != market.owner) revert Auctioneer_OnlyMarketOwner(); )

  4. Postconditions.

    • that the metadata for the market has been changed (IMPORTANT: not all fields are supposed to change)

  5. Inputs.

    • uint256 id_ full control; despite that, msg.sender is checked to be the owner of the market

    • uint32[3] calldata intervals_full control; limited checks(seems like all checks are fine)

  6. Examine all function calls the function makes.

    • There are no function calls here.

Zellic © 2024Back to top ↑