Hunt prep
Before you test Ethereum Credit Guild
What 29 disclosed reports say about Ethereum Credit Guild: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 21 | 0 | – | – | $0 |
| Smart contracts lesson | 5 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
totalBorrowedCredit can revert, breaking gauges.
The function should be fixed by capping the result at zero to prevent underflow, or better by tracking total tokens minted by the PSM module with a separate variable.
Disclosed
-
SurplusGuildMinter.getReward() is susceptible to DoS due to unbounded loop
The fix is to call claimRewards with a specific term instead of all terms, so the loop only processes one gauge.
Disclosed
-
RateLimitedMinter isn’t used by SimplePSM resulting in Governance attacks
The unused import was removed, but the sponsor disagreed with adding rate limits to the PSM; a lockup on veto voting power was suggested as a mitigation.
Disclosed
-
ProfitManager’s creditMultiplier calculation does not count undistributed rewards; this can cause value losses to users
The creditMultiplier slashing calculation should use targetTotalSupply() instead of totalSupply().
Disclosed
-
Inability to withdraw funds for certain users due to whenNotPaused modifier in RateLimitedMinter
An emergency withdraw method should be added so users can retrieve funds while forgoing rewards during a pause.
Disclosed
-
No check for sequencer uptime can lead to dutch auctions failing or executing at bad prices
The contract should be fixed by integrating an external uptime feed such as Chainlink’s L2 Sequencer Feeds to invalidate an auction if the sequencer was offline, or by implementing a mechanism to restart an auction that received no bids.
Disclosed
-
Users staking via the SurplusGuildMinter can be immediately slashed when staking into a gauge that had previously incurred a loss
The SurplusGuildMinter should initialise userStake.lastGaugeLoss to block.timestamp when a user first stakes, and compare the gauge's lastGaugeLoss to the user's stored value instead of a zeroed struct.
Disclosed
-
Rounding errors can cause ERC20RebaseDistributor transfers and mints to fail for underflow
The share calculations should be adapted to tolerate rounding fluctuations, for example by flooring the mentioned subtractions to zero.
Disclosed
-
LendingTerm inconsistency between debt ceiling as calculated in borrow() and debtCeiling()
The debt ceiling calculation method should be unified across the protocol.
Disclosed
-
The creation of bad debt ( mark-down of Credit) can force other loans in auction to also create bad debt
The callDebt should be calculated dynamically with the current credit multiplier during the auction instead of being stored as a snapshot.
Disclosed
-
Anyone can steal all distributed rewards
Prevent self-transfers, as they serve no purpose and cause harm.
Disclosed
-
The userGaugeProfitIndex is not set correctly, allowing an attacker to receive rewards without waiting
When userGaugeProfitIndex is zero it should be set to the current gaugeProfitIndex the first time claimGaugeRewards is called.
Disclosed
-
Inability to offboard term twice in a 7-day period may lead to bad debt to the market
The check in proposeOffboard should be modified to allow a new offboarding if the previous poll is completed, for example by resetting lastPollBlock upon successful offboarding.
Disclosed
-
Incorrect calculations in debtCeiling
The fix is to apply the gauge weight delta to totalWeight as well, so that the relative debt ceiling is calculated correctly.
Disclosed
-
Auction manipulation by block stuffing and reverting on ERC-777 hooks
Increase the auction duration and implement the fix from the related report about bad debt with blacklisting collateral tokens.
Disclosed