Every new project tells a story in its first week. This is the story of Gatekeeper—a service that does one thing obsessively well: stand at the door and decide who gets in. It’s the enforcement arm that makes SpecChain’s promises real.
Why Gatekeeper Exists
SpecChain gives us a ledger of API expectations. Gatekeeper enforces them.
The moment we wanted wallets to log in and policies flowing from blockchain state, we needed something purpose-built. Not OAuth bolted onto a smart-contract stack. Something that actually speaks crypto.
But here’s what made this urgent: Tether recently announced a vision where machines— autonomous agents, smart contracts, distributed systems—could have their own wallets. Not controlled by humans. Not coordinated through a DAO. Actually autonomous. When that becomes real, authentication gets exponentially harder.
A human struggling with SIWE is a headache. A machine that needs bulletproof, auditable, programmatically predictable authentication? That’s a different problem entirely. That’s Gatekeeper.
Gatekeeper answers three questions:
- Who just knocked on the door?
- What are they allowed to do?
- Is the chain healthy enough to vouch for them?
The goal: keep the human-friendly feel of SpecChain while trusting cryptography under the hood. But build it forward-compatible for machines.
Choosing Go for the Edge Layer
I wanted the edge service to be boring. That’s the opposite of insult—it’s the highest compliment for infrastructure.
Go delivered. The standard library had HTTP, JSON, crypto. No dependency explosion.
The early experiments paid off in days: one command (go build -o gatekeeper ./cmd/server), one binary, boots in seconds. Predictable under load. That’s the
whole promise.
Experiment 1: Wallet-First Authentication
The first spike: getting SIWE (Sign-In with Ethereum) working end-to-end. But I built it thinking about machines, not just humans.
Tether’s vision of autonomous wallets means a bot should authenticate exactly like a human would—by proving it controls a wallet. Same ceremony, same cryptography. The difference: machines can’t handle OAuth redirects or browser sessions. They need deterministic, programmatic authentication.
I started with nonce management—the part most teams get wrong. 128 bits of cryptographic entropy. 5-minute TTL (strict). Single-use enforcement: once a nonce is burned, it’s gone. The test harness let me watch them age out exactly when expected. That’s a luxury when you’re usually debugging this at 2 a.m. by scrolling logs and guessing.
After that, Gatekeeper issues short-lived JWTs. Downstream services stay agnostic about the chain. SIWE goes from novelty to something ops teams can reason about and defend—and machines can call reliably without human intervention.
Experiment 2: Talking to Ethereum like an Adult
RPC reliability is the difference between a secure door and a revolving one.
Most projects ignore this. One slow node and the whole system chokes. I built a provider abstraction: primary endpoint + fallback. If the primary times out (5-second deadline), transparent failover. Context deadlines enforce timeouts— misbehaving nodes can’t stall the process.
The surprise: how natural this felt in Go. A tiny struct, a standard http.Client,
explicit timeouts. No goroutine gymnastics. No concurrency headaches. Just clean,
readable code that does one thing well. That’s the win.
Experiment 3: Declarative Policy Rules
I wanted product folks to define access without shipping new binaries. No “ask an engineer” tax on every policy change. And more importantly: when machines hold wallets, policies need to be transparent and machine-readable.
The policy loader ingests JSON, validates every field, turns it into strongly typed rules. Scopes. Allowlists. ERC-20 minimums. NFT ownership. Tether wallet thresholds. I could sketch in a notebook, encode it as JSON, and see it enforced in minutes. No deployment. No testing. No waiting.
The best part: the logic mirrors SpecChain’s spirit. Human-readable declarations that become deterministic checks. A machine can parse these rules and know exactly what it’s allowed to do. No hidden logic. No “trust us.” That’s the whole philosophy in action.
Why It Matters
Together, these experiments gave Gatekeeper a personality.
Wallet-native sign-in instead of OAuth pretending to be blockchain-aware. Battle-tested RPC calls instead of “pray the node doesn’t timeout.” Policies as configuration instead of shipping binaries.
This makes SpecChain’s promises enforceable at the edge. An app asks: “Does this wallet hold the right NFT?” or “Does this autonomous agent have permission to act?” One HTTP round trip. One answer. No ambiguity. No “what if the node is slow?”
This is especially critical when the wallet is autonomous—when a Tether-powered bot is making real trades or a distributed agent is executing smart contracts. The authentication can’t fail open. It can’t be slow. It can’t be opaque.
That’s infrastructure that respects crypto’s primitives and makes machine autonomy trustworthy.
What’s Next
The roadmap is ambitious but focused.
Audit integration: Stream policy decisions into the same immutable audit trail SpecChain uses. Right now they’re separate. They should be one story.
Rate limiting: Shared RPC credits are a commons problem. Add hooks so overuse doesn’t tank the whole system. Gatekeeper can be the traffic cop.
Developer experience: Bootstrap a full sandbox—Gatekeeper + local chain + sample policies—in under a minute. Make it so teams can tinker without production anxiety.
Here’s the deeper insight: these aren’t features. They’re making Gatekeeper feel like a native part of the blockchain ecosystem, not a bolt-on from the Web2 world.
The Niche Opinion
If you’re building on-chain products, authentication probably isn’t the bottleneck you’re obsessing over right now. You’re thinking about contract design, liquidity, governance tokens. Those all matter.
But here’s what most teams miss: the infrastructure that sits between users and smart contracts is where real value-adding decisions happen. It’s unsexy. It doesn’t generate token hype. But it’s the difference between systems that work and systems that work well.
And when machines start owning wallets—when autonomous agents are making decisions without human coordination—authentication becomes critical path infrastructure. Not nice-to-have. Critical. You can’t have a market-making bot that fails open on an RPC timeout. You can’t have a distributed agent that can’t deterministically prove it has permission to act.
That’s why Gatekeeper exists. Not because humans need better ways to sign in (they mostly just need SIWE). But because machines need cryptographically sound, auditable, battle-tested infrastructure. Infrastructure that respects crypto’s primitives instead of borrowing concepts from the Web2 playbook.
The teams building this right will have a compounding advantage over the next 5 years. Because when everyone else is figuring out machine wallet autonomy, you’ll already have the authentication layer that makes it possible.
Check It Out
Gatekeeper is open-sourced on GitHub: github.com/roguedan/gatekeeper
It’s a working proof of concept with test coverage and documentation. The problems are real, they’re solvable, and I’m learning the space one unglamorous commit at a time.
