Skip to content

Code4rena

Ethereum Credit Guild

Every publicly disclosed report for Ethereum Credit Guild and what kind of bugs they were.

disclosed reports
29
most reported class
Business logic
bug classes found
3
first disclosure
2024
Find Ethereum Credit Guild on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Ethereum Credit Guild chose to make public.

DoS

totalBorrowedCredit can revert, breaking gauges.

The totalBorrowedCredit function subtracts redeemableCredit from targetTotalSupply, but a decrease in creditMultiplier after a loss can make redeemableCredit exceed targetTotalSupply, causing an underflow revert. This breaks debtCeiling calculations and prevents new borrows in the market.

Ethereum Credit Guild

Medium
DoS

SurplusGuildMinter.getReward() is susceptible to DoS due to unbounded loop

The SurplusGuildMinter.getReward() function calls ProfitManager.claimRewards() which loops over all gauges the contract is subscribed to, and since the number of gauges is unbounded, the call can consume more gas than the block gas limit and revert. An attacker could cause stake, unstake, and getReward to become unusable by ensuring a large number of terms are added.

Ethereum Credit Guild

Medium
Business logic

RateLimitedMinter isn’t used by SimplePSM resulting in Governance attacks

The SimplePSM contract allows minting gUSDC without a rate limit, so an attacker with enough USDC can mint a large amount and use it to veto governance actions. The ProfitManager also does not replenish the RateLimitedMinter buffer, which could deplete the buffer for LendingTerm contracts.

Ethereum Credit Guild

Medium
Business logic

Inability to withdraw funds for certain users due to whenNotPaused modifier in RateLimitedMinter

When the protocol is paused, the RateLimitedMinter's mint function is blocked by a whenNotPaused modifier, and because unstaking first tries to mint pending guild rewards, users with staked CREDIT and pending rewards cannot unstake or withdraw. This contradicts the documented expectation that the GUARDIAN role can freeze usage but not block withdrawals.

Ethereum Credit Guild

Medium
Smart contracts

Users staking via the SurplusGuildMinter can be immediately slashed when staking into a gauge that had previously incurred a loss

The SurplusGuildMinter contract incorrectly marks a user as slashed when they stake into a gauge that has ever experienced a loss, because it compares the gauge's last loss timestamp against a freshly initialised zero value. An attacker can immediately call getRewards to slash the user, causing them to lose their staked Credit and any guild rewards.

Ethereum Credit Guild

High
Business logic

The creation of bad debt ( mark-down of Credit) can force other loans in auction to also create bad debt

The auction contract stores the loan debt as a snapshot when a loan is called, but the protocol's credit multiplier can be marked down later if another loan creates bad debt. This makes the stored debt lower than the recalculated principal, so bids in the first auction phase revert and the loan can only be bid on in the second phase, forcing additional bad debt.

Ethereum Credit Guild

High
Smart contracts

Anyone can steal all distributed rewards

A caching error in the rebase token contract allows a user to steal all unminted distributed rewards by transferring tokens to themselves while in rebase. The attacker can frontrun reward distribution transactions and atomically claim the rewards for themselves.

Ethereum Credit Guild

High
Business logic

Inability to offboard term twice in a 7-day period may lead to bad debt to the market

The offboarding contract prevents proposing a new offboarding poll for the same lending term within 7 days, even if the previous offboarding completed and the term was re-onboarded. An attacker could exploit this by re-onboarding a risky term quickly, preventing GUILD voters from offboarding it again, potentially leading to bad debt.

Ethereum Credit Guild

Medium
Business logic

Over 90% of the Guild staked in a gauge can be unstaked, despite the gauge utilizing its full debt allocation

A gauge's debt ceiling calculation uses a tolerance multiplier that allows a staker to unstake a portion of their Guild even when the gauge is at full debt allocation. By repeatedly unstaking small amounts, over 90% of the staked Guild can be withdrawn, bypassing the intended lock that prevents exit when the gauge is fully utilised.

