Stoploss

The stoploss protocol protects uniswap liquidity providers against impermanent losses.

Demo Video Live Demo Source Code

Technologies

Ethereum

Solidity

The Graph API

Description

# Stop ๐Ÿ˜ˆ Loss Protocol ## Project Description ๐Ÿ˜ˆ The stoploss protocol is a decentralized protocol against impermanent losses. Is allows Liquidity Providers (LPs) to limit their impermanent losses on Automated Market Makers (AMMs, eg. Uniswap) in a safe, automated and non-custodial way. ### Problem Statement Impermanent losses for LPs is recognized in the industry as the biggest problem of AMMs: "*Impermanent loss is by far one of the biggest detriments to the success of DEXs like Uniswap."* โ€” Lucas and Cooper *ยซ :Imp:ermanent losses has become a problem about equal to having an elephant in the living room. It's so big you just can't ignore it. ยป* โ€” :smiling-imp: ** ![Banner](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F5fd6f7f5-8932-4fe0-804f-ef6ecbfd00b7%2FCCA0D3A6-B21B-4E18-AC14-62F4D135B90E.jpeg?table=block&id=f858c91f-6d9b-4f84-a11a-f4df695ba755&width=2690&userId=&cache=v2) ### Stoploss.finance Alpha specs Most LPs supplying liquidity to AMMs such as Uniswap suffer from Impermanent losses. Stoploss allows LPs to limit those losses via a protocol that triggers automated liquidations based on users' maximum acceptable loss. Example: - Provide 700 DAI as liquidity in the ETH/DAI uniswap pool - Place a stop-loss order guaranteeing 500 DAI - If the liquidity of the LP gets close to 500 DAI (500+X%), LP position will get liquidated, 500 DAI will be sent to the LP.* OR For the most bullish of us - Provide 3 ETH in the ETH/DAI pool - Place a stop-loss order guaranteeing 2 ETH - If the liquidity of the LP gets close to 3ETH (3ETH+X%), tLP position will get liquidated, 3ETH DAI will be sent to the LP.*

How It's Made

Smart contracts: Stoploss Factory => Create Stoploss pools + Stoploss Oracle Each Stoploss pool is linked to uniswap router 02 and uniswap pair. Each Stoploss pool use the stoploss Oracle to get price data (TWAP of Uniswap Pair). Example: To protect against IL in the Uniswap ETH/DAI pair: - We create a Stoploss pool through the factory and an oracle - Users make stoploss order from this Stoploss pool. They can send directly LP Tokens, or they can send DAI that we convert for them into LP token, interacting with Uniswap Router Contract. We have a subgraph that stores all Stoploss order created and all price oracle updates. We deployed on kovan on top of live uniswap contracts. Everything works fine. Data to create stoploss order: web3 Data to fetch stoploss orders states: the graph protocol Side note: we simplified last minute the oracle to make better UX for the demo.

Team

Hadrien Charlanes Nathan Sexer
โ† click here to see all projects