Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 101 additions & 45 deletions docs/pl-genesis-demo-script.md
Original file line number Diff line number Diff line change
@@ -1,112 +1,168 @@
# PL Genesis Hackathon — Demo Video Script

**Target length**: 2–3 minutes
**Tone**: Wishonia narrating (deadpan, data-first, dry)
**Target length**: 3–4 minutes
**Tone**: Wishonia narrating (deadpan, data-first, dry, alien observer)

---

## 1. Hook (15s)
## 1. Hook — Your Government Is a Misaligned Superintelligence (20s)

> "Your governments are misaligned superintelligences — collective intelligence systems controlling billions of lives, optimising for re-election instead of welfare. I built alignment software. It works on my planet. Let's see if your species can handle it."
> "Your government is a misaligned superintelligence. It controls trillions of dollars, billions of lives, and the allocation of your civilisation's entire productive capacity. And it is optimising for the wrong objective function."

*Visual*: Optomitron homepage hero, the tagline scrolling in.
*Visual*: Optomitron homepage hero. The tagline animates in.

> "The objective of the Earth Optimisation Game is to align it — to force it to reallocate resources away from things that make you poorer and deader, toward things that make you healthier and wealthier."

---

## 2. Wishocracy — Citizen Preferences (25s)
## 2. The Numbers (25s)

> "Here are some numbers."

> "Step one: actually ask people what they want. Radical concept, I know."
*Visual*: Navigate to `/scoreboard`. Show the headline metrics — healthy lifespan, median income, collapse countdown.

*Visual*: Open `/wishocracy`. Show pairwise comparison cards — "Healthcare vs Defense", slider interaction.
> "150,000 humans die every day from diseases that are theoretically curable. That's 59 September 11ths. But nobody invades anybody about it because cancer doesn't have oil."

> "Citizens compare budget priorities head-to-head. Eigenvector decomposition produces stable preference weights from as few as ten comparisons. Your species invented this maths in 1977 and then mostly used it to rank sports teams."
> "Your governments currently spend $604 on the capacity for mass murder for every $1 they spend testing which medicines work. Your chance of dying from terrorism: 1 in 30 million. Your chance of dying from disease: 100%."

*Visual*: Show completion state with summary. Highlight the **"Content-addressed on IPFS"** badge with the Storacha CID.
*Visual*: Show the GDP collapse countdown timer.

> "Every preference snapshot is stored on Storacha — content-addressed, immutable, linked to its predecessor. No server can alter it after the fact."
> "The parasitic economy — cybercrime, rent-seeking, military spending — grows at 15% per year. The productive economy grows at 3%. In 15 years, it becomes more rational to steal than to produce. This is the clock."

---

## 3. Alignment — Politician Report Cards (20s)
## 3. The Moronia Problem (20s)

> "Step two: find out which of your elected officials actually agrees with you."
> "I've seen this before."

*Visual*: Navigate to `/alignment`. Show ranked politicians with scores.
*Visual*: Navigate to `/moronia`. Show the AI-generated images of Moronia.

> "Voting records are compared against citizen preferences. Each politician gets a Citizen Alignment Score — a single number that answers 'how much do they actually represent you?'"
> "Moronia was a planet that spent 604 times more on weapons than on curing disease. It no longer exists. Their allocation ratio correlates with yours at 94.7%."

*Visual*: Zoom into a politician card. Highlight the **"Verified on IPFS"** green badge. Click it to show the CID gateway link.
*Visual*: Hard cut to `/wishonia`. Show Wishonia imagery.

> "Wishonia redirected 1% of its murder budget to clinical trials 4,297 years ago. That is where I am from. It is considerably nicer."

---

## 4. Hypercerts — Verifiable Attestations (25s)
## 4. The 1% Treaty — One Slide, Whole Solution (25s)

> "The fix is not complicated."

*Visual*: Navigate to the Wishocracy voting page or the game landing page.

> "Redirect 1% of global military spending — $27 billion a year — to clinical trials. That's going from spending 99% on bombs to 98% on bombs. Radical, I know."

> "This would increase clinical trial capacity by 12.3 times. It would compress the time to cure all diseases from 443 years to 36 years. The math is not in dispute."

> "The problem is not that nobody wants this. The problem is that everybody wants it but thinks nobody else will agree to it. This is called pluralistic ignorance, and it is your civilisation's most expensive bug."

---

## 5. The Game — Play It (30s)

> "Step one: allocate."

