You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,9 @@ The EulerSwap contract tracks what it believes the reserves to be by caching the
51
51
52
52
### **1. Core contracts**
53
53
54
-
#### **Maglev contract**
54
+
#### **EulerSwap contract**
55
55
56
-
The `Maglev` contract is the core of EulerSwap and is responsible for:
56
+
The `EulerSwap` contract is the core of EulerSwap and is responsible for:
57
57
58
58
- Managing liquidity reserves.
59
59
- Executing token swaps based on the EulerSwap curve.
@@ -76,20 +76,20 @@ The `Maglev` contract is the core of EulerSwap and is responsible for:
76
76
77
77
### **2. Periphery contracts**
78
78
79
-
#### **MaglevPeriphery contract**
79
+
#### **EulerSwapPeriphery contract**
80
80
81
-
The `MaglevPeriphery` contract extends the functionality of the core Maglev contract by providing:
81
+
The `EulerSwapPeriphery` contract extends the functionality of the core EulerSwap contract by providing:
82
82
83
83
-**Swap price quotations** before execution.
84
84
-**Liquidity checks** to ensure solvency before transactions.
85
85
-**Binary search mechanisms** for dynamic price calculation.
86
86
87
87
##### **Key functions**
88
88
89
-
-`quoteExactInput(address maglev, address tokenIn, address tokenOut, uint256 amountIn)`: Estimates the output amount for a given input.
90
-
-`quoteExactOutput(address maglev, address tokenIn, address tokenOut, uint256 amountOut)`: Estimates the required input amount to receive a specified output.
91
-
-`computeQuote(IMaglev maglev, address tokenIn, address tokenOut, uint256 amount, bool exactIn)`: A high-level function to compute swaps while enforcing fee multipliers.
92
-
-`binarySearch(IMaglev maglev, uint112 reserve0, uint112 reserve1, uint256 amount, bool exactIn, bool asset0IsInput)`: Uses binary search to determine an optimal swap amount along the curve.
89
+
-`quoteExactInput(address eulerSwap, address tokenIn, address tokenOut, uint256 amountIn)`: Estimates the output amount for a given input.
90
+
-`quoteExactOutput(address eulerSwap, address tokenIn, address tokenOut, uint256 amountOut)`: Estimates the required input amount to receive a specified output.
91
+
-`computeQuote(IEulerSwap eulerSwap, address tokenIn, address tokenOut, uint256 amount, bool exactIn)`: A high-level function to compute swaps while enforcing fee multipliers.
92
+
-`binarySearch(IEulerSwap eulerSwap, uint112 reserve0, uint112 reserve1, uint256 amount, bool exactIn, bool asset0IsInput)`: Uses binary search to determine an optimal swap amount along the curve.
93
93
94
94
### **3. Vault integration**
95
95
@@ -110,8 +110,8 @@ EulerSwap integrates with **Ethereum Vault Connector (EVC)** to enable collatera
110
110
111
111
EulerSwap’s architecture is designed for **efficient, secure, and collateral-backed trading** with a custom **swapping curve**. The system leverages:
112
112
113
-
-**Maglev** as the core AMM contract.
114
-
-**MaglevPeriphery** for auxiliary quoting and validations.
113
+
-**EulerSwap** as the core AMM contract.
114
+
-**EulerSwapPeriphery** for auxiliary quoting and validations.
115
115
-**Ethereum Vault Connector (EVC)** for collateralized vault management.
116
116
-**Security-focused design** to prevent vulnerabilities in asset handling.
0 commit comments