colburnlee / mini-capstone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decentralized Finance (DeFi) Arbitrage Opportunities

So... What's Defi?

DeFi TVL
Image courtesy defillama.com

Defi's explosive growth has fueled the construction of many automated market makers (AMMs) that are fully autonomous trading mechanisms that have no centralized control over price making (aside from market force). Here's an article explaining how AMMs function and why they are important to the growing landscape of DeFi.

Okay, So What Does Arbitrage Mean?

Simply put, arbitrage refers to the difference between two identical products. For example, many countries and banks offer exchange between the Euro (EUR) and the United States Dollar (USD). The arbitrage opportunity in this instance would refer to the price discrepancy between financial institutions offering the EUR/USD exchange. If you're still lost, there is more information on this trade available here

This Project

The API provided by the 0x protocol (more information) is used to search for the best price available over multiple protocols (Ethereum, Polygon, Binance Smart Chain, and the Fantom Network) at a given time (0x searches 30+ AMMs alone on the Ethereum network) to find the maximum price difference to execute the same trade across each. This will help us determine price inefficiencies that persist between protocols, and shed light on how long it takes for significant price gaps to be closed by market forces and/or arbitrage traders.

Full data set available via Google Sheets

Graph
Data output example

About


Languages

Language:Python 100.0%