Skip to content

d4rm5/superswap

 
 

Repository files navigation

Superchain Liquidity Pool

Introduction

Overview

The Superchain Liquidity Pool is a decentralized solution designed to centralize fragmented liquidity across multiple blockchain networks. It provides a seamless interface for token swaps, liquidity provision, and cross-chain interactions, leveraging the Superchain infrastructure for secure and efficient operations.

Demo Video:

Superchain Liquidity Pool Overview

Key Features

  1. Cross-Chain Interoperability: Integrates with Superchain bridges and messaging protocols to enable liquidity flow and swaps across chains.
  2. Efficient Liquidity Management: Centralizes liquidity to minimize fragmentation, reduce slippage, and enhance capital efficiency.
  3. Scalable Architecture: Designed to handle high transaction throughput across multiple Layer 2 networks.
  4. Developer-Friendly: Fully open-source, with clear interfaces for extending and integrating the pool into multi-chain applications.

How It Works

  1. Users can bridge tokens using the SuperchainTokenBridge to a target chain.
  2. Through the L2ToL2CrossDomainMessenger, approvals and interactions with the liquidity pool are managed across chains.
  3. The Inter contract ensures that liquidity operations (e.g., adding or removing liquidity) are executed securely on the target chain.
  4. Swaps and liquidity provision are executed on the SimpleLiquidityPool, ensuring the invariant and optimizing reserves.

Vision

Our goal is to simplify liquidity operations in a multi-chain ecosystem, reduce barriers to cross-chain DeFi, and foster a unified infrastructure for developers and users alike. By addressing the challenges of liquidity fragmentation, the Superchain Liquidity Pool builds a foundation for a more efficient decentralized financial system.

🚀 Getting Started

1. Install prerequisites: foundry

supersim requires anvil to be installed.

Follow this guide to install Foundry.

2. Clone and navigate to the repository:

git clone git@github.com:ethereum-optimism/superchainerc20-starter.git
cd superchainerc20-starter

3. Install project dependencies using pnpm:

pnpm i

4. Initialize .env files:

pnpm init:env

5. Start the development environment:

This command will:

  • Start the supersim local development environment
  • Deploy the smart contracts to the test networks
  • Launch the example frontend application
pnpm dev

🤝 Contributing

Contributions are encouraged, but please open an issue before making any major changes to ensure your changes will be accepted.

⚖️ License

Files are licensed under the MIT license.

License information

Languages

  • TypeScript 87.1%
  • Solidity 8.9%
  • JavaScript 1.6%
  • Shell 1.2%
  • Other 1.2%