Launch App
PROTOCOL SPECIFICATION·VERSION 1.0·NIMIQ MAINNET

The Proof-of-Action Protocol Specification

A formal architectural reference for decentralized smart covenants, sub-second escrow settlements, mathematical custody, and sceptical AI oracles on the Nimiq blockchain.

Vault: NQ86 845N NUJ3 88U4 2V9E DEDF XV8Y CFES 8RKT·Fee: 0.0011 NIM·Inference: Qwen 3.6 (Hetzner)lib/vault.ts
Section 1

§ 1. Protocol Doctrine & Foundations

lib/escrow.ts

§ 1.1 The Doctrine of Proof-of-Action

lib/contract.ts
"Traditional distributed ledgers excel at recording the transfer of digital abstractions within their closed state machines. Acta connects blockchain consensus directly with reality: money moves when physical deeds or verified digital deliverables occur."

On traditional blockchains, escrows are hampered by high transaction gas ($2–$15 per state update on EVM chains), slow block times (12–15 seconds), and opaque dispute systems. Acta leverages the Nimiq Proof-of-Stake (Albatross) consensus engine to achieve sub-second micro-blocks and deterministic finality with micro-fees of 0.0001 NIM.

Because transaction costs on Nimiq are negligible, micro-covenants become viable: lending a power tool for two hours, sponsoring a neighborhood park cleanup, placing an unforgeable cryptographic proximity token at a secret location, or commissioning a global open-source bug fix.

§ 1.2 Traditional Escrow Failure Modes vs. Acta

Centralized Middlemen (Web2)
  • Extract 15% to 30% commission from participants.
  • Arbitrary account freezes and custodial censorship.
  • Weeks of bureaucratic dispute arbitration.
  • User reputation is locked inside closed corporate silos.
Acta Smart Covenants (Nimiq)
  • Flat 0.001 NIM protocol fee retained by treasury.
  • Non-custodial vault holding funds autonomously on-chain.
  • Instant settlement upon cryptographic or AI oracle verdict.
  • Algorithmic trust score compounds into direct borrowing power.

§ 1.3 Local Proximity vs. Global Remote Deeds

A common misconception is that Acta only supports physical, in-person hardware handoffs between neighbors. This is only one subset of its capability. The protocol spans two complementary vectors:

Vector I: Physical Proximity & Regional Deeds

Equipment custody loans (cameras, e-bikes, tools), physical scavenger hunts (ScanQuest tokens), and geofenced real-world environmental tasks. Protected by Ed25519 single-use cryptographic QR handshakes and GPS bounds.

Vector II: Global Remote & Digital Deeds

Online venture deliverables, open-source software contributions, graphic design tasks, translation bounties, and decentralized challenges worldwide. Anyone anywhere across the globe can accept, execute, and settle covenants with zero physical meeting required.

§ 1.4 Guarantees, Tradeoffs & Constraints

Acta does not compromise on architectural honesty. We disclose the real-world engineering constraints:

Sceptical Vision AI InstructionThe vision oracle defaults to refusal whenever there is doubt. Challengers must ensure clear lighting and framed requirements. Transport timeouts (502 / 429) are treated as retryable errors, never recorded as failures.
Sequential Nonce SerializationNimiq accounts utilize sequential transaction nonces. Concurrent payouts are serialized through a strict FIFO execution queue (`lib/backend-nimiq.ts`) to prevent nonce collision.
GPS Accuracy BoundsGeofenced covenants enforce a 50-metre radius and an accuracy bound (≤ 50 metres) via HTML5 Geolocation to prevent location spoofing.

§ 1.5 Network Economy & Fee Schedule

lib/escrow-math.ts
OperationProtocol FeeNimiq GasRecipient
Available Listing Creation0.0000 NIM0.0000 NIMOff-chain Radar listing
Bounty / Rent Creation0.0000 NIM0.0001 NIMNimiq Validators
Covenant Acceptance (Lock)0.0000 NIM0.0001 NIMNimiq Validators
Vault Payout Settlement0.0010 NIM0.0001 NIMCommunity Treasury & Validators
Cancellation / Refund0.0000 NIM0.0001 NIMFull Principal Returned
Section 2

