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.
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.
Your system has 200 ms to be right.
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.
What I build
Rust systems engineering is the common thread. Most engagements combine two of these: build the thing, then make it survive production.
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
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
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
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.
A price platform that degrades instead of going dark
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.
Sole engineer on the service: protocol specification, venue ingestion, storage design, deployment topology, and the operational tooling around it.
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.
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.
Funds-safety engineering on a live derivatives backend
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.
Backend architecture and delivery: transaction construction, job execution, venue integrations, reconciliation tooling, and post-incident redesigns.
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.
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.
A Rust harness that measures what vector compression does to an agent's answers
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.
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.
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.
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.
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.
A focused assessment of an existing codebase, architecture, integration, or production concern.
- Technical findings
- Risk assessment
- Prioritised recommendations
- Remediation plan
- Architecture diagrams
- Implementation roadmap
A defined engagement to build a specific subsystem, integration, protocol component, or production improvement.
- Discovery
- Architecture
- Implementation
- Testing
- Deployment support
- Documentation & handover
Ongoing senior engineering support for teams that need architectural and delivery ownership alongside their own engineers.
- 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
neutral, no crypto backdrop
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.
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.
- 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.