Skip to content

AkuaChain — Compliance-native L3 infrastructure for regulated real-world asset markets. Intent execution on L3. ERC-3643 settlement on Base L2. Built for RWAs, not DeFi cosplay.

License

Notifications You must be signed in to change notification settings

AkuaX/AkuaChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AkuaChain logo

AkuaChain

AkuaChain is a compliance-native L3 intent layer for regulated real‑world asset (RWA) markets, paired with atomic settlement on L2.

  • Intent execution on L3: users post / accept RFQs and coordinate trades on AkuaChain L3.
  • Rollup L3 on Caldera: AkuaChain runs as a Caldera L3 rollup on the Arbitrum Nitro stack, using AnyTrust mode for low-cost, high-throughput intent activity.
  • Settlement on L2: trades settle atomically on Base Sepolia (L2) via an EIP‑712 settlement router.
  • RWA-first: designed to work with ERC‑3643‑style compliance constraints and transfer rules.

Mental model

  • L3 (AkuaChain / Caldera Nitro AnyTrust): intent + UX coordination (RFQs, accept/cancel, event feed)
  • L2 (Base Sepolia): funds + compliance enforcement (atomic USDC ↔ RWA settlement)

This repository is early-stage. Interfaces, flows, and contract layouts may change as we harden security, add CI, and integrate production infrastructure.

What’s in this repo

Contracts

L2 (Base) — marketplace settlement

  • contracts/marketplace/AkuaMarketRegistryL2.sol
    • Canonical registry of supported markets (RWA token + quote token + metadata + active flag).
  • contracts/marketplace/AkuaSettlementRouterL2.sol
    • EIP‑712 signed RFQ settlement.
    • Nonce-based replay protection per maker.
    • Cancel/fill tracking.
    • Optional protocol fee.
    • Pausable + ReentrancyGuard.

L3 (AkuaChain) — intent layer

  • contracts/l3/AkuaMarketRegistryL3.sol
    • L3 registry for market metadata and pointers to L2 settlement targets.
  • contracts/l3/AkuaRFQRouterL3.sol
    • RFQ posting/acceptance/cancellation, designed for off-chain indexing (event-driven feed).
  • contracts/l3/AkuaSettlementForwarderL3.sol
    • Phase 1: emits settlement-request events for relayers.
    • Phase 2 target: L3→L2 messaging integration (rollup-stack dependent).

Tests

Foundry-style tests live under test/:

  • test/marketplace/*
  • test/l3/*
  • test/raincross/*

Docs

Architecture and flows:

  • Marketplace docs: docs/marketplace/
  • L3 docs: docs/l3/

Architecture (high level)

AkuaChain uses a hybrid design:

  1. L3 is the intent layer

    • Users post RFQs and accept them on L3.
    • Events are intended to be indexed (e.g., into a DB) for UI feeds and operations.
  2. L2 is the funds layer

    • Settlement executes atomically via a settlement router:
      • maker ↔ taker swaps (RWA token ↔ quote token)
      • fee accounting (optional)
      • signature verification via EIP‑712

This separation helps keep matching/intents cheap and composable while preserving secure, atomic settlement on the funds chain.

Quickstart (dev)

Prereqs

  • Node.js (LTS recommended)
  • pnpm (this repo specifies pnpm@9.x in package.json)
  • Foundry (for forge test)

Install deps

pnpm install

Compile (Hardhat)

pnpm compile

Run tests (Foundry)

forge test -vvv

Environment variables

Hardhat reads environment variables from .env (via dotenv). Common variables:

  • BASE_SEPOLIA_RPC
  • AKUACHAIN_L3_RPC
  • DEPLOYER_KEY
  • BASESCAN_API_KEY / ETHERSCAN_API_KEY

Do not commit secrets. Use .env locally.

Security

  • This code has not been audited.
  • Do not use in production without a thorough review, formal verification where appropriate, and independent audits.
  • If you discover a security issue, please report it privately (open an issue only if it contains no exploitable details).

Contributing

PRs are welcome. Suggested contribution types:

  • Add CI (formatting, compile, forge test)
  • Add missing scripts referenced in package.json (or remove/replace them)
  • Improve docs and diagrams
  • Add integration tests and deployment tooling

License

MIT — see LICENSE.

About

AkuaChain — Compliance-native L3 infrastructure for regulated real-world asset markets. Intent execution on L3. ERC-3643 settlement on Base L2. Built for RWAs, not DeFi cosplay.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •