Orbswap Prediction
Uniswap v4 pm-AMM hook for an asymmetric LP payoff to simulate prediction markets.
Problem Statement
Most prediction markets are adopted as orderbooks, but AMMs have not taken off as prediction market infrastructure. Our belief for it is that custom curves such as CPMM and LMSR do not allow for the concentration of the probability by the LP, instead the LP is forced to accept a 50/50 outcome, waiting until the event occurs, resulting in IL as seen in desmos figure below and simluation link here: [href=https://www.desmos.com/calculator/sk8d2g49hj].For example, consider the prediction for tomorrow's weather, will it rain or shine? It rarely is a 50/50 coinflip, instead it's a rather specific probability, and an LP should have the freedom, just like in Uniswap v3, to concentrate around such a specific probability.We come up with a custom curve that allows the LP to concentrate one's probability just like uniswap v3 allows one to concentrate one's range. We now have the ability to not just be passive liquidity providers, but also make a bet on the likelihood of an outcome ourselves.The unique invariant happens to be x^(1-P)*y^P = k where P is the value of probability ranging from 0 to 100%. when P=.5 we have a 50% probability and the invariant simplifies to the 50% peak above, giving us a classic CPMM such as the one used by butter.markets for conditional funding markets.
Solution
-Solidity, Uniswap V4, prb-math and Desmos
Hackathon
ETHGlobal Buenos Aires
2025
Prizes
- 🏆
Uniswap v4 Volatile - Pairs Hooks2nd place
Uniswap Foundation
Contributors
- MarcusWentz
13 contributions
- v-for-vasya
5 contributions