SAMM Protocol - v1.1

Using a Smart Automated Market Maker (SAMM) to provide liquidity in a decentralised parimutuel market

Abstract: This lite-paper introduces a conceptual framework as to how a Smart Automated Market Maker (SAMM) could be used to provide on-chain liquidity to a simplified binary-outcome parimutuel market. Using such a SAMM with external market context being provided by independent probability nodes can allow a system to bootstrap liquidity efficiently. This result has the potential to solve the liquidity consistency problem typically faced by parimutuels whilst being efficient enough to keep fees to parimutuel participants low. Ongoing governance is then required for parameter calibration to keep the system in a state of equilibrium.

Keywords: parimutuel markets, automated market makers, bootstrap liquidity

Disclosure: This paper is for academic purposes only and is not intended to be a financial service or advice. By reading this you agree that any usage of the information is at your own risk.

Terminology

Parimutuel Market - This is a betting system in which all entries are placed together in a common pool. Consider an N outcome event, in this case the total pool will be the sum of all individual outcome pools. The house-take or fee is then deducted, and payoff odds are calculated by sharing the total pool net of fees amongst all winning entries. For the remainder of the paper, we will focus on the simplified binary-outcome parimutuel market, an example of this is a football match in which either team can win but a draw outcome is impossible.

Automated Market Makers (AMM) - AMMs in the blockchain context were first described by the Bancor protocol in 2017 and later made popular by the success of the decentralized exchange protocol UNISWAP. In the case of UNISWAP, the AMM stands ready to quote prices on any crypto exchange pair that it supports. The protocol does this by applying a constant pricing function on the 2 supplied liquidity pools and is thus able to price any marginal liquidity-taker based on the size required. It does this purely based on the pricing function and the on-chain liquidity pools without any actual pricing context on the pair from any other external source.

There are 3 stakeholders that interact with the UNISWAP protocol. The first stakeholder is the speculator who trades against the liquidity pools and pays a fee for this privilege. Speculators care about slippage, spreads and fees. All else equal, it is preferred that fees are lower, as this encourages additional volume. Second are the liquidity providers (LPs) that supply different assets to the protocol. They do this in return for the fees that the protocol charges for swap trades and may be further rewarded by governance token distributions from the protocol itself. The last stakeholder of the 3 are the governance token holders that make periodic adjustments to the protocol. Some portion of the fees earned from using the protocol may accrue to a treasury which the governance token holders control and use for protocol improvements.

The problems with parimutuels

The house generally does not seed the pools in parimutuels, they merely host the event and take a fee off the top. For this reason, liquidity in a parimutuel market is largely driven by the speculators that are willing to take directional trades on this market. This makes bootstrapping liquidity in new parimutuel markets challenging since the absolute pool size might initially be too low to attract more speculators. Initial seeding attempts by the house could very quickly become a loss-making exercise if done naively, as more informed speculators outperform the house odds.

When the pools are small it is also more likely that they will be heavily skewed resulting in unbalanced payoff odds; these can be easily shifted by few participants which may dissuade more speculators from joining. Consistency of pool size over time is also challenging for events that are short term and recurrent. Imagine a recurring event which only lasted 1-5 minutes but ran 24/7. If the main user base of the parimutuel platform was in Asia say, there would hardly be any liquidity during US trading hours. The poor liquidity in the above cases generally has a direct impact on overall fees as these might need to be kept high in order to compensate the house when volumes are too low. These high fees are a deterrent for new speculators and hurts the liquidity feedback loop.

In traditional markets the above problems are solved by enlisting several market makers who would agree to continuously provide deep liquidity with a reasonable bid/ask spread for speculators to execute against. With enough liquidity and speculator activity, this creates a positive feedback loop where more speculators join because of the ability to access deeper liquidity and place bigger and bigger trades.

Finding a solution

Given how successful UNISWAP has been it makes sense to consider an application of an AMM to a decentralised parimutuel market to determine if this could be used to bootstrap liquidity. However, there would be some drawbacks to a direct application. As it stands UNISWAP requires large liquidity pools in order to provide low slippage. LPs to UNISWAP can also suffer an impermanent loss for crypto pairs that are trending over time. Due to these, LPs must be highly incentivized to lock up their liquidity and so the protocol offers them high fees relative to centralised exchanges as well as initial rewards in order to make LP capital sticky.

