Skip navigation
Please use this identifier to cite or link to this item: http://arks.princeton.edu/ark:/88435/dsp015425kd96p
Title: Building a Uniswap v3 Liquidity Provision Backtesting Suite
Authors: Aubin, Christopher
Advisors: Viswanath, Pramod
Department: Computer Science
Class Year: 2023
Abstract: Uniswap is the largest decentralized exchange for cryptocurrencies. The latest version, Uniswap v3, changed how liquidity providers provide, and are rewarded for providing, liquidity. It allows liquidity providers to allocate liquidity to one or more closed intervals of the price of an asset. Providing liquidity over small intervals at or around the market price of an asset earns additional fees per unit liquidity because such liquidity is more useful to Uniswap users, who would like to minimise slippage. This introduces the problem of strategic liquidity provision: providing liquidity in more concentrated intervals earns larger rewards, but those rewards are more volatile because the price is likely to spend less time in those smaller intervals. Furthermore, changing the interval over which liquidity is provided costs gas fees. This project documents the development of and provides a backtesting suite for Uniswap v3 liquidity provision strategies that is more rigorous than those produced by any similar projects and demonstrates that suite with some simple Uniswap v3 liquidity provision strategies. It also includes in-depth explanations of the Uniswap v3 core contracts and informal proofs of the correctness of some of the core contracts (some were not fantastically commented and are heavily optimised for minimal gas consumption) and provides Python scripts that can be used to collect the data necessary to backtest a strategy for any pool on the ETH chain, over any period of time after the pool's creation.
URI: http://arks.princeton.edu/ark:/88435/dsp015425kd96p
Type of Material: Princeton University Senior Theses
Language: en
Appears in Collections:Computer Science, 1987-2024

Files in This Item:
File Description SizeFormat 
AUBIN-CHRISTOPHER-THESIS.pdf587.48 kBAdobe PDF    Request a copy


Items in Dataspace are protected by copyright, with all rights reserved, unless otherwise indicated.