> For the complete documentation index, see [llms.txt](https://providence-labs.gitbook.io/providence-labs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://providence-labs.gitbook.io/providence-labs/how-providence-works/markets/exchange-rate-adjustment/modified-exchange-rate.md).

# Modified Exchange Rate

Mathematics Behind Providence.

First define *σ*(*t*) to be a piecewise sigmoid function of time (*t*) (*detailed in* [*Sigm*](/providence-labs/how-providence-works/markets/exchange-rate-adjustment/sigma.md)[*a* ](/providence-labs/how-providence-works/markets/exchange-rate-adjustment/sigma.md)*section*):

• Let *Nj* denote the number of outcome *j* tokens minted to the swapper.

• Let *Ni* denote the number of outcome *i* tokens burned by the swapper.&#x20;

• Let *Eij* denote the exchange rate between *i* and *j* outcome tokens.

• Let *Si* denote the total supply of outcome *i* tokens.

• Let Sj denote the total supply of outcome i tokens.

A term *P* is given by the reciprocal of the current unmodified exchange rate (*Si / Sj*).

And define a term *a*:&#x20;

<figure><picture><source srcset="/files/ynpFy3VHb2SywZ19uHjk" media="(prefers-color-scheme: dark)"><img src="https://646852516-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW2oa9FDAHfE4qqpNR6MX%2Fuploads%2FGsW1xQeZgP1grzjLa3kD%2FScreenshot%202024-06-17%20at%2011.49.28.png?alt=media&amp;token=510969ca-847a-4dd7-8a2f-2bce4a80cafa" alt=""></picture><figcaption></figcaption></figure>

A function *f*(*t*) can be derived:

<figure><picture><source srcset="/files/7vikl1PvYhrSe6ppw59Z" media="(prefers-color-scheme: dark)"><img src="https://646852516-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW2oa9FDAHfE4qqpNR6MX%2Fuploads%2Ffcs0QWoTeFLiR8cNIj3Z%2FScreenshot%202024-06-17%20at%2011.50.49.png?alt=media&amp;token=83ac4071-8fb4-4ac3-80bc-458a0df58da4" alt=""></picture><figcaption></figcaption></figure>

Combining this, the exchange rate between outcome *i* and *j* (*Eij*) is given:

<figure><picture><source srcset="/files/1zfA3XXIS1SWFYtHU62I" media="(prefers-color-scheme: dark)"><img src="https://646852516-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW2oa9FDAHfE4qqpNR6MX%2Fuploads%2Ftkd5FDqY7u9KAIzoqUJQ%2FScreenshot%202024-06-17%20at%2011.52.05.png?alt=media&amp;token=bcf23eb1-b46e-4a24-b959-5044582b01e5" alt=""></picture><figcaption><p>Note that the reciprocal relation is given by Eji = σ(t) · p/f(t).</p></figcaption></figure>

<figure><picture><source srcset="/files/KniXTr03MFnYJWlb50b5" media="(prefers-color-scheme: dark)"><img src="https://646852516-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW2oa9FDAHfE4qqpNR6MX%2Fuploads%2FNq66TgOaqPWL9QdEKkoo%2FScreenshot%202024-06-17%20at%2011.53.55.png?alt=media&amp;token=5616be0e-3809-4f68-a1b8-926b95e8556b" alt=""></picture><figcaption><p>Figure 2: Visualization of the exchange rates <em>Eij</em>(<em>t</em>) and <em>Eji</em>(<em>t</em>) over time, based on <em>σ</em>(<em>t</em>) and <em>f</em>(<em>t</em>), assuming constant odds <em>p</em> and <em>Te</em> (expiry) of 10.</p></figcaption></figure>

A small swap fee as a percentage of the outcome tokens burned will be collected and automatically liquidated into USDC post-settlement.
