Hunt prep
Before you test Nested Finance contest
What 15 disclosed reports say about Nested Finance 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 | 13 | 0 | – | – | $0 |
| DoS lesson | 1 | 0 | – | – | $0 |
| Race condition 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.
-
User can bypass entryFee by sending arbitrary calldata to ParaSwap operator
The entry and exit fees should be charged on the tokens that enter and leave the Reserve, not on the swap's input or output tokens, and users should be restricted to predefined function signatures.
Disclosed
-
NestedFactory : User can utilise accidentally sent ETH funds via processOutputOrders() / processInputAndOutputOrders()
The receive function should be restricted to accept ETH only from the WETH contract, and the ETH input path should require that the funds are not coming from the reserve.
Disclosed
-
Undesired behavior
The code should check for duplicate token entries before pushing to the array, and a fix PR was referenced.
Disclosed
-
NestedFactory does not track operators properly
The team said they would call rebuildCache when adding and removing operators, removing entries from the cache at the same time, and a fix PR was linked.
Disclosed
-
Destroy can avoid the bulk of fees
The fee should be charged on the full amount transferred back, or a maximum slippage amount should be enforced in the order submission function; a fix PR was referenced.
Disclosed
-
Passing multiple ETH deposits in orders array will use the same msg.value many times
The team planned to remove the multicall library and treat ETH exclusively so that ETH operations cannot be batched.
Disclosed
-
Copy your own portfolio to keep earning royalties
The issue cannot be fully fixed, only mitigated, because a user can use multiple wallets; the frontend already prevents duplicating with the same address.
Disclosed
-
NestedFactory: Ensure zero msg.value if transferring from user and inputToken is not ETH
The function _transferInputTokens() should require msg.value to be zero when the input token is not ETH, as shown in the recommended mitigation.
Disclosed
-
FeeSplitter: Unbounded number of shareholders can cause DOS
The contract should enforce a sanity maximum number of shareholders that can be added.
Disclosed
-
Ensure on-chain that cache is synced
A modifier should be added to require that the cache is synced on all functions that interact with operators.
Disclosed
-
NestedFactory.sol#_submitInOrders() Wrong implementation cause users to be overcharged
The recommendation is to decrease the reserve holding by the amount actually spent plus fees and to transfer any remaining input tokens back to the user or reserve.
Disclosed
-
isResolverCached() will always return false after removing operator
The removeOperator function should replace the removed element with the last element and then pop the last element, instead of deleting the value.
Disclosed