1. Built: separate vaults, one atomic sale boundary
The Solidity draft is implemented. Hookless v4 and Fables have separate position-handling contracts; they share fixed sale terms and an atomic Bebop exit.
Current chain choice remains Robinhood4663. No vault was deployed or funded on a public chain. The code contains no hardcoded live-chain addresses; Ethereum mainnet would need its own verified dependencies. USDG remains a candidate denomination.
Fables answer: yes, this reviewed hook lets the vault claim accrued LP swap fees after withdrawing every tracked share. Harvesting is a separate terminal-only operation, so its failure cannot block an already completed principal exit. Unstaked LPs do not earn FABLES emissions.
2. Separate LP concerns, shared safeguards
| Concern | Hookless v4 | Optional Fables |
|---|---|---|
| Position owner | Vault directly owns the PoolManager position | Vault holds tracked ERC-6909 liquidity receipts |
| Entry / exit | WETH and quote ERC-20s; either address ordering | Native ETH0 and quote1; exact WETH unwrap/wrap |
| LP fee | Static fee10 =0.1bp | Dynamic; reviewed hook floor100 =1bp |
| Fee harvesting | Fees collected with removal, excluded from principal | Accrued fees claimed separately after exit |
| Runtime evidence | Real pinned Uniswap v4 core in local EVM | Controlled fixture matching reviewed ABI/accounting paths |
| Shared rules | Single owner, fixed minimum, exact principal, one-shot closure, fixed recipients, guarded calls and atomic rollback | |
No proxy, upgrade, arbitrary adapter, shared managed vault, one-way pool gate, active migration, Zap or staking path. Each concrete type has its own stateless create/fund/open factory.
3. Exact RFQ execution path
- Keeper obtains a fresh compatible signed quote offchain before submission.
- Vault authenticates caller, ACTIVE state, nonce, deadline and chain.
- Remove the whole tracked position; identify principal separately from fees.
- Fables only: receive native principal and wrap exactly that principal into WETH.
- Validate both typed orders against recovered WETH and fixed recipients/tokens.
- Approve that exact amount, call the fixed Bebop Standard router, clear allowance.
- Check exact WETH debit and new quote-token receipt; enforce the whole-order minimum.
- Only then set SOLD_RFQ. Owner claims proceeds afterward.
AMM completion separately requires the actual endpoint still exists at inclusion and full principal is recovered. Owner cancellation intentionally exits the current mix without claiming a target-price success.
4. What the exact Fables code supports
Reviewed RH FablesRampETH at 0x06a889870C8f83640D6816319f72e2aA579b6080. Sourcify and read-only runtime bytes match at block101933582. This is source/deployment identity evidence, not a funded execution.
- Receipt units equal liquidity1:1. Withdrawal pays principal only and checkpoints accrued fee debt.
- claimFees accepts a zero-share holder with owed fees; it can be paused independently from withdrawal.
- harvestFablesFees runs only after SOLD_AMM, SOLD_RFQ or CANCELLED and tracked liquidity0.
- Native refunds may include forced donations. The vault records actual rounded funding, never net balance loss.
- Donated receipts do not increase sale principal. Terminal recovery transfers them to the fixed owner.
Swap fees are not FABLES emissions
Unstaked LP earns swap fees. Staked positions forgo those fees for emission eligibility. Staking is not implemented pending the owner’s preference. A fixed-stream terminal emission claim can recover a genuine existing entitlement, but cannot create one.
The distributor is permissionless: outsiders can claim tokens to an ACTIVE vault. We can block vault withdrawals and exclude rewards from the sale floor; we cannot prohibit upstream token delivery.
The reviewed hook’s swap fee floor is1bp. The pinned ETH/USDG probe showed16.7bp, with a10% accrued-fee deduction and20% claim-fee cap. These observations are not future or full-size price promises. Hookless0.1bp stays independent.
5. The onchain minimum uses actual principal
W0 = exact rounded WETH principal funded (wei)
M = ceil(W0 * targetQuoteAtomsPerEth / 1e18)
B0 = full-conversion quote principal from actual ticks and liquidity
I = strictly positive improvement buffer (quote-token atoms)
RFQ minimum = max(M, B0 + I)
require recoveredQuotePrincipal + newRfqReceipt >= RFQ minimum
Opening requires B0≥M. W0/B0 never shrink after a reversal. Fees, old balances, donations and rewards cannot subsidize the floor. Native fees and WETH fees remain separate from the sold principal.
This is a whole completed-order principal average, not a per-slice floor or a gas-inclusive guarantee. Actual tick rounding matters: arbitrary decimal bounds are not necessarily valid ranges. Active two-way liquidity can reacquire ETH; closed orders cannot reopen.
6. Bebop authentication and compatibility boundary
The vault calls Standard swap itself; it does not implement ERC-1271 or gasless settle. Owner/keeper authorization is checked locally. The router and PMM authenticate their own signed orders; actual receipt checks enforce the price independently.
Vault, router and submitting origin have different roles
The outer order’s tokensOwner/receiver is the vault. The inner PMM taker/receiver is the router. A nonzero signed origin binds the submitting EOA origin; it is not the vault caller-authority check. Prove the provider-approved keeper flow without rewriting signed fields.
The initial profile is exact-size, single-order, zero optional flags/commands and expiry-only router info. No arbitrary hooks, oracle, checker, native sentinel, partial fill or Permit2. A genuine quote outside this profile is rejected unchanged.
7. Three agentic review passes and the fix
- Independent security review of all authored contracts and relevant upstream code: authorization, exact receipts, wrapping, callbacks and transaction boundaries.
- Test/tooling review: state machine, accounting, both token orderings, actual mined rollback and seeded swap reversals.
- Fables integration author’s cross-review of shared sale, hookless, Bebop and factory paths; not labeled an independent review of its own Fables implementation.
Low-severity finding: donated receipts lacked recovery
Tracked sale principal remained safe, but unsolicited ERC-6909 receipts left after exit had no compatible claim entrypoint. Fixed with owner-only, terminal-only recoverFablesReceipts to the immutable owner, for the fixed hook/range, with exact receipt-delta checks. The independent reviewer checked the fix; runtime assertions passed.
No critical/high/medium exploit was identified in these bounded passes. This is not an independent external audit or proof that no undiscovered issue exists.
8. Tests, debugger and scan results
63 passing tests, zero failures. solc-js0.8.26, optimizer200, viaIR, Cancun; in-process Hardhat, no Anvil or RPC listener. Suite breakdown and input hashes are included in test/evidence/verification.json.
- Real v4 core: both token orientations, full/partial conversion, endpoint finalization, cancellation and32 seeded two-way swaps.
- Atomic failure: immediate and late settlement reverts, successful-return underpayment, excessive allowance pull, stale size and reentrancy.
- Fables model: native wrapping/receipt rollback, zero-share harvest, paused claims, forced refunds, early emissions and donated-receipt recovery.
- Factories: success, owner identity, and rollback of CREATE/code, token transfer, allowance, LP and logs.
- Node debugger paused after a late underpayment and inspected restored liquidity, balances, allowance, router state and nonce.
| Contract | Runtime size | Check |
|---|---|---|
| HooklessSaleVault | 14,266 bytes | Below24,576-byte EIP-170 limit |
| FablesSaleVault | 18,442 bytes | Below24,576-byte EIP-170 limit |
| HooklessSaleFactory | 17,600 bytes | Below24,576-byte EIP-170 limit |
| FablesSaleFactory | 22,628 bytes | Below24,576-byte EIP-170 limit |
The bounded source scan found no delegatecall, selfdestruct, catch-and-continue, tx.origin owner authorization or size violation in production code. It is not Slither. Compiler warnings concern upstream transient storage and an intentional test-only forced-ETH fixture.
npm audit retains18 development-toolchain advisories:6high,2moderate,10low. No OpenZeppelin Solidity advisory was reported. This is not a clean dependency audit; tests use local fixtures, not a public service.
9. Source handoff and reproducible commands
Start with AGENT-HANDOFF.md in the source ZIP. All contracts, tests, dependency pins, vendored v4 source/license, reviews and saved evidence are included. No secrets, installed dependencies, Git history or proprietary Fables implementation is bundled.
npm ci --ignore-scripts
npm test
npm run scan
Requires Node24/npm11. Compile before test:runtime; do not run a test against artifacts from an unfinished compilation. No chain daemon or private RPC is needed. The package extraction record distinguishes fresh extracted validation from archived original results.
Detailed call signatures and units are in docs/INTEGRATION.md. The report itself is standalone; its browser checks are presentation checks, not Solidity tests.
10. What remains before using funds
- Authentic provider quote/settlement, vault-held-in-LP inventory eligibility and keeper-origin compatibility.
- Actual complete Fables shared-ledger execution with multiple LPs, not only its controlled fixture.
- Independent audit and exact selected token/wrapper/core/router/PMM/hook/stream identities.
- Live pool discovery, route quality and applicable protocol/dynamic fees; no unmeasured gas advantage.
- Production quote denomination, wallet/keeper/gas setup and any optional additional pricing policy.
No backend quote stream, rate-limit scheduler, deployment, funded transaction or active keeper was included. No first-touch guarantee, stablecoin peg guarantee or ability to force the market price is asserted.
11. Only unresolved reward choice affects the next feature
The implemented default is unstaked LP swap fees harvested after exit. If FABLES token emissions are wanted instead, staking needs a separately reviewed opt-in path and the user gives up those LP fees. No unanswered question has been treated as approval to add staking.
Already settled: separate optional Fables, hookless0.1bp, standard two-way routing, one owner per production vault and atomic remove-plus-Bebop. No need to reconfirm these.
12. Source and evidence index
- Exact FablesRampETH source/ABI and match data; runtime pin and public manifest included in research/.
- Pinned Uniswap v4 core, vendored with provenance/license.
- Pinned Bebop Standard router source; our typed ABI is authored separately.
- Fables documentation; exact-code findings take precedence over generic product summaries.
- SPEC.md, docs/INTEGRATION.md, docs/VERIFICATION.md, reviews/code-path-scan-1/2/3.md and test/evidence/*.json in the source handoff.
Read-only deployment evidence was collected at a pinned block; test evidence comes from a local EVM. Neither is a public-chain execution receipt. Historical report versions remain preserved.