You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-13Lines changed: 10 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ PolicyPool keeps the first submission deliberately narrow:
63
63
- One Hook: `PolicyPoolHook.sol`
64
64
- One covenant schema: `maxSwapAmount`, `dailyCap`, `spentToday`, `lastResetTimestamp`
65
65
- One callback: `beforeSwap`
66
-
- One pair for the demo: `MockUSDC / MockETH`
66
+
- One proof pair: `MockUSDC / MockETH`
67
67
- Two v4 pools using the same Hook but different fee tiers, so they have different `PoolId`s
68
68
- Two live proofs:
69
69
- 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
123
123
124
124
## Why X Layer
125
125
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.
127
127
128
128
## File Structure
129
129
@@ -164,7 +164,7 @@ docs/
164
164
SECURITY_NOTES.md
165
165
DEPLOYMENT_PLAN.md
166
166
web/
167
-
index.html # static judge/demo page shell
167
+
index.html # static judge proof page shell
168
168
```
169
169
170
170
## Hook Callback Plan
@@ -371,18 +371,15 @@ Current tests cover:
371
371
- demo router caught strict-pool refusal and emitted `SwapBlockedCaught`
372
372
- live X Layer proof verifier for accepted, max-swap refused, and daily-cap refused outcomes
373
373
374
-
## Demo Video Structure
374
+
## No-Video Review Path
375
375
376
-
Recommended demo structure:
376
+
The repo and live site are structured so judges can verify PolicyPool without a recorded walkthrough:
377
377
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.
Copy file name to clipboardExpand all lines: docs/JUDGE_GUIDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
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.
4
4
5
-
The demo question is simple:
5
+
The proof question is simple:
6
6
7
7
> Same exact-input order, different pool policy. Can the pool enforce a different onchain outcome before swap execution?
8
8
@@ -154,7 +154,7 @@ No. Dynamic fee Hooks still let the swap execute at a different price. PolicyPoo
154
154
155
155
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.
156
156
157
-
## Why The Demo Uses Mock Assets
157
+
## Why The Proof Uses Mock Assets
158
158
159
159
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.
Copy file name to clipboardExpand all lines: docs/POLICY_SCHEMA.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Policy Covenant Schema
2
2
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.
4
4
5
5
## Covenant Fields
6
6
@@ -35,7 +35,7 @@ PolicyPool uses `bytes32` reason constants so the Hook revert and router-caught
35
35
- V1 does not enforce slippage caps.
36
36
- V1 does not enforce asset allowlists.
37
37
- 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.
0 commit comments