The smart contract uses `transfer` to send ether, which can fail if the recipient is a contract with a costly fallback function. An attacker could cause ether transfers to fail, potentially locking funds or disrupting payouts.
The addLiquidity function calculates the expected LP token amount using Curve's calc_token_amount and then applies a slippage tolerance to that already-exact value. An attacker could exploit this by manipulating the pool to be imbalanced, causing the function to accept a much lower amount of LP tokens than intended, leading to value loss.
The admin role can call updateRewardsMetadata to reset the claimed tracker, allowing a user to claim rewards again after a metadata update. If the admin accidentally sends two identical update transactions, a user could claim twice.
The BribeVault.transferBribes function accepts distribution parameters without verifying they match the actual deposited bribes, allowing the admin to create arbitrary distributions. An attacker with admin access could under- or overreport amounts, take amounts from other bribes, or steal all amounts by using 100% fees.
The transferBribes function allowed an admin to distribute rewards before the associated proposal deadline and lacked validation that the provided token and amount matched the reward identifier. An attacker with admin privileges could transfer rewards early or with incorrect tokens and amounts.
A privileged depositor role could perform a self-transfer of WETH to artificially increase the recorded bribe amount without actually transferring any new tokens. This could allow the attacker to inflate bribe amounts at no cost.
The contract relies on a Curve pool's price oracle to calculate liquidity amounts, which could be manipulated by an attacker who skews the price a few blocks before the upkeep transaction, causing the treasury to deposit more ETH or burn more BTRFLY than necessary. The report recommends adding freshness and deviation checks to the oracle usage.
The transferBribes() function in BribeVault.sol uses token.transfer() instead of safeTransfer, so tokens like USDT that do not return a boolean will cause the transaction to revert. This makes such tokens unusable in the protocol.
The depositBribeERC20 function in BribeVault is reentrant because it calls an attacker-supplied token contract before registering the token. An attacker with DEPOSITOR_ROLE can use a malicious token to reenter and inflate a bribe's amount to the maximum integer, allowing them to steal all funds when the bribe is withdrawn.
The transferBribes function uses a user-supplied fee amount instead of the stored fee state variable, so the fee can be set to any value. A malicious admin could set an incorrect fee, undermining the fairness of bribe distribution.
The BribeVault contract lets any address holding DEPOSITOR_ROLE pull an approved ERC20 amount from a briber using arbitrary bribe and reward identifiers. A malicious or compromised depositor could therefore move a user's approved tokens into the vault, and the admin role could later withdraw them.
The setFee function allows an admin to set fees up to 100% and can be changed at any time, including after deposits are made, potentially harming users. An attacker with admin privileges could frontrun deposits or retroactively increase fees, though the report notes this requires trust in the admin.
The BribeVault contract allows an address with the DEFAULT_ADMIN_ROLE to grant itself the depositor role, then use depositBribeERC20 to pull tokens from any user who has approved the contract, and finally withdraw those tokens via emergencyWithdrawERC20. A malicious or compromised admin could therefore steal all approved tokens up to the allowance limit.
The depositBribeERC20 function in BribeVault.sol allows a depositor to specify an arbitrary briber address, so a malicious depositor could transfer another user's approved tokens without their knowledge. The function also lacks checks for expired proposals and allows mismatched reward and bribe identifiers, leading to incorrect state updates.
The reward distributor contract allows users to claim rewards based on a merkle root that the admin can update. If a user frontruns the admin's call to update the merkle root, they can claim their reward twice or cause a loss of rewards.
The RewardDistributor contract uses the bribeVault address to represent native ETH when claiming rewards. If the bribeVault address is changed via setBribeVault(), users with ETH rewards will be unable to claim them because the contract will attempt to call transfer() on the new bribeVault address, which is not an ERC20 token.
The ThecosomataETH contract's withdraw function lets the owner transfer any ERC20 token, including the protocol's own BTRFLY and WETH, so the owner could steal deposited funds. An attacker with owner privileges could front-run the keeper and take the funds.
RC
Redacted Cartel contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.