Marat Nusurov

Arbitrage Kit

Company: HodlTree
Role: Senior Solidity Developer
Stack: Solidity 0.8.0 · Truffle · Ganache · Mocha · Web3.js · OpenZeppelin
Period: 09/2020 - 05/2021

Overview

Smart contract framework orchestrating atomic arbitrage trades and flash loan interactions across multiple decentralized exchanges. The architecture abstracts protocol-specific complexity through modular connector contracts, enabling seamless execution of sophisticated multi-leg trading strategies across Ethereum and Polygon. Implements delegatecall-based proxy pattern with stateful memory threading to execute complex arbitrage paths atomically without intermediate state mutations. Operated alongside a self-hosted Geth full node for low-latency RPC access in time-sensitive arbitrage execution.

Technical Scope

Multi-DEX Protocol Abstraction

Flash Loan Framework

Stateful Execution Pipeline

Precise Swap Control

Delegatecall-Based Proxy Architecture

Gas Optimizations

Key Engineering Decisions

Decision Rationale
Delegatecall proxy over wrapper contracts Atomic execution within single contract context eliminates intermediate transfers and reentrancy risks
Modular connectors per DEX Protocol-specific optimizations (Curve dynamics, Bancor paths, 0x fees) reduce generic overhead
ArbMemory for state threading Reduces calldata overhead and enables reusable transaction templates for complex multi-leg arbitrage
Flash loan callback patterns Callback-based repayment verification enables 0-capital arbitrage on both Uniswap V3 and Balancer pools
Direct pool interaction Bypasses router layers, reducing hop count and implicit protocol fees for maximum spread capture

Technical Insights

See HodlTree page for additional context.