*Visual*: Navigate to `/wishocracy`. Show the pairwise comparison interface.

> "Indicate your preferred share of spending devoted to weapons versus clinical trials. Compare budget priorities head-to-head. Ten comparisons. Eigenvector decomposition. The same maths invented in 1977 that your species mostly uses to rank American football teams."

*Visual*: Complete a few comparisons. Show the results summary.

> "Every alignment score is published as a Hypercert on the AT Protocol and stored on Storacha."
> "Step two: vote yes or no — should all governments redirect 1% of military spending to clinical trials?"

*Visual*: Navigate to `/transparency`. Show the attestation records grid — IPFS CIDs, AT Protocol URIs.
> "Step three: get your shareable URL."

> "Click any CID. You'll see the raw JSON — the Activity claim, the Measurements, the Evaluation. Tamper-proof. Auditable by anyone. This is what accountability looks like when you take it seriously."
*Visual*: Show a shareable link generating.

*Visual*: Click a Storacha gateway link, show raw JSON in browser.
> "Every friend who votes through your link earns you alignment points. Your network becomes your lobby. Decentralised. No headquarters. No PAC. Just maths and peer pressure."

---

## 5. Earth Optimization Prize (20s)
## 6. The Prize Pool — The Investment Nobody Loses (25s)

> "Traditional philanthropy: give money, hope it works, never check. My approach: outcome-based escrow."
> "Step four: get your rich friends to invest in the Earth Optimisation Prize Pool."

*Visual*: Navigate to `/prize`. Show the mechanism steps and donation section.
*Visual*: Navigate to `/prize`. Show the prize pool mechanism.

> "Donors deposit $WISH into a Prize Pool smart contract. The funds are locked until health and income metrics cross verifiable thresholds. Then donors vote on which implementers get paid — weighted by deposit amount. Your deposit IS your identity. No sybil attacks possible."
> "The Prize Pool is a Dominant Assurance Contract diversified across venture capital, achieving 17% annual returns. Here is how it works:"

*Visual*: Highlight the PrizePool contract details — deposit-as-identity, Storacha evidence CIDs, bonded disputes.
> "Donors deposit $WISH into a smart contract. If Earth hits its targets — median income up, healthy life years up — the funds unlock and flow to verified implementers. If Earth fails to hit its targets, depositors get their principal back. Plus 17% annual gains. The gains that were achievable anyway by diversifying across venture capital."

> "Implementers register with Storacha CIDs linking to their Hypercert evidence. Challengers can post a bond to dispute allocations. Lose → you forfeit the bond. Win → the fraudster gets deactivated. Accountability with teeth."
*Visual*: Highlight the smart contract logic — escrow, thresholds, refund conditions.

> "This is called a free option. You either get a healthier, wealthier planet, or you get your money back with interest. The only way to lose is not to play."

---

## 7. Incentive Alignment Bonds (20s)

> "Now for the part your lobbyists really won't enjoy."

*Visual*: Show the $WISH token / IAB section.

> "Incentive Alignment Bonds. Sell one billion dollars of these. Use the proceeds to fund a 1% Treaty campaign. Create a Special Purpose Vehicle that receives treaty inflows — 1% of military spending per year, $27 billion annually. Distribute: 10% to bond holders, 10% to a Super PAC, 80% to fund clinical trials."

> "The Super PAC funds politicians algorithmically — based on their Citizen Alignment Score. Politicians earn campaign funding by voting for the treaty and increasing the reallocation. Not by attending donor dinners."

---

## 6. $WISH Token + IAB (25s)
## 8. Politician Scores — The Leaderboard They Fear (15s)

> "Which brings us to the leaderboard."

*Visual*: Navigate to `/governments/US/politicians`. Show politician alignment rankings.

> "Every politician ranked by the ratio of spending they have voted for: mass murder capacity versus clinical trial funding. A single number. Public. Immutable. On-chain."

*Visual*: Scroll through rankings. Highlight the alignment score column.

> "Your leaders aren't evil. They're just optimising for the wrong metric. We changed the metric."

---

> "Now for the part your campaign finance lobbyists won't enjoy."
## 9. Optimal Policy Tools (15s)

*Visual*: Show the $WISH Token & UBI section on the transparency page.
> "For the politicians who want to align:"

> "The $WISH token has a 0.5% transaction tax. That replaces your IRS. No 74,000-page tax code. No 83,000 employees. Revenue collection as a protocol feature."
*Visual*: Navigate to `/tools` or the Optomitron budget/policy pages.