Ethereum Credit Guild

Medium
Business logic

Incorrect calculations in debtCeiling

The debtCeiling function incorrectly applies a gauge weight delta only to the gauge's own weight, not to the total weight, causing the calculated ceiling to be too low when a user tries to decrement their gauge weight. This prevents users from withdrawing Guild tokens from the gauge even when it is the only gauge of its type and should have an unlimited ceiling.

Ethereum Credit Guild

Medium
Business logic

The gauge status wasn’t checked before reducing the user’s gauge weight.

The gauge status was not checked before reducing a user's gauge weight, allowing guild holders to decrement their weight on an offboarded term and avoid being slashed for potential losses, transferring the loss to other passive holders and credit token holders.

Ethereum Credit Guild

Medium
Business logic

Auction manipulation by block stuffing and reverting on ERC-777 hooks

The auction duration and midpoint were set too short in the deployment script, allowing an attacker to stuff blocks and prevent bids until the auction price dropped, buying collateral cheaply. This could cause losses for stakers and, with ERC-777 tokens, become a self-liquidation attack.

Ethereum Credit Guild

Medium
Business logic

LendingTerm debtCeiling function uses creditMinterBuffer incorrectly

The debtCeiling function incorrectly uses the creditMinterBuffer as a cap on total debt rather than on additional borrowing, causing the ceiling to be lower than it should be. This can prevent guild voters and surplus stakers from removing their votes or stakes from a gauge, even when the true debt ceiling would allow it.

Ethereum Credit Guild

Medium
Business logic

Anyone can prolong the time for the rewards to get distributed

The reward distribution mechanism resets the end timestamp each time a new distribution is triggered, so an attacker can repeatedly call distribute with a tiny amount to extend the distribution period and delay rewards for rebasing users.

Ethereum Credit Guild

Medium
Smart contracts

Malicious borrower can decrease Guild holders reward

A borrower can temporarily stake a large amount of credit tokens just before a profit notification, capturing most of the rewards meant for long-term Guild stakers. The attacker then unstakes and repays the flash loan, leaving other stakers with reduced rewards.

Ethereum Credit Guild

Medium
DoS

Wrong ProfitManager in GuildToken, will always revert for other types of gauges leading to bad debt

The GuildToken contract stores a single ProfitManager address set at construction, but each market has its own ProfitManager. When a second market's ProfitManager calls notifyGaugeLoss, the call reverts because the sender does not match the stored address, so losses from other markets cannot be recorded and loans are not removed, leading to bad debt.

Ethereum Credit Guild

Medium
Business logic

Users can deflate other markets Guild holders rewards by staking less priced token

The SurplusGuildMinter::stake() function does not verify that the provided term's CREDIT token matches the minter's CREDIT token, allowing a user to stake a cheaper token (gUSDC) into a different market's term (gWETH). This inflates the gauge weight for the target term, reducing rewards for legitimate guild holders in that market.

Ethereum Credit Guild

Medium
Business logic

There is no way to liquidate a position if it breaches maxDebtPerCollateralToken value creating bad debt.

Loans can exceed the maximum debt per collateral token after a partial repayment or when periodic repayments are disabled, yet the liquidation function only allows calling a loan if the term is deprecated or a partial repayment deadline was missed. This leaves the position unliquidatable, creating bad debt and forcing the entire term to be offboarded.

Ethereum Credit Guild

Medium
Business logic

PnL system can be broken by large users intentionally or unintentionally.

The profit and loss accounting function can revert when a large borrower's loss exceeds the remaining credit token supply after the surplus buffer is burned, because the calculation of the new credit multiplier subtracts the loss from the total supply and underflows. An attacker could intentionally burn their own credit tokens to trigger this, blocking loan auctions and breaking the gauge slashing and voting systems.

Ethereum Credit Guild

Medium