In its current form, an application of a UNISWAP AMM to a parimutuel market without any external content on the market would result in either the AMM showing equal pools for both outcomes, so 2 to 1 odds before fees or odds which are inline with the current pool sizes for each outcome. With these naive event odds, the LPs will likely fall victim to an informed speculator which has a better grasp of the odds of the event. This will result in LPs incurring negative expected value per event to which the protocol could then respond by raising fees to ensure that LPs eventually recover their capital. However, this has the net effect of dissuading new speculators from joining, all else equal. The above case is the result of the AMM being naive to external market context i.e. an accurate indication of the events probabilities.

Creating an AMM with probability-guided liquidity, a Smart Automated Market Maker (SAMM), would result in neutral to positive expected value per event for LPs. This then allows the overall fee to be reduced to further encourage new speculator activity which creates a positive liquidity feedback loop.

SAMM applied to a decentralised parimutuel

A SAMM with external context would have an additional stakeholder over the UNISWAP protocol, a Probability Provider (PP). Below we describe the 4 stakeholders of such a model and how they are incentivised to act in the best interest of the decentralised parimutuel market.

Figure 1: High Level Design of the SAMM in a Parimutuel Market

The first stakeholder is the familiar speculator who would take directional views on the parimutuel market and pays the house fee. All else equal speculators would prefer stable odds and deep liquidity where their trade has little to no impact on the market. Whilst individual speculator results will vary, on average their expected value would be negative after fees, as is the case in the centralised world.

The second stakeholder would again be the LP which would contribute liquidity to the SAMM in return for fees. The LP would not pay the house fee for any markets that the SAMM provides liquidity on. Since liquidity will be added in line with accurate probabilities, the expected value per event will be neutral to positive over a large number of events, resulting in a relatively low risk profile for the LP.

The third stakeholder we will consider is the Probability Providers (PPs). We envision several independent oracle-type nodes that would compete by submitting outcome probabilities directly to the SAMM for a particular parimutuel market. Unlike the more traditional objective oracle; PP’s are projecting unknown events; and therefore require their own specific considerations for avoiding bad-actors. The PPs would be incentivized by earning a portion of the fees on the pool based on their rolling success rate. The metric used to monitor their ongoing performance would incorporate both magnitude and direction. A group of the best performing PPs will be awarded rewards. PP’s would be encouraged to join as they are not carrying any capital risk, apart from oracle staking if required.

The fourth and last stakeholder would be the Governance Token Holders (GT) which would periodically set certain parameters of the protocol to ensure that it remains in a state of equilibrium i.e. LPs are generating sufficient return on capital, speculators aren’t paying too much fees and a competitive PP market exists. The GTs would further control the protocol treasury and use this for further developments to the SAMM and decentralised parimutuel.

Example

Let us now consider a simple example to see how the SAMM with probabilities would achieve a neutral to positive EV for the LPs. In the below example assume that the PPs are indeed accurate with their probability indication for the binary-outcome parimutuel. The PPs indicate a 40% probability of outcome 1 and a 60% probability of outcome 2 as can be seen in the blue highlighted cells. The SAMM consumes this information and seeds the LP capital in these proportions, 4000 and 6000 units respectively. This can be seen in the Pools-LP bets row. Assume further that speculators are split in their views and bet a smaller proportion relative to the SAMM. This is seen in the Pools-Traders row where they bet 500 and 500 for either outcome. We will leave it to the reader to work through the rest of the details, but assuming a 3% house fee, the LP ends out with a small positive EV. The speculators are negative EV and out of pocket the house fees. These fees are then the incentive for all of the other stakeholders to act in the best interest of the SAMM and decentralised parimutuel.

Incentive structure

This then leads us to the incentive structure or fee split for the 3 receiving stakeholders, LPs, PPs and GTs. LP’s are putting their capital at risk, PP’s are providing the required intelligence on how best to deploy that capital, and GT’s ensure ongoing improvements and maintenance of the system. Fees need to be appropriately apportioned between these 3 stakeholders in a manner that ensures equilibrium of the system.

