Hunt prep
Before you test FactoryDAO contest
What 24 disclosed reports say about FactoryDAO 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 |
| DoS lesson | 8 | 0 | – | – | $0 |
| Smart contracts lesson | 4 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
| Crypto 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.
-
MerkleVesting withdrawal does not verify that tokens were transferred successfully
The contract should check that the transfer succeeded, for example by using a low-level call that returns a success boolean, as the judge suggested.
Disclosed
-
Malicious token reward could disable withdrawals
An emergencyWithdraw function that ignores failed reward token transfers was added to mitigate the issue.
Disclosed
-
safeTransferFrom is recommended instead of transfer (1)
The project resolved the issue by switching to the SafeERC20 wrapper, as shown in the linked pull request.
Disclosed
-
Merkle leaves are the same length as the parents that are hashed
The leaf should be computed with abi.encodePacked to reduce its size to 52 bytes, preventing collisions with parent nodes.
Disclosed
-
DoS: Blacklisted user may prevent withdrawExcessRewards()
The team resolved this by wrapping transfers in a try-catch, as indicated in the linked pull request.
Disclosed
-
Rebasing tokens go to the pool owner, or remain locked in the various contracts
The project resolved this by deciding not to support rebasing tokens, as shown in the linked pull request.
Disclosed
-
Pool owners can prevent the payment of taxes
The issue was fixed by forcing taxes to be paid during withdraw(), as indicated by the resolved pull request.
Disclosed
-
amount requires to be updated to contract balance increase (1)
The contract should measure the balance before and after the transfer and use the actual increase, as shown in the recommended code, and this was resolved via a pull request.
Disclosed
-
ERC20 tokens with different decimals than 18 leads to loss of funds
The contract should dynamically check decimals() for each token in reward calculations, or addPool should require all tokens to have 18 decimals.
Disclosed
-
Owner of a pool may prevent any taxes being withdrawn
The withdrawTaxes function should be modified to allow withdrawal per reward token or to use try-catch so that a single failed transfer does not block all others.
Disclosed
-
Centralisation Risk: Owner may abuse the tax rate to claim 99.9% of pools
The tax rate should have a reasonable upper bound, such as 5%.
Disclosed
-
wrong out of range check
The check was fixed by also requiring the index to be greater than zero.
Disclosed
-
A transfer that is not validated its result.
The transfer should be wrapped with a require statement to ensure it succeeds, as done in MerkleDropFactory.sol.
Disclosed
-
MerkleDropFactory.depositTokens() does not require the tree to exist
The function should be fixed by adding a check to ensure the treeIndex is valid (0 < treeIndex <= numTrees).
Disclosed
-
SpeedBumpPriceGate: Excess ether did not return to the user
The contract was fixed to send only the required price to the beneficiary and refund any excess to the payer.
Disclosed