-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AuctionHouse.getBidDetail() - Malicious actor can intentionally slash any successful term GUILD holders. #599
Comments
0xSorryNotSorry marked the issue as sufficient quality report |
0xSorryNotSorry marked the issue as duplicate of #691 |
0xSorryNotSorry marked the issue as duplicate of #1245 |
Trumpero changed the severity to QA (Quality Assurance) |
Trumpero marked the issue as grade-b |
Hey, @Trumpero About block stuffing:
About Blacklisted ERC20s
|
@NicolaMirchev Agree that this issue should be a dup of #685, since it also mentions the block stuffing attack in phase 2 of auction. |
Trumpero removed the grade |
For transparency, the judge requested duplicate labels, severity and grade to be updated. |
Hey, @Trumpero |
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/main/src/loan/AuctionHouse.sol#L118
Vulnerability details
Impact
In combination with USDT/USDC blacklist and block stuffing a malicious user can intentionally generate bad debt for successful term and slash all GUILD holders as a result.
Tokens like USDT and USDC have functions that allow them to blacklist an address. The consequence of this action is that a blacklisted user can no longer transfer or receive tokens, which will make the first phase of the auction always revert when trying to send the remaining collateral to the borrower, which will completely block the first phase.
After that when the midPoint passes, the malicious user can delay the second phase making use of block stuffing spaming the network with transactions for one or more blocks, to delay the debt repayment from active participants of the protocol. The result of this action would generate bad debt, which will slash all GUILD holders no matter if this is the best lending term out there and GUILD liquidity is worth a lot. This is huge loss of participants capital, without any real reason.
Proof of Concept
Coded PoC, which should be placed inside test/unit/loan/AuctionHouse.t.sol and executed with forge test --match-test testSlashGUILDTermBlacklistPlusBlockStuffing -vv
https://gist.github.com/NicolaMirchev/3a9d1cb926c6239493980c92136e5da8
Tools Used
Manual review
Recommended Mitigation Steps
LendingTerm::onBid
so this function won’t be dependant on external ERC20 logic(blacklists)mapping(address -> uint256) collateralToBeRepayed
or other name and a function ``withdrawRepayedLoanCollatelwhich will send the pending reward to the
msg.sender` based on the mapping and decrement it.onBid
function may look like this:The text was updated successfully, but these errors were encountered: