Rust systems software house · Solana, EVM & agentic AI · London

A blocking integration should not be the reason you miss your launch.

EpochFi Labs is a senior-led Rust systems software house. We design, build, integrate, and harden production financial systems on Solana and EVM, and the retrieval, memory and evaluation infrastructure behind agentic AI. One engineer accountable for the whole system — not a ticket queue.

Available for new engagementsLiam Faruq, founder · London
Order lifecycle · failure pathfig. 01
intent acceptedidempotency key issued
venue adapter · submitbounded retry
connection lost mid-submitstate unknown
reconciliation sweepvenue is source of truth
position convergesdeterministic recovery

Most prototypes model steps 1 and 2. Production systems lose money at step 3. The work is designing 4 and 5 before an incident forces you to.

Epoch clockconnecting
0slots since you opened this page
200 ms per slot · 432,000 slots per epoch
Your system has 200 ms to be right.
11 yrs
building financial systems
Bank-side
JP Morgan rates pricing · NatWest trade data · Caplin FX & commodities
Rust & Solana
full-time since 2024, across protocol and trading teams
London
working with teams worldwide, remote-first
01 · Problems

The point where shipping fast stops being enough.

If one of these describes your position, the conversation is usually short and specific.

An exchange, venue, or protocol integration is blocking your launch.

Third-party APIs fail in ways documentation does not describe: partial fills, silent rejections, duplicate acknowledgements, sockets that stay open for hours while sending nothing. I have built and repaired integrations across many venues, and I know which failure modes must be designed for before launch rather than after.

Your prototype works, but it is not ready for real money or real users.

A demo only has to succeed once. A production financial system has to be correct when a transaction is dropped, a worker restarts mid-operation, or a venue returns a state you did not anticipate. That gap is architecture, not effort.

You need senior Rust, Solana, or EVM expertise without making a permanent hire.

Hiring a senior Rust engineer in this domain takes months and commits you to a salary before you know the shape of the work. An engagement gives you the same seniority on a defined scope, and ends when the work is done.

Your agent's retrieval layer is a black box, and nobody can say whether the last change made the answers worse.

Embedding model, quantisation, chunking and the chat model all interact, and most teams tune them by feel. The fix is the one trading systems already use: an explicit run log, a fixed matrix of what varies, and a benchmark that scores the answer rather than a proxy for it.

02 · Services

What I build

Rust systems engineering is the common thread. Most engagements combine two of these: build the thing, then make it survive production.

01

Rust, Solana & EVM engineering

On-chain programs and the Rust services around them, written to be maintained by your team after I leave.

  • Anchor programs & Solidity contracts
  • Transaction execution engines
  • Keeper, liquidation & arbitrage bots
  • Indexers & Geyser / gRPC pipelines
  • Client SDKs & instruction builders
  • Async services, CLIs & operational tooling
Stack
RustTokioAnchorSolidityFoundryTypeScript
02

DeFi & trading infrastructure

The parts of a financial product where correctness is commercial: what a position is, when it settles, and what happens when a venue disagrees with you.

  • Order books, AMMs & vaults
  • Perpetuals, lending & prediction markets
  • Price & market-data streams
  • Exchange & protocol integrations
  • Order & position lifecycle
  • Settlement & reconciliation
Stack
PhoenixJupiterDriftPythRedisPostgresClickHouse
03

Agentic AI & retrieval

The systems layer underneath an agent: retrieval, memory, model connectors, and the harness that says whether a change made the answers worse.

  • RAG & agent-memory pipelines
  • Embedding codecs & vector quantisation
  • Model connectors & MCP tool servers
  • Evaluation harnesses & run logs
  • Reproducible benchmarks & write-ups
Stack
RustONNX RuntimeSQLiteAnthropic APIOpenAI APIMCP
03 · Selected work

Three Rust systems

Two sit behind a live mobile perpetuals and prediction-market product on Solana; those repositories are private, with technical detail available under NDA. The third is open-source research into retrieval for agentic AI.

CASE 01ASYMMETRA LABSREAL-TIME MARKET DATA

A price platform that degrades instead of going dark

Problem

A mobile trading product needed prices from seven heterogeneous venues, on-chain and off, delivered to phones fast enough to trade against. Each venue fails differently, and a chart that freezes or lies is a support ticket at best and a bad fill at worst.

Responsibilities

Sole engineer on the service: protocol specification, venue ingestion, storage design, deployment topology, and the operational tooling around it.

Approach

Independent Tokio tasks per venue with backoff reconnect and liveness watchdogs, funnelling into a bounded channel that deliberately drops stale ticks under backpressure — the correct failure mode for price data. Per-symbol transport precedence lets on-chain marks own a symbol while fresh and hand back to the venue socket when they age out, so an outage degrades quality rather than emptying a chart. A database-driven market registry means new markets go live without a deploy. Prices are served over a documented WebSocket contract with snapshot-first ordering guarantees, so the mobile client needs no buffering, deduplication, or staleness logic of its own.

Outcome

Removed the single-transport dependency behind price outages, cut on-chain ingress roughly eightfold by slicing account frames server-side, and made market listing an operational action rather than an engineering one. 263 tests, none ignored, including wire-protocol assertions taken directly from the specification.

In numbers
venues ingested7+
storage tiers3
on-chain read latency~50 ms
tests · ignored263 · 0
TODO / FIXME / HACK0
Stack
Rust · TokioYellowstone gRPCPythMagicBlock ERRedisPostgresWebSocket
CASE 02ASYMMETRA LABSTRADING BACKEND

Funds-safety engineering on a live derivatives backend

Problem

Real money moving through perpetuals, a hosted-perps router across four venues, prediction markets, and a high-leverage sixty-second game — with custodial wallets and no tolerance for a position ending in an unknown state.

Responsibilities

Backend architecture and delivery: transaction construction, job execution, venue integrations, reconciliation tooling, and post-incident redesigns.

Approach

Every high-risk module states the invariant it protects. The market registry fails closed rather than defaulting to a wrong account slot. Withdrawal sweeps only write a terminal record after funds are confirmed home; on exhaustion the position stays open, ops are alerted, and a reconciler re-enqueues it. Protective stop and take-profit legs are placed and confirmed before the previous ones are cancelled, so a failed reset can never strip existing protection. Expiry and liquidation are made mutually exclusive by a database write-fence. A gasless-transaction incident was closed by re-specifying the budget in terms of confirmed sponsorships and deploying it under a new key namespace, so stale semantics could not survive the release.

Outcome

Introduced deterministic recovery paths across every funds-moving workflow, replaced silent defaults with explicit refusals, and gave the team paging that fires once per incident instead of not at all. A real-funds mainnet harness with cent-level conservation assertions makes release verification repeatable rather than a judgement call.

In numbers
lines of Rust~380k
API routes288
ops binaries38
test functions~2,700
TODOs in 380k lines32
Stack
Rust · AxumAnchorPhoenixJupiterJito · HeliusSupabasePrivy
CASE 03EPOCHFI LABS · OPEN SOURCEAGENTIC AI · RETRIEVAL

A Rust harness that measures what vector compression does to an agent's answers

Problem

Every vector database quantises embeddings to save memory, and every retrieval-augmented agent inherits that choice. Recall is easy to measure. What nobody measures is whether the codec changed the answer a given chat model gave. The two layers of compression in an agent, the retrieval key and the prompt payload, are routinely confused, and neither is benchmarked end to end.

Responsibilities

Sole author: workspace design, the codec trait and distance kernels, model connectors, the compressed-domain store, the benchmark matrix, and the experiment programme with its write-ups.

Approach

A five-crate Cargo workspace built around one Codec trait, so f32, int8 and binary vectors are scored on their compressed bytes with no decode step. Anthropic, OpenAI-compatible and local ONNX models sit behind two traits. A SQLite store searches in the compressed domain and records every run: embedding model, codec, chat model, timings, tokens, retrieved chunks and the answer. The benchmark is an explicit matrix of embedding model × codec × chat model × dataset. Integration tests drive the real binary against an in-process mock of both provider APIs, so CI needs no key and no model download.

Outcome

