Skip to content

Code4rena

Gondi Invitational

Every publicly disclosed report for Gondi Invitational and what kind of bugs they were.

disclosed reports
38
most reported class
Business logic
bug classes found
5
first disclosure
2024
Find Gondi Invitational on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Gondi Invitational chose to make public.

Business logic

Incorrect accounting of _pendingWithdrawal in queueClaiming flow

In the queue claiming flow, the pending withdrawal amount for a queue index was overwritten rather than accumulated, so funds distributed from earlier queue indexes were lost. An attacker or user could lose received funds when multiple queues were claimed together.

Gondi Invitational

High
Access control

addNewTranche() no authorization from borrower

The addNewTranche function only verified the lender's signature, not the borrower's authorisation, so any lender could add a tranche to any loan. A lender could set a very high APR and a fee equal to the principal, harming the borrower.

Gondi Invitational

High
Race condition

mergeTranches() / refinancePartial() lack of nonReentrant

The mergeTranches and refinancePartial functions lack reentrancy protection, allowing an attacker to reenter during a callback and create duplicate loan records for the same NFT. This could let the attacker repay one loan, recover the NFT, use it to borrow other funds, and then repay the other loan to recover the NFT again.

Gondi Invitational

High
Business logic

Collected fees are never transferred out of Pool contract

The Gondi Pool contract credits fees to an internal counter but never transfers them out, so the funds remain locked in the contract indefinitely. An attacker could not directly steal these fees, but the value is permanently stuck, representing a leak of value.

Gondi Invitational

Medium
Business logic

Pool.getMinTimeBetweenWithdrawalQueues current calculations may not be sufficient

The minimum time between withdrawal queues in the Pool contract is calculated as MaxDuration plus a seven-day buffer, but auction bidding can be extended by a no-action margin, so the buffer may be too short. This could cause pendingQueues to be overwritten before a loan is repaid, leaving the loan unable to find its corresponding queues.

Gondi Invitational

Medium
Business logic

loanLiquidation() calculation of interest is not accurate

The loan liquidation function incorrectly treats the entire received amount as principal when calculating fees, ignoring that the received amount may exceed the principal. This leads to incorrect fee calculation when the received amount is greater than the principal.

Gondi Invitational

Medium
Business logic

loan.hash() does not contain protocolFee

The loan hash used to verify loan integrity omitted the protocolFee field, so a caller could supply an arbitrary protocolFee in later calls without failing the hash check. This allowed borrowers to avoid paying protocol fees and could cause accounting errors in the LoanManager.

Gondi Invitational

Medium
Access control

Anyone can remove existing term without queueing through setTerms()

The confirmTerms function in PoolOfferHandler can be called by anyone and uses caller-supplied terms to overwrite existing terms, allowing an attacker to set all existing terms' aprPremium to zero without the owner's intent.

Gondi Invitational

Medium
DoS

Attacker can front-run and pass in empty terms, making it impossible to confirmTerms()

The confirmTerms() function can be called by anyone and accepts an empty terms list, which sets pendingTermsSetTime to max and prevents the owner from confirming new terms. An attacker can front-run the owner's confirmTerms() call with an empty list, blocking the owner from setting up new terms.

Gondi Invitational

Medium
Business logic

Borrower signature could be reused in emitLoan()

The borrower's signature for a loan execution could be reused to call emitLoan() multiple times, allowing an attacker to force the borrower into repeated loans after repayment. This could happen if the borrower set a long expiration time and the lender's offer still had capacity.

Gondi Invitational

Medium
Business logic

confirmUnderwriter() need to recalculate getMinTimeBetweenWithdrawalQueues

The Pool contract calculates a minimum time between withdrawal queues based on the underwriter's maximum duration, but when the underwriter is changed via confirmUnderwriter, this value is not recalculated. If the new underwriter has a larger maximum duration, the minimum time becomes too small, causing pending queues to be overwritten prematurely and loans to fail to find their queues when repaid.

Gondi Invitational

Medium
Business logic

distribute() uses the wrong end time to break maxSeniorRepayment ’s expectations

The distribute() function calculates pending interest using the current block timestamp instead of the loan's end time, so interest accrues for longer than the loan duration. When proceeds are insufficient, this causes earlier lenders to receive more repayment than expected, breaking later lenders' maxSeniorRepayment protection.

Gondi Invitational

Medium
Business logic

confirmBaseInterestAllocator() change BaseInterestAllocator may pay large getReallocationBonus

When the owner confirms a new base interest allocator, the old allocator's entire balance is transferred back into the pool, which can dramatically increase the pool's assets. A subsequent user calling reallocate() then receives an outsized bonus because the bonus calculation uses the large delta between current balance and target idle.

Gondi Invitational

Medium
Business logic

triggerFee is stolen from other auctions during settleWithBuyout()

The settleWithBuyout function pays the trigger fee from the contract's balance instead of from the buyer, so the fee is taken from funds belonging to other auctions. This can cause other auctions to fail to settle or lose principal.

Gondi Invitational

High
Race condition

validateOffer() reentry to manipulate exchangeRate

The validateOffer function updates the pool's outstanding loan accounting before the loan principal is transferred out, temporarily inflating the pool's exchange rate. An attacker can use a malicious validator callback during loan emission to redeem pool shares at this inflated rate and receive more assets than entitled.

Gondi Invitational

High
Business logic

Invalid maxTranches check can result in maxTranche cap to be exceeded

The smart contract did not enforce a maximum number of tranches in several functions that add tranches, and the existing check used equality instead of a greater-than-or-equal comparison. An attacker could exceed the intended cap, potentially causing unexpected behaviour or denial of service.

Gondi Invitational

Medium
Business logic

Function addNewTranche() should use protocolFee from Loan struct

The addNewTranche function uses the current protocol fee fraction instead of the fee stored in the Loan struct when a loan was issued. This could cause inconsistent fee collection if the admin updates the protocol fee.

Gondi Invitational

Medium
DoS

Function Pool.validateOffer() does not work correctly in case principalAmount > currentBalance

The Pool contract's validateOffer() function incorrectly calls reallocate() with wrong parameters when the principal amount exceeds the current balance, causing the contract to deposit more funds instead of withdrawing. This can leave the contract with insufficient balance to fund the loan, resulting in a denial of service under certain conditions.

Gondi Invitational

Medium
Business logic

_processOffersFromExecutionData() lack of check executionData.duration<=offer.duration

The loan emission function only checked that the offer duration was non-zero, but did not verify that the duration supplied in the execution data was less than or equal to the offer's duration. An attacker could therefore create a loan whose actual borrowing period far exceeds the agreed offer duration, and if the lender is a LoanManager this could also exceed the maximum pending queues and cause accounting problems.

Gondi Invitational

High
Business logic

_baseLoanChecks() check errors for expire

The loan expiration check in _baseLoanChecks uses a strict less-than, so at the exact timestamp when the loan duration ends, the loan is still considered valid. An attacker can liquidate the loan and then immediately add a new tranche, which clears the original loan record, causing the later liquidation callback to fail and locking the NFT or funds.

Gondi Invitational

High