Skip to content

Commit

Permalink
- hide latex formulas
Browse files Browse the repository at this point in the history
  • Loading branch information
Snedashkovsky committed Oct 9, 2023
1 parent d883032 commit 62e7b23
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ formulas without orderbook matching (Liquidity Pool Model only)
```math
Price = \frac{Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + 2 \times Source Coin Amount}
```
<img src="https://latex.codecogs.com/png.image?\inline\dpi{150}\bg{white}Price&space;=&space;\frac{Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;(1&space;-&space;Pool\&space;Fee)}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;2\&space;*\&space;Source\&space;Coin\&space;Amount}" />
[//]: # (<img src="https://latex.codecogs.com/png.image?\inline\dpi{150}\bg{white}Price&space;=&space;\frac{Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;&#40;1&space;-&space;Pool\&space;Fee&#41;}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;2\&space;*\&space;Source\&space;Coin\&space;Amount}" />)

```math
Target Coin Amount = \frac{Source Coin Amount \times Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + 2 \times Source Coin Amount}
```

<img src="https://latex.codecogs.com/png.image?\inline\dpi{175}\bg{white}Target\&space;Coin\&space;Amount&space;=&space;\frac{Source\&space;Coin\&space;Amount\&space;*\&space;Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;(1&space;-&space;Pool\&space;Fee)}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;2\&space;*\&space;Source\&space;Coin\&space;Amount}" />
[//]: # (<img src="https://latex.codecogs.com/png.image?\inline\dpi{175}\bg{white}Target\&space;Coin\&space;Amount&space;=&space;\frac{Source\&space;Coin\&space;Amount\&space;*\&space;Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;&#40;1&space;-&space;Pool\&space;Fee&#41;}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;2\&space;*\&space;Source\&space;Coin\&space;Amount}" />)

where _Pool Fee = 0.003_ as most common value

Expand All @@ -42,14 +41,12 @@ where _Pool Fee = 0.003_ as most common value
```math
Price = \frac{Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + (1 - Pool Fee) \times Source Coin Amount} \times \frac{Source Coin Pool Weight}{Target Coin Pool Weight}
```

<img src="https://latex.codecogs.com/png.image?\inline\dpi{200}\bg{white}Price&space;=&space;\frac{Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;(1&space;-&space;Pool\&space;Fee)}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;(1&space;-&space;Pool\&space;Fee)\&space;*\&space;Source\&space;Coin\&space;Amount}\&space;*\&space;\frac{Source\&space;Coin\&space;Pool\&space;Weight}{Target\&space;Coin\&space;Pool\&space;Weight}" />
[//]: # (<img src="https://latex.codecogs.com/png.image?\inline\dpi{200}\bg{white}Price&space;=&space;\frac{Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;&#40;1&space;-&space;Pool\&space;Fee&#41;}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;&#40;1&space;-&space;Pool\&space;Fee&#41;\&space;*\&space;Source\&space;Coin\&space;Amount}\&space;*\&space;\frac{Source\&space;Coin\&space;Pool\&space;Weight}{Target\&space;Coin\&space;Pool\&space;Weight}" />)

```math
Target Coin Amount = \frac{Source Coin Amount \times Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + (1 - Pool Fee) \times Source Coin Amount} \times \frac{Source Coin Pool Weight}{Target Coin Pool Weight}
```

<img src="https://latex.codecogs.com/png.image?\inline\dpi{175}\bg{white}Target\&space;Coin\&space;Amount&space;=&space;\frac{Source\&space;Coin\&space;Amount\&space;*\&space;Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;(1&space;-&space;Pool\&space;Fee)}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;(1&space;-&space;Pool\&space;Fee)\&space;*\&space;Source\&space;Coin\&space;Amount}\&space;*\&space;\frac{Source\&space;Coin\&space;Pool\&space;Weight}{Target\&space;Coin\&space;Pool\&space;Weight}" />
[//]: # (<img src="https://latex.codecogs.com/png.image?\inline\dpi{175}\bg{white}Target\&space;Coin\&space;Amount&space;=&space;\frac{Source\&space;Coin\&space;Amount\&space;*\&space;Target\&space;Coin\&space;Pool\&space;Amount\&space;*\&space;&#40;1&space;-&space;Pool\&space;Fee&#41;}{Source\&space;Coin\&space;Pool\&space;Amount\&space;&plus;\&space;&#40;1&space;-&space;Pool\&space;Fee&#41;\&space;*\&space;Source\&space;Coin\&space;Amount}\&space;*\&space;\frac{Source\&space;Coin\&space;Pool\&space;Weight}{Target\&space;Coin\&space;Pool\&space;Weight}" />)

### Analytics

Expand Down

0 comments on commit 62e7b23

Please sign in to comment.