Skip to content

Instantly share code, notes, and snippets.

View ArpitxGit's full-sized avatar
🎯
Focusing

dungexn ArpitxGit

🎯
Focusing
View GitHub Profile

The goal is to

  • Continuously monitor the impermanent loss incurred for a position in Uniswap V3
  • And if there is a loss, we need to exit the position
  • It has to be 100% automated (the end user should not be expected to be online signing the transaction when the liquidity is pulled out)

Monitoring a position

We can use the Uniswap V3's subgraph to know a position's details like tokens, price at the time of providing liquidity, etc. We will also know the current tick in the pool.