Steamm-whitepaper
Steamm-whitepaper
November 2024
Nope 0xxgen Ripleys
nope@solend.fi 0xxgen@solend.fi ripleys@solend.fi
In the same way, when flows are positive we deploy funds to the
lending market if the following condition is met:
𝑈 > 𝑈∗ +𝑏
𝑑
⇐⇒ > 𝑈∗ +𝑏
𝑎 + 𝑑 + Δ𝐿
Figure 1: End-to-end flow from LP tokens, to bTokens to ⇐⇒ 𝑑 > (𝑈 ∗ + 𝑏)(𝑎 + 𝑑 + Δ𝐿) (2.2.4)
cTokens
Where the deploy amount Δ𝑑 is computed as follows:
3 SWAP MODEL
Given the yielding nature of the liquidity, swap quotations are
applied to the bToken counterparts of each token. This approach
allows pools to consider the accumulated interest of each asset as
part of the liquidity itself. In practice, when a user swaps, say, USDC
for SUI, the protocol first converts the input amount of USDC into
an equivalent amount of BUSDC, then quotes the output amount in
BSUI, which is ultimately converted into the corresponding amount
Figure 2: Illustration of utilization range
in SUI.
Since a swap consists of an inflow and a corresponding outflow, a
These parameters are set by the global admin when lending is
provisioning action optionally occurs prior to the swap execution to
initialized. However, they can be updated dynamically, enabling
ensure the bank has sufficient funds to fulfill the outflow. A follow-
strategies that manage utilization based on market conditions such
up action then rebalances the liquidity from the inflow, maintaining
as volatility and order flow.
the bank’s equilibrium.
The utilization rate 𝑈 is defined as ratio between deployed liq-
uidity 𝑑 and total liquidity 𝐿 (deployed plus available liquidity 𝑎):
𝑑
𝑈 = (2.2.1)
𝐿
where 𝐿 = 𝑑 + 𝑎
When a given inflow or outflow Δ𝐿 occurs, we recompute the
post utilization rate, such that for negative flows we recall funds
from the lending market if the following condition is met:
• Execute swap: The pool executes the swap on the bTokens, preserving the product of the reserves of the two assets in the pool,
via quoter_x::swap() and returns bSUI as the output ensuring that the product remains constant regardless of the trades
• Burn bSUI in return for SUI via bank::burn_btoken() that occur.
• Rebalance the utilization of the bSUI and bUSDC banks We define the constant-product formula as:
if the utilization rates fall below or above the utilization
thresholds
𝑥 (𝑦 + 𝑐) = 𝑘 (5.1)
4 LIQUIDITY PROVIDERS Where 𝑥 represents the reserve of asset 𝑋 , 𝑦 the reserve of asset 𝑌 ,
With regard to the deposit and withdrawal of liquidity by the LPs, 𝑐 being a vertical offset, and 𝑘 the invariant product of the reserves.
the flow is rather straightforward. When a trader swaps one asset for another, the constant-product
When depositing liquidity, the respective banks will optionally formula is adjusted to reflect the new reserves while maintaining
deploy extra liquidity to the lending markets to guarantee that the invariant 𝑘.
utilization bounds are met. Given a swap, the AMM adjusts the reserves to maintain the
invariant.
Given an input Δ𝑥, the pool will return an output Δ𝑦 such that:
𝑘
𝑦 − Δ𝑦 + 𝑐 = (5.2)
𝑥 + Δ𝑥
Hence:
5.3 Dynamic Fee Quoter pools, creating extra value for LPs while preserving enough reserve
The Dynamic Fee Quoter provides a quotation mechanism with liquidity for active trading.
dynamic fees based on market volatility. When a trader swaps, the This modular, yield-enhancing design makes Steamm a power-
quoter computes an exponential-moving average of the volatility ful protocol for liquidity providers, offering both market-making
based on a reference price and accumulated volatility metric. functionality and improved yield with lower opportunity cost. By
We use absolute price deviations as a proxy for volatility. We balancing reserve availability and yield generation, Steamm ensures
define the accumulated volatility metric as follows: an optimized experience for users in the Sui ecosystem, meeting
both trading and investment needs efficiently.
𝑉𝜆 = max 𝑉ˆ + max(|𝑃𝑜𝑟𝑎𝑐𝑙𝑒 − 𝑃ˆ |, |𝑃𝑖𝑛𝑡𝑒𝑟𝑛𝑎𝑙 − 𝑃ˆ |), MaxVol
(5.3.1)
Where 𝑃𝑜𝑟𝑎𝑐𝑙𝑒 stands for the oracle price and 𝑃𝑖𝑛𝑡𝑒𝑟𝑛𝑎𝑙 the inter-
nal constant-product price of the pool. The volatility accumulated
metric is capped by a parameter 𝑀𝑎𝑥𝑉 𝑜𝑙 defined by the pool.
When a swap occurs, at 𝑛 + 1, we compute the reference price
as well as the reference volatility:
,𝑡 =0
𝑃
𝑜𝑟𝑎𝑐𝑙𝑒
𝑃ˆ𝑛+1 = 𝑃ˆ𝑛
, Δ𝑡 < 𝑓 (5.3.2)
, Δ𝑡 ≥ 𝑓
𝑃𝑜𝑟𝑎𝑐𝑙𝑒
0 ,𝑡 =0
𝑉ˆ𝑛 , Δ𝑡 < 𝑓
𝑉ˆ𝑛+1 =
(5.3.3)
𝑉𝜆 × 𝑅 , Δ𝑡 ≥ 𝑓
, Δ𝑡 > 𝑑
0
where
Δ𝑡 = 𝑡ˆ𝑛 − 𝑡 (5.3.4)
and we update the reference time after the two previous compu-
tations such that:
,𝑡 =0
𝑡
𝑡ˆ𝑛+1 = 𝑡ˆ𝑛 , Δ𝑡 < 𝑓 (5.3.5)
, Δ𝑡 ≥ 𝑓
𝑡
The quoter then provides a quotation price based on the constant-
product formula and adds a dynamic fee charged on the output:
𝑉2 ×𝜙
Δ𝑂𝑢𝑡 × 𝜆 (5.3.6)
100
Where Δ𝑂𝑢𝑡 represents the output amount and 𝜙 is a fee control
parameter used for scaling.
6 SUMMARY
Steamm is an advanced Automated Market Maker that maximizes
liquidity efficiency, through its native money market integration,
and adaptability through its modular quotation design. By enabling
various swap quotation models, including constant-product, stable,
and dynamic-fee AMMs, Steamm supports diverse trading needs,
offering robust flexibility and enhanced liquidity management.
A key innovation is Steamm’s liquidity re-utilization model.
Unlike traditional AMMs where liquidity often sits idle, Steamm
channels unused liquidity into lending markets via an abstraction
called Bank, generating additional yield for liquidity providers.
Through the use of bTokens, earned yield flows back into liquidity
4