The updateVaultAndCreditDelegationWeight()
function currently calculates the weight
based on the total assets
of the vault instead of the total shares
. This miscalculation can lead to significant discrepancies in the representation of ownership stakes and the distribution of credit delegation.
In the current implementation, the weight
is calculated using the following line:
This line retrieves the total assets
of the vault, which does not accurately reflect the ownership represented by shares
. The correct approach should involve using the total shares
, typically obtained via totalSupply()
, to ensure that the weight reflects the actual ownership stakes of users in the vault
.
The use of total assets instead of shares for weight calculation can result in:
Misrepresentation of Ownership: ownership stakes are inaccurately represented.
Incorrect Credit Delegation: The weight used for credit delegation calculations may be skewed, affecting the financial operations of the vault.
Manual Review
Modify the weight calculation in the updateVaultAndCreditDelegationWeight
function to use totalSupply()
instead of totalAssets()
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.