§ 2. The Nimiq Ledger & Micro-Consensus

lib/backend-nimiq.ts

§ 2.1 The Nimiq PoS Albatross Engine

Acta runs atop Nimiq's second-generation consensus mechanism: Albatross. Albatross is a state-of-the-art, optimistic Proof-of-Stake algorithm capable of achieving thousands of transactions per second with sub-second micro-blocks.

FINALITY TIME< 1 SecondInstant micro-blocks
BASE NETWORK FEE0.0001 NIMMicro-penny economics
NATIVE CRYPTOGRAPHYEd25519 & BLSSingle-use signed QR tokens

§ 2.2 Embedded Nimiq Pay Mini-App Sandbox

Acta detects when executed inside the official Nimiq Pay mobile application via the injected global bridge (window.nimiq).

Zero-Redirect Native Keyguard

Inside Nimiq Pay, transactions are signed natively inside the secure hardware enclave of the phone without redirecting to an external browser tab. If loaded in Chrome, Safari, or desktop browsers, Acta smoothly falls back to the standard Nimiq Hub pop-up and local key storage.

§ 2.3 Autonomous Vault & Hot Reserve

lib/vault.ts

All covenant collateral and bounty funds are held by the autonomous protocol address:

NQ86 845N NUJ3 88U4 2V9E DEDF XV8Y CFES 8RKTHOT VAULT

The vault operates non-custodially: funds can only be disbursed when cryptographic proof (signed QR, geofence coordinate, AI verdict, or sponsor signature) is verified by the backend engine.

§ 2.4 Zero-Cron Settlement Architecture

Most Web3 apps rely on background crons (e.g. cron-job.org or daily server crons) to detect timeouts. Acta is 100% zero-cron.

State transitions occur lazily: when a user loads Radar (GET /api/listings), any expired task (expires_at < NOW()) is dynamically marked inactive in the query, instantly vanishing from the active radar container with zero background scheduler dependency.

Section 3

§ 3. The 6 Smart Covenant Archetypes

components/ListingDetailSheet.tsx

§ 3.1 Equipment Loan / Borrowing Covenants

app/api/listings/route.ts

Borrow high-value physical hardware (camera gear, power tools, drones, measurement instruments) with zero centralized paperwork. Collateral is locked securely into the autonomous vault and returned instantly upon scanning the owner's cryptographic return QR code.

§ 3.1.1 Fundamental Distinction: "Available" vs. "Rent" Modes
Mode A: "List as Available" (Lender)

The sponsor owns the item and offers it to the community. No transaction is broadcast upon listing; no funds are deducted from the sponsor. Only when a borrower accepts is collateral locked into the vault.

Mode B: "Rent an Item" (Borrower)

The sponsor is seeking to borrow equipment and puts up rental reward/collateral. An on-chain transaction is broadcast upon listing to lock the reward into the vault escrow upfront.

§ 3.2 Vision Oracle Verification (Qwen 3.6 on Hetzner)

lib/vision.ts

