Skip to content

Commit 7413f18

Browse files
committed
Frame PolicyPool for no-video submission
1 parent 2d03c36 commit 7413f18

3 files changed

Lines changed: 14 additions & 17 deletions

File tree

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ PolicyPool keeps the first submission deliberately narrow:
6363
- One Hook: `PolicyPoolHook.sol`
6464
- One covenant schema: `maxSwapAmount`, `dailyCap`, `spentToday`, `lastResetTimestamp`
6565
- One callback: `beforeSwap`
66-
- One pair for the demo: `MockUSDC / MockETH`
66+
- One proof pair: `MockUSDC / MockETH`
6767
- Two v4 pools using the same Hook but different fee tiers, so they have different `PoolId`s
6868
- Two live proofs:
6969
- a `5,000 mUSDC` exact-input swap passes the loose pool and fails the strict pool
@@ -123,7 +123,7 @@ The spoof guard is part of the proof. Passing surge-looking `hookData` through t
123123

124124
## Why X Layer
125125

126-
PolicyPool is deployed on X Layer mainnet because the product needs cheap, repeatable swap proofs and an active onchain trading environment. The demo does not stop at deployment: it initializes v4 pools, runs accepted swaps, records max-swap refusal, records daily-cap refusal, and verifies all of it from X Layer receipts.
126+
PolicyPool is deployed on X Layer mainnet because the product needs cheap, repeatable swap proofs and an active onchain trading environment. The submission does not stop at deployment: it initializes v4 pools, runs accepted swaps, records max-swap refusal, records daily-cap refusal, records Surge execution, and verifies all of it from X Layer receipts.
127127

128128
## File Structure
129129

@@ -164,7 +164,7 @@ docs/
164164
SECURITY_NOTES.md
165165
DEPLOYMENT_PLAN.md
166166
web/
167-
index.html # static judge/demo page shell
167+
index.html # static judge proof page shell
168168
```
169169

170170
## Hook Callback Plan
@@ -371,18 +371,15 @@ Current tests cover:
371371
- demo router caught strict-pool refusal and emitted `SwapBlockedCaught`
372372
- live X Layer proof verifier for accepted, max-swap refused, and daily-cap refused outcomes
373373

374-
## Demo Video Structure
374+
## No-Video Review Path
375375

376-
Recommended demo structure:
376+
The repo and live site are structured so judges can verify PolicyPool without a recorded walkthrough:
377377

378-
1. Open on the live hero: `Policy bends. LPs get paid.`
379-
2. Show the featured Surge proof: `40 mUSDC` donated, `5,000 mUSDC` swapped, same v4 unlock.
380-
3. Open the Surge receipt and point to `Donate`, Hook `SwapAccepted`, and router `SurgeAccepted`.
381-
4. Open the spoof-guard receipt and show the old router cannot activate Surge with fake `hookData`.
382-
5. Return to the proof ledger and show the V1 covenant baseline: loose accepts `5,000 mUSDC`, strict refuses the same exact-input amount, and daily cap refuses the third fill.
383-
6. Close on `node scripts/verify-live.mjs`, X Layer explorer links, the latest green CI run for `verify-all`, and the `beforeSwap` covenant check.
384-
385-
Target length: 90 to 120 seconds.
378+
1. Open the live hero: `Policy bends. LPs get paid.`
379+
2. Click the featured Surge proof and inspect the `Donate`, Hook `SwapAccepted`, and router `SurgeAccepted` logs.
380+
3. Click the spoof-guard proof and inspect the old-router refusal path.
381+
4. Return to the proof ledger and inspect the V1 covenant baseline: loose accepts `5,000 mUSDC`, strict refuses the same exact-input amount, and daily cap refuses the third fill.
382+
5. Run `node scripts/verify-live.mjs` for the concise live verifier or `node scripts/verify-all.mjs` for the full local + live proof path.
386383

387384
## Current Status
388385

docs/JUDGE_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
PolicyPool is a Uniswap v4 Hook on X Layer mainnet that gives each pool a small, public execution covenant. Before a swap executes, the Hook checks whether the order fits that pool's `maxSwapAmount` and `dailyCap`. PolicyPool Surge adds a trusted router that can bend the max-swap covenant only by donating a surge fee to LPs inside the same v4 unlock.
44

5-
The demo question is simple:
5+
The proof question is simple:
66

77
> Same exact-input order, different pool policy. Can the pool enforce a different onchain outcome before swap execution?
88
@@ -154,7 +154,7 @@ No. Dynamic fee Hooks still let the swap execute at a different price. PolicyPoo
154154

155155
Factory-owned policy setup, optional immutable or timelocked covenants, real asset pools, and a production deployment process. Those are adoption hardening steps, not requirements for proving the Hook primitive.
156156

157-
## Why The Demo Uses Mock Assets
157+
## Why The Proof Uses Mock Assets
158158

159159
The hackathon requirement is a deployed Uniswap v4 Pool and Hook on X Layer with Hook behavior triggered by real transactions. PolicyPool uses mock assets so the proof focuses on Hook semantics, not asset liquidity. The pool covenant logic is independent of the token pair.
160160

docs/POLICY_SCHEMA.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Policy Covenant Schema
22

3-
PolicyPool v1 uses a deliberately small pool-level covenant. It is designed to be easy to verify in code, tests, and the demo.
3+
PolicyPool v1 uses a deliberately small pool-level covenant. It is designed to be easy to verify in code, tests, and live X Layer receipts.
44

55
## Covenant Fields
66

@@ -35,7 +35,7 @@ PolicyPool uses `bytes32` reason constants so the Hook revert and router-caught
3535
- V1 does not enforce slippage caps.
3636
- V1 does not enforce asset allowlists.
3737
- V1 covenant is per pool, not per LP.
38-
- Refused swaps revert inside the Hook; reverted Hook logs do not persist. The live demo proof uses `PolicyPoolDemoRouter.swapOrRecord` to catch the `PolicyBlocked` revert and emit `SwapBlockedCaught` with the original revert bytes, which the verifier decodes.
38+
- Refused swaps revert inside the Hook; reverted Hook logs do not persist. The live proof uses `PolicyPoolDemoRouter.swapOrRecord` to catch the `PolicyBlocked` revert and emit `SwapBlockedCaught` with the original revert bytes, which the verifier decodes.
3939

4040
## Scope
4141

0 commit comments

Comments
 (0)