Hooks
FlaunchPool.sol
FlaunchPoolHook, implemented in FlaunchPool.sol, enforces the launch-block gate and collects fees during swaps. The findings cover synchronous paired-token transfers and the launching-router exemption.
Reviewed source: src/hooks/FlaunchPool.sol at commit 38f14ff.
Findings
| ID | Severity | Finding |
|---|---|---|
| B-10 | Medium | An issuer freeze can halt trading in a currency across every launch |
| B-03 | Low | The launch-block gate can be bypassed through TrustedSignerZap |
[MEDIUM] B-10 · An issuer freeze can halt trading in a currency across every launch
B-10 · Medium
Paired-token fees and conversion proceeds move through shared protocol addresses inside swaps. An issuer freeze of one of those addresses can make those swaps revert across launches.
The hook transfers paired-token fees to Flaunch during afterSwap. The internal swap pool also takes and deposits conversion proceeds before the surrounding swap completes. Those transfers touch shared protocol addresses.
If a paired token's issuer blocks Flaunch, the hook or the internal swap pool, the transfer can revert and unwind the whole swap. Moving protocol treasury fees to a pull-based claim fixed a related problem in F-04, but the paired-token leg still executes synchronously.
Impact
Exact-input sells, exact-output buys and buys that reach the internal swap position can fail for every launch paired with the affected currency until the issuer reverses its action. Exact-output sells can still work when only Flaunch is blocked.
The rating is Medium with low likelihood. The review treats an issuer freeze of USDC protocol addresses as unlikely. Freeze and pause rules for the native stock tokens could not be established, so their likelihood remains unknown. A freeze of an individual beneficiary or recipient has a narrower effect and is not the trigger described here.
Affected code
Locations refer to the reviewed commit, 38f14ff.
src/hooks/FlaunchPool.sol:241–263— Fees are taken and deposited during afterSwap.src/core/InternalSwapPool.sol:250–255— Conversion proceeds follow the same synchronous path.src/core/FeeDistribution.sol:303–310— ERC20 deposits transfer into the common distributor.
From src/core/InternalSwapPool.sol:249–255:
Currency paired = state.launchedTokenIsCurrency0 ? _key.currency1 : _key.currency0;
if (proceeds != 0) {
paired.take(poolManager, address(this), proceeds);
if (!paired.isAddressZero()) {
IERC20(Currency.unwrap(paired)).forceApprove(address(flaunch), proceeds);
}
flaunch.deposit{value: paired.isAddressZero() ? proceeds : 0}(flaunch.poolTokenId(poolId), Currency.unwrap(paired), proceeds);
Proof of concept
TokensBlocklist.t.sol uses a blocklisting mock token. It shows that blocking Flaunch stops relevant swaps across launches, and that blocking the hook or internal swap pool also halts the affected path.
Four controls distinguish that result from a frozen beneficiary, recipient, escrow or paused token. Those cases remain isolated to the relevant claim, recipient or currency. The tests do not demonstrate that the real stock tokens expose an issuer freeze function.
The test source is poc/TokensBlocklist.t.sol in the Solidity evidence bundle. Follow the reproduction setup, then run:
FOUNDRY_GAS_LIMIT=1000000000000 forge test --match-path 'test/audit/TokensBlocklist.t.sol' -vv
Recommended solution
Accrue fees and proceeds as ERC-6909 claims in PoolManager and redeem them through a separate permissionless flush. Alternatively, isolate failed deposits and queue them in the hook so a payout failure does not unwind the user swap.
[LOW] B-03 · The launch-block gate can be bypassed through TrustedSignerZap
B-03 · Low
The hook exempts approved launching routers from the launch-block gate. TrustedSignerZap also exposes a public swap, which lets another buyer use that exemption.
The hook checks whether the router is approved to launch, rather than whether the resolved caller created the pool. TrustedSignerZap needs that approval for its launch function, but its public swap entry point accepts any registered pool.
When a pool has no active trusted window, the fee calculator requires no signature. Another account can therefore call the zap's swap function in the launch block and pass a gate that rejects an ordinary router. Direct launches, LaunchZap, AtomicLaunchZap, and trusted-signer launches with zero duration all leave this path available once the zap has been approved.
Impact
A buyer can enter a launch in the creator's block. The source review lowered the rating from Medium to Low after measuring 0.2-second Base blocks on 25 November: the bypass removes only that short delay and still requires the buyer's transaction to be positioned for the launch block.
At the reviewed snapshot the trusted-signer zap was absent from deployment scripts and the Sepolia address book, so the issue depends on its later approval. It does not give access to another user's funds.
Affected code
Locations refer to the reviewed commit, 38f14ff.
src/hooks/FlaunchPool.sol:164–168— The launch-block exception checks the router.src/zaps/TrustedSignerZap.sol:97–126— Public swaps can use the same approved router.src/calculators/TrustedSignerFeeCalculator.sol:71–77— Pools outside a trusted window use the base fee without a signature.
From src/hooks/FlaunchPool.sol:164–168:
// Only approved launching routers may swap in the launch block.
PoolId poolId = key.toId();
if (launchBlock[poolId] == block.number && !approvedLaunchingRouters[sender]) {
revert CannotBuyZeroBlock();
}
Proof of concept
- Approve
TrustedSignerZapas a launching router and verified swap router. - Have Alice create a launch without a trusted window.
- In the same block, have Bob buy through
TrustedSignerZap.swap. - Repeat through an ordinary router and observe
CannotBuyZeroBlock.
ZapsPoC.t.sol covers direct and zap launches and shows that an active trusted window stops the unsigned buyer. LaunchBlockBypass.t.sol reproduces the public-swap path independently. In HookAudit.t.sol::test_poc_launchBlockGateBypassedThroughTrustedSignerZapSwap, a second account buys about 8.9% of supply in the launch block.
The test source is poc/LaunchBlockBypass.t.sol in the Solidity evidence bundle. Follow the reproduction setup, then run:
FOUNDRY_GAS_LIMIT=1000000000000 forge test --match-path 'test/audit/LaunchBlockBypass.t.sol' -vv
Recommended solution
Record the launcher for each pool and require the resolved sender to match it during the launch block. A smaller fix is to reject the public TrustedSignerZap.swap entry point while launchBlock(poolId) == block.number; the zap's launch prebuys use a different path.
Shared findings
- B-01 · High: Internal swap pool inventory can be bought for dust — The hook permits third-party dust liquidity, which defeats the internal swap pool's non-zero-liquidity guard.
- B-24 · Low: Single-step ownership and renunciation can permanently freeze payouts — The hook retains single-step ownership transfers and inherited renunciation.