Skip to content

Commit

Permalink
tip-132
Browse files Browse the repository at this point in the history
  • Loading branch information
danijelthales committed Mar 15, 2023
1 parent 439821f commit 59fde6e
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 69 deletions.
147 changes: 78 additions & 69 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions TIPs/TIP-132.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
| id | Title | Status | Author | Description | Discussions to | Created |
| ----------- | ----------- | ----------- | ----------- | ----------- | ----------- | ----------- |
| TIP-132 | Change how min_spread variable is applied on Overtime| Draft | Danijel (@danthales)| Change how min_spread variable is applied on Overtime| https://discord.gg/thales | 2023-03-06


## Simple Summary

Change the application of min_spread from an additive method to relative multiplication

## Abstract

This TIP proposes to change the min_spread application from being added as a net value to the default odds, to being a multiplier

## Motivation

Adding min_spread as an additive value was inherited from ThalesAMM architecture. While not an incorrect way to apply the margin, it led to Overtime having significantly better payouts on favourites and worse payouts on underdogs.

Overtime takes odds from oracle as those are provided by the selected book, e.g. Pinnacle, then we normalize odds to add up to 1 (or 100%). After the normalization we apply our own margin by adding min_spread variable and skew to the normalized odds. This yields a following scenario noticed on a tennis match with a heavy favourite:

```
API odds
favourite 1.03 | 97.1%
underdog 12 | 8.3%
sum = 105.4
Normalized odds:
97.1/105.4 = 0.9212
8.3/105.4 = 0.078
Our odds:
(0.9212 + 0.0133x1.5)x1.01 = 0.9505615 | 1.05
(0.078 + 0.0133x1.5)x1.01 = 0.0989295 | 10.1
```

In this example Overtime ended up having a 40% better payout on he favourite.

I believe its best to change our approach to using min_spread as a relative multiplier (4%), which will always get the odds back to the values on par with those received from the oracles. I feel this imperfection in odds has likely set us back somewhat PnL wise, and this change will allows us to have a better control over increasing liquidity.

## Specification

Use min_spread as a relative multiplier instead of an additive constant.
Set min_spread value to 4% (0.04 on 18 decimals)

## Implementation

https://github.com/thales-markets/contracts/pull/301

## Copyright

Copyright and related rights waived via CC0.

0 comments on commit 59fde6e

Please sign in to comment.