id | Title | Status | Author | Description | Discussions to | Created |
---|---|---|---|---|---|---|
TIP-190 | Parlays AMM rework | Draft | padzank | Parlays AMM collaterization rework | 2023-12-04 |
This TIP proposes changing ParlaysAMM collaterization mechanism from using positional tokens via SportsAMM to directly collaterizing with the full sUSD amount for gas savings.
The current implementation of ParlaysAMM uses SportsAMM to buy individual positions to fully collaterize a parlay potential winnings.
The positions are bought using inverse quotes. This approach also serves the purpose of allowing both SportsAMM and ParlayAMM to split the risks of potential losses as well as measure global house exposure via skew impact on individual markets and total available liquidity.
The design itself is brilliant and showcases the full power of synergizing web3 smart contracts. The design was acknowledged in this detailed Delphi digital report.
However, due the number of computations and contract interactions, this approach is very gas consuming. A 4 legs parlay can use up to 13m gas. At current gas prices on Optimism and Arbitrum, this often ends up being north of $2 in gas fees for end users. And it linearly goes up with more positions added to the parlay, making long-legged parlay almost not feasible, even though those are usually most profitable for sportsbooks.
Unfortunately, the above presents a problem for Overtime to scale, and I believe we have to address it even if it means some compromises in the approach.
This TIP therefore proposes to change the approach from ParlayAMM buying positions from SportsAMM, to ParlayAMM simply locking the (s)USD amount needed to collaterize a parlay in the dedicated Parlay contract. While testing, this approach has shown a reduction of 60%-70% in gas consumption.
Besides the gas reduction, this approach further improves UX as there will be no more additional slippage for users when creating parlays. Individual odds on a parlay will always be directly multiplied, which brings the UX very close to the known web2 experience.
Arguably this brings more risks to the ParlayAMM LPs. However, world wide data shows that parlays are the most profitable for sportsbooks, with usual profits being around 30% on parlays, vs just the 5% on singles of total volume. Therefor, I believe this is a move in the right direction and that we should take steps to get more and more users to use parlays.
With regards to capital efficiency, the new approach could be perceived as less capital efficient, as it locks the full sUSD amount in a parlay contract, but in fact, that amount will in average be released quicker than before, due to the fact that as soon as the first game on parlay ends up againt the position the user took, the full amount can be claimed back to the liquidity providers.
Separating ParlayAMM and SportsAMM in this manner will also give a more straightforward overview into the performance of each.
ParlayAMM will no longer use SportsAMM to collaterize parlays, instead it will lock the full amount of potential payout in (s)USD from liquidity pool into the parlay contract.
ParlayAMM will read the latest odds from SportsAMM, but will no longer apply a slipapge using the inverse quotes logic, rather it will simply multiply all odds.
A new risk management logic is introduced in ParlayAMM to ensure that no individual market can incur a larger risk than intended for liquidity provider. For every parlay bought, the ParlayAMM will store the risk per each market into a new variable RiskPerMarketAndPosition and block further parlays to be created if that risk exceed the indeded cap defined in RiskManager contract.
Estimated gas savings range between 60-70%.
This TIP is unrelated to Overtime V2 contracts, and is intended to serve as a solution in the interim to not further block scaling and user acquisition. No changes are needed on integrators side
https://github.com/thales-markets/contracts/pulls
Copyright and related rights waived via CC0.