Hunt prep
Before you test Redacted Cartel contest
What 18 disclosed reports say about Redacted Cartel 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 | 9 | 0 | – | – | $0 |
| Access control lesson | 5 | 0 | – | – | $0 |
| Race condition lesson | 2 | 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.
-
Send ether with call instead of transfer
The fix is to use `call` to send ether and check the return value, as shown in the recommended mitigation.
Disclosed
-
Wrong slippage check
The minimum expected LP tokens should be computed off-chain and passed as a parameter to the performUpkeep function, or a price feed should be used.
Disclosed
-
Improper control over the versions of distributions’ metadata may lead to repeated claims of rewards
The update function should require the caller to provide the current update count and check it matches, preventing replay of the same update.
Disclosed
-
Distributions must not match actual bribes
The function should be fixed by validating the distributions, amounts, and fees against the deposited bribes, for example by checking that the token matches the reward identifier and that the amount plus fees equals the stored bribe amount.
Disclosed
-
transferBribes could transfer before proposal deadline + Input validation
The project should add on-chain validation to ensure the proposal has expired and that the provided token and amount match the reward identifier.
Disclosed
-
ThecosomataETH: Oracle price can be better secured (freshness + tamper-resistance)
The contract should be fixed by requiring that the price was updated within a certain time limit and that the last reported price has not deviated too far from the current oracle price.
Disclosed
-
SafeERC20.sol is imported but not used in the transferBribes() function
It should be fixed by using OpenZeppelin's SafeERC20 safeTransfer and safeTransferFrom functions, which handle the return value check and non-standard tokens.
Disclosed
-
Reentrancy in depositBribeERC20 function
The bribe token should be set before the transfer is made, and a nonReentrant modifier should be added to the deposit function.
Disclosed
-
Fees can be any amount
The function should use the stored fee state variable instead of accepting user input for the fee.
Disclosed
-
DEPOSITOR_ROLE can be granted by the deployer of BribeVault and transfer briber’s approved ERC20 tokens to bribeVault by specifying any bribeIdentifier and rewardIdentifier
The depositor contract should first pull the tokens from the briber into itself, and the vault should then transfer from the calling depositor (msg.sender) rather than from the briber address.
Disclosed
-
Manipulations of setFee
The fee should have a reasonable upper limit (e.g., 30%) and a timelock should be used so users can react to fee changes.
Disclosed
-
DEFAULT_ADMIN_ROLE of BribeVault can steal tokens from users’ wallets
The report recommends using TokemakBribe instead, restricting the 'from' parameter of transferFrom to msg.sender, and using a multi-sig for the DEFAULT_ADMIN_ROLE.
Disclosed
-
Depositor can spend funds of another Depositor
The function should only be callable by trusted bribe contracts, as the project states it already restricts the depositor role to such contracts.
Disclosed
-
Users Can Frontrun Calls to updateRewardsMetadata() And Claim Tokens Twice
The fix should implement a delay where users cannot claim rewards before a call to `updateRewardsMetadata()` is made, or set a blank merkle root and evaluate previous claims before constructing a new one.
Disclosed
-
Changing bribeVault in RewardDistributor.sol will Lock Current ETH Rewards
The bribeVault address should be made immutable and the setter removed, as the project confirmed they will do.
Disclosed