InfinityPools Whitepaper
Pierre de Fouquieres Matthieu Gavaudan
pierre@infinitypools.finance matthieu@infinitypools.finance
Abstract
InfinityPools is a new decentralized finance primitive that can offer extremely high levels of
leverage (1000x or more), has no liquidations and is fully permissionless (can instantly be
offered for any token). All without any counterparty risk or oracles.
InfinityPools is a two sided marketplace, with traders on one side and liquidity providers
on the other. InfinityPools' liquidity provisioning mechanism resembles lending out AMM
LP tokens. Liquidity providers have no credit risk and generate additional yield.
1 Introduction On InfinityPools, no liquidation occurs in
response to the spot price falling. Since the
Leverage is conventionally achieved through private pool holds liquidity for the duration
margin trading. The simplest instance being: of the loan, the asset position can be sold there
the trader borrows some cash, with some margin just prior to repaying the loan, irrespective of
as collateral, to buy more of an asset than could how low the spot price has fallen to in the
be bought with the margin alone. If the price of meantime. In addition, the trader can decide
the asset rises, selling the asset position leaves whether to use their private pool, or any other
the trader with a profit, after repaying the loan. decentralized exchange offering a higher price,
If the price of the asset falls, the asset pos- to swap the asset position for cash to repay the
ition has to be sold before its loss in value is loan. As such, no price oracle is used. With no
greater than the margin, otherwise the loan external dependence on a liquidation bot, nor
will be in default. Derivatives such as perpetual price oracle, the protocol is entirely autonomous
futures offer the same P&L to traders as margin and so permissionless.
trading through borrowing, and as such have
the same limitations.
With margin, unfortunately, if the price
starts falling, there is no guarantee the asset 2 High level overview
position can be sold at a sufficiently high price
to cover the loan repayment, as usage of spot Let's imagine a scenario where a liquidity pro-
liquidity is competitive. The higher the leverage vider has lent out a ETH/USDC LP token
ratio, the lower the amount of margin, so the on InfinityPools. The LP token is worth 1000
smaller the downward price move which puts USDC and is deployed in a tight liquidity range
the loan in default. This also limits the leverage centered at 900 USDC.
ratio: if the threshold downwards price move A trader, wanting to go long ETH with
is too small, it is infeasible to sell the asset leverage, could then borrow that LP token and
position before the loan gets into default. redeem it for 1000 USDC. Assuming the cur-
InfinityPools solves these problems by rent market price of ETH is 1000 USDC, the
securing beforehand the spot liquidity needed trader could then swap the 1000 USDC for 1
to unwind the leverage. Leverage is created out ETH, minus fees and slippage (using a spot
of a loan of concentrated AMM liquidity itself. DEX of their choice). There are now three pos-
Conceptually, the trader borrows a liquidity sible scenarios:
range from a public pool, to put in their private
A) If the price of ETH goes up, the trader
pool which only they can execute swaps on.
makes money and can swap back a part
This liquidity is chosen to guarantee that the
of the 1 ETH for 1000 USDC to pay
leveraged asset position can be sold for the
back the LP token.
exact amount of borrowed cash. Moreover, as
a liquidity range has reserves backing it, bor- B) If the price of ETH goes down to right
rowing liquidity implies borrowing the cash above 900 USDC, the 1 ETH the trader
needed to buy the leveraged asset holdings in holds is worth 900 USDC and the
the first place. liquidity provider is expecting back an
1
2 Section 3
LP token worth 1000 USDC. The trader in collateral in order to pay back the
therefore needs to start out with 100 full LP token.
USDC (or 0.11 ETH) in collateral in The minimum collateral requirement for a
order to pay back the full LP token. trader borrowing an LP token worth 1000
USDC at the 900 USDC liquidity range is there-
C) If the price of ETH goes below fore 100 USDC (10x leverage). It follows
900 USDC, the liquidity provider is that the closer the liquidity range borrowed is
expecting back an LP token worth 1.11 to the current market price of ETH, the more
ETH. The trader already holds 1 ETH leverage it enables. For example, if the liquidity
and the remaining 0.11 ETH is worth, range borrowed was deployed at 999 USDC,
at most, 100 USDC. Therefore, same the maximum loss / initial collateral required
as with scenario B, the trader needs to would be 1 USDC, which corresponds to 1000x
start out with 100 USDC or 0.11 ETH leverage.
Figure 1. ETH/USDC InfinityPool 10x leveraged trade payoff
The chart above shows the payoff functions token in the pool at a single predetermined
for the trader and the corresponding liquidity price. eg. if the borrowed assets are in ETH,
providers, and excludes the interest rates paid. they can be swapped for USDC at the prede-
Interest rates paid by the borrower in this scen- termined price and vice versa.
ario would be 1 USDC for a one day trade The ability to swap the borrowed tokens at
(0.1% daily rate), assuming normal levels of a predetermined price is what guarantees there
volatility. In the case where the price of ETH is no liquidation risk. Once liquidation risk is
drops below 900 USDC, the trader's position removed, unlimited amounts of leverage can be
remains open and the same payoff function con- offered for any asset. This type of swap is not to
tinues to apply as long as the loan isn't closed be confused with the swap at market price used
out. to enter in the long position in the example
above (1000 USDC for 1 ETH). The swap at
market price can be executed using any decent-
ralized exchange or aggregator.
3 Deeper dive Leverage can be created from an arbitrary
number of wide or narrow liquidity ranges that
may or may not be adjacent (ie. does not have
3.1 Swappers to be a narrow range concentrated around a
The fundamental primitive in InfinityPools is single number such as above). Liquidity over
the ability to borrow pool liquidity. This gives a range (or sum of ranges) borrowed in one
traders the right to exclusively swap the bor- transaction is aggregated into a single prim-
rowed tokens backing the liquidity for the other itive called a swapper. The tokens (eg. ETH &
Deeper dive 3
USDC) backing the aggregated liquidity ranges above, token1 is USDC, token0 is ETH and the
for a given swapper, are called its reserves. liquidity range borrowed is at 900 USDC. The
Each swapper has a single predetermined max reserves of USDC when the pool price is
price, known as its strike price, at which an above the liquidity ranges are 1000 and the max
unlimited number of token swaps can be per- reserves of ETH when the pool price is below
formed for free (no slippage or fees) using its the liquidity range is 1.11. Therefore, the strike
underlying reserves. The strike price is at the price is 1000/1.11 = 900.
midpoint for the liquidity used to generate The formula to calculate leverage from the
leverage: strike price is:
max: token1 reserves
strike price = market price
max: token0 reserves leverage
market price ¡ strike price
Where token0 and token1 are the pool's two
tokens, and the max reserves occur when the Instead of trading fees, yield accrues to liquidity
pool price is respectively below or above all providers, more directly, from the interest rate
borrowed liquidity ranges. In the example which the borrower pays to hold the liquidity.
AMM liquidity range Swapper
Who can use it to swap tokens? Anyone Only the borrower
At what price will tokens be swapped? Pool price (+slippage) Strike price (no slippage)
Where does the LP yield come from? Swap fees Interest (no swap fee)
Table 1. Comparison of liquidity range and swapper
3.2 Swapper reserves remains constrained at all times to have reserves
A liquidity range is minted with reserves whose which are sufficient to recreate the originating
amounts vary along a predefined curve as swaps liquidity ranges. As a result, the liquidity pro-
move the pool price within the liquidity's range. viders incur no risk in lending liquidity ranges.
When creating a swapper from a range (or There is no credit risk fundamentally because
sum of ranges), it has precisely the amount borrowers just gain the ability to use the
of reserves to recreate the originating liquidity liquidity, while the reserves backing it remain
ranges. While the swapper is lent out, it secured.
Figure 2. Liquidity range vs. swapper reserves
For example, the figure above shows the style), and its corresponding swapper (different
difference between the reserves backing each one from first example). Because price is meas-
of: unbounded liquidity (Uniswap v2 style), ured by `quote token amount / base token
liquidity concentrated to a range (Uniswap v3 amount', the price at a given point is the slope
4 Section 3
of the reserves curve at that point. In partic- so the difference only materializes when the
ular, for the two price tangent lines in the inner pool price is in the borrowed liquidity range.
plot, one can read off their price as 900 USDC Otherwise, the maximum difference just shrinks
/ 1.0 ETH = 900 ETHUSDC and 1000 USDC for smaller ranges, while swappers have the
/ 0.9 ETH = 1111 ETHUSDC. The two tan- advantage of being fungible for the same strike,
gent lines in the outer plot are shown for the irrespective of the liquidity range(s) which cre-
same prices, for comparison. ated them.
As seen in the figure, the reserves curve
for unbounded liquidity is convex, ie. its slope
becomes steeper from right to left. This is true 3.3 Visualization of trade reserve
for the reserves curve of any sum of liquidity requirement
ranges, because as more ETH flows out in
exchange for USDC (moving right to left on the The leveraged trade from the first example can
curve), the price used always increases (slope be visualized in the space of reserve amounts,
becomes steeper). The line connecting the end- as shown in the following figure. As mentioned
points of any reserves curve is then always previously, in this space, price is equal to the
above the curve - a key property of convex absolute value of the slope of diagonal lines.
curves. A swapper created from the liquidity Therefore to reach 1 ETH in reserves (the max-
range is made to have this line bounding its imum ETH exposure for this trade), the trader
valid reserves region. This is what guarantees will need to swap the borrowed USDC for ETH
the swapper to have reserves which are at all at the 1000 ETHUSDC market price - therefore
times sufficient to recreate the original liquidity along the 1000 USDC to 1 ETH diagonal, as
ranges. indicated on step 3.
Despite this price range (over 20% across) After the USDC to ETH swap is complete,
being relatively wide, especially when used and the trader's reserves are at 1 ETH, their
to create leverage, the corresponding swapper value in USDC is again given by the price diag-
(with a strike of 1000 / 1.0 = 1000 ETHUSDC) onal. For a market price of p, this price diagonal
is barely distinguishable from the underlying is the line between 1 ETH and p USDC (for
sum of liquidity ranges, in terms of valid its slope to be p USDC / 1 ETH = p ETH-
reserves. The two are in fact equivalent when USDC), so that the 1 ETH can be swapped
limited to having all reserves in a single token, into p USDC (using any DEX for example).
Figure 3. ETH/USDC InfinityPool 10x leveraged trade steps
The leverage effect can be seen in the pic- the pivot is the 1 ETH point on the x-axis and
ture above. The way profits are multiplied to the lever is the price diagonal, whose slope is
create leverage is in fact similar to a physical driven by the market price, and whose y-inter-
lever (where the word leverage comes from): cept determines P&L.
Maturity profile 5
At higher leverage ratios, the numbers on ation applies. More specifically, the borrower
both axes scale up proportionally. For example, payoff starts as an out of the money put option,
at 20x leverage, the numbers on the axes scale and swapping reserves over then transforms the
up by a factor of 2. When a trader borrows 1900 payoff into that of an in the money call option.
USDC (2 x 950 USDC as the strike is now 950 This ability to switch back and forth at
instead of 900), by adding 0.1 ETH in collat- will between in/out of the money allows the
eral, they can swap that 1900 USDC for 2 ETH. swapper to lock in profits at any time, as done
in step 5A. Moreover, this enables borrowers to
immediately realize the value of their position
3.4 Financial payoff function in USDC, at any time before loan maturity.
The other way to visualize the same steps of When a deep in the money call is switched to
this trade is in terms of payoff functions, as a deep out of the money put plus cash, the
shown below. What can be seen in this pic- overwhelming majority of the value will be in
ture is that the swapper payoff matches that cash, as deep out of the money options are close
of a vanilla option, which ensures no liquid- to worthless.
Figure 4. ETH/USDC InfinityPool 10x leveraged trade lifecycle
4 Maturity profile with the futures' underlying asset. To recover
their position, the long holder would have to sell
Loans of liquidity ranges mature on a con- the asset, at spot price, and buy more future,
tinuous basis, with the same proportion of the at its mark price. This difference of mark price
position maturing in each instant. The amount minus spot price is exactly proportional to the
of loan outstanding is therefore an exponential funding rate which long perpetual positions pay
function of time. If a trader borrows 1 USDC continuously. Therefore the funding rate corres-
for example, once some time t has elapsed since ponds to the continuous settlement and forced
borrowing, the USDC still on loan will be 2¡t replenishing of the position, which net out to
with t measured in days, which is the exponen- keep the position constant over time.
tial e¡t with = ln(2). Users have the option, In order for traders to make bets on the dir-
and not the obligation, to replenish the holdings ection of spot price moves, perpetuals' implicit
that have decayed at a new, current, interest settlement at spot is required. The forced
rate. replenishing of perpetual positions is problem-
This replenishing of the trader position is in atic however, as it makes the P&L of perpetual
fact, implicitly, how perpetual futures maintain trades dependent on the perpetual market itself,
a constant position over time. If the future did unlike a proper derivative. This is the cause
settle, this would leave a long position holder of dysfunction observed in perpetual markets,
6 Section 6
most crucially perpetual P&L failing to track The specific liquidity ranges which were used
the spot market (not even tracking the same to constitute a loan (at a single strike) do not
perpetual on other venues in fact), due to often need to be recorded. As the repayment is on
double digit, and sometimes triple digit funding an immutable exponential schedule, only the
rate APRs. growth rate of the amount of liquidity avail-
InfinityPools avoids these problems by able in each bucket is recorded. Interest for bor-
making replenishing of the trader position rowing each liquidity range is already accounted
entirely optional. Traders can set an interest for in the scheme as it is collateralised upfront
rate tolerance that allows them to continuously and paid in liquidity range units. If all sup-
exit their position without slippage while the plied and borrowed liquidity ranges and interest
interest rate is above their indicated threshold, paid are known, then all positions (the avail-
and replenishes the position notional when it is able liquidity in each bucket of the float pool,
below. For example, if a borrower doesn't want and the remaining notional for each fixed loan)
to pay more than 10% APR on their loan, they are known for all future time points.
can select 10% as the threshold interest rate
tolerance. The loan will automatically unwind
exponentially when the APR goes above 10% 6 Revolving loan
and will grow its notional back to the original
level when the APR goes below 10%. The second loan type, called a revolving loan, is
used for higher levels of leverage (40-2000x+).
It is more expensive for borrowers as it offers
5 Fixed term loan them more optionality.
The revolving loan matures according to the
There are two loan types in InfinityPools. The same schedule as the fixed term loan. However,
first type, called a fixed term loan is used for unlike fixed term loans, a revolving loan can
lower levels of leverage (1-40x) and is cheaper be closed out anytime, in which case it effect-
for borrowers. ively matures immediately. By closing out the
The interest due over the lifetime of a fixed loan, the borrower returns the liquidity range
term loan needs to be paid upfront by the bor- to the pool (so that the liquidity ranges are
rower, and the protocol will disburse this sum available again to lend or provide liquidity),
to the liquidity range lenders according to the and no longer owes further interest payments.
maturity schedule. While the loan has a prede- Revolving loan's interest is not paid upfront,
termined duration, borrowers can take profit on instead borrowers can post collateral increment-
their trade at any point by swapping the bor- ally to cover future interest payments. In the
rowed assets back to their original token (eg. case the borrower closes out their loan, they will
swapping ETH back to USDC in the example get back any unspent collateral. For example,
above). if a borrower posts enough collateral for a 1
Supposing that the pool price follows a geo- hour loan, but closes out their position after
metric Brownian motion with no drift (ie. which 30 minutes, they will get back 50% of their
is a martingale), then the fair value interest collateral. This is what makes it possible to
rate on a fixed term loan can be computed as: achieve higher ratios of amount borrowed to
r capital provided (ie. higher leverage ratios).
1 2 In other words, the high levels of leverage
where q = +
2qm
1
q¡ 2
¡1 4 generated by revolving loans come from the
multiplication of two factors. The first factor
per day (times 100 in percentage terms). Here comes from using the typical leverage mech-
m is the `absolute' moneyness (the dis- anism explained above (which gives you 1-40x
tance between the pool price and the leverage). The second factor comes from the
strike price), which is the maximum of ability to pay interest incrementally. Using the
k / p and p/k, where p is the pool price exponential maturity function we can determine
and k is the strike price, what fraction of the interest is due over a given
time period. For example, the interest due for
is the daily variance of the price, ie. 15 minutes of the loan is 1/139 of the total due.
quadratic variation of the logarithm of If you then multiply the first factor (eg. 15x
price over one day, leverage) by the second factor (139), you get
and = ln(2) as previously. 2000x leverage over the course of 15 minutes.
Optimal pricing 7
As a point of reference, Aave flash loans to providing liquidity in the float pool, and con-
offer a leverage ratio of 1111x (corresponding sequently their capital can be withdrawn on
to a one time interest payment of 0.09%) but the same exponential schedule over which loans
they only last a single transaction (essentially mature.
for zero time).
Borrowers can pay the interest by depos-
iting one of the two pool tokens (or a mix of
both) and choosing a deadline from under 12 8 Optimal pricing
minutes to over 1 day. Beyond a 1 day deadline
most of the total interest is already required (as As the fair value interest rate (for each loan
the loan has a half-life of one day). So in that type) equals the return which liquidity pro-
case the user can provide the total interest and viders can expect to earn from the float pool,
their position will have no deadline. Borrowers there is no incentive for liquidity providers to
can either extend the deadline for their loan by lend below this rate, and therefore the fair value
depositing additional tokens, or the loan will is used as a rate floor for each strike.
be closed out automatically after the deadline In addition, the rate offered for each strike
is passed. responds to demand through a scaling factor
Supposing again that the pool price follows s(u) which is a function of the utilization ratio
a geometric Brownian motion with no drift, u for the given strike, ie. u is the proportion of
then the fair value interest rate on a revolving swappers (liquidity ranges borrowed together,
loan on a per day basis (times 100 in percentage aggregating to a single strike) currently loaned
terms) can be computed as: out vs. the total supply at that strike. There-
fore the rate offered for a given strike is the
scaling factor s(u) times the rate floor for that
¡ 1 q¡ 2
1 ¡ 1 ¡q ¡ 2
1
strike.
q+ 2
m ¡ q¡2 m ¡1
For a given strike, suppose there exists a
where q, m are defined as previously. market rate r, which is an interest rate for
For revolving loans, which liquidity ranges which there is high lending demand (greater
were used to constitute each loan needs to be than the total supply) at rates below r, and
recorded. Otherwise, in the case where the loan negligible demand at rates above. The max-
is closed out and liquidity ranges need to be imum interest which liquidity providers could
put back in the pool, the interest to be paid to earn is therefore r (assuming that r is above
each underlying bucket could not be known. the rate floor), which would occur with the full
supply lent out at rate r, therefore making the
utilization ratio equal to 1.
However the actual utilization ratio in this
7 Float pool scenario must be the u such that the rate offered
equals r. 1 ¡ u is the liquidity that is not lent
The liquidity which is offered on loan, either on out, and therefore LPs earn the rate floor, in
a fixed term or revolving basis, comes from a expectation. u is the liquidity that is lent out
conventional concentrated liquidity pool (sim- and it therefore earns the rate floor times s(u).
ilar to Uniswap v3). Conversely, when liquidity So that the effective interest rate earned by
is not on loan, it remains in the float pool and is liquidity providers is u s(u) + 1 ¡ u times the
then available for performing spot swaps. This rate floor.
underlying pool is referred to as the float pool, Therefore a scaling factor s(u) is needed
and is internal to the InfinityPools contract. such that the effective rate is as close as pos-
From the perspective of spot token swap- sible to the market rate r (so that liquidity
pers, the float pool functions identically to a providers get as close as possible to the max-
conventional liquidity pool. The float pool has imum theoretical yield r) and such that s(u)
the ability to achieve lower fee levels, while has reasonable growth as u increases (so that
simultaneously offering higher LP yield, than the effective rate is stable relative to changes
a standalone liquidity pool, due to the addi- in u).
2¡u
tional yield and volume coming from lending The scaling factor s(u) used is 2 ¡ 2u , which
liquidity. From the perspective of liquidity pro- has the property of having liquidity providers
viders, lending is a source of yield additional earn an effective rate at least 82% of the max-
8 Section 10
imum achievable rate (ie. r), irrespective of 10 Use cases
the value of r. How close the effective interest
rate gets to the maximum interest rate r, over 10.1 Multi-block arbitrage
a range of market rates r, is shown in the plot With revolving loans, arbitrageurs are able to
below (note the effective rate only gets closer borrow large amounts of assets for multiple
to the maximum rate for any higher values of blocks. This means they can execute arbitrages
r not shown). between DEXs with two legs separated in time
(as is typically the case in off-chain arbitraging
across exchanges), rather than being limited to
buying and selling simultaneously in a single
transaction with a flash loan.
Such leveraged market making across DEXs
outside the confines of a single block is also
advantageous as these trades are much harder
for miners to steal for themselves (significantly
reduces MEV). Here is an example breakdown:
¡ Take out loan of ETH, for a strike close
to the market price
¡ Swap ETH for USDC on DEX A
Figure 5. Closeness of effective interest rate to ¡ Later: Swap USDC for ETH of DEX B
optimality
(can even have DEX A = DEX B at a
better price than in previous step)
¡ Return the loan
9 Lender compensation
10.2 More powerful flash loans
Liquidity providers have two sources of yield, A swapper's functionality is available as a flash
from the float pool, and from interest on lending operation, meaning the borrower can spend
of their liquidity ranges. These sources of yield reserves backing the swapper in any way on-
are complementary as the float pool generates chain, as long as reserves are made whole again
yield using only liquidity ranges through which by the end of the transaction (otherwise the
the pool price is passing, while the liquidity transaction is rolled back).
ranges lent out can (and typically will be) for This is more powerful than both a flash loan
ranges some distance from the current price. and a flash swap, because the reserve tokens
This enables generating higher yield than a typ- returned can be any mixture of the pool's two
ical liquidity pool, as the float pool captures tokens, so long as they are interchanged in the
the same source of yield as a liquidity pool, proportion given by the strike price.
and interest on lending of liquidity ranges is
additional to this. 10.3 Everlasting structured
Liquidity providers are therefore no longer products
required to hold both assets in a pool to earn Liquidity providers on InfinityPools can struc-
yield. In fact, InfinityPools liquidity providers ture their liquidity ranges in such a way that
can even choose to systematically move their they match the payoffs of more traditional
range away from the current price, aiming to structured products such as covered calls or
only hold their preferred asset at all times. This cash secured puts. The advantages of providing
continues to generate yield, and is similar to capital to an InfinityPools structured product
issuing a covered call or put option, with the rather than one constructed via options are:
added benefit of not suffering from the liquidity
¡ They are available for all assets,
fragmentation across expiry dates of the options
including those with no existing per-
market.
petual futures markets.
Liquidity providers are able to withdraw
their assets from a given pool according to ¡ There is no spread fee paid to market
exponential maturity (50% in 24h, 75% in 48h, makers for rolling over positions.
etc.). However, by borrowing the range that ¡ Permissionless and flexible payoff struc-
they minted they can zero out their exposure tures with the option to withdraw capital
instantaneously. at any time.