function tune( uint256 id*, uint48 time_, uint256 price_ ) internal
Intended behavior.
Adjusting the control variable to hit market capacity
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
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
Postconditions.
Update
markets[id_].maxPayout
,terms[id_].controlVariable
,metadata[id_].lastTune
,metadata[id_].tuneBelowCapacity
,metadata[id_].lastTuneDebt
Inputs.
uint256 id_: full control.
uint256 time_: partially controlled.
uint256 price_: uncontrolled.
Examine all function calls the function makes.
There are no function calls here.