You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand it is the intention of the developer to have the insert function be called with a correct _NICR value.
However, I reckon the SortedTroves contract could protect itself form the risk that the developer does not follow the original intentions with this change:
On the downside, it creates a couple extra SLOAD costs, mitigated by the fact that the storage locations are likely to have been written in the same transaction and so should cost WARM_STORAGE_READ_COST, plus, the rest of the function cold reads a lot of other storage locations.
The text was updated successfully, but these errors were encountered:
The function
SortedTroves.insert
takes inuint256 _NICR
as a parameter. Further in the call stack, this value is compared to_troveManager.getNominalICR(_nextId)
and_troveManager.getNominalICR(_prevId)
.I understand it is the intention of the developer to have the
insert
function be called with a correct_NICR
value.However, I reckon the
SortedTroves
contract could protect itself form the risk that the developer does not follow the original intentions with this change:On the downside, it creates a couple extra
SLOAD
costs, mitigated by the fact that the storage locations are likely to have been written in the same transaction and so should costWARM_STORAGE_READ_COST
, plus, the rest of the function cold reads a lot of other storage locations.The text was updated successfully, but these errors were encountered: