This repository has been archived by the owner on Aug 18, 2024. It is now read-only.
0x52 - LendingPool#flashAction
is broken when trying to refinance position across LendingPools
due to improper access control
#145
Labels
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
0x52
medium
LendingPool#flashAction
is broken when trying to refinance position acrossLendingPools
due to improper access controlSummary
When refinancing an account,
LendingPool#flashAction
is used to facilitate the transfer. However due to access restrictions onupdateActionTimestampByCreditor
, the call made from the new creditor will revert, blocking any account transfers. This completely breaks refinancing across lenders which is a core functionality of the protocol.Vulnerability Detail
LendingPool.sol#L564-L579
We see above that
account#updateActionTimestampByCreditor
is called beforeflashActionByCreditor
.AccountV1.sol#L671
When we look at this function, it can only be called by the current creditor. When refinancing a position, this function is actually called by the pending creditor since the
flashaction
should originate from there. This will cause the call to revert, making it impossible to refinance acrosslendingPools
.Impact
Refinancing is impossible
Code Snippet
LendingPool.sol#L529-L586
Tool used
Manual Review
Recommendation
Account#updateActionTimestampByCreditor()
should be callable by BOTH the current and pending creditorThe text was updated successfully, but these errors were encountered: