Payment Rail
A stablecoin payment orchestration rail in Go — payments-grade correctness over crypto rails.
LEVEL 1THE PROBLEM
Sending an ERC-20 transfer is trivial. Being the company that owes someone money — at volume, on a rail that can reorganise underneath you — is not, and the people carrying that risk are finance and ops, not the engineer who wrote the transfer call. You need idempotent initiation, a ledger that survives crashes and retries without double-spends, and confirmation tracking that stays correct when the chain reorgs. Payment Rail is that missing layer — a self-hostable service that treats blockchains as unreliable settlement rails behind a boring, correct, auditable payments API. Traditional business in the front, crypto rails in the back.
LEVEL 2THE BUILD
Seven Go binaries in one module: a REST payments API, an in-process double-entry ledger (Postgres is the source of truth, balances derived from history), a network-isolated gRPC signer that signs only well-formed EIP-1559 payloads under a per-key spend cap (paired with an EVM chain adapter that builds and broadcasts USDC transfers), a reorg-safe chain-watcher, a transactional outbox relay that drains domain events to Kafka, a webhook dispatcher that HMAC-signs every delivery, and an operator CLI for approvals, replays, and audit checks. Idempotency at every failure boundary, correctness chosen over throughput, and every decision written up as an ADR.
BOSS FIGHTTHE RESULT
Feature-complete: every milestone from M0 to M7 landed — the idempotent ledger + payments API, the isolated signer + EVM submit path, reorg-safe settlement, a transactional outbox → Kafka → signed-webhook delivery pipeline, policy/velocity/four-eyes controls backed by an append-only hash-chained audit log, treasury reconciliation with a proof-of-reserves check, and a fault-injection chaos suite plus a published load-test benchmark (~568 req/s sustained, P99 146.5 ms on a local single-host bench). Testnet only, not audited — a portfolio & learning project built in the open. The full stack boots from the README in under ten minutes, on a machine I have never touched.
HIGH SCORES
- 568REQ/S SUSTAINEDLOCAL BENCH · LOOPBACK
- 45.7 MSP50 LATENCYCONCURRENCY 32
- 147 MSP99 LATENCYCONCURRENCY 32
- 0ERRORS25,000 REQUESTS
- 7GO BINARIESONE MODULE
- 30ADRSDECISIONS RECORDED