The NestedFactory contract allowed users to bypass entry fees by supplying arbitrary calldata to the ParaSwap operator, which could be manipulated to swap a tiny amount of input token for a large amount of output token via a malicious ERC777 token. An attacker could thus deposit a large amount into the vault without paying the intended entry fee.
The NestedFactory contract accepts plain ETH transfers from any sender and its order processing functions do not verify that ETH input comes from the reserve, allowing anyone to create an output order using the contract's accidentally sent ETH balance. An attacker could thereby convert stray ETH into tokens for their own benefit.
The store function in NestedRecords.sol pushes a token address into an array without checking for duplicates, so if a token is first added with amount 0 and later with a larger amount, it appears twice and all processing uses the first (zero) occurrence. An attacker could potentially cause loss of funds by exploiting this duplicate entry, but the sponsor argues the current operators prevent zero-amount transfers, so the issue is not currently exploitable.
The areOperatorsImported function used a logical AND instead of OR when comparing operator implementation and selector, so it could return true even if only one field matched. An attacker could exploit this to cause the owner to skip importing a corrected operator, potentially leading to token loss.
The NestedFactory contract's operator cache could fall out of sync with the factory's own list of operators, because adding or removing an operator did not trigger a cache rebuild and the cache check could not detect removed operators. As a result, a removed operator could still be used in core operations such as create() and swapTokenForTokens(), and a newly added one could fail until the cache was rebuilt manually.
The destroy function in NestedFactory only charged fees on the small amount of tokens returned by the user's chosen orders, not on the remaining balance. An attacker could submit tiny swap orders and have the bulk of their portfolio transferred back to them fee-free.
The contract's deposit logic reuses the same msg.value across multiple orders in a batch, allowing a user to account for more ETH than actually deposited. An attacker could potentially drain the contract's ETH holdings by depositing once and withdrawing multiple times.
The protocol allows a user to copy their own portfolio and receive royalty shares for it, and repeat this to reduce fees. An attacker could create many wallets and bypass the frontend to lower fees to zero.
A user who calls create() or addToken() with an ERC20 token as input but also sends native ETH will have that ETH permanently locked in the contract. The contract does not check that msg.value is zero when the input token is not ETH.
The FeeSplitter contract allows the same shareholder to be added multiple times because the setShareholders function does not check for duplicates. An attacker could add duplicate shareholders, causing them to receive more fees than intended when _sendFee is called.
The FeeSplitter contract allows an unlimited number of shareholders, so a large number of shareholders can cause the _sendFees() function to run out of gas when distributing fees. This results in a denial of service for all NestedFactory functions, particularly those that remove funds like withdraw() and destroy().
Core factory functions rely on a cache of operators being in sync, but removing or updating an operator does not immediately rebuild that cache. A user could therefore call create or swap functions that still use a removed or outdated operator until the cache is rebuilt.
The order-submission function in the NestedFactory contract calculated fees and handled leftover input tokens incorrectly, so any unspent amount was treated as part of the fee rather than returned to the user. An attacker or ordinary user could therefore be overcharged whenever orders cost less than the supplied input amount.
Removing an operator from the NestedFactory contract deletes its value in the operators array but leaves a zero entry, causing the cache to become permanently out of sync. As a result, isResolverCached() always returns false, and any function requiring a synced cache becomes uncallable.
The reserve address in NestedFactory.sol is zero until an owner calls setReserve(), so any transfer or comparison involving reserve before that call may behave incorrectly. An attacker could front-run the setReserve() transaction to exploit the uninitialised state.
NF
Nested Finance 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.