Photo bounties are judged by an autonomous multi-modal AI vision model: Qwen 3.6 35B FP8 running on dedicated Hetzner cloud inference (https://inference.hetzner.com/api/v1).

Sceptical Truth Policy

The vision oracle prompt instructs the model: "You are a sceptical verification oracle for an escrow payment system. If you are in doubt, pass must be false." It checks scene lighting, required components, absence of screen mockups, and adherence to sponsor criteria.

§ 3.3 ScanQuest Cryptographic Handshake (Ed25519 QR)

lib/qr.ts

Physical proximity transfers and return receipts rely on ephemeral Ed25519-signed payloads.

  • Single-use cryptographic nonce burned in database upon redemption to guarantee zero replay attacks.
  • 10-minute expiry window (exp = Date.now() + 600000).
  • Full WebRTC camera scanner with automatic fallback to native file upload.

§ 3.4 Geolocation Geofence Attestation (GPS)

app/api/bounty/geo/route.ts

For regional bounties (street cleanups, physical checkpoints, event attendance), Acta verifies physical presence using the Haversine Great-Circle formula:

distance ≤ 50m AND gpsAccuracy ≤ 50m

§ 3.5 In-Person / Creator Attestation

app/api/bounty/manual_approve/route.ts

Custom commissions where an algorithmic or AI oracle cannot evaluate subjective nuance. The challenger submits proof in Inbox, and the sponsor clicks "Approve & Release Vault Funds", broadcasting the release transaction sub-second.

§ 3.6 Online Ventures & Digital Bounties (100% Global)

Acta is global-first. A sponsor in Tokyo can deploy a 500 NIM bounty for resolving a GitHub issue, auditing a smart contract, designing a 3D icon, or writing technical documentation.

A developer in Buenos Aires or Berlin can accept the covenant, submit deliverables (PR URL, design link, or SHA256 checksum), and trigger autonomous payout upon sponsor signature or AI prescreen verdict.

Section 4

§ 4. Contract Lifecycle & State Machine

components/ContractToggles.tsx

§ 4.1 The 4 Contract Toggles

In the active dashboard, covenants are partitioned into 4 distinct views:

1. In ProgressActive covenants where funds are locked in the vault and custody or task deadlines are ticking down.
2. Awaiting MeCovenants that require immediate action from the current user (generate QR, submit proof, or approve deliverable).
3. SettledImmutable register of completed covenants. Displays on-chain transaction hash (txHashOut), verified oracle stamp, and Nimiq explorer links.
4. RefundedCancelled listings, expired covenants, or mutually refunded transactions where 100% of vaulted funds returned to source without penalty.

§ 4.2 Dynamic Attention Badges & Auto-Dismissal

app/app/page.tsx

To eliminate notification noise, every toggle displays a dynamic numerical badge (1, 2) indicating how many items require user attention. The badge automatically dismisses as soon as the user opens that tab, tracking view state locally in memory.

§ 4.3 Covenant State Machine Transitions

Inspect Interactive Diagram in § 7.2 ↓

Every covenant transitions deterministically through 6 formal stages: open → locked → settling → released (or disputed / refunded).

§ 4.4 Unreturned Item Claims & 48-Hour Grace Period

Default Protection Guarantee

If an equipment loan deadline elapses without return, the covenant enters a dispute window. The borrower is granted a 48-hour grace window (LENDER_CLAIM_GRACE_MS) to return the item.

If the borrower still fails to return the item after the 48-hour grace period, the lender's "Claim Collateral" button unlocks. Invoking POST /api/claim seizes 100% of the vaulted collateral and transfers it directly to the lender's wallet.

Section 5

§ 5. Reputation & Sovereign Privileges

lib/escrow-math.ts

§ 5.1 The Algorithmic Trust Score Formula (0–100)

lib/auth.ts

Acta does not rely on subjective star ratings or easily gamed reviews. Trust is derived algorithmically from mathematical facts etched in the acts ledger:

Trust Score = min(100, round(

(settledActs / totalActs) * 35 // Completion Rate (35 pts)

+ min(25, (log10(volumeNIM + 1)/5) * 25) // Volume Weight (25 pts)

+ min(20, (tenureDays / 90) * 20) // Account Tenure (20 pts)

+ min(10, (distinctOracles / 5) * 10) // Oracle Diversity (10 pts)

+ min(10, (communityActs / 10) * 10) // Sponsored Peer Acts (10 pts)

))

§ 5.2 Reputation as Buying Power (Collateral Discount)

Simulate Discount Calculator in § 7.1 ↓

Trust score directly lowers required collateral locks for equipment borrowing:

discountRate = min(0.30, trustScore * 0.003) // Up to 30% discount at Trust 100

§ 5.3 The 5 Sovereign Privileges / Rites

Rite I: Daily Vigil & Continuous StreaksDaily attendance attestation. Maintains continuous presence on the calendar and unlocks periodic treasury honorariums.
Rite II: Sovereign Proof StampsCryptographic badges permanently minted onto the user's Acta Passport for every verified action.
Rite III: Herald's Call & Peer CovenantsMutual dual-reward onboarding covenants disbursed immediately from the protocol treasury.
Rite IV: Autonomous Milestone DripsCareer milestone grants for volume thresholds, clean tenure, and first-time achievements.
Rite V: The Immutable Deed ScrollUndeniable public ledger linking acts to cryptographic nonces and Nimiq block explorer URLs.

§ 5.4 Instant Dual-Reward Referral System (10 NIM Each)

lib/referral.ts

Unlike traditional web apps that delay referral incentives for weeks, Acta rewards both the Referrer AND the Referee with 10 NIM immediately from the treasury when the referral is claimed or upon joining.

  • Inviter earns 10 NIM credited directly to their wallet.
  • Invited peer earns 10 NIM welcome bonus credited directly to their wallet.
  • Can be claimed via unique URL (/?ref=CODE) or by entering the 6-character code in the Passport dashboard.

§ 5.5 Career Milestones & Recurring Drips

The protocol fee treasury continuously redistributes accumulated fees through autonomous performance grants:

FIRST_CONNECTION: 10 NIM
FIRST_SETTLED: 1 NIM
FIRST_BOUNTY: 1 NIM
RECUR_SETTLE: 1 NIM every 3rd settle
Section 6

§ 6. Developer Reference & REST API

§ 6.1 Cryptographic Authentication & Bearer Tokens

app/api/auth/verify/route.ts

Clients authenticate by signing a single-use nonce challenge with their Nimiq Ed25519 keypair.

Authentication Flow (TypeScript & cURL)
// 1. Request challenge nonce
const { nonce } = await fetch('/api/auth/challenge').then(r => r.json());

// 2. Sign message via Nimiq Keyguard or window.nimiq
const message = `Acta login\n\nNonce: ${nonce}`;
const { publicKey, signature } = await signMessage(message);

// 3. Verify signature & establish session
const res = await fetch('/api/auth/verify', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ publicKey, signature, nonce }),
});
const { address, token } = await res.json();
// Store token and transmit via Authorization: Bearer <token>

