The goal of the IPOR AMM is to offer a spread ($s^*$) on IPOR rates satisfying the following two requirements:
The first requirement translates the idea that the market should be fair (or close to), in such a way that the AMM and Liquidity providers are incentivised by number of trades, while keeping the contracts attractive to users.
The second requirement is an extra step to make sure that at a situation the best contract have multiple possible spreads, the AMM should choose the best for the users.
From a mathematical point of view, we can write these two conditions as follows:
$$ M = min\{| E[F(x,l_0)] |: x \in[0,1)\} $$
$$ s^* = min\{s : E[F(s, l_0)] -M \approx 0\} $$
Where $F(s, l_0)$ is the pool PnL of a new contract if spread $s$ is offered, while $E[\cdot]$ is the expected value (given a distribution of rates). For the next sections we will define the formulas for $F(\cdot, L_0)$ and $E[\cdot]$. In later sections we will explain our strategy to compute its values.
We need a number and notation that represents all the future cashflows the Pool will pay/receive at a given expected interest rate. That number is the Exposure of the Pool:
Exposure of the Pool: We define the exposure of the pool for the Pay fix and receive fix sides as follows. Let $\Gamma_P, \Gamma_R$ be the set of open contracts for the Pay fix and Receive fix sides. For a contract $i$ in the Pay fix or Receive fix side (i.e., $i \in \Gamma_P \cup \Gamma_R$ ) let $C_i$ be the collateral for the contract $i$ and let $l_i$ be the leverage for the contract $i$. Finally, let $r_i$ be the fixed rate for contract $i$ and let $dt_i$ be the remaining time to expiration at time $t$ for contract $i$.
With the in mind, for a given rate $r$, we define the Exposure of the Pool for the Pay Fix side ($X_P$) and the Exposure of the Pool for the Receive Fix side ($X_R$) as the sum of all payoffs
$$ X_{P}(r, t) = \sum_{i \in \Gamma_P} C_i \cdot l_i \cdot (r - r_i)\cdot dt_i \\ X_{R}(r, t) = \sum_{i \in \Gamma_R} C_i \cdot l_i \cdot (r_i - r)\cdot dt_i $$
When there is no ambiguity, we will omit $t$ from $X_P(r,t)$ and write it only as $X_P(r)$.
<aside> 💡 Example (Understanding $X_{R\text{,}P}$): For clarity, let’s go through an example of exposure calculation.
Suppose we have a contract with a pay fix rate at 3% with six months remaining until expiration. In this case, $dt = 0.5$. See below three contract examples:
</aside>