The other important parameter is the fee rate for a particular parimutuel. As data around the profitability of LP capital emerges it may be necessary from time to time to adjust the fee rate. This can be done intermittently by the GTs or automatically recalibrated based on the fee vs. LP expected value curve. Where LP returns have been poor, the fee rates might have to be adjusted higher and/or the PP split improved so as to incentivize more accurate PPs to enter and/or existing PPs to further invest in predictive tooling.

PP oracle

The mechanism where the independent PP nodes contribute probabilities to the AMM needs to be considered further. Specifically, the design of the metric, how a multitude of independent probabilities are consolidated into a single probability for usage and the rolling period on which PPs are measured for rewards.

Unlike objectively variable/comparable metrics, the PP oracle here is making future predictions; so no individual prediction is right or wrong compared to others at the time of being submitted. Care needs to be taken to ensure no manipulation of the PP oracle occurs by distorted input probabilities.

We propose a lagged measure of performance to be used to calculate which PP’s fit the events best over time e.g. AUC-ROC or log-loss calculations of past performance over a rolling-100 event window. Using lagged performance allows for smoothing out short term manipulation, by comparing the submitted probabilities to the actual historic performance as the validation. Lastly, we can further diversify the final probability used for capital allocation by averaging several strong PP providers.

LP pool sizing

The SAMM will need to seed the pools with a reasonable size such that it minimises the risk of bankrupting the total LP pool following a long series of incorrect directional predictions. This is mitigated to a large extent by the SAMM betting both sides of any event; thereby only exposing the expected value difference of the individual outcomes to risk of drawdown.

The Kelly Criterion, after adjusting for more or less conservatism, can be used to help set an appropriately conservative trade size per event e.g. k x Kelly, where k is set to reach a target risk of x% drawdown. Practically, during a drawdown, the pools may reduce faster than the Kelly Criterion advises; as risk-averse LP’s start to withdraw some capital.

Design flow of a single event

We envision a two contract system where the parimutuel market contract manages the creation of new markets and the trading and payout thereof. The next would be the SAMM contract which would receive liquidity from LPs and probabilities from PPs. This SAMM would then follow the above outline on probability consolidation and trading sizing and add liquidity via the market contract with a special provision that the SAMM pays no fees. The SAMM could be triggered at a new partimutel market's inception or when an onchain bet is made by a speculator. This would allow for further adjustments from the SAMM when new probabilities emerge. The SAMM would not alter its existing bets, but rather just add to one of the pool sides to make the adjustment as required. When the event ends, the parimutuel contract would learn about the outcome from an on-chain event oracle and the payouts would be triggered. For simplicity we envision the fees to be paid out in the same entry currency that was used in the pools.

Figure 3: Individual Event Flow

A high-speed blockchain, such as Solana, would be required for a completely decentralised solution. This is needed in order for all stakeholders to be able to participate in very short termed parimutuel events e.g. minutely events.

Risks and mitigation