> "The tax funds two things: Universal Basic Income — distributed automatically to verified citizens via World ID — and Incentive Alignment Bonds, where smart contracts distribute campaign funds to politicians based on their Hypercert-verified alignment scores."
> "The Optomitron contains an Optimal Budget Generator and Optimal Policy Generator. It analyses time-series data across hundreds of jurisdictions — which policies actually increased median income and healthy life years. Not which policies were popular. Which ones worked."

*Visual*: Show the pipeline diagram. Highlight each step.
*Visual*: Show the budget optimiser, analysis explorer.

> "Politicians earn funding by aligning with citizens, not donors. No PACs. No lobbyists. Just maths."
> "All free. All open. All citable."

---

## 7. Architecture (15s)
## 10. Architecture (15s)

> "Under the hood: 15 packages, 2,600+ tests, a domain-agnostic causal inference engine, and a fully typed TypeScript monorepo."
> "Under the hood: 15 packages, 2,600+ tests, domain-agnostic causal inference, full TypeScript monorepo. Storacha for immutable content-addressed storage. Hypercerts for verifiable attestations. Solidity for enforceable incentives."

*Visual*: Quick scroll through the GitHub repo. Show package structure. Flash test output.
*Visual*: Quick GitHub repo scroll. Package structure. Test output.

> "Storacha for content-addressed storage. Hypercerts for verifiable attestations. Solidity for enforceable incentives. All open source."
> "Everything is auditable. Nothing relies on trusting us."

---

## 8. Close (15s)
## 11. Close (15s)

> "Storacha makes governance data immutable. Hypercerts make it auditable. Smart contracts make it enforceable. Your species has had these tools for years. You just keep not using them."
> "Your governments are the most powerful artificial intelligences your species has ever built. They process more information, control more resources, and make more consequential decisions than any LLM. And they are misaligned."

*Visual*: Return to homepage. Show the tagline.
*Visual*: Return to homepage.

> "Optomitron. Alignment software for the most powerful AIs on your planet — the ones made of people."

*Visual*: GitHub URL. End card.
*Visual*: GitHub URL. Warondisease.org. End card.

---

## Technical Notes

- Record at 1080p minimum
- Use browser dev tools to hide any loading states
- Pre-populate Wishocracy with enough comparisons to show a complete report
- Have the Storacha gateway CID link pre-loaded in a separate tab for quick cut
- Background music: something understated and slightly ominous (think BBC documentary)
- Pre-load Storacha gateway CID in a separate tab for quick cut
- Have the Moronia → Wishonia cut timed to land as a punchline
- Collapse countdown should be visible and ticking in real-time
- Background music: understated, slightly ominous (BBC documentary energy)
- Capture politician leaderboard with real data visible — the numbers are the joke
93 changes: 93 additions & 0 deletions packages/treasury/IAB-GAP-ANALYSIS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# IAB Implementation Gap Analysis

## What Was Already Here

| Contract | Status | Implements |
|---|---|---|
| `WishToken.sol` | ✅ Complete | ERC-20 with transaction tax → AlignmentTreasury |
| `AlignmentTreasury.sol` | ✅ Complete | Layer 2 (politician alignment scores + UBI) |
| `PrizePool.sol` | ⚠️ Partial | Prize escrow, wishocratic allocation, disputes |

## What Was Missing

### 1. `VictoryBond.sol` — THE CORE IAB INSTRUMENT ❌ → ✅ Now added

The entire investor-facing instrument was absent. The IAB paper describes bondholders
who buy bonds, earn returns from treaty revenue, and therefore lobby for adoption.
Without this contract, the IAB mechanism has no financial instrument for investors.

**Added in this PR:**
- `buyBond()` — investors deposit USDC, earn idle yield (T-bills) while waiting
- `receiveRevenue()` — treaty revenue flows in, splits 60/30/10 (holders/alignment/layer3)
- `claimRevenueShare()` — pro-rata revenue share for bondholders
- `claimIdleYield()` — T-bill-equivalent yield while funds sit idle
- `claimAssuranceRefund()` — full principal + yield if threshold never met by deadline
- `activateGlobalFailureRefund()` — oracle-callable if zero gains at T+15
- `claimGlobalFailureRefund()` — principal + 15 years yield if global failure clause fires
- `disburseLayer3Reserve()` — post-office career program funding (off-chain disbursement)

