Conversation
…loan The previous FAQ incorrectly stated that excess USDC 'cannot be borrowed'. In reality, excess USDC (actual balance - poolBalance) can be extracted by anyone via flash loan because the repayment check only verifies balanceAfter >= poolBalance, not balanceAfter >= balanceBefore. Updated to warn users and recommend calling sync() immediately after any direct transfers to protect excess funds. Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
Original prompt from Player 53627 |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Summary
Fixes a misleading FAQ entry that incorrectly stated excess USDC "cannot be borrowed." In reality, excess USDC (actual balance - poolBalance) can be extracted by anyone via flash loan because the repayment check only verifies
balanceAfter >= poolBalance, notbalanceAfter >= balanceBefore.The updated FAQ now warns users about this risk and recommends calling
sync()immediately after any direct transfers to protect excess funds.Review & Testing Checklist for Human
src/LIQFlashYul.sollines 167-176 (should beif lt(mload(0x00), poolBal) { revert })Test plan: This is a documentation-only change. Review the wording for clarity and technical accuracy.
Notes
This issue was identified during discussion about Issue #12 (excess USDC security concern). The previous FAQ was misleading - while
amount <= poolBalanceprevents borrowing MORE than poolBalance, it doesn't prevent extracting excess funds via reduced repayment.Link to Devin run: https://app.devin.ai/sessions/861106c4151b439ebcb344694d9b611a
Requested by: Player 53627 (github.stagnate430@passmail.com) / @igor53627