Back to Projects
ABK

AMM DEX (Uniswap V2+)

Uniswap V2 implementation with extensions: TWAP oracle, configurable swap fees, flash loans and slippage protection.

Overview

A production-grade Uniswap V2-style Automated Market Maker with extensions including TWAP oracle for manipulation-resistant pricing, adjustable swap fees, flash loan support and comprehensive sandwich attack protection.

Key Features

Constant product AMM (x × y = k)
TWAP oracle for external price feeds
Configurable swap fees (max 1%)
Flash loan functionality
Multi-hop swap routing
Slippage and deadline protection

Architecture

AMMPair.sol - Core AMM with LP tokens + TWAP

AMMFactory.sol - CREATE2 pair deployment

AMMRouter.sol - User-facing swap interface

AMMLibrary.sol - Math helpers and quote functions

System Architecture

Loading diagram...

Tech Stack

SolidityFoundryCREATE2TWAPFlash LoansArbitrum

Testnet Deployments