Challenge
After local market arbitrage experience, I explored arbitrage and liquidity provision on decentralized exchanges, focusing on Uniswap v3. I downloaded tick-level historical data and replicated smart contract logic in Python to create precise offline historical data for AMM strategy development.
Results
Several LP position management strategies were developed, with the most promising selected for testing on all available historical data. Initial tests were incredibly successful, leading to live implementation and validation. Some bugs in the offline implementation were found during validation, and the strategy needed refinement for profitability. A module for trading on centralized exchanges was added, and the strategy was revalidated and implemented live. However, my strategy proved suboptimal, requiring significant changes or lower fees. Some simple delta hedging error optimizations improved results, but not to a clearly profitable level, leading to the development of a price movement prediction model. The strategy currently yields about 7% annual returns but is still underwhelming.
Bulletpoints
- Designed Uniswap v3 liquidity provision strategies, targeting 40-50% APY gains, and bootstrapped operations with personal savings.
- Developed a Python implementation of Uniswap v3, enabling strategy simulation using historical data and facilitating execution across multiple exchanges in diverse directions and instruments, for constructing complex positions.
- Engineered robust and efficient Solidity smart contracts, integrated with a Python backtesting platform. This combination markedly improved trading strategy execution and data integration capabilities.
- Evaluated and integrated LP with delta-hedging, and initiated the development of predictive systems for price movement.
- Conducted in-depth protocol analysis of Uniswap v3, identifying critical shortcomings and conceptualizing an innovative decentralized exchange.