Inspiration

Excellent tools like Uniswap allow provisioning liquidity and on-chain price discovery through interaction with buyers and sellers and using demand and supply to deterministically set the price. The fatal flaw here is that real world demand and supply changes create opportunities for arbitrageurs to open a position at a better price than what Uniswap offers, and then close on Uniswap. This makes the price consistent and reflect the real world from the perspective of the consumers of Uniswap, but the liquidity providers (LPs) leak value via imperment loss to these arbitragers.

Off chain price discovery can protect LPs (and Uniswap) from offering an unfavourable price, while maintaining competitiveness on the price offered to swappers.

What it does

Shows you the better price of the one provided by the LP demand-supply balance and the one from external price feeds

How we built it

Using Chainlink price feeds! Should've used the public APIs and jobs, sadly no time to implement

Challenges we ran into

Understanding and adding this functionality to a uniswap fork is hard!

Accomplishments that we're proud of

Implementing price based on both the LP demand-supply equation and the price feed for one pair, verifying that better price is displayed.

What's next for arbfreeswap

Probably fork one of the other DEXes to reuse their security and best practices. Or maybe make this a PR for their projects.

Built With

Share this project:

Updates