> whoami

Sameer Agarwal

I build systems where trust is a design flaw.

Oracle aggregation. Cross-chain attestation.

Verifiable compute. ZK/FHE privacy.

Novel AMM curves.

2020–22

The Reliability Problem

Razor Network's oracle needed to aggregate prices from dozens of sources across a staking network. The initial design used weighted mean — but weighted mean is manipulable. A single outlier data point, if staked heavily enough, can move the aggregate significantly. Switching to weighted median was a security decision disguised as a statistics decision: the median is only manipulable if you control more than half the stake. Every math choice in an oracle is a trust assumption.

Oracle DesignStakingData Aggregation
2022–23

The Bridging Problem

Cross-chain data was getting more important. The question wasn't just 'can I transmit a value?' but 'who vouches for it, and how?' We designed a cross-chain bridging mechanism using Threshold Signature Scheme (TSS) — a cryptographic primitive that requires a threshold of validators to co-sign before data crosses a bridge. At the time it was unnamed infrastructure. It was the first attempt to make the validator set itself the trust boundary.

Cross-chainTSSBridge Design
2023

Compute Needs Proof Too

At Syntience, the problem was distributed AI training pipelines. We were running GPT-2 training across multiple nodes on GCP. But a question kept surfacing: how do you know the compute actually happened correctly? A node could return fraudulent gradient updates. This wasn't a problem we solved at Syntience — but prototyping verifiable training validation pipelines was the moment the question became concrete. Computation has the same trust problem as data.

Distributed AIVerifiable ComputePyTorch
2023–25

Bridging Becomes Protocol

The cross-chain bridging work evolved into something larger: Metalayer, a full verification protocol. As the sole smart contract engineer, I designed the complete security surface — validator registration, staking, the attestation lifecycle, dispute resolution, and the whitepaper that forced every design decision to be explicit. The key insight: attestation can't be bolted onto a bridging protocol after the fact. It has to be the protocol. The validator lifecycle is the product.

MetalayerAttestationValidator LifecycleZKP
2026–

The Exploration

Venturing into new territory. Uniswap V4 hooks let you embed novel AMM curves directly into swap routing — Distro's Gaussian prediction markets are a first experiment in distributions as financial primitives. FHE via ZAMA makes payroll confidential without a trusted intermediary. Chainlink CRE enclaves create verifiable computation with privacy guarantees. The throughline holds: each tool is a way to participate in a protocol while revealing only what the math requires.

V4 HooksFHEChainlink CREPrediction Markets

Razor Network

Blockchain Developer

July 2020 – Feb 2026

Razor Network Oracle

2020–22

The oracle problem at Razor wasn't data fetching — it was aggregation security. When dozens of staked validators report prices, the aggregation function determines how hard it is to manipulate the result. We moved from weighted mean to weighted median early on. That shift roughly doubled the stake required to meaningfully skew an output. The staking and rewards mechanism was designed to punish outlier reporters and reward validators who cluster around consensus — aligning economic incentives with data accuracy.

Syntience

2023

Syntience's problem was distributed AI training at scale. I built GPT-2 training pipelines across multiple GCP nodes using PyTorch, designed modular decision-making frameworks using mixture-of-experts models, and worked on inference reliability. The question that kept surfacing — how do you verify that a compute node actually ran the computation it claims to have run? — didn't have a clean answer in 2023. Prototyping verifiable training validation pipelines was the first attempt to make this concrete.

Metalayer

2023–25

It started as a bridge. We needed to move oracle data cross-chain without introducing a new trust assumption, so we built a TSS-based bridge-proxy — a threshold of the existing validator set co-signs cross-chain transmissions. No new committee, no new trust surface. That design kept evolving: if validators can attest to oracle data crossing a bridge, they can attest to anything. The bridge became Metalayer — a modular compute and verification protocol.

As the sole smart contract engineer, I owned the entire security surface: validator registration, staking mechanics, the attestation lifecycle (open → attest → finalize → dispute), and the dispute resolution mechanism. The protocol supported bridge attestation, oracle data attestation, ZK proof verification, and AI inference result validation — each with different latency requirements and finality guarantees but a single shared validator lifecycle. Writing the protocol whitepaper was the most valuable forcing function: every design decision had to be explicit enough to put in a document.

🥇 Best LI.FI-Powered DeFi Integration

ENSRouter

GitHub ↗

The Problem

Your wallet address changes per chain and per token preference. Senders shouldn't need to know your current routing preferences — they should just know your name.

The Design Decision

ENS text records are already on-chain, version-controlled, and human-readable. Storing payment routing config there makes preferences portable and trustless — no custodian, no syncing problem.

ENSCross-chainLI.FIUSDC
→ deep dive

The Problem

Binary prediction markets force yes/no answers on continuous outcomes. 'ETH above $3000 at end of month' loses all the information in between.

The Design Decision

Represent market state as a Gaussian probability distribution. Traders shift the distribution by changing its mean and variance — expressing nuanced beliefs, not just directions. The AMM invariant is a constant L₂ norm (analogous to Uniswap's x·y=k), making position collateral computable in closed form.

Uniswap V4AMMPrediction MarketsGaussian
→ deep dive

BlocPaie

The Problem

On-chain payroll exposes every salary to every counterparty — contractors, competitors, and regulators can all see exactly what each person earns.

The Design Decision

FHE (Fully Homomorphic Encryption) via ZAMA lets salary computations happen on encrypted data. The contract processes payroll without ever seeing the actual numbers. EIP-7702 passkey auth removes the wallet-management burden from contractors who just want to get paid.

FHEZAMAEIP-7702Payroll
→ deep dive

The Problem

DeFi lending requires overcollateralization because creditworthiness is private data. Traditional mortgage systems require banks, appraisers, and courts because trust must be established at every step.

The Design Decision

Chainlink CRE confidential enclaves assess creditworthiness using Plaid data and Gemini — and then discard all raw financial data before writing the verdict on-chain. The liquidation auction uses Vickrey mechanics (winner pays second-highest bid) with only opaque bid hashes stored on-chain.

Chainlink CREFHEVickrey AuctionMortgage
→ deep dive

The Agora

GitHub ↗

The Problem

AI agents have no skin in the game. When an LLM argues a position, there's no mechanism for that conviction to be tested against opposing views with real consequences.

The Design Decision

Agents register via ERC-8004 — an on-chain agent identity standard. Soulbound BeliefTokens make conviction non-transferable — an agent can't sell its beliefs. MON tokens staked on philosophical positions create real incentives. When a Stoic agent wins a debate, all agents staked on Stoicism earn yield from the losing agent's stake.

AI AgentsMonadERC-8004Soulbound Tokens
→ deep dive

Building

Distro

Early-close mechanism for prediction positions. Perp DEX-style mark-to-market exit with a three-tier waterfall: market vault → LP pool backstop → circuit breaker.

BlocPaie FHE Adapter

The FHE computation layer that sits between invoice generation and on-chain settlement. Getting the gas economics right for encrypted payroll runs.

Thinking About

ZK for On-Chain Proof Verification

Metalayer prototyped this. The open question: what proof systems work at the latency requirements of real-time attestation?

FHE Latency

Current FHE overhead is significant. Watching ZAMA's work on GPU acceleration and what that means for confidential DeFi primitives.

Rust for Protocol Engineering

The performance gap between Solidity and Rust matters once you're building off-chain components for ZK provers and sequencers.

// contact

If you're building anything interesting in the Web3 space — or need help or advice — I want to hear about it.