Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: high
Invalid

Missing variable update

## Summary
Missing update of variables in `else` block of `CreditDelegationBranch::settleVaultsDebt` after the swap operation.
## Vulnerability Details
After a successful swap operation, some variables update are missing. The logic inside the `else` block of
`CreditDelegationBranch::settleVaultsDebt` lack updating the `usdcAvailableForEngine`.
## Impact
The USDC available for the vault engine is more compare to the actual balance because it is never updated after the swap
operation of USDC(reduction) to vault asset(addition).
## Recommendations
Consider adding this line of code
```diff
+ UsdTokenSwapConfig.load().usdcAvailableForEngine[vault.engine] -= ctx.assetOutAmount;
```
Updates

Lead Judging Commences

inallhonesty Lead Judge
6 months ago
inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.