code-423n4 / 2021-04-vader-findings

1 stars 0 forks source link

token == arrayAnchors[i] #303

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

paulius.eth

Vulnerability details

Impact

In function updateAnchorPrice here 'arrayAnchors[i]' can be replaced with 'token' to eliminate one expensive storage access: arrayPrices[i] = iUTILS(UTILS()).calcValueInBase(arrayAnchors[i], one);

0xBrian commented 3 years ago

https://github.com/vetherasset/vaderprotocol-contracts/commit/30292da1c71654d32e888ca8d0404a7b56496b7a