Hunt prep
Before you test Rubicon v2
What 89 disclosed reports say about Rubicon v2: 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 15
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
Fee and rounding handling in market buy and sell paths
Business logic Read the lesson
Several reports show fee maths in the market and position buy and sell functions going wrong, including fee-inclusive fill comparisons and division by 10000. Test the same fee and rounding paths on the sibling functions and on tokens with different decimal precision to see whether the fee is applied consistently. This builds on the cluster of fee and rounding findings in the market and position contracts.
Backed byIncorrect fee handling in Position.sol's Market Buy / Sell funct... (2025) RubiconMarket: buy() may not take any fee for tokens with low de... (2025) Calling Position._marketSell function compares fill_amt that inc... (2025)+3 more reports
- Incorrect calculations can occur when calling Position._marketBuy and Position._marketSell functions that do not include maker fee in _fee (2025)
- Calling Position._marketBuy and Position._marketSell functions that calculate _fee by dividing by 10000 can cause incorrect calculations (2025)
- Fee inclusivity calculations are inaccurate in RubiconMarket (2025)
From the lessons: Check whether every swap, deposit or mint path enforces a user-supplie...; Compare the protocol's computed slippage bound against the true expect...; Test the protocol with several ERC20 variants (different decimals, no...
-
2
Leverage position curve and collateral accounting
Business logic Read the lesson
Reports describe the short leverage curve being non-smooth, openPosition using previous collateral for borrowing, and the last borrowed asset not being collateralised. Test opening and closing positions at boundary sizes and with reused collateral to see whether the resulting leverage and liquidation threshold match expectations. This follows the leverage and collateral accounting findings.
Backed byThe curve of short leverage position is not smooth and may cause... (2025) Due to the loss of precision, openPosition will make the user’s... (2025) When opening a position, the collateral of the previous position... (2025)From the lessons: Liquidation and force repay paths.; Mint or redeem shares and check whether the function enforces a minimu...; Open a position and close at the same price and check whether it latch...
-
3
Liquidation and close paths for leveraged positions
Business logic Read the lesson
Several reports show liquidated positions that cannot be closed, positions that can still be interacted with after liquidation, and leveraged positions that cannot be closed at all. Test the close, liquidate and repay flows on positions in each state to see whether state transitions and collateral release behave correctly. This builds on the liquidation and close findings.
Backed byPosition contract allows to interact with positions that are liq... (2025) A liquidated position possibly cannot be closed (2025) Cannot close leveraged positions (2025)+2 more reports
From the lessons: Liquidation and force repay paths.; Liquidation, repayment and debt takeover flows where front-running can...; Front-run a liquidation with a minimal repayment of the outstanding de...
-
4
Reward accounting in BathBuddy and staking
Business logic Read the lesson
Reports show reward accounting errors, lost initial-period rewards, incorrect reward duration extension and a rewards DoS in BathBuddy. Test notifyRewardAmount, vesting and claim flows around period boundaries and with low-decimal reward tokens to see whether accounting stays consistent. This follows the reward accounting findings.
Backed byBathBuddy rewards DoS (2025) Incorrect reward duration extension in notifyRewardAmount functi... (2025) Rewards for initial period may be lost in BathBuddy contract (2025)+2 more reports
From the lessons: Yield distribution and reward treasury contracts.; Reward accumulation updates in staking and vault contracts.
-
5
First depositor and share minting on the Compound fork
Business logic Read the lesson
A high finding covers the first depositor bug on the unmodified Compound fork, and older reports show first depositor share minting and previewWithdraw share errors. Test deposit, mint and withdraw share maths on a fresh market and after large share burns to see whether rounding favours the depositor. This builds on the share accounting findings.
Backed byFirst depositor bug on unmodified Compound fork (2025) First depositor can break minting of shares (2022) previewWithdraw calculates shares wrongly (2022)From the lessons: Mint or redeem shares and check whether the function enforces a minimu...; Withdraw or redeem from a vault and check whether a slippage bound is...; Trigger an internal outflow and check whether deposited share counters...
-
6
Rounding exploitation across swap and position maths
Business logic Read the lesson
Rounding is a recurring technique here, with reports on rounding-error profit and precision loss raising leverage. Test the swap, position and fee calculations with amounts near rounding boundaries and low-decimal tokens to see whether repeated small operations yield risk-free value. This follows the rounding findings.
Backed byAttack on rounding errors to get risk free profit (2025) Due to the loss of precision, openPosition will make the user’s... (2025) RubiconMarket: buy() may not take any fee for tokens with low de... (2025)+1 more report
From the lessons: Compare the protocol's computed slippage bound against the true expect...; Test the protocol with several ERC20 variants (different decimals, no...
-
7
Slippage and minimum fill enforcement in market and router
Business logic Read the lesson
Reports show slippage checked incorrectly in the market, missing minimum sell amounts at make, and router slippage checks that do not hold. Test the buy, sell, make and router swap paths with a user-supplied minimum to see whether the bound is actually enforced. This builds on the slippage findings.
Backed byRubiconMarket checks slippage incorrectly (2025) Missing a check for minimum sell amount at the make function (2025) RubiconRouter.swapEntireBalance() doesn’t handle the slippage ch... (2022)+1 more report
From the lessons: Check whether every swap, deposit or mint path enforces a user-supplie...; Compare the protocol's computed slippage bound against the true expect...; Set the slippage parameter to a value that passes the check but still...
-
8
Offer cancellation and batch offer edge cases
Business logic Read the lesson
Reports show some offers cannot be cancelled, batchOffer and batchRequote create offers as self, and V1 offers break buys due to cancel reverting. Test cancel, requote and batch paths for offers created through different entry points to see whether ownership and cancellation behave correctly. This follows the offer lifecycle findings.
Backed bySome offers can’t be cancelled (2025) RubiconMarket batchOffer and batchRequote make offers as self; c... (2025) RubiconMarket._buys will not work for V1 offers due to the rever... (2025)From the lessons: Open admission and same-price close in a trading protocol.; NFT rental orders, partial offers and payment token handling.
-
9
FeeWrapper ETH refunds and fee recipient handling
Reports show FeeWrapper failing to refund ETH, low-level calls to codeless accounts succeeding, and reentrancy when the fee recipient is malicious. Test the fee charging and refund paths with ETH and with a contract fee recipient to see whether refunds and state updates are handled safely. This builds on the FeeWrapper findings.
Backed byREENTRANCY ATTACK POSSIBLE IF THE _feeTo IS A MALICIOUS CONTRACT... (2025) Low level calls to accounts with no code will succeed in FeeWrap... (2025) FeeWrapper fails to handle ETH payment refunds (2025)+1 more report
From the lessons: Functions that make external calls to tokens, native currency or NFTs...; Re-enter through a token callback or a read-only call rather than the...; Re-enter a redemption or swap function through a callback and check wh...
-
10
Market pause and stop controls
Access control Read the lesson
Reports show stop and isClosed not pausing functionality, buys not disabled when matching is disabled, and changing matchingEnabled breaking the protocol. Test the pause, stop and matching toggle paths to see whether each control actually blocks the operations it should. This follows the market control findings.
Backed byCalling ExpiringMarket.stop and ExpiringMarket.isClosed function... (2025) RubiconMarket buys can not be disabled if offer matching is disa... (2022) Changing matchingEnabled in RubiconMarket breaks protocol (2022)From the lessons: Two-step admin and ownership transfer functions.; Initialise and setup functions on newly deployed contracts.
-
11
Borrow limit and interest calculation edge cases
Reports show an infinite loop in _borrowLimit, borrow limit ignoring existing collateral, and block.number causing incorrect interest. Test the borrow limit and interest accrual with positions that have no bathToken, with existing collateral, and across block progression to see whether limits and interest stay correct. This builds on the borrow and interest findings.
Backed byPotential infinite loop in _borrowLimit function (2025) Position._borrowLimit doesn’t use exisiting collateral in case i... (2025) Use of block.number leads to incorrect interest calculations (2025)From the lessons: Liquidation and force repay paths.; Reward accumulation updates in staking and vault contracts.
-
12
Migration value and price manipulation
Business logic Read the lesson
Reports show users receiving less value on migration and migration being exposed to price manipulation. Test the migrator with different bathTokenV1 balances and around price movements to see whether the conversion preserves value. This follows the migration findings.
Backed byUser can possess less value than before when V2Migrator.migrate... (2025) Users might get less assets than expected upon migration due to... (2025)From the lessons: Migration permit revocation and reactivation.; Price feeds, pool share weights and Curve or Balancer pool oracles use...
-
13
Token variant handling across deposits and transfers
Business logic Read the lesson
Older reports show USDT approval issues, deflationary token deposits failing, and transfer-on-fee accounting inconsistencies. Test deposits, withdrawals and transfers with tokens that reject non-zero approvals, charge fees on transfer, or return no boolean to see which paths break accounting. This builds on the token compatibility findings.
Backed byUSDT is not supported because of approval mechanism (2022) Cannot deposit to BathToken if token is Deflationary Token (Bath... (2022) Inconsistent Order Book Accounting When Working With Transfer-On... (2022)+1 more report
From the lessons: Deposit a USDT-like token that rejects non-zero-to-non-zero approvals...; Test the protocol with several ERC20 variants (different decimals, no...; Use a fee-on-transfer token as the asset or collateral and check wheth...; Call every transfer and transferFrom path with a token that returns fa...; Use a token whose approve and transfer do not return a boolean and che...
-
14
Router ETH handling and fund custody
Business logic Read the lesson
Reports show excess ether not returned, withdrawForETH draining WETH, and router funds being stealable. Test the router ETH and WETH paths, including refunds and swaps with leftover value, to see whether user funds and excess ETH are handled correctly. This follows the router findings.
Backed byAn attacker can steal all RubiconRouter funds (2025) RubiconRouter: Excess ether did not return to the user (2022) withdrawForETH could be used to drain the WETH in RubiconRouter.... (2022)+1 more report
From the lessons: Functions that make external calls to tokens, native currency or NFTs...; Swap, deposit, mint, withdrawal and settlement functions in AMMs, vaul...
-
15
Access control on offer and insert entry points
Access control Read the lesson
An older report shows missing access control on the offer and insert functions. Test the offer creation and insertion entry points from unprivileged callers to see whether authorisation is enforced and whether offers can be created on behalf of others. This builds on the access control finding.
Backed byLack of Access Control for offer(uint, ERC20, uint, ERC20) and i... (2022) RubiconMarket batchOffer and batchRequote make offers as self; c... (2025)From the lessons: Open admission and same-price close in a trading protocol.; Two-step admin and ownership transfer functions.
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 | 55 | 0 | – | – | $0 |
| Smart contracts lesson | 11 | 0 | – | – | $0 |
| Access control lesson | 9 | 0 | – | – | $0 |
| DoS lesson | 7 | 0 | – | – | $0 |
| Race condition lesson | 3 | 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.
-
Incorrect reward duration extension in notifyRewardAmount function
The notifyRewardAmount function should be modified to only extend the reward duration when necessary.
Disclosed
-
Position._borrowLimit doesn’t use exisiting collateral in case if user doesn’t have any _bathToken
The calculation should query the comptroller for the account's overall liquidity and, when liquidity is non-zero, include the maximum borrowable amount from existing collateral.
Disclosed
-
Some offers can’t be cancelled
Override the SimpleMarket offer function in RubiconMarket so that it routes through the sorted offer logic and inserts the offer into the tracking lists.
Disclosed
-
The _matcho() is not implemented properly
The _matcho() function should add the fee to m_pay_amt when calling buy(), as suggested in the report.
Disclosed
-
Potential infinite loop in _borrowLimit function
The function should be fixed by limiting the number of iterations, restricting the minimum _loopBorrowed value, or using a closed-form solution to avoid the loop.
Disclosed
-
Attack on rounding errors to get risk free profit
The spend calculation should be rounded up instead of down.
Disclosed
-
FeeWrapper fails to handle ETH payment refunds
The FeeWrapper should implement a receive function to accept ETH and then refund any remaining ETH back to the original caller after the target call.
Disclosed
-
Wrong calculation of repayment amount in Position contract
The contract should track changes in the supply/borrow state to calculate interest accurately, though this may increase gas costs.
Disclosed
-
The last borrowed asset will not be collateralized and the user may be liquidated due to insufficient collateral
After the borrow loop ends, supply any remaining asset balance as collateral.
Disclosed
-
BathBuddy contract should implement methods to pause and unpause contract
The contract should implement public pause and unpause functions restricted to the owner that call the internal _pause and _unpause methods.
Disclosed
-
Calling Position._marketSell function compares fill_amt that includes fee to min_fill_amount that does not include fee
The Position._marketSell function should be updated to pass _minFill.add(_fee) to sellAllAmount instead of _minFill.
Disclosed
-
Cannot close leveraged positions
The contract should implement a repay loop (repay, redeem, swap) or allow partial closing of positions.
Disclosed
-
The curve of short leverage position is not smooth and may cause users to open positions that are different from expectations
The recommendation is to no longer support 1.0x short leverage.
Disclosed
-
Zero reward rate calculation impedes low-decimals token distributions
Increase the precision scale of the reward rate calculation using a factor (e.g. 10**8) multiplied to the amount when calculating the distribution’s rate.
Disclosed
-
Position contract allows to interact with positions that are liquidated
The contract should reject interactions such as increaseMargin and closePosition on positions that have already been liquidated.
Disclosed