Skip to main content
Utilization
U = { 0 if poolAssets = 0 lockedNotional poolAssets , otherwise U =
\begin{cases}
0 & \text{if }\texttt{poolAssets}=0 \\
\dfrac{\texttt{lockedNotional}}{\texttt{poolAssets}}, & \text{otherwise}
\end{cases} U = ⎩ ⎨ ⎧ 0 poolAssets lockedNotional , if poolAssets = 0 otherwise
Jump Rate Model
r b a s e r_{\mathrm{base}} r base - Rate per second
r ~ ( U ) \tilde r(U) r ~ ( U ) denote the raw (unclamped) per-second rate from the kinked curve.
s 1 s_1 s 1 - Slope before kink
s 2 s_2 s 2 - Slope after kink
κ \kappa κ - Kink
clamps: r min , r max r_{\min},\; r_{\max} r m i n , r m a x
Domain: U ∈ [ 0 , 1 ] U \in [0, 1] U ∈ [ 0 , 1 ] is utilization (WAD fraction).
r ~ ( U ) = { r b a s e + U s 1 , U < κ r b a s e + κ s 1 + ( U − κ ) s 2 , U ≥ κ \tilde r(U) =
\begin{cases}
r_{\mathrm{base}} + U\, s_1, & U < \kappa \\
r_{\mathrm{base}} + \kappa s_1 + (U - \kappa) s_2, & U \ge \kappa
\end{cases} r ~ ( U ) = { r base + U s 1 , r base + κ s 1 + ( U − κ ) s 2 , U < κ U ≥ κ
Then clamps,
r ( U ) = min ( max ( r ~ ( U ) , r min ) , r max ) r(U) = \min\!\big(\max(\tilde r(U),\, r_{\min}),\, r_{\max}\big) r ( U ) = min ( max ( r ~ ( U ) , r m i n ) , r m a x )
Price, Strike, and Delta
S S S - Spot (comes from oracle, 18 decimals)
δ \delta δ - Strike delta (WAD fraction) > = 0 >= 0 >= 0
K K K - Strike (18 decimals)
K = { S ⋅ ( 1 + δ ) , δ > 0 S , δ = 0 K =
\begin{cases}
S \cdot (1+\delta), & \delta > 0 \\
S, & \delta = 0
\end{cases} K = { S ⋅ ( 1 + δ ) , S , δ > 0 δ = 0
Rate Multiplier vs Delta (OTM discount)
h h h - OTM half, scales the effective rate when the trader chooses δ > 0 \delta > 0 δ > 0
m m m - Rate multiplier
m ( δ ) = { 1 , h + δ = 0 h h + δ , otherwise m(\delta) =
\begin{cases}
1, & h+\delta=0 \\
\dfrac{h}{h+\delta}, & \text{otherwise}
\end{cases} m ( δ ) = ⎩ ⎨ ⎧ 1 , h + δ h , h + δ = 0 otherwise
The effective per-second rate charged to size notional becomes:
r e f f ( U , δ ) = r ( U ) ⋅ m ( δ ) = r ( U ) ⋅ h h + δ . r_{\mathrm{eff}}(U,\delta) = r(U)\cdot m(\delta) = r(U)\cdot\frac{h}{h+\delta}\,. r eff ( U , δ ) = r ( U ) ⋅ m ( δ ) = r ( U ) ⋅ h + δ h .
Spend per Second and Notional Sizing
Given notional N N N and r e f f ( U , δ ) r_{\mathrm{eff}}(U,\delta) r eff ( U , δ ) , the instantaneous spend-per-second is:
s p e n d ( N ; U , δ ) = N ⋅ r e f f ( U , δ ) . \mathrm{spend}(N;U,\delta) = N \cdot r_{\mathrm{eff}}(U,\delta)\,. spend ( N ; U , δ ) = N ⋅ r eff ( U , δ ) .
Let the user’s maximum be s p e n d max \mathrm{spend}_{\max} spend m a x (from the incoming Superfluid flow). The protocol finds the largest N N N such that:
N ⋅ r e f f ( U , δ ) ≤ s p e n d max . N \cdot r_{\mathrm{eff}}(U,\delta) \le \mathrm{spend}_{\max}\,. N ⋅ r eff ( U , δ ) ≤ spend m a x .
Additionally, inventory/cap constraints are enforced in discrete lots:
b b b - Buffer fraction (WAD)
B B B - Buffer amount
A A A - Available asset cap = m a x ( 0 , poolAssets − lockedNotional − B ) max\big(0,\, \texttt{poolAssets} - \text{lockedNotional} - B) ma x ( 0 , poolAssets − lockedNotional − B )
L L L - Lot size
M M M - Max lots = [ A / L ] [A / L] [ A / L ]
The solver binary-searches m ∈ [ 0 , M ] m \in [0, M] m ∈ [ 0 , M ] to maximize N = m ⋅ L N = m \cdot L N = m ⋅ L under the spend constraint.
Payout at Close
At close, with final spot S c l o s e S_{\mathrm{close}} S close
payout ( N , K , S c l o s e ) = N ⋅ max ( 0 , 1 − K S c l o s e ) \text{payout}(N, K, S_{\mathrm{close}}) =
N \cdot \max(0, 1- \tfrac{K}{S_{\mathrm{close}}})\, payout ( N , K , S close ) = N ⋅ max ( 0 , 1 − S close K )
Observations:
payout = 0 \text{payout} = 0 payout = 0 if S c l o s e ≤ K S_{\mathrm{close}} \le K S close ≤ K
As S c l o s e → ∞ S_{\mathrm{close}} \to \infty S close → ∞ , payout → N \text{payout} \to N payout → N