The first published experiment, on 8,036 SciFact chunks across two embedding models, confirmed that int8 is close to lossless at 3.9× smaller and that binary loses a third of the neighbours at 32× smaller, with the loss set by the embedding model rather than the codec. Every number ships with its commit, config and command, and negative results are kept. The roadmap runs through LLM-judged scoring, product quantisation, payload compression and an agent-memory loop.

In numbers
Cargo crates5
codecs · metrics3 · 3
corpus · queries8,036 · 300
int8 recall@100.987–0.995
test functions · TODOs58 · 0
Stack
Rust · TokioONNX RuntimefastembedSQLiteAnthropic APIOpenAI-compatibleBEIR
04 · Engagement models

Three ways to start

Most clients begin with a review, because it makes the rest of the work accurately scopeable. Embedded work runs at 20 or 40 hours a week. Rates are agreed on the discovery call, not published.

I. ENGINEERING REVIEW

A focused assessment of an existing codebase, architecture, integration, or production concern.

Deliverables
  • Technical findings
  • Risk assessment
  • Prioritised recommendations
  • Remediation plan
  • Architecture diagrams
  • Implementation roadmap
Fixed scope · 1–2 weeks · rates agreed on the call
II. DELIVERY SPRINT

A defined engagement to build a specific subsystem, integration, protocol component, or production improvement.

Phases
  • Discovery
  • Architecture
  • Implementation
  • Testing
  • Deployment support
  • Documentation & handover
Fixed scope · typically 4–8 weeks · rates agreed on the call
III. EMBEDDED PARTNER

Ongoing senior engineering support for teams that need architectural and delivery ownership alongside their own engineers.

Shape
  • Part-time: 20 hours a week
  • Full-time: 40 hours a week
  • Monthly retainer
  • Architecture ownership
  • Code & AI-code review
  • Technical planning
  • Rolling monthly renewal
20 or 40 hours a week · min. one month · rates agreed on the call
portrait — plain dark background,
neutral, no crypto backdrop
05 · Who you work with

Liam Faruq

Founder & principal engineer, EpochFi Labs Ltd · London

I spent the first part of my career inside bank technology: trade-event feeds and data services at RBS and NatWest Markets, then rates pre-trade pricing at JP Morgan, building concurrent Java systems for OIS, swaps and swaptions. After that, full-stack work on a consumer lending platform, and FX and commodities settlement tooling in Rust at Caplin Systems. Since 2024 I have worked exclusively in Rust and Solana, contracting with protocol and trading teams.

That sequence is the point of EpochFi Labs. Trading, settlement and reconciliation have well-understood failure modes in traditional finance, and much of the Solana ecosystem is rediscovering them at cost. I bring that discipline into on-chain engineering, without the overhead of a large consultancy. The same discipline carries into agentic AI, where retrieval, memory and evaluation are state-management problems under new names; hvec, our open-source benchmark harness, is where that research track lives.

EpochFi Labs is a deliberately small, senior-led Rust systems software house. You speak to the founder who writes the code, scopes the work, and answers for it in production. When an engagement needs additional hands, I say so before we start.

2024 — nowRust & Solana contracting — Asymmetra Labs, Ranger Finance and other protocol teams; hvec, open-source agentic-AI retrieval research
2024Caplin Systems — FX and commodities trading tools in Rust for tier-one banks
2022 — 2024Deko Pay — full-stack engineering on a retail credit platform
2019 — 2021JP Morgan Chase — rates pre-trade pricing, concurrent Java
2015 — 2019RBS & NatWest Markets — trade-event feeds, batch processing, data services
EducationMEng Electronics & Computer Engineering, University of Nottingham — Siemens sponsored
06 · Next step

Tell me what you are building.

Every engagement starts with a short form: who you are, your company, how it is funded, and what you are building. If the fit looks right you get a link to book a thirty-minute discovery call within two working days, and you leave that call with a view on scope and risk whether or not we work together.

Useful to include
  • What you are building, and who it is for
  • Where the system is today: prototype, devnet, or live
  • The problem you would most like solved first
  • Any date the work is tied to
  • Your team's current Rust and Solana experience

Happy to sign an NDA before reviewing anything.