Insurance.getVaultDeltaForDeposit
returns wrong investDelta
#98
Labels
Insurance.getVaultDeltaForDeposit
returns wrong investDelta
#98
Handle
cmichel
Vulnerability details
Vulnerability Details
On single deposits, the
getVaultDeltaForDeposit
function is supposed to return 100% allocation for the desired vault to invest in.However, it always sets 100% allocation to the first vault (index 0) because of using the wrong variable:
Impact
The
investDelta
also indicates that one would invest 100% in the first vault even ifvaultIndexes
suggests a different priority.Recommended Mitigation Steps
Use
_vaultIndexes
(return value ofsortVaultsByDelta
) instead of the uninitializedvaultIndexes
.The text was updated successfully, but these errors were encountered: