No description
Find a file
johba e562a51d47 fix: use waitFor instead of isVisible for wallet connect in deep link test
The deep link test's wallet connection was silently failing because
isVisible() returns immediately without waiting for the element to
appear. wagmi needs time to settle into 'disconnected' state after
provider injection. Now uses waitFor() which properly auto-retries,
plus adds a 2s delay matching the pattern used in test 01.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:41:35 +00:00
.codeberg/ISSUE_TEMPLATE fix: Issue template (push3-seed.yaml) doesn't enumerate manifest.jsonl fields (#705) 2026-03-14 00:37:06 +00:00
.husky feat: OptimizerV3 with direct 2D staking-to-LP parameter mapping 2026-02-13 18:21:18 +00:00
.woodpecker Merge pull request 'fix: feat: E2E quality gate — mobile viewports + cross-browser matrix (#1099)' (#1139) from fix/issue-1099 into master 2026-03-25 01:36:02 +01:00
containers fix: feat: basic analytics funnel tracking for launch readiness (#1101) 2026-03-23 13:04:24 +00:00
docker fix: copy hoisted node_modules in CI Dockerfile (#161) 2026-02-20 02:36:00 +01:00
docs fix: feat: basic analytics funnel tracking for launch readiness (#1101) 2026-03-23 13:04:24 +00:00
evidence fix: action: test prediction #1150 — run-user-test baseline persona UX evidence (#1151) (#1152) 2026-03-25 08:47:23 +01:00
formulas chore: gardener housekeeping 2026-03-23 2026-03-23 18:07:12 +00:00
gardener chore: planner run — Phase 1 complete, bottleneck shifts to Phase 2 (#1157) 2026-03-25 09:36:59 +01:00
kraiken-lib chore: gardener housekeeping 2026-03-23 2026-03-23 18:07:12 +00:00
landing chore: planner run — Phase 1 complete, bottleneck shifts to Phase 2 (#1157) 2026-03-25 09:36:59 +01:00
onchain chore: gardener housekeeping 2026-03-23 2026-03-23 18:07:12 +00:00
packages fix: feat: basic analytics funnel tracking for launch readiness (#1101) 2026-03-23 13:04:24 +00:00
planner chore: planner run — Phase 1 complete, bottleneck shifts to Phase 2 (#1157) 2026-03-25 09:36:59 +01:00
scripts fix: fix: wallet connector panel not rendering at standard viewports — blocks all user funnels (#1156) 2026-03-25 09:29:53 +00:00
services chore: gardener housekeeping 2026-03-23 2026-03-23 18:07:12 +00:00
tests fix: use waitFor instead of isVisible for wallet connect in deep link test 2026-03-25 11:41:35 +00:00
tools fix: anvil not validated in tool-check step (#1046) 2026-03-23 00:07:14 +00:00
web-app chore: gardener housekeeping 2026-03-23 2026-03-23 18:07:12 +00:00
.claude-code-supervisor.yml fix: refactor AGENTS.md into progressive-disclosure structure (#184) 2026-02-23 09:46:35 +00:00
.dockerignore feature/ci (#84) 2026-02-02 19:24:57 +01:00
.gitignore fix: deployments-local.json committed to repo (#589) 2026-03-20 09:48:00 +00:00
.gitmodules fix: clean URLs, contract addresses, gitmodule (#16, #58, #147) (#162) 2026-02-20 17:28:59 +01:00
.lintstagedrc.json fix: lint: Ban waitForTimeout, setTimeout-as-delay, and fixed sleep patterns (#442) 2026-03-03 20:58:01 +00:00
AGENTS.md chore: planner run — Phase 1 complete, bottleneck shifts to Phase 2 (#1157) 2026-03-25 09:36:59 +01:00
docker-compose.yml fix: feat: basic analytics funnel tracking for launch readiness (#1101) 2026-03-23 13:04:24 +00:00
eslint.config.js fix: lint: Ban waitForTimeout, setTimeout-as-delay, and fixed sleep patterns (#442) 2026-03-03 20:58:01 +00:00
HARBERG.md docs: consolidate and update all documentation for launch readiness 2026-02-13 19:22:34 +00:00
IMPLEMENTATION_SUMMARY.md feat/ponder-lm-indexing (#142) 2026-02-18 00:19:05 +01:00
package-lock.json fix: update package-lock.json for @harb/analytics workspace package 2026-03-23 13:24:00 +00:00
package.json fix: lint: Ban waitForTimeout, setTimeout-as-delay, and fixed sleep patterns (#442) 2026-03-03 20:58:01 +00:00
playwright.config.ts fix: CROSS_BROWSER_SPECS glob matches unintended conversion-funnel spec (#1154) 2026-03-25 08:29:10 +00:00
README.md docs: consolidate and update all documentation for launch readiness 2026-02-13 19:22:34 +00:00
RESOURCES.md docs: RESOURCES.md — add dispatch mechanism, formula inventory, and constraints 2026-03-22 11:56:03 +01:00
STATE.md fix: fix: evolution formula must commit results via PR before closing (#1047) 2026-03-22 00:22:04 +00:00
TECHNICAL_APPENDIX.md docs: consolidate and update all documentation for launch readiness 2026-02-13 19:22:34 +00:00
USERTEST-REPORT-V2.md feat/ponder-lm-indexing (#142) 2026-02-18 00:19:05 +01:00
VERSION_VALIDATION.md docs: consolidate and update all documentation for launch readiness 2026-02-13 19:22:34 +00:00
VISION.md docs: add VISION.md — launch strategy and phase definitions (#894) 2026-03-17 06:56:05 +01:00

KRAIKEN

The fairest ponzi in the world.

KRAIKEN is a DeFi protocol that couples Harberger-tax staking with a dominant Uniswap V3 liquidity manager. The result: asymmetric slippage, sentiment-driven pricing, and VWAP-based price memory that protects the protocol from exploitation.

Deployed on Base.

The Three Stages

  1. Harberger — A staking market balanced by the Harberger tax. Complete.
  2. KRAIKEN — Token issuance governed by an automated liquidity manager. Current stage.
  3. SoverAIgns — The liquidity manager augmented by AI for outlandish performance. Future.

How It Works

Three-Position Liquidity Strategy

The LiquidityManager maintains three Uniswap V3 positions simultaneously:

  • Anchor — Shallow liquidity near the current price. Fast price discovery, high slippage for attackers.
  • Discovery — Medium liquidity bordering the anchor. The fee capture zone.
  • Floor — Deep liquidity at VWAP-adjusted distance. Price memory that protects against whale dumps.

Any round-trip trade (buy → recenter → sell) pays disproportionate slippage costs twice, making manipulation unprofitable.

Harberger Tax Sentiment Oracle

Stakers self-assess tax rates on their positions. Higher tax = higher confidence. Positions can be snatched by anyone willing to pay more. This creates a continuous prediction market for token sentiment.

OptimizerV3

Reads staking data (% staked, average tax rate) and outputs a binary bear/bull configuration:

  • Bear (~94% of state space): AS=30%, AW=100, CI=0, DD=0.3e18 — protective
  • Bull (>91% staked, low tax): AS=100%, AW=20, CI=0, DD=1e18 — aggressive fee capture

The binary step avoids the AW 40-80 kill zone where intermediate parameters are exploitable.

VWAP Floor Defense

The floor position uses volume-weighted average price with directional recording (buys only). During sell pressure, the VWAP-to-price distance grows, making the floor resist walkdown. This gives the protocol "eternal memory" against dormant whale attacks.

Tech Stack

Component Technology Location
Smart Contracts Solidity, Foundry onchain/
Indexer Ponder (TypeScript) services/ponder/
Staking App Vue 3, Vite, Wagmi web-app/
Landing Page Vue 3, Vite landing/
Automation Bot Node.js, Express services/txnBot/
Shared Library TypeScript kraiken-lib/
Block Explorer Otterscan Docker service
Reverse Proxy Caddy Docker service

Repository Structure

harb/
├── onchain/           # Solidity contracts, tests, deployment scripts, analysis
│   ├── src/           # Core: Kraiken, Stake, LiquidityManager, OptimizerV3
│   ├── test/          # Foundry test suite
│   ├── script/        # Deployment scripts
│   └── analysis/      # Fuzzing, parameter sweeps, security review
├── services/
│   ├── ponder/        # Blockchain indexer → GraphQL API
│   └── txnBot/        # recenter() + payTax() automation
├── web-app/           # Staking dashboard (Vue 3)
├── landing/           # Marketing site (Vue 3)
├── kraiken-lib/       # Shared TypeScript helpers and ABIs
├── tests/e2e/         # Playwright end-to-end tests
├── scripts/           # Dev environment, CI bootstrap, utilities
├── docker/            # CI Dockerfiles
├── containers/        # Entrypoints, Caddyfile
└── docs/              # Deployment runbook, Docker guide

Quick Start

# Prerequisites: Docker Engine (Linux) or Colima (Mac)
# See docs/docker.md for installation

nohup ./scripts/dev.sh start &    # Start full stack (~3-6 min first time)
tail -f nohup.out                  # Watch progress
./scripts/dev.sh health            # Verify all services healthy

Access points (via Caddy on port 8081):

Contracts (Base Mainnet)

Contract Address
Kraiken 0x45caa5929f6ee038039984205bdecf968b954820
Stake 0xed70707fab05d973ad41eae8d17e2bcd36192cfc
LiquidityManager 0x7fd4e645ce258dd3942eddbeb2f99137da8ba13b

Documentation

License

GPL-3.0-or-later