By definition, from the docs the Protocol fee(swapFeeApr) is defined as 0.5% per year on all credit for cash operations and the recipient of the cash pays the fee. However, during a liquidateWithReplacement operation which is also a credit for cash operation as a borrow limit order(BorrowOffer) is filled, the cash repcipient(borrower) does does not pay any fees. As seen from the code the profit extracted is only dependent on the loans interest/rate.
Lines of code
https://github.com/code-423n4/2024-06-size/blob/8850e25fb088898e9cf86f9be1c401ad155bea86/src/libraries/actions/LiquidateWithReplacement.sol#L146-L147
Vulnerability details
Impact
Impact on protocol earnings
Proof of Concept
By definition, from the docs the Protocol fee(swapFeeApr) is defined as 0.5% per year on all credit for cash operations and the recipient of the cash pays the fee. However, during a
liquidateWithReplacement
operation which is also a credit for cash operation as a borrow limit order(BorrowOffer) is filled, the cash repcipient(borrower) does does not pay any fees. As seen from the code the profit extracted is only dependent on the loans interest/rate.Tools Used
Manual Review
Recommended Mitigation Steps
Assessed type
Other