


Debank
Everything you need to learn for the Debank contest: 28 comprehensive code tours totaling over 325 steps, formulas presented in LaTeX, and a detailed glossary.
Click here to watch video preview
Sherlock, 03 Jul - Jul 10 2025
Everything you need to learn for the Debank contest: 28 comprehensive code tours totaling over 325 steps, formulas presented in LaTeX, and a detailed glossary.
Click here to watch video preview
Sherlock, 03 Jul - Jul 10 2025
Everything you need to learn for the Debank contest: 28 comprehensive code tours totaling over 325 steps, formulas presented in LaTeX, and a detailed glossary.
Click here to watch video preview
Sherlock, 03 Jul - Jul 10 2025
Code Tours
1.1 General Overview
2.1 misc: Overview
2.2 Admin.sol: Multi-Admin Security
2.3 UniversalERC20.sol: Unified Token Handling
2.4 SignedDecimalMath.sol: Fixed-Point Arithmetic
2.5 Utils.sol: Swap Data Structures
2.6 UniswapV2Lib.sol: Uniswap V2 Integration
2.7 UniswapV3Lib.sol: Uniswap V3 Integration
3.1 Executor Adapters: Overview
3.2 Adapter1: Dispatch Logic
3.3 UniswapV2 Executor: Pair-Level Swap
3.4 UniswapV3 Executor: Single-Hop via Universal Router
3.5 UniswapV3Fork Executor: Legacy Router Compatibility
3.6 UniswapV4 Executor: Multi-Action Packet Routing
3.7 AlgebraV3 Executor: Single-Hop on Algebra Pools
3.8 CurveV1 Executor: StableSwap Exchanges
3.9 CurveV2 Executor: Extended Stable/Zap Support
3.10 BalancerV1 Executor: V1 Weighted Pool Swap
3.11 BalancerV2 Executor: SingleSwap via Vault V2
3.12 MakerPSM Executor: Pegged-Asset Mint/Redeem
3.13 Velodrome Executor: Forked-V3 Swap
3.14 WETH Executor: ETH↔WETH Conversion
4.1 Executor: Swap Execution Engine
5.1 Router.sol: Swap Flow and Fee Management
6.1 DexSwap Adapters: Tour Goals
7.1 DexSwap: Overview
7.2 DexSwap: Custom Errors
7.3 DexSwap and Spender: The Swap Execution Flow