There are two functions _convertAssetsToUsdc and _convertUsdcToAssets which handle swapping assets to and from usdc to settle credit and debt. The issue is that settlement fee is not charged when the underlying asset is USDC.
In _convertAssetsToUsdc
there is a check to see if the underlying asset is USDC. If it is, no swap is required and the usdc out remains the same. The problem is that there is not settlement fee charged in this scenario.
https://github.com/Cyfrin/2025-01-zaros-part-2/blob/35deb3e92b2a32cd304bf61d27e6071ef36e446d/src/market-making/branches/CreditDelegationBranch.sol#L815C9-L818C10
For example, it is possible that a vault uses USDC as it collateral asset (ctx.vaultAsset == ctx.usdc) . They may be incentivized to do so, as settleVaultsDebt would not charge a settlement fee
No fee on USDC
Manual Review
Fee settlement should be outside the if else blocks to ensure it is charged
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.