Skip to content

Commit 4eabe47

Browse files
update architecture doc
1 parent 06b55c3 commit 4eabe47

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/architecture.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ The EulerSwap contract tracks what it believes the reserves to be by caching the
5151

5252
### **1. Core contracts**
5353

54-
#### **Maglev contract**
54+
#### **EulerSwap contract**
5555

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:
5757

5858
- Managing liquidity reserves.
5959
- Executing token swaps based on the EulerSwap curve.
@@ -76,20 +76,20 @@ The `Maglev` contract is the core of EulerSwap and is responsible for:
7676

7777
### **2. Periphery contracts**
7878

79-
#### **MaglevPeriphery contract**
79+
#### **EulerSwapPeriphery contract**
8080

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:
8282

8383
- **Swap price quotations** before execution.
8484
- **Liquidity checks** to ensure solvency before transactions.
8585
- **Binary search mechanisms** for dynamic price calculation.
8686

8787
##### **Key functions**
8888

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.
9393

9494
### **3. Vault integration**
9595

@@ -110,8 +110,8 @@ EulerSwap integrates with **Ethereum Vault Connector (EVC)** to enable collatera
110110

111111
EulerSwap’s architecture is designed for **efficient, secure, and collateral-backed trading** with a custom **swapping curve**. The system leverages:
112112

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.
115115
- **Ethereum Vault Connector (EVC)** for collateralized vault management.
116116
- **Security-focused design** to prevent vulnerabilities in asset handling.
117117

0 commit comments

Comments
 (0)