UNISWAP v4 • CONCEPT-STAGE GRANT APPLICATION

Static fees charge the same.
LP risk does not.

Sentinel tests whether Uniswap v4 can price adverse-selection risk better: low fees in normal conditions, higher LP compensation when market conditions become dangerous.

Fund the evidence, not the assumption.

This grant is designed to prove or disprove the economics before production capital is committed. Every deliverable is public, reproducible and falsifiable — including the decision not to deploy.

Applicant: independent solo builder • Contact: mario18g@gmail.com • Ask: $35,000 • Duration: 11 weeks
Working V0 prototype: github.com/chaosxcode/sentinel-hookPrior work: HookGuard

1. The problem

LP risk changes faster than fee logic. LVR research formalizes the adverse-selection cost LPs face when stale AMM prices are traded against by better-informed arbitrageurs. A 2021 study of 17 Uniswap v3 pools (43% of sampled TVL) measured roughly $199.3M in fees against $260.1M in impermanent loss over its study period — an aggregate gap of $60.8M.

Historic LP evidence: $199.3M fees earned versus $260.1M impermanent loss across 17 Uniswap v3 pools in a 2021 study

Figure 1 — Historic evidence from arXiv:2111.09192. A historic baseline, not a claim that all LPs lose today.

No fake performance claims: Gate 1 exists specifically to measure whether this problem is strong and predictable enough in current pools to justify Sentinel.

2. First users and target market

Passive LP

Wants more compensation during high-risk market conditions — without managing anything.

Pool deployer

Chooses Sentinel as the v4 dynamic-fee logic for a new pool.

Researcher / builder

Uses HookLab to benchmark alternative fee models on identical data.

The LP journey through Sentinel: calm market at base fee, risk rises, fee steps up within hard bounds, then returns to base

Figure 2 — The LP experience. Deterministic pool logic; no offchain operator, no wallet classification.

Initial research focuses on high-volume WETH/stablecoin markets (research filters: trailing 30-day volume ≥ $50M, median TVL ≥ $5M — our filters, not Uniswap requirements). A first pilot would target a new WETH/USDC dynamic-fee pool on Unichain only after all three gates pass.

3. Mechanism

Five signals. One bounded risk score.

T = clip(0.30·V + 0.25·S + 0.20·D + 0.15·I + 0.10·A, 0, 1)

Five pre-swap signals — volatility, size pressure, deviation, imbalance, acceleration — combine into a bounded score that maps to an LP fee between a hard floor and ceiling

Figure 3 — The V0.1 model. All inputs are pre-swap state only.

These weights are hypotheses, not claimed results. Training data selects parameters; validation freezes them; a locked holdout tests them exactly once. A reviewer should never be able to ask “where did 0.30 come from?” and catch us pretending an initial guess is empirically proven.

4. Why Uniswap v4

v4 supports hook-controlled dynamic fees natively in the swap lifecycle: beforeSwap can return an LP-fee override on a dynamic-fee pool, validated by v4 core under the protocol’s fee rules. Sentinel therefore places the risk decision inside the pool itself — transparent logic executing in the same transaction as the swap — rather than relying on a trusted offchain service to recommend or enforce a fee.

Trust-minimized

Same transparent rule for every swap.

Composable

Builders can inspect, integrate and route to the pool.

Native

The fee decision happens in the same transaction as the swap.

For V1, external oracles stay out of the production fee path entirely — Uniswap’s v4 security framework notes that offchain dependencies expand the failure surface.

5. Security and anti-gaming

Uniswap’s hook security guidance warns that dynamic fees can create trader extraction, manipulation through liquidity splitting, and new MEV vectors — and that worst-case adversarial flows must be modeled, not just averages. Sentinel treats that as the design spec:

Attack and mitigation matrix pairing each anticipated manipulation strategy with a specific defense

Figure 4 — Every anticipated attack paired with a testable defense. Gate 3 attacks this list adversarially.

Hard fee bounds

Absolute floor and ceiling.

Rate limits

Cap how quickly fees can move.

Safe fallback

Invalid state returns to conservative base-fee mode.

Plus: no arbitrary external calls in the swap path, fixed-size O(1) state (no unbounded iteration), hard admin ranges with versioned configuration, and minimized upgradeability.

6. HookLab: the experiment

Every strategy receives the same historical event stream and only information available before each trade. An external reference price may be used after the swap to measure LVR outcomes — but no strategy ever sees future or reference information when choosing a fee.

HookLab benchmark: one event stream replayed through four strategies — static, volatility-only, volatility plus surge, and Sentinel — scored on identical metrics

