The settleVaultsDebt
function does not enforce that totalSettledDebt
remains non-decreasing when processing vaults. This allows for scenarios where debt is incorrectly reduced, leading to inaccurate accounting of settled debt. This bug manifests in the CreditDelegationBranch.sol contract, specifically in the settleVaultsDebt
function.The settleVaultsDebt
function does not enforce that totalSettledDebt
remains non-decreasing when processing vaults. This allows for scenarios where debt is incorrectly reduced, leading to inaccurate accounting of settled debt. The bug manifests in the CreditDelegationBranch.sol contract, specifically in the settleVaultsDebt
function.
The settleVaultsDebt
function in CreditDelegationBranch.sol does not enforce that totalSettledDebt
remains non-decreasing when processing vaults. This allows for scenarios where debt is incorrectly reduced, leading to inaccurate accounting of settled debt.
Action: Calls settleVaultsDebt
with vaultIds = [0]
.
Execution: The function processes the vault but incorrectly decreases totalSettledDebt
from 0
to -1
.
Violation: The totalSettledDebt >= initialDebt
fails, as debt decreases instead of remaining constant or increasing.
Pre-Settlement:
initialDebt = 0
totalSettledDebt = 0
Post-Settlement:
totalSettledDebt = -1
(expected totalSettledDebt >= 0
)
The system may incorrectly report settled debt, leading to financial discrepancies.
Vs
Add a check in the settleVaultsDebt
function to ensure totalSettledDebt
does not decrease after processing each vault
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.