Hunt prep
Before you test Debt DAO contest
What 17 disclosed reports say about Debt DAO contest: 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 | 10 | 0 | – | – | $0 |
| Smart contracts lesson | 5 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
| DoS lesson | 1 | 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.
-
addCredit / increaseCredit cannot be called by lender first when token is ETH
The contract should provide a separate function to grant consent and should revert if ETH is sent before the other party has consented.
Disclosed
-
Call to declareInsolvent() would revert when contract status reaches liquidation point after repayment of credit position 1
The whileBorrowing() modifier should be reviewed and amended so it does not depend on the first credit position's principal.
Disclosed
-
Borrower/Lender excessive ETH not refunded and permanently locked in protocol
The receiveTokenOrETH function should either refund any excess ETH to the sender or revert if msg.value does not exactly equal the required amount.
Disclosed
-
Borrower can by mistake add own money to credit if credit is in ETH
The addCredit function should require that, for ETH payments, the lender address equals the caller.
Disclosed
-
The lender can draw out extra credit token from borrower’s account
Add reentrancy protection to the close() function.
Disclosed
-
address.call{value:x}() should be used instead of payable.transfer()
It should be fixed by using a low-level call with a result check or OpenZeppelin's Address.sendValue, while keeping reentrancy protections.
Disclosed
-
Mistakenly sent eth could be locked
The ERC20 branch should check that msg.value is zero and revert if any ETH is sent, as the report recommends.
Disclosed
-
Reentrancy bug allows lender to steal other lenders funds
Send tokens only at the end of the _close function or add a reentrancy guard.
Disclosed
-
Lender can trade claimToken in a malicious way to steal the borrower’s money via claimAndRepay() in SpigotedLine by using malicious zeroExTradeData
The functionality should probably be limited to the borrower, since the borrower would not benefit from stealing their own money.
Disclosed
-
Borrower can close a credit without repaying debt
The close function should be fixed to ensure that a credit with the user-supplied ID exists before closing it.
Disclosed
-
Repaying a line of credit with a higher than necessary claimed revenue amount will force the borrower into liquidation
The fix is to add a check that the repayment amount does not exceed the principal plus accrued interest, similar to the check in depositAndRepay.
Disclosed
-
Mutual consent cannot be revoked and stays valid forever
The consent mechanism should be fixed by allowing revocation, adding an expiry, or invalidating consents when function arguments change.
Disclosed
-
Lender can reject closing a position
The report recommends using a pull-based pattern so the lender withdraws funds instead of receiving them directly during closing.
Disclosed
-
Non-existing revenue contract can be passed to claimRevenue to send all tokens to treasury
The contract should check that the revenue contract was registered before processing the claim, and revert if it was not.
Disclosed
-
Variable balance ERC20 support
The protocol should check the before and after balance of token transfers, record relative shares instead of specific amounts, confirm balances with balanceOf when necessary, or disallow such tokens.
Disclosed