§ 6.2 Listings API Endpoints

app/api/listings/route.ts
POST/api/listings

Deploys a new covenant listing to Radar.

POST /api/listings Payload
{
  "title": "Sony Alpha A7 IV Camera Lens Kit",
  "collateralNIM": 2500,
  "durationDays": 3,
  "kind": "borrow",
  "category": "electronics",
  "borrowMode": "lend",
  "description": "Includes 24-70mm f/2.8 GM lens and 2 batteries.",
  "contract": {
    "criteria": "Return item clean with no lens scratches",
    "deadlineHours": 72,
    "minTrust": 15,
    "expiresInHours": 168,
    "ai": { "primary": "qr", "presenceCheck": false, "preScreen": false }
  }
}
GET/api/listings

Fetches active listings from Radar. Filter with query params: ?filter=borrow|bounty|mine. Excludes expired listings automatically.

§ 6.3 Escrows & Custody API

app/api/escrows/route.ts
POST/api/escrows

Locks funds into the autonomous vault when accepting an open covenant.

POST /api/escrows Payload
{
  "listingId": "list_94a8f2e...",
  "txHash": "0x5a2d8e...",
  "lenderPubkey": "c982a4...",
  "idempotencyKey": "idem_e8a912..."
}

§ 6.4 Oracle Verification Endpoints

lib/vision.ts
POST /api/bounty/verify
route.ts

Streams base64 image buffer to Qwen 3.6 on Hetzner inference. On pass, triggers sub-second vault payout.

POST /api/bounty/scanquest
route.ts

Verifies Ed25519 signature over single-use 10-minute token and consumes nonce to prevent replay.

POST /api/bounty/geo
route.ts

Verifies Haversine distance (≤50m) and GPS accuracy radius for location check-ins.

POST /api/bounty/manual_approve
route.ts

Sponsor signs approval in Inbox to disburse vaulted reward for custom commissions.

§ 6.5 Referral Claim API (POST /api/referral/claim)

app/api/referral/claim/route.ts

Claims a peer referral code and immediately disburses 10 NIM to the referrer and 10 NIM to the referee directly from the treasury.

POST /api/referral/claim
// POST /api/referral/claim
{
  "code": "7A1F2C"
}

