Assessment reports>Bond Protocol>Threat Models>function tune( uint256 id*, uint48 time_, uint256 price_ ) internal

function tune( uint256 id*, uint48 time_, uint256 price_ ) internal

  1. Intended behavior.

    • Adjusting the control variable to hit market capacity

  2. Negative behavior.

    • Shouldn’t tune other markets than the one at id

    • Shouldn’t omit any important variables that need to be updated when tuned

  3. Preconditions.

    • Assumes that the market can be tuned( which means that there’s still debt to be purchased); basically if maxdebt hasn’t been reached

  4. Postconditions.

    • Update markets[id_].maxPayout, terms[id_].controlVariable, metadata[id_].lastTune , metadata[id_].tuneBelowCapacity, metadata[id_].lastTuneDebt

  5. Inputs.

    • uint256 id_: full control.

    • uint256 time_: partially controlled.

    • uint256 price_: uncontrolled.

  6. Examine all function calls the function makes.

    • There are no function calls here.

Zellic © 2024Back to top ↑