Skip to content

Commit 1135971

Browse files
committed
sync readme content with white paper
1 parent 7bcb6a1 commit 1135971

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
16.9 KB
Binary file not shown.

docs/white-paper/main.tex

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ \section{Introduction}
5757

5858
For end-users, EulerSwap functions like a typical Uniswap-style interface. However, behind the scenes, it incorporates advanced mechanisms such as dynamic borrowing and repaying, customisable pricing curves, and shared liquidity provisioning. The primary target audience for liquidity providers includes professional market makers, token issuers, and DAOs, while swappers include leverage traders on Euler, aggregators, intent solvers, and MEV bots.
5959

60+
\section{Swap accounts}
61+
62+
EulerSwap differs from traditional AMMs in that it does not use shared liquidity pools. Instead, each EulerSwap instance -- known as a `swap account' -- manages liquidity on behalf of a single user or entity. This design provides customisable risk parameters and full control over leveraged positions, making it ideal for professional market makers, DAOs, and algorithmic traders. While future iterations may explore shared liquidity models, the current system prioritises capital efficiency and risk isolation per account.
63+
6064
\section{Example}
6165

6266
Suppose that Euler allows borrowing of USDT with USDC as collateral at a loan-to-value (LTV) ratio of 0.95, and vice versa. This means that for every \$1 of USDC or USDT collateral, a user can borrow up to \$0.95 of the other asset.
@@ -99,6 +103,26 @@ \section{Example}
99103
\label{fig:EulerSwap_liquidity}
100104
\end{figure}
101105

106+
\section{Virtual reserves and debt limits}
107+
108+
EulerSwap AMMs utilise virtual reserves to simulate larger liquidity pools, effectively increasing the depth of trades that can be serviced. Virtual reserves allow swaps beyond the actual reserves --- the initial collateral deposited by the swap account holder --- by permitting borrowed liquidity, where EulerSwap dynamically loans the out token using the in token as collateral.
109+
110+
Each swap account can configure independent virtual reserve levels. These reserves define the maximum debt exposure an AMM will take on. For instance, if a user deposits \$1,000 in collateral and sets virtual reserves at \$5,000 per vault, the AMM effectively supports up to \$10,000 in combined swap depth, with a loan-to-value (LTV) ratio of 83.3\%.
111+
112+
Note that the effective LTV must always remain below the borrowing LTV of the lending vault to prevent liquidation. Additionally, different AMM curves influence whether the maximum virtual reserves are achievable.
113+
114+
\subsection{Reserve desynchronisation}
115+
116+
Unlike traditional AMMs, EulerSwap does not hold user funds directly. Instead, it operates as an EVC operator, meaning that all liquidity remains in the wallet of the account holder. This design provides enhanced security and flexibility but introduces the possibility of reserve desynchronisation. Causes of reserve desynchronisation:
117+
118+
\begin{itemize}
119+
\item \textbf{Interest Accrual:} Over time, collateral deposits earn interest while borrowed tokens accumulate interest costs.
120+
\item \textbf{External Fund Movements:} A user may manually withdraw funds from a vault, causing EulerSwap’s internal calculations to diverge from actual reserves.
121+
\item \textbf{Liquidation Events:} If an AMM’s loan-to-value (LTV) ratio exceeds the vault’s risk threshold, automatic liquidation may adjust balances unexpectedly.
122+
\end{itemize}
123+
124+
Users must periodically invoke \texttt{syncVirtualReserves()} to update EulerSwap’s internal state. This function recalculates actual balances and debts relative to the vault and adjusts the virtual reserves accordingly.
125+
102126
\section{Curve}
103127

104128
The space of possible reserves in a EulerSwap AMM is determined by how much debt a swap account is allowed to hold. The EulerSwap curve passes through an equilibrium point $(x_0, y_0)$, at which the marginal price is defined by:

0 commit comments

Comments
 (0)