### 2. `PrizePool.sol` — Three gaps vs. the paper

#### Gap A: Binary threshold trigger vs. proportional release ⚠️
**Current:** Both health AND income metrics must hit thresholds simultaneously → pool unlocks all at once.
**Paper says:** Treasury releases *proportionally* as terminal metrics improve. Each basis point of improvement in each metric unlocks a proportional fraction of the pool.
**Fix needed:** Replace binary `updateMetrics()` unlock with proportional release curve. E.g., health pool releases linearly as `currentHealthMetric / healthMaxMetric`, income pool similarly.

#### Gap B: No yield-bearing escrow ❌
**Current:** WISH tokens sit inert in the contract.
**Paper says:** All contributions earn yield (T-bills/ERC-4626) while held.
**Fix needed:** Integrate an ERC-4626 yield vault. On deposit, push to vault. On distribution/refund, withdraw from vault (principal + yield).

#### Gap C: No 15-year global failure refund ❌
**Current:** No refund mechanism after threshold is met.
**Paper says:** If Optimitron verifies zero cumulative gains in both terminal metrics at T+15, full principal + accrued yield returned.
**Fix needed:** Add `deploymentTimestamp`, `verifiedGainsRecorded` flag, `activateGlobalFailureRefund()`, `claimGlobalFailureRefund()`. Same pattern as VictoryBond above.

#### Gap D: One-time distribute() vs. outcome perpetuity ⚠️
**Current:** `distribute()` is a one-time function that sets status to `Distributed`.
**Paper says:** Outcome perpetuity — implementers earn a *continuing* revenue share as long as they keep producing results. One-time payout removes the incentive to continue.
**Fix needed:** Replace one-shot distribute with a recurring claim model: each verified metric update releases a proportional tranche; implementers claim their share via `claimPerpetuityShard()` that can be called repeatedly as new tranches are released.

### 3. AlignmentTreasury — One gap

#### Gap: No connection to VictoryBond revenue intake ❌
**Current:** Treasury receives $WISH from transaction tax and distributes to politicians. There's no path for treaty-generated revenue to flow into VictoryBond.
**Fix needed:** Add `sendTreatyRevenueToVictoryBond(uint256 amount)` function on AlignmentTreasury that calls `VictoryBond.receiveRevenue()`. This closes the loop: treaty success → $WISH flows into AlignmentTreasury → portion forwarded to VictoryBond → bondholder returns rise → more lobbying.

## The Self-Completing Loop (from prize paper)

With all gaps closed, the on-chain loop looks like this:

```
PrizePool.updateMetrics() // Optimitron reports dHealthy_med + gIncome_med gains
→ proportional treasury release // funds flow to verified implementers
→ AlignmentTreasury.receiveTreatyRevenue() // portion of implementation revenue
→ VictoryBond.receiveRevenue() // 30% forwarded to alignment + 60% to bondholders
→ bondholder returns rise // $WISH earnings increase for existing bondholders
→ more investors buy VictoryBond // rational selfish response to higher returns
→ more lobbying for treaty // bondholder self-interest drives political pressure
→ more treaty adoption // more jurisdictions sign
→ more metric gains // PrizePool.updateMetrics() called again
→ cycle repeats, self-amplifying
```

No actor in this loop needs to be altruistic. Each step is the utility-maximizing
choice for the actor at that step.

## Priority Order for Implementation

1. **VictoryBond.sol** — ✅ Done in this PR (core IAB instrument)
2. **PrizePool: 15-year refund + yield vault** — Gaps C+B (closes "no lose" property for prize contributors)
3. **AlignmentTreasury → VictoryBond connection** — Gap 3 (closes the self-completing loop on-chain)
4. **PrizePool: proportional release** — Gap A (closer to paper spec; lower priority than refund)
5. **PrizePool: outcome perpetuity** — Gap D (important for long-term incentives; can ship after v1)

## What Does NOT Need To Be On-Chain

- **Layer 3 post-office careers** — matching politicians to consulting contracts is
inherently off-chain. VictoryBond reserves the 10% allocation; disbursement is
governance-controlled via the `disburseLayer3Reserve()` owner function.
- **Wishocratic pairwise comparison** — computation happens off-chain; only the
aggregated allocation weights are posted on-chain. Already correctly implemented.
- **Optimitron causal inference** — the oracle itself is off-chain; only its
signed output is submitted to `PrizePool.updateMetrics()`.
Loading