harb/onchain
openhands a46c30cff6 fix: landing page user test fixes (#162)
- Add VueQueryPlugin to landing main.ts (wagmi/vue requires it)
- Add Vite proxy for /api/graphql → ponder:42069/graphql
- Replace axios with native fetch in WalletCard.vue
- Add navigateTo() for CTA buttons (uses VITE_APP_URL env)
- Load contract addresses from bootstrap in landing entrypoint
- Add via_ir to foundry.toml (OptimizerV3Push3 stack-too-deep)
- Add VITE_APP_URL env to docker-compose landing service

Fixes: blank landing pages, broken LiveStats, missing CTA links,
missing contract addresses in footer
2026-02-23 14:47:38 +00:00
..
.claude chore: analysis tooling, research artifacts, and code quality 2026-02-13 18:22:03 +00:00
.github/workflows chore: forge init 2024-03-12 10:00:53 +01:00
.husky Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
analysis chore: analysis tooling, research artifacts, and code quality 2026-02-13 18:22:03 +00:00
lib feat/ponder-lm-indexing (#142) 2026-02-18 00:19:05 +01:00
script feat: deployment scripts, E2E tests, and documentation 2026-02-13 18:21:49 +00:00
src feat: Push3 → Solidity transpiler + OptimizerV3 port 2026-02-23 14:47:38 +00:00
test feat: Push3 → Solidity transpiler + OptimizerV3 port 2026-02-23 14:47:38 +00:00
.claude-code-supervisor.yml fix: refactor AGENTS.md into progressive-disclosure structure (#184) 2026-02-23 09:46:35 +00:00
.gas-snapshot chore: analysis tooling, research artifacts, and code quality 2026-02-13 18:22:03 +00:00
.gitignore fix: gitignore JS lock files in onchain/ (Foundry-managed deps) 2026-02-23 13:40:19 +00:00
.lintstagedrc.json Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
.secret.local start stack from container (#40) 2025-10-02 17:11:22 +02:00
.solhint.json Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
.solhintignore Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
AGENTS.md docs: consolidate and update all documentation for launch readiness 2026-02-13 19:22:34 +00:00
deployments-local.json feat: deployment scripts, E2E tests, and documentation 2026-02-13 18:21:49 +00:00
foundry.toml fix: landing page user test fixes (#162) 2026-02-23 14:47:38 +00:00
hAIrberger.md refactor: Complete project renaming from HARB/Harberger to KRAIKEN 2025-08-19 11:05:08 +02:00
package-lock.json Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
package.json Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
README.md docs: consolidate and update all documentation for launch readiness 2026-02-13 19:22:34 +00:00
remappings.txt basic shift implementation 2024-03-28 21:50:22 +01:00
UNISWAP_V3_MATH.md more docs 2025-08-18 00:16:09 +02:00

KRAIKEN Onchain

Solidity contracts for the KRAIKEN protocol. Built with Foundry.

Contracts

Contract Description
Kraiken.sol ERC20 token with mint/burn controlled by LiquidityManager. VERSION=2.
LiquidityManager.sol Three-position Uniswap V3 strategy (Anchor, Discovery, Floor).
Stake.sol Harberger-tax staking with snatching auctions and discrete tax brackets.
OptimizerV3.sol UUPS upgradeable. Binary bear/bull parameter selection from staking sentiment.
VWAPTracker.sol Volume-weighted average price with directional recording and compression.

Setup

git submodule update --init --recursive
cd lib/uni-v3-lib && npm install && cd ../..
forge build
forge test

Deploy

source .env
forge script script/BaseSepoliaDeploy.sol:BaseSepoliaDeploy --slow --broadcast --verify --rpc-url ${BASE_SEPOLIA_RPC_URL}

See docs/DEPLOYMENT_RUNBOOK.md for production deployment.

Deployments

Base Mainnet

Contract Address
Kraiken 0x45caa5929f6ee038039984205bdecf968b954820
Stake 0xed70707fab05d973ad41eae8d17e2bcd36192cfc
LiquidityManager 0x7fd4e645ce258dd3942eddbeb2f99137da8ba13b

Base Sepolia

Contract Address
Kraiken 0x22c264Ecf8D4E49D1E3CabD8DD39b7C4Ab51C1B8
Stake 0xe28020BCdEeAf2779dd47c670A8eFC2973316EE2
LiquidityManager 0x3d6a8797693a0bC598210782B6a889E11A2340Cd

Research & Analysis

The analysis/ directory contains fuzzing scripts, parameter sweep tools, and security analysis:

Key findings: critical sqrt price bug fixed, 1050-combo 4D parameter sweep completed, floor ratchet vulnerability identified. See the research report for details.

ABI Architecture

Contract ABIs flow through the stack via kraiken-lib/src/abis.ts, which imports directly from out/ (forge build artifacts). Run forge build to update ABIs across all consumers (ponder, web-app).

References