Borrower can craft a borrow that cannot be liquidated, even by arbiter.
Debt DAO contest
HighCode4rena
Every publicly disclosed report for Debt DAO contest and what kind of bugs they were.
Newest first. Only what Debt DAO contest chose to make public.
Debt DAO contest
HighThe 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
HighThe 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
HighThe 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
MediumWhen 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
MediumThe 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
MediumThe 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
MediumThe 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
MediumA 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
MediumThe lender can supply malicious trade data to claimAndRepay, causing the contract to buy a tiny amount of the debt token while the lender keeps the proceeds from selling the borrower's revenue token. This lets the lender repay only a small amount and steal the borrower's funds.
Debt DAO contest
MediumThe 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
HighThe repay function in a smart contract underflows the principal when the repayment amount exceeds the principal plus interest, setting it to a very large number. This forces the credit line into immediate liquidation and makes repayment extremely expensive.
Debt DAO contest
HighThe 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
MediumThe 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
MediumThe claimRevenue function did not verify that the provided revenue contract was registered. An attacker could pass a non-existent contract address, causing all claimed tokens to be sent to the treasury instead of the escrow, depriving the lender of revenue.
Debt DAO contest
HighThe 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
MediumWhitelisted function selectors in the Spigot contract are not tied to specific revenue contracts, so a selector approved for an innocent function can also match a malicious function in another contract. An attacker could exploit this selector clash to call a harmful function through the Spigot's operate function.
Debt DAO contest
Medium