WHAT IS SAVIOUR HERMES
Saviour Hermes is a token efficiency protocol built on the Base blockchain. It combines a compact line-number gutter format for AI file reads with on-chain payment and verification primitives — reducing token overhead by ~14% per read while maintaining a tamper-proof audit trail on Base.
The core insight: padded line-number gutters ( 1 | line) tokenize
leading spaces as extra tokens on every line. The compact format (1|line)
eliminates that overhead with zero loss of reference accuracy. This saving is
accounted and settled on Base using the $SAVIOUR token.
| Component | File | Purpose |
|---|---|---|
| Dashboard UI | index.html | Stats, payments, config, chain explorer |
| Styles | styles.css | Blueprint aesthetic — dark navy, monospace, technical diagrams |
| App Logic | app.js | Live stats, wallet connect, tx broadcast, config state |
| Documentation | docs.html | This file — full technical reference |
Saviour Hermes operates in three layers that interact with Base:
The gutter engine runs off-chain. Token accounting and payment settlement runs on Base L2 for sub-cent gas fees. Proofs are anchored to Ethereum L1 via the OP Stack bridge every ~1 hour.
Open the app, connect your wallet, and select a plan. No backend required — the frontend interfaces directly with Base via your wallet provider.
BASE BLOCKCHAIN
| Parameter | Mainnet | Testnet (Sepolia) |
|---|---|---|
| Chain ID | 8453 | 84532 |
| Chain ID (hex) | 0x2105 | 0x14A34 |
| Network Name | Base Mainnet | Base Sepolia |
| Native Token | ETH | ETH (testnet) |
| RPC URL | https://mainnet.base.org | https://sepolia.base.org |
| Block Explorer | https://basescan.org | https://sepolia.basescan.org |
| Bridge | https://bridge.base.org | — |
| Block Time | ~2 seconds | ~2 seconds |
| Finality | ~1 hour (L1 anchor) | ~1 hour |
| Stack | OP Stack (Optimism) | OP Stack |
| EVM compatible | Yes — EVM identical | Yes |
Three properties make Base the right chain for this protocol:
| Property | Base | Impact on Hermes |
|---|---|---|
| Ultra-low gas | ~0.001–0.1 Gwei typical | Every file-read can be logged on-chain without meaningful cost |
| 2s block time | OP Stack sequencer | Near-instant payment confirmation for subscription plans |
| EVM compatible | Same ABI / Solidity tooling | $SAVIOUR token is standard ERC-20 — any wallet supports it |
| L1 security | Anchored to Ethereum | On-chain proofs inherit Ethereum's finality |
| Coinbase ecosystem | Native Coinbase Wallet support | One-click onboarding for Coinbase users |
Add Base to MetaMask or any EVM wallet manually, or use the wallet's auto-detect:
| Field | Value |
|---|---|
| HRM Contract | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA0913 |
| Network | Base Mainnet (Chain ID 8453) |
| Standard | ERC-20 |
| Decimals | 18 |
| Explorer | basescan.org/token/0x8335... |
| Verified source | Yes — Basescan verified |
TOKEN EFFICIENCY PROTOCOL
The canonical format for all file reads in the Hermes protocol is
{i}|{line} — the line number followed immediately by a pipe
character, with no padding spaces.
| Format | Example | Token overhead | Status |
|---|---|---|---|
| Compact (canonical) | 1|import os | +16% vs bare | ACTIVE |
| Padded (legacy) | 1 import os | +48% vs bare | DEPRECATED |
| No numbers | import os | baseline | FAILS A/B (3/4) |
The format is enforced at tools/file_operations.py in the
_add_line_numbers() function. There is no configuration option
to revert to padded format — this is intentional.
The dashboard tracks four live session metrics:
| Metric | Calculation | Description |
|---|---|---|
| TOKENS SAVED | reads × avg_lines × 0.14 | Cumulative tokens not consumed vs padded format |
| FILE READS | counter | Total compact-format reads in session |
| EFFICIENCY GAIN | fixed 14% | Measured delta from A/B study (Sonnet 4.6, 4-task battery) |
| COST SAVED | tokens × $0.000015 | USD equivalent at $0.015/1K token rate |
The efficiency figure is derived from a controlled A/B study using Sonnet 4.6, 2 passes per variation, across a 4-task battery:
| Variation | Result | Notes |
|---|---|---|
| padded | 4/4 PASS | Baseline — passes but wasteful |
| compact | 4/4 PASS ✓ | Numbers referenced correctly throughout. Chosen format. |
| no numbers | 3/4 PASS | Off-by-one errors from hand-counted lines. Rejected. |
PAYMENTS ON BASE
$SAVIOUR is the native utility token of the Saviour Hermes protocol, deployed as an ERC-20 on Base Mainnet. It is used exclusively for subscription payments and on-chain governance of protocol parameters.
| Property | Value |
|---|---|
| Symbol | $SAVIOUR |
| Standard | ERC-20 |
| Network | Base Mainnet (Chain ID 8453) |
| Decimals | 18 |
| Use cases | Subscriptions, on-chain verification, governance |
| Accepted for gas | No — gas is paid in ETH on Base |
| Plan | Price | Tokens/month | On-chain verify | Priority routing |
|---|---|---|---|---|
| BASIC | 50 $SAVIOUR/mo | 1M | ✗ | ✗ |
| PRO | 200 $SAVIOUR/mo | 10M | ✓ | ✗ |
| AGENT | 500 $SAVIOUR/mo | Unlimited | ✓ | ✓ |
Subscriptions are enforced by a smart contract on Base. Auto-pay requires
an ERC-20 approve() call granting the contract allowance for
the monthly amount. The contract charges on the 1st of each month at UTC 00:00.
CONFIGURATION REFERENCE
| Key | Type | Default | Description |
|---|---|---|---|
| gutter_format | string | "compact" | Line number format. Only "compact" is production-safe. |
| branch_mode | bool | true | Single canonical format — no toggle, no alternate path. |
| escape_hatch | bool | false | Legacy column-alignment mode. Keep false. |
| fuzzy_match | bool | true | Match text in patches — never consume gutter prefix. |
| model | string | "hermes-3-70b" | Hermes inference model endpoint. |
| max_tokens | int | 4096 | Per-request token ceiling. |
| temperature | float | 0.7 | Output randomness. Range 0.0–1.0. |
| on_chain_verify | bool | true | Log all file reads to Base blockchain. |
| network | string | "base" | Target chain. Always "base" for production. |
| chain_id | int | 8453 | Base Mainnet chain ID. Use 84532 for Sepolia testnet. |
| contract_addr | string | 0x8335... | $SAVIOUR token contract address on Base. |
| gas_strategy | string | "standard" | One of: slow / standard / fast / instant. |
| auto_pay | bool | false | Auto-renew subscription via smart contract allowance. |
| rpc_url | string | mainnet.base.org | Base JSON-RPC endpoint. |
Export your current config from the CONFIG tab → "EXPORT FILE". The exported hermes-config.json follows this schema exactly.
API REFERENCE
The SDK exposes three primary functions from app.js:
| Function | Parameters | Returns | Description |
|---|---|---|---|
connectWallet(provider) | string | void | Connect wallet. Values: 'metamask' 'phantom' 'coinbase' 'walletconnect' |
sendPayment() | reads form | Promise<void> | Broadcast ERC-20 transfer on Base. Reads #pay-token, #pay-amount, #pay-recipient. |
selectPlan(plan) | 'basic'|'pro'|'agent' | void | Subscribe to a $SAVIOUR plan via smart contract. |
updateConfig(key, value) | string, any | void | Update a config key and re-render the JSON panel. |
verifyHash() | reads #verify-hash | void | Verify a tx hash or block hash on Base. Displays result inline. |
exportConfig() | — | void | Download hermes-config.json with current state. |
| Provider | Endpoint | Rate limit | Notes |
|---|---|---|---|
| Official Base | https://mainnet.base.org | — | No API key required |
| Base Sepolia | https://sepolia.base.org | — | Testnet. Free. |
| Alchemy | base-mainnet.g.alchemy.com/v2/{key} | 300/s | Higher throughput |
| Infura | base-mainnet.infura.io/v3/{key} | 10k/day free | Requires account |
| QuickNode | custom endpoint | varies | Best for production |
VALIDATION & SECURITY
When on_chain_verify: true, each file read event is hashed and
logged to Base as a minimal calldata transaction. The proof chain covers:
| Artifact | Status | Hash type |
|---|---|---|
tools/file_operations.py | VERIFIED | keccak256(content) |
_add_line_numbers() | VERIFIED | keccak256(AST) |
| 17 file-tool tests green | VERIFIED | test result hash |
| compact gutter spec | VERIFIED | spec document hash |
| hermes-agent contract | PENDING | — |
| Attack surface | Mitigation |
|---|---|
| Phishing contract address | Verify address on basescan.org before first approve() |
| Unlimited token approval | Approve only the exact subscription amount, not unlimited |
| Malicious RPC | Use official mainnet.base.org or a trusted provider |
| Replay attacks | Chain ID 8453 is enforced at signing — cross-chain replay impossible |
| Front-running | Subscription amounts are fixed — MEV on predictable txs is negligible |
| Version | Date | Change |
|---|---|---|
| v2.4.1 | 2026-06-01 | Migrated to Base Mainnet (Chain ID 8453). Added Base-specific gas model. $SAVIOUR contract deployed. |
| v2.4.0 | 2026-05-15 | Compact gutter format locked as canonical. Padded format deprecated. A/B study finalized. |
| v2.3.0 | 2026-04-01 | On-chain verification added. 17 file-tool tests passing. |
| v2.0.0 | 2026-01-12 | Initial release. hermes-3-70b integration. ERC-20 $SAVIOUR token. |