There is a good reason for UNISWAP avoiding the use of external market context in their protocol. Information off-chain needs to be consumed and made available on-chain via an oracle service which can be subject to manipulation. Similarly, by using a consolidation of independent probabilities, the SAMM opens itself up to the risk of a variety of attacks. Below we discuss some of these and mitigation, but we add a point of caution that this is by no means an exhaustive list.

  1. A speculator with a strong predictive model (predictive power in excess of the fees), could consistently trade against the SAMM resulting in short term losses for the LPs. This is where automated or governance driven calibration of the fee parameters would be needed. By raising the overall fee the SAMM effectively neutralizes the edge of the speculator. The fee split between the LPs-PPs could also be changed in favour of the PPs for this parimutuel market. This would make it relatively more attractive for the speculator to rather join the PP side of the market. This then strengthens the SAMM and puts the LPs back in positive expected value territory; the fees that were initially raised will then be reduced back to some equilibrium.

  2. An individual PP could submit an inaccurate probability to fool the SAMM into seeding liquidity in line with these incorrect odds. An extreme example here is if a PP submitted a 100% for outcome 1 and 0% for outcome 2 and then traded as a speculator against the SAMM. Such an attack would likely result in a positive expected value after fees for the speculator. However, with outlier removal, these extreme odds will likely be cut from the probability set. Using a magnitude metric will also penalize the performance of the guilty PP resulting in lower future rewards if any. We could also ensure that the rolling metric of the PP needs to be in a certain top tier before their contributions are used so newcomers need to pass a proving period. Another option is staking and slashing.

  3. A single PP could add negligible noise to create multiple PP submissions; to take a larger share of PP rewards (in the case where multiple PPs are rewarded). Can be mitigated by only rewarding the best PP however this could hurt PP diversity.

  4. A group of high tier PPs which are already earning rewards could collude to fool the AMM into adding liquidity at the wrong odds. Since their probabilities are already consumed and used for liquidity the SAMM has no reason to doubt a majority view. The GT holders should ensure that the overall fees and PP fee splits are high enough such that it brings a diverse group of PPs. It might also be worthwhile increasing the size of the top tier for further diversity. Such an attack would be the equivalent of a 51% attack in principle. We really just need to ensure that there is a large group of diverse and independent PPs.

  5. A speculator could additionally act as an LP and try to increase the capital in the SAMM in order to increase the pool sizes when the speculator has sufficient edge. The solution here would be that new capital added to the SAMM would not immediately translate into an increased bet size but rather implemented with some lag.

  6. Many PP nodes could be disrupted via a targeted ddos attack. In this case the SAMM would default to odds that are 50/50 or inline with current pool sizes. The SAMM could reduce its bet size substantially when there are few or fragmented probabilities being provided. Again, this problem would be solved with a large and globally diverse PP set.

Further enhancements

In this final section we highlight further enhancements that could be made to the SAMM and decentralised parimutuel market contract. The first revolves around capital efficiency.

  1. The SAMM will have access to a reasonable amount of LP capital, however there may be periods when this capital is not active due to gaps in stop and start times of the parimutuel markets as well as the SAMM only betting some fraction of the total LP capital. Some percentage of idle capital could be moved to lending protocols like AAVE or Compound. Another enhancement would be to leverage composability and use a-tokens (interest bearing tokens) as the assets for the pools directly.

  2. In the current proposition, the speculator does not see any benefit from doing additional volume i.e. there is a fixed fee regardless of volume traded. In traditional markets there is usually a fee tiering structure that encourages speculators to increase their participation. A similar structure could be implemented here, with lower fee tiering being applied to higher rolling participation rates.

  3. The next enhancement regards the ongoing governance described early where GTs make periodic changes to the fee parameters and splits. These were merely lagged proxies for actual known on-chain performance. A calibration contract could be created such that when called it seeks to determine the dynamic fee required to appropriately reward LP capital. Based on the performance metrics from PPs it could also dynamically adjust the LP-PP split of the fees to encourage the correct behaviour. The calibration contract could be called at the end of every recurrent game resulting in as close to real time dynamic fee setting.

  4. The SAMM could be further improved by reworking the bet sizing model. Rather than betting a certain % of the pool every game the SAMM could use the probabilities provided and their standard deviation as a measure of confidence and increase its bet sizes when appropriate. However, this may blur the line between liquidity provision and speculative trading, and so no fees for the SAMM may no longer be appropriate.

  5. Lastly the extension to an N outcome parimutuel would require PPs to submit N predictions. These again could be consumed by the SAMM which would then add liquidity to all N pools in proportion to the consolidated N outcome probabilities. This would add additional complexity on the metric design and monitoring of rolling successes for rewards, but based on the framework outlined above these could be incorporated.

Authors:

Heshil Mohanlal

Preevan Moodley

Rob Levy

Dan Gunsberg

References:

https://uniswap.org/whitepaper.pdf

https://cryptorating.eu/whitepapers/Bancor/bancor_protocol_whitepaper_en.pdf

https://towardsdatascience.com/betting-optimally-29f283d96669

https://en.wikipedia.org/wiki/Parimutuel_betting

Last updated