https://github.com/TacitusXI/zkSync-AMM-contract
ZK-rollups use ZKPs by combining a large number of Layer 2 transactions (off-chain) into one transaction that then gets mined on the Ethereum mainnet. Instead of mining 100s of transactions individually, they can be rolled up into a single transaction.
https://github.com/TacitusXI/zkSync-AMM-contract
amm blockchain constant-product dapp defi dex ethereum layer2 layer2-dapp rollup smart-contracts solidity unis zk-snarks zksync
Last synced: 11 months ago
JSON representation
ZK-rollups use ZKPs by combining a large number of Layer 2 transactions (off-chain) into one transaction that then gets mined on the Ethereum mainnet. Instead of mining 100s of transactions individually, they can be rolled up into a single transaction.
- Host: GitHub
- URL: https://github.com/TacitusXI/zkSync-AMM-contract
- Owner: TacitusXI
- Created: 2022-09-04T16:45:42.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-02-10T13:15:51.000Z (over 1 year ago)
- Last Synced: 2025-04-08T16:30:48.035Z (about 1 year ago)
- Topics: amm, blockchain, constant-product, dapp, defi, dex, ethereum, layer2, layer2-dapp, rollup, smart-contracts, solidity, unis, zk-snarks, zksync
- Language: Solidity
- Homepage:
- Size: 133 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ποΈ Constant Product Automated Market Maker (AMM) Contract build on zkSync ZK rollup layer2 solution ποΈ
> There are 3 contracts: token0.sol and token1.sol are erc20 tokens and CPAMM is AMM contract to swap these two tokens. Instructions how to deploy and verify contracts on zkSync explorer below
## π Table of Contents
* [General Info](#-general-information)
* [Technologies Used](#-technologies-used)
* [Features](#-features)
* [Requirements For Initial Setup](#-requirements-for-initial-setup)
* [Setup](#-setup)
## π© General Information
- Contract allows users to set and get greeting message on zkSync network
## π» Technologies Used
- zksync-web3 library
- layer2 zk rollup
## π Features
ZK-Rollup has absolute dominance in user experience, which can be concretely expressed as a :
- high level of security,
- fast
- economic transactions.
## π Requirements For Initial Setup
- Install [yarn](https://classic.yarnpkg.com/lang/en/docs/install)
- Install [Docker](https://www.docker.com/products/docker-desktop/)
## π Setup
### 1. πΎ Clone/Download the Repository
### 2. π¦ Install Dependencies:
```
$ cd repository_file
$ yarn
```
### 3. π .env environment variables required to set up
Create .env file inside project folder
- You can get your private key from your wallet(β οΈDon't share your private key with untrusted parties)
```
PRIVATE_KEY =
```
### 4. π Run Compile
```
$ yarn hardhat compile
```
### 5. π Deploy to zkSync ( β οΈ Make sure to have ETH on your wallet in GOERLI testnet β οΈ)
```
$ yarn hardhat deploy-zksync
```
### 7. π Verify contracts
- π Go to [zkScan](https://zksync2-testnet.zkscan.io/#) explorer and find your deployed contract.
- βοΈ Go to "Π‘ode" tab and click "Verify & Publish":

- π€ Choose how you want to verify: Via flattened source code || Via Standard Input JSON.
- β
Enter the required data and you have successfully verified your contract.