Skip to content

Commit 503245f

Browse files
committed
updated audit note
1 parent 36732d1 commit 503245f

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

docs/audits/EulerSwapHook_Audit_Scope.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
Through a new partnership between Euler Labs and Uniswap Foundation, the teams intend to expose EulerSwap's core logic and mechanisms via a Uniswap v4 Hook interface.
44

5-
This is primarily done by inheriting `EulerSwap.sol:EulerSwap`, i.e. `EulerSwapHook is EulerSwap, BaseHook`, and implementing a "custom curve" via `beforeSwap`. The implementation will allow integrators, interfaces, and aggregators, to trade on EulerSwap as-if it is any other Uniswap v4 Pool
5+
This is primarily done by inheriting `UniswapHook.sol:UniswapHook`, i.e. `EulerSwap is UniswapHook, ...`, and implementing a "custom curve" via `beforeSwap`. The implementation will allow integrators, interfaces, and aggregators, to trade on EulerSwap as-if it is any other Uniswap v4 Pool
66

77
```solidity
88
// assuming the EulerSwapHook was instantiated via EulerSwapFactory
99
PoolKey memory poolKey = PoolKey({
1010
currency0: currency0,
1111
currency1: currency1,
1212
fee: fee,
13-
tickSpacing: 60,
13+
tickSpacing: 1,
1414
hooks: IHooks(address(eulerSwapHook))
1515
});
1616
@@ -20,23 +20,30 @@ minimalRouter.swap(poolKey, zeroForOne, amountIn, 0);
2020

2121
## Audit Scope
2222

23-
The scope of audit involves the code-diff introduced by [PR #48](https://github.com/euler-xyz/euler-swap/pull/48/files). **As of Apr 1st, 2025, the diff is subject to change but will be code-complete by the audit start time.**
24-
25-
Major Changes will include:
26-
27-
* Replacing `binarySearch` quoting algorithm with a closed-form formula
28-
* Implementing a protocol fee, as a percentage of LP fees, enacted by governance
29-
30-
As for the files in scope, only files from `src/` should be considered:
23+
The scope of audit involves a re-audit of EulerSwap, primarily `src/`:
3124

3225
```
3326
├── src
27+
│ ├── CtxLib.sol
28+
│ ├── CurveLib.sol
29+
│ ├── EulerSwap.sol
3430
│ ├── EulerSwapFactory.sol
35-
│ ├── EulerSwapHook.sol
36-
│ └── utils
37-
│ └── HookMiner.sol
31+
│ ├── EulerSwapPeriphery.sol
32+
│ ├── FundsLib.sol
33+
│ ├── MetaProxyDeployer.sol
34+
│ ├── QuoteLib.sol
35+
│ ├── UniswapHook.sol
3836
```
3937

38+
> The interfaces are out of scope
39+
40+
## Notable Changes since the prior audit:
41+
42+
* Introduction of Uniswap v4 Hook logic
43+
* Addition of a protocol fee
44+
* Refactoring EulerSwap instances to delegate call into an implementation contract
45+
* Replaced binary-search quoting, with a closed formula `fInverse()`
46+
4047
## Known Caveats
4148

4249
### Prepaid Inputs

0 commit comments

Comments
 (0)