// 200 OK Response
{
  "ok": true,
  "rewardNIM": 10,
  "referrer": "NQ10 05XT YLN6 1H4P SEDE PY2A L9AF YAJ4 NRF5",
  "paidReferrer": true,
  "paidReferee": true,
  "message": "10 NIM referral reward successfully granted to both you and your friend!"
}

§ 6.6 Core TypeScript Interfaces & Schemas

lib/contract.ts
lib/escrow.ts & lib/contract.ts
export type ListingKind = 
  | "borrow" 
  | "bounty" 
  | "bounty_venture" 
  | "bounty_qr" 
  | "bounty_manual" 
  | "bounty_geo";

export type OracleType = "qr_sig" | "vision" | "geo" | "creator" | "system";
export type EscrowState = "locked" | "settling" | "released" | "cancelled" | "disputed" | "expired";

export interface ListingContract {
  criteria: string;                 // exact criteria evaluated by Qwen 3.6
  deadlineHours: number;            // completion window after accepting
  minTrust: number;                 // minimum trust score required to accept
  expiresInHours: number;           // radar listing lifespan
  geo?: { lat: number; lng: number; radiusM: number };
  ai: {
    primary: "vision" | "qr" | "geo" | "creator";
    presenceCheck: boolean;         // require accompanying scene photo
    preScreen: boolean;             // AI assistant score for manual review
  };
}
Section 7

§ 7. Interactive Sandboxes & Tooling

Inspect the live algorithmic and state models of Acta. Use these interactive testbeds to simulate collateral savings, audit state transitions, and test vision verdicts.

§ 7.1 Reputation & Collateral Discount Calculator

lib/escrow-math.ts
Interactive SimulatorSovereign Tier

Reputation & Collateral Discount Calculator

Simulate how your historical on-chain integrity lowers required vault collateral across equipment covenants.

lib/escrow-math.ts
1,000 NIM
10 NIM (Micro)10,000 NIM (Camera)25,000 NIM (Drone)
65 / 100
0 (New)30 (Proven)60 (Sovereign)100 (Max)
Collateral Formula (lib/escrow-math.ts)

Every trust point earns 0.3% discount up to the 30% ceiling:

discountRate = min(0.30, trustScore * 0.003)
Vault Custody Breakdown
Standard Escrow Lock:1000 NIM
Trust Discount (19.5%):−195 NIM
Actual NIM Required to Lock:805 NIM
Vault Retention (0.001 NIM) + Gas (0.0001 NIM):0.0011 NIM
Net Returned to Challenger on Completion:804.9989 NIM
Liquidity Saved Upfront:+195 NIM

§ 7.2 Covenant State Machine Flow Navigator

lib/escrow.ts
State Machine Architecture

Covenant Lifecycle & Transitions

Select any lifecycle state below to inspect the deterministic cryptographic, database, and vault actions.

lib/escrow.ts

2. Accepted & Locked

Next:Proof submitted (QR / Vision / GPS / Deliverable) → transitions to 'settling'
Sponsor / Lender View

Shows in 'In Progress' toggle. Lender keys primed. For Borrow: Return QR ready for generation.

Challenger / Borrower View

Shows in 'In Progress' toggle. Active custody countdown or bounty challenge window begins.

VAULT HOT RESERVE BEHAVIORFull collateral + bounty locked in autonomous Vault (NQ86 845N...)
POSTGRES DATABASE MUTATIONescrows table: state = 'locked', progress = 'awaiting_proof', deadline_at = now + duration

§ 7.3 Autonomous Oracle Test Playground

lib/vision.ts
Oracle Testbed

Autonomous Oracle Verification Playground

Test how Acta's deterministic and AI oracles judge real-world evidence and trigger smart settlements.

lib/vision.ts
Oracle Verdict Payload (JSON)
VERDICT: PASS (SETTLED)
{
  "pass": true,
  "reason": "Pavement cleared with green bag tied beside curb as requested."
}

Sceptical AI instruction: "When in doubt, pass=false". Rejects stock photos, screenshots, and ambiguous angles.

Ready to participate in the Proof-of-Action protocol?

Connect your Nimiq wallet, inspect open covenants on Radar, or mint your referral covenant.

Launch Acta Application