Exposure.sortVaultsByDelta
does not work for N_COINS != 3
#101
Labels
Exposure.sortVaultsByDelta
does not work for N_COINS != 3
#101
Handle
cmichel
Vulnerability details
Vulnerability Details
The
Exposure.sortVaultsByDelta
function computes the missing vault index from the min and max vault indices by:This only works for
N_COINS = 3
.Impact
If any new stablecoin is ever removed or added, this function will break.
Recommended Mitigation Steps
Never change the number of stablecoins and consider adding an
assert(N_COINS == 3)
here.The text was updated successfully, but these errors were encountered: