← All documentation

KAURAX — Infrastructure Audit

Date: 2026-09-07 Scope: the repository as it stands, before any infrastructure restructuring. Method: live inspection of the running devnet, the source tree, the test suites and the existing CI. Nothing below is inferred from documentation — every claim was checked.


1. Current architecture

What the repository actually is today

A single-package pnpm workspace containing a working Ethereum Layer-3 and one frontend. It is not yet a monorepo in the apps/ + services/ sense.

kaurax/
├── contracts/            Foundry — L2 settlement, L3 predeploys, bridges, AI layer
├── packages/
│   ├── config/           typed configuration loader
│   ├── node/             kaurax-node: sequencer, derivation, batcher, proposer, RPC
│   ├── sdk/              @kaurax/sdk
│   └── cli/              kaurax CLI
├── explorer/             Next.js 16 — explorer + bridge UI + dashboard (12 routes)
├── website/              static index.html
├── chain/                chain config + genesis allocation
├── scripts/              devnet / testnet / deployment shell scripts
├── infrastructure/       docker (3 Dockerfiles), monitoring (Prometheus + Grafana)
├── docs/                 23 documents
└── tests/                end-to-end acceptance test
PropertyValue
Package managerpnpm 10.28.0 (workspace via pnpm-workspace.yaml)
Workspace globspackages/*, explorer, tests
Frontend frameworkNext.js 16.3.4, App Router, React 19
ContractsFoundry, Solidity 0.8.28, evm_version = cancun
Node runtimeNode.js ≥ 20, TypeScript 5.7, ESM ("type": "module")
Build orchestrationnone — plain pnpm -r recursion, no Turborepo
Chain clientanvil (revm) as the L3 execution engine, driven by kaurax-node

Network configuration in place

DevnetTestnet (configured, never run)
KAURAX chain ID84208421
Native currencyKAX, 18 decimalsKAX
Underlying L2local anvil, chain 8415Base Sepolia, chain 84532
L1local anvil, chain 8410Sepolia, 11155111

Discrepancy to resolve. The infrastructure brief's example uses chainId 123456 and

symbol KXR. The project already uses 8420 / KAX, and those chain IDs were verified

free against the public registry (chainid.network, 2 750 chains). Per the brief's own

instruction ("ΜΗΝ χρησιμοποιήσεις το παράδειγμα chain ID αν υπάρχει ήδη άλλο"), the

existing values are kept. The `KXR` symbol is not adopted — changing it would break

the genesis, the explorer, the SDK and every document. It is a one-line config change if

you want it; say the word and I will do it properly across the tree.


2. What works

Verified live during this audit — the devnet was running throughout.

ComponentEvidence
L3 chainHead at block 219 while auditing; 2s block time; real EVM state roots
SequencerOwn mempool, nonce ordering, deposits ahead of user transactions
Deposit derivationL2 TransactionDeposited → L3 transaction, exactly once
Batcher36 batches landed on the L2 as real calldata
Proposer18 output roots published to KauraxL2OutputOracle
BridgeDeposit + Merkle-proven withdrawal + finalize, end to end
Data availabilityA transaction was recovered from L2 calldata alone by the test
JSON-RPC + WSFull eth_* surface, subscriptions, kaurax_* namespace
RPC hardeninganvil_*, evm_*, debug_*, hardhat_* blocked on the public port
Explorer12 routes, all 200, all reading live chain state
SDK + CLIVerified against the live chain
Contracts76 forge tests passing, forge fmt clean
Node/SDK units29 vitest tests passing
Acceptance47 checks passing from a clean slate
MonitoringPrometheus metrics on :7300, Grafana dashboard provisioned
CI6 workflows, all valid YAML

Running processes at audit time: anvil ×3 (L1 8545, L2 9545, L3 engine 18420), kaurax-node (8420/8421/7300), next start (3000).


3. What doesn't work / doesn't exist

Not present at all

MissingImpact
apps/ directory9 of the 10 required frontends do not exist
services/apiNo backend API. No /api/health.
services/indexerNo indexer. The explorer scans blocks over RPC on every request.
services/relayerWithdrawal proving/finalizing is manual
services/analytics—
PostgreSQLNo database anywhere in the repository
RedisNot present
NginxNo reverse proxy config; no TLS termination
UpCloud provisioningNo bootstrap, no deploy script, no firewall config
turbo.jsonNo build orchestration or caching
Wallet / Pay / AI / Swap / Names / Launchpad / Docs UIsDo not exist
Deployment workflowdeploy.yml absent — CI builds but never deploys

Present but limited

ComponentLimitation
Explorer address & tx historyScans a rolling window of recent blocks over RPC. Not a historical index. The UI states this.
Contract verificationNone. No contract is marked verified, and the UI says so.
docker-compose.ymlWritten and valid, but never executed — the Docker daemon was unavailable
Testnet profileConfigured and version-pinned, never operated
WebsiteStatic HTML, not a Next.js app, not Vercel-structured
Bridge UIInitiates and tracks; proving/finalizing on the L2 is left to the CLI/SDK

4. Missing components (by brief section)

§RequirementStatus
2Monorepo layout apps/ services/ blockchain/ packages/ infra/Missing
3deploy.yml for UpCloudMissing (other 5 workflows exist)
411 Vercel applications1 of 11 (explorer)
5UpCloud server provisioningMissing
6Per-service Docker layoutPartial — 3 Dockerfiles, not the docker/{l3,rpc,…} layout
7Public RPC endpoint configPartial — RPC works, no TLS/proxy/domain
16Backend APIMissing
17IndexerMissing
18PostgreSQLMissing
19NginxMissing
20UFW / Fail2ban / SSH hardeningMissing
23Health endpointsMissing
24infra/scripts/deploy.shMissing
25infra/scripts/bootstrap.shMissing
26DNS planMissing
28DEPLOYMENT.md, ARCHITECTURE.md, SECURITY.md, CONTRIBUTING.mdMissing (docs/ covers architecture and security at a protocol level, not an ops level)

5. Security risks

#RiskSeverityState
S1No fault proof system. Output roots are trusted; an incorrect one surviving the challenge window can drain KauraxPortal.CriticalKnown, documented, unresolved
S2No TLS. RPC and everything else is plain HTTP.HighNginx + certbot needed
S3No rate limiting, no auth, no CORS policy on the public RPC. Trivially DoS-able.HighMust be fronted by a proxy
S4Keys are plain environment variables. No KMS, no hardware signing, no rotation.HighDocumented; unresolved
S5Every privileged role (guardian, challenger, proposer, deployer) is a single EOA.HighUnresolved
S6.env is present in the working tree. Correctly gitignored and untracked (verified), but it holds the devnet keys.MediumContained
S7Execution engine exposes anvil_*. Bound to loopback and blocked at the RPC facade, but a misconfigured deployment could expose port 18420.MediumMust never be published — enforced in compose
S8No firewall, no Fail2ban, no non-root deploy user — because no server exists yet.HighTo be built
S9No database, therefore no database credentials — but also no place for indexer data.MediumTo be built
S10Nothing has been audited.CriticalStated everywhere

Positive findings: no tracked .env; no private-key literals outside .env.example (which deliberately holds the public Anvil keys); zero TODO/FIXME markers; zero mock or fabricated data; admin RPC namespaces actively blocked and asserted at devnet startup.


6. Deployment risks

#RiskMitigation planned
D1docker-compose.yml has never been run. Docker daemon unavailable in this environment.Rewrite for the target topology; validate with docker compose config; mark as unverified until a real host runs it
D2Unbatched L3 blocks are not durably persisted. A node loss before batching loses those transactions.Named Docker volumes for chain data; documented as a remaining gap
D3Devnet state lives in .devnet/ on the local filesystem. Not suitable for a server.Docker volumes
D4No rollback procedure.deploy.sh keeps the previous image tag and can revert
D5No health gating — CI has no way to know a deploy succeeded./api/health + deploy.sh failing on unhealthy services
D6Secrets would have to reach the server somehow.GitHub Actions secrets → SSH → server-side .env, never in the image or repo
D7Single server = single point of failure.Accepted for a €0-budget testnet; documented
D8Explorer queries the chain on every request with no cache. Will not survive public traffic.Indexer + PostgreSQL

7. Recommended changes

Ordered, non-destructive, each verifiable.

  1. Restructure to the target monorepo by moving existing directories, not rewriting

them: explorer/ → apps/explorer/, website/ → apps/web/, contracts/ → blockchain/contracts/, infrastructure/ → infra/. Keep packages/* where it is. Add Turborepo. 2. Add PostgreSQL + the indexer — this is the single highest-value addition. It unlocks real address history, token tracking and analytics, and takes the read load off the RPC. 3. Add the backend API (Fastify) with real health endpoints backed by real checks. 4. Build the remaining apps against real data where it exists, and label everything else explicitly Coming Soon / Testnet / Not deployed — never as working production. 5. Nginx + TLS-ready config, with the RPC rate-limited and CORS-scoped. 6. UpCloud `bootstrap.sh` and `deploy.sh`, idempotent, with checks before every destructive step. 7. `deploy.yml` driving SSH deployment, with secrets only from GitHub Actions. 8. Ops documentation: DEPLOYMENT.md, ARCHITECTURE.md, SECURITY.md, CONTRIBUTING.md.

Explicitly not recommended

  • Changing the chain ID or the KAX symbol without instruction — it would break genesis, the

explorer, the SDK and the docs for no functional gain. - Rewriting kaurax-node, the contracts or the explorer. They work and are tested. - Adding any paid service. The plan uses Vercel (free tier), GitHub (free), one UpCloud VPS, and self-hosted PostgreSQL/Redis/Nginx in Docker.


8. Constraint: what cannot be verified from here

Stated so that nothing in the deliverable is mistaken for tested:

  • No Docker daemon in this environment (colima not running) — every container image

and compose topology is written and statically validated, but not executed. - No UpCloud server, no domain, no DNS control, no TLS certificate, no API keys. All of these become .env.example entries and documentation, never guesses. - Vercel deployment cannot be performed — no authenticated project. The apps are built to deploy, and the configuration is provided.

Everything that can be run locally will be run and its result reported honestly.