function decayAndGetPrice( uint256 id_, uint256 amount_, uint48 time_ ) internal
Intended behavior.
Adjust the SDA and the pricing of a specific market id.
Negative behavior.
It shouldn’t be callable whenever
It shouldn’t be able to update inactive/ inexistent markets
The market capacity shouldn’t overflow/ underflow from the
uncheckedscope.
Preconditions.
Assumes the market exists and is functional
Assumes adjustments can be made.
Postconditions.
The
totalDebtshould be updated (is updated twice)The
lastDecayshould be updatedThe
metadata[id_].lastDecayshould be updated
Inputs.
id - controllable; amount - controllable: affects the number of
payouttokens;block.timestamp- partially controlled
Examine all function calls the function makes.
There are no external function calls here.