Gary Kocsis

Protocol Engineer | Smart Contract Engineer

Solidity · EVM · DeFi · Uniswap v4 · Foundry

I design and build Solidity smart contracts and DeFi protocols. My background in institutional trading and financial systems shapes how I define what a protocol should do, anticipate how it can fail, and test the implementation.

Selected Work

Uniswap v4 · ETHGlobal Online 2026

Standby

Future exact-output commitments backed by shared AMM liquidity

Standby began with a question: Can a liquidity pool commit to delivering a specific output amount in the future while still serving ordinary swaps? I designed and implemented a Uniswap v4 protocol that backs those commitments with shared pool liquidity.

The central design decision was to let ordinary pool activity proceed as long as the remaining execution capacity could still cover outstanding commitments. The hook checks that condition when admitting new commitments and when evaluating pool activity. When a commitment is exercised, the protocol enforces exact output and verifies delivery to the beneficiary.

I tested the backing invariant and commitment lifecycle with Foundry unit, fuzz, stateful invariant, and integration tests. Independent reference calculations checked the core economic math. I also ran the full commitment lifecycle on Base Sepolia.

Atrium Uniswap v4 Hook Incubator

RangeGuard

Swap-fee-funded impermanent loss coverage for liquidity providers

I built RangeGuard during the Atrium Uniswap v4 Hook Incubator to explore how a pool could fund capped impermanent loss coverage through its own trading activity. The hook directs a portion of swap fees into a coverage buffer. Eligible positions accrue coverage while in range, and claims settle when liquidity is withdrawn.

I used the Actual/365 Fixed day-count convention to make accrual calculations reproducible. Reactive Network monitors tick-range changes and supports periodic accrual checkpoints. I used Foundry unit, fuzz, and invariant tests to check coverage accounting, range boundaries, and withdrawal settlement.

How I Build

Before writing Solidity, I define what the protocol owes each participant, who can act, and which state changes are allowed. I turn those rules into invariants and design tests that exercise them across different sequences of actions.

One Standby test follows a commitment through three pool actions. A compatible swap proceeds. A swap that would leave too little capacity to cover the commitment reverts. The beneficiary can then still receive the exact committed output. This sequence checks that ordinary pool use can coexist with the commitment and that the hook protects it until exercise.

Security and Financial Systems Experience

Macro · Instruction Resident and Contributor

I reviewed student Solidity contracts for security and code quality, documented potential findings in project-specific shadow specs, and gave students feedback on how to improve their implementations. Before joining as a resident, I completed the Macro Fellowship Engineering Program and built an AMM, a DAO with signature-based voting, and token fundraising contracts.

JPMorgan Chase · Vice President

I managed the team developing conversion programs for a migration of more than one million brokerage accounts. I wrote SQL to verify mapped data across the source and destination systems. That work shaped how I approach cutovers: define what must match and check it before relying on the new system.

Bear Stearns · Associate Director

I worked on FIX order routing and direct exchange connectivity for institutional trading. Supporting global trading around the clock shaped how I think about reliability at system boundaries, where an order passes from one system to another.

Education and training

B.S. in Applied Mathematics–Economics, Brown University · MBA, DeSales University · Certificate in Advanced Computer Security, Stanford Center for Professional Development · Token Engineering Fundamentals, Token Engineering Academy · Uniswap Hook Incubator Program, Atrium Academy

Get in Touch

I’m open to Protocol Engineer and Smart Contract Engineer roles in DeFi and on-chain infrastructure.