Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: medium
Valid

`rebalanceVaultsAssets` will not be able to perform the swaps

Summary

In the rebalanceVaultsAssets the calls to the `dexAdapter` will always revert due to insufficient balance.

Vulnerability Details

In the rebalanceVaultsAssetswe can see that it will try to swap collateral tokens for USDC:

However the issue here is that the collateral assets are not stored in the `MarketMakingEngine` so it will always revert here:

since the assets are actually stored in the zlpVault

Impact

rebalanceVaultsAssets will always revert.

Tools Used

Manual Review

Recommendations

Implement a way to get the collateral assets from the vault to the MarketMakingEngine.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

settlevaultsdebt and rebalanceVaultAssets inside CreditDelegationBranch incorrectly swaps tokens from marketmakingengine and not directly from Zlpvault which breaks protocol

Support

FAQs

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