Figure 5 — Four strategies, one scorecard. The volatility+surge baseline is deliberately strong (Aegis-like public design).

Core metrics: LP net economics (fees earned − measured adverse-selection/LVR cost), trader effective fee, slippage, fee-regime distribution, modeled volume retention, gas overhead — reported as pool-month distributions with clustered-bootstrap confidence intervals, so one exceptional market period cannot flatter the whole system.

7. Three hard gates

Three pre-registered gates with pass criteria and failure actions: prove the problem, prove the economics, prove safety

Figure 6 — Pre-registered pass/fail criteria with defined failure actions.

Gate 1 — Prove the problem

Study ≥3 core pools. Require positive measured adverse-selection cost on ≥70% of active study days, top 10% risk windows explaining ≥30% of loss, and pre-swap score correlation of Spearman |ρ| ≥ 0.15 with ex-post adverse-selection cost on validation data, distinguishable from zero under the pre-registered clustered-bootstrap analysis. Failure: publish the methodology and terminate the live-hook thesis.

Gate 2 — Prove the economics

On locked holdout data: reduce measured LVR by ≥10% vs the best static baseline, improve LP net economics by ≥5% vs static and ≥3% vs the strongest dynamic baseline, remain positive in ≥60% of pool-months, and keep trader friction bounded (volume-weighted effective fee rise ≤1bp without pre-registered justification; modeled volume retention ≥95%). Failure: do not request production-pilot funding.

Gate 3 — Prove safety

≥100,000 stateful fuzz sequences with zero invariant violations, median swap-path overhead ≤40k gas vs the comparable no-hook path, all fee bounds and fallbacks intact, and no materially profitable manipulation in the pre-registered attack suite. An independent security review is required before meaningful capital sits behind the hook — the Uniswap Foundation Security Fund is the intended audit path. Failure: no live capital.

These bars are intentionally demanding. They are our proposed pre-commitments, not established industry thresholds — that is the point: they are falsifiable.

8. Study design and data

Train

Jan 2023 – Dec 2024
Uniswap v3 pool data (v4 did not yet exist)

Validate

Jan – Dec 2025
v3 + live v4 data from the Jan 31, 2025 v4 launch

Locked holdout

Jan – Jul 2026
Evaluated exactly once, after parameters freeze

Data hierarchy

The v3 → v4 transfer question, addressed head-on

Signals explored on v3 history must re-validate on live v4 data (Feb 2025 onward) before parameters freeze for the holdout. If signal behavior does not transfer across protocol versions, that is a Gate 1/Gate 2 failure — reported, not hidden. The July 31, 2026 cutoff gives the study a complete final month before the current grant preparation period. The split is our proposed experimental design, not a Uniswap requirement.

9. Pre-committed result templates

These are the exact charts the final report will publish. They ship empty on purpose — the grant funds filling them in, whatever the answer turns out to be.

Empty template chart: LP net economics uplift versus static baseline for strategies A through D, labeled TEMPLATE NOT A RESULT Empty template chart: share of time in each fee regime, labeled TEMPLATE NOT A RESULT

Figures 7–8 — Deliberately labeled “NOT A RESULT” so no illustrative bar can ever be mistaken for empirical Sentinel performance.

10. 11-week delivery plan

Eleven-week plan: data and Gate 1 in weeks 1–2, HookLab and baselines in weeks 3–5, Solidity prototype and fuzzing in weeks 6–8, adversarial testing and go/no-go in weeks 9–11

Figure 9 — Proposed project milestones, not Uniswap-mandated timelines. Open source from week 1.

Weeks 1–2

Data pipeline, Gate 1 measurement, threat model, freeze KPIs. Milestone: public Gate 1 report.

Weeks 3–5

HookLab replay engine, static + dynamic baselines, Sentinel model. Milestone: benchmark report.

Weeks 6–8

Solidity v4 hook prototype, Foundry tests, invariants, fuzzing, gas report. Milestone: fuzz + gas report.

Weeks 9–11

Manipulation suite, locked holdout run, public docs, explicit go/no-go. Milestone: final public report.

11. Adoption path

Open-source benchmark → test deployment (Unichain Sepolia) → hook registry → security review / UF Security Fund → routing enablement → small audited pilot → public live dashboard → broader deployment only after evidence.

The first proposed live target is a new WETH/USDC dynamic-fee pool on Unichain, conditional on all three gates passing. UF’s Hooks Routing Rebate Program (up to 85% of routed gas costs subsidized, starting with Unichain) gives hooked pools a concrete distribution path. Proposed pilot planning target: $100K–$250K TVL for ~30 days — an internal target, not a claim of guaranteed partner capital, and not part of this $35K concept-stage scope.

