The settling vaults in credit, it's currently passing the amountIn in usd but it should pass amountIn as collateral for calculateSwapAmount
The settleCreditDeposit
in CreditDelegationBranch
will pass the usd amount for the credit case as input for calculateSwapAmount
. However, the correct approach is to pass the amount of collteral. Since the dexAdapter accepts the amountIn of tokenIn.
USD being pass as amountIn:
calculateSwapAmount calling dexAdapter
dexAdapter
As we can see, the amountIn is relative to the tokenIn.
Will result in an incorrect amount of usd being calculated and unbalanced debt/credit calculations.
Manual review.
Pass the amountIn as collateral instead of usd when calling calculateSwapAmount
when settling vault for the credit case.
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.