Skip to content

Code4rena

Debt DAO contest

Every publicly disclosed report for Debt DAO contest and what kind of bugs they were.

disclosed reports
17
most reported class
Business logic
bug classes found
4
first disclosure
2023
Find Debt DAO contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Debt DAO contest chose to make public.

Business logic

addCredit / increaseCredit cannot be called by lender first when token is ETH

The mutual consent mechanism for addCredit and increaseCredit does not revert on the first call, so when the lender sends ETH with that first call the ETH is lost. The borrower cannot complete the second call without sending ETH, so the lender cannot add credit first.

Debt DAO contest

High
Business logic

Call to declareInsolvent() would revert when contract status reaches liquidation point after repayment of credit position 1

The declareInsolvent() function is guarded by a modifier that reverts when the first credit position has zero principal. After a borrower repays one credit position, the queue reordering can move a fully repaid position to the front, so the arbiter's call to declare insolvency reverts even though the contract is liquidatable.

Debt DAO contest

High
Business logic

Borrower/Lender excessive ETH not refunded and permanently locked in protocol

The protocol's ETH receiving function does not refund excess ETH sent by borrowers or lenders, and because internal accounting only records the intended amount, the surplus becomes permanently locked in the contract. An attacker or careless user could send more ETH than required, and those funds could never be withdrawn.

Debt DAO contest

Medium
Business logic

Borrower can by mistake add own money to credit if credit is in ETH

When a credit line is denominated in ETH, the addCredit function accepts ETH from whoever sends the transaction rather than from the named lender, because the sender argument is never compared with the caller. A borrower could therefore end up funding their own credit by mistake.

Debt DAO contest

Medium
Smart contracts

The lender can draw out extra credit token from borrower’s account

The close() function in the LineOfCredit contract sends tokens to the lender before updating the internal count, allowing a lender using a token with a transfer hook to re-enter close() and repeatedly withdraw extra tokens from the borrower's account. This also underflows the count variable, preventing the line from being repaid and the borrower from recovering collateral.

Debt DAO contest

Medium
Smart contracts

address.call{value:x}() should be used instead of payable.transfer()

The contract uses Solidity's transfer() to send ETH, which forwards only a fixed small amount of gas. If the recipient is a smart contract whose fallback needs more gas, the transfer fails and the ETH cannot be withdrawn.

Debt DAO contest

Medium
Business logic

Mistakenly sent eth could be locked

The contract's token transfer helper ignores any ETH sent alongside an ERC20 transfer, so that ETH becomes stuck in the contract. An attacker could cause a user to lose funds by inducing them to send ETH with an ERC20 call, or a user might do so by mistake.

Debt DAO contest

Medium
Smart contracts

Reentrancy bug allows lender to steal other lenders funds

A reentrancy bug in the _close function of LineOfCredit.sol allows a lender to repeatedly close the same credit position and drain funds from other lenders who lend the same token type. An attacker could steal other lenders' tokens if the protocol supports a token with a callback mechanism.

Debt DAO contest

Medium
Business logic

Borrower can close a credit without repaying debt

The close function of LineOfCredit did not verify that the supplied credit ID existed, so calling it with a non-existent ID still decremented the internal credit count and could mark the whole facility as repaid. A borrower could therefore close a credit without repaying the debt, leaving the lender with bad debt while keeping the borrowed amount and collateral.

Debt DAO contest

High
Business logic

Mutual consent cannot be revoked and stays valid forever

The MutualConsent contract allows one party to give consent for a function call that cannot be revoked, so the other party can later execute that function without fresh consent. This lets a borrower set interest rates without the lender's ongoing approval.

Debt DAO contest

Medium
DoS

Lender can reject closing a position

The lender can reject the closing of a credit line by reverting the token transfer when the credit token is native ETH or an ERC-777 token with receiver hooks. This prevents the borrower from closing the credit line, which blocks migration to a new line, releasing a spigot, and sweeping remaining tokens.

Debt DAO contest

Medium
Smart contracts

Variable balance ERC20 support

The protocol stores the spot balance of deposited ERC20 tokens, which is inaccurate for tokens whose balances change over time (fee-on-transfer, rebasing, or variable-balance tokens). This can lead to incorrect collateral valuation and loss or locking of funds during deposit, repayment, or withdrawal.

Debt DAO contest

Medium