Core hook, HookLab and research outputs remain open source. No token. No hidden paid service required to verify the hook. Phase II (audit, production hardening, monitoring, integrations) is funded separately only if the evidence warrants it.

12. The ask

$35K

Build the data pipeline, HookLab, Sentinel prototype, adversarial tests and a reproducible public report — then make an evidence-based decision about whether production is justified.

Budget

Data pipeline + Gate 1 validation (onchain extraction, CEX reference-price ingestion, reproducible dataset)$6K
HookLab replay engine + baselines (static, volatility-only, volatility+surge, Sentinel)$8K
Solidity v4 hook prototype (working hook, Foundry tests, deployment scripts, gas report)$8K
Threat model + adversarial testing (attack matrix, stateful fuzzing, invariants, manipulation analysis)$6K
Dashboard + docs + open-data package (public methodology and results)$4K
Infrastructure / contingency (RPC, indexing, reference-data storage, test infra)$3K
Total — evidence-based go/no-go$35K

13. Who is building this

A solo, self-taught builder-operator — and this application is deliberately structured so the Foundation funds verifiable output, not credentials. Two pieces of that output are already public:

SentinelHookV0 — working prototype, live now

A functioning v4 dynamic-fee hook skeleton built on the official v4 template: beforeSwap fee override with hard bounds, rate limiting, hysteresis + cooldown, pre-swap-only observations and safe fallbacks. 14 passing Foundry tests including fuzz invariants (fee never left bounds across 6,400 randomized swaps); measured ~13.9k gas overhead vs a no-hook pool against the Gate 3 target of ≤40k. Deliberately contains no trained model and no performance claims. Already deployed to Unichain Sepolia at 0xcbd5…3080, with a live demo pool: a 355-tick move triggers the fee to ramp 0.05%→0.30% in five rate-limited steps, every step a public FeeUpdated event (transaction links in the repo README). github.com/chaosxcode/sentinel-hook

HookGuard — prior Uniswap-ecosystem work

A transparent risk scanner for Uniswap v4 hooks: analyzed all 486 registered hooks (only 6% had a published audit) and counted every pool ever created on Unichain — 1,211 deployed hooks vs 15 on the official list. Open source with a public site. github.com/chaosxcode/hookguardlive site

Founder & operator

Started and ran multiple businesses, including one successful exit. Former franchise consultant — hands-on experience taking ventures from idea to operating reality.

Shipped onchain

Created and sold NFT collections end to end — contracts, mints, pricing, community. Published comic book artist; the craft shows in this package’s figures and docs.

Distribution instincts

Years in sales at GoDaddy translating technical products for real customers — the same skill the adoption path (deployers, routers, LPs) depends on.

Accountability by design

Self-taught across every domain above. That is exactly why this proposal pre-registers its thresholds, publishes open source from week 1, and routes security to independent review before any live capital.

Everything funded here is public and reproducible: if the work is good, the repos prove it; if a gate fails, the report says so. Specialist security depth is explicitly deferred to the independent review / UF Security Fund path rather than claimed. Contact: mario18g@gmail.com

14. Why this fits Uniswap now

Category validation

UF’s Hook Design Lab explicitly includes dynamic fees as a design area; its selected project Aegis reported roughly halved adverse selection vs fixed fees. Sentinel does not claim to have discovered dynamic fees.

Clear differentiation

Sentinel tests the next question: can a transparent multi-signal measure of adverse-selection conditions outperform strong volatility-based baselines while remaining manipulation-resistant?

Public-good value

HookLab, the dataset and the methodology stay useful to every hook builder even if Sentinel fails its own gates.

Technical appendix — extraction anchors

Networkv4 PoolManagerStart block
Ethereum0x000000000004444c5dc75cB358380D2e3dE08A9021688329
Unichain0x1F9840000000000000000000000000000000000425500
Unichain SepoliaOfficial testnet PoolManager — test deployment target
SentinelHookV0 (deployed)0xcbd5bac7b96770d7f18b97d05d6518a4d0913080Unichain Sepolia

Anchors from the official Uniswap/v4-subgraph network configuration. Events decoded: Initialize, Swap, ModifyLiquidity. Subgraph queried via The Graph’s GraphQL API with attribute-based pagination.

Primary references

Can Uniswap v4 price LP risk better?

We are not asking the Foundation to believe the answer. We are asking for the resources to measure it, build it, attack it and publish the result — whichever way it comes out.

Fund the evidence.

mario18g@gmail.com