🍓Introduction to JAMM
What is JAMM DEX?
JAMM DEX is a decentralized exchange (DEX) based on the automated market maker (AMM) model, built specifically for the JuChain blockchain network. It uses the constant product formula (x * y = k) to maintain the balance of liquidity pools, providing users with permissionless token swapping services.
Core Features
Multi-Tier Fee System
JAMM DEX supports four different trading fee tiers:
0.5% (50 basis points)
1.0% (100 basis points)
2.0% (200 basis points)
3.0% (300 basis points)
Each trading pair can select an appropriate fee tier based on its characteristics, providing a flexible pricing mechanism for assets with different risk and liquidity profiles.
Referral Reward System
JAMM DEX has a built-in referral reward mechanism:
Users can set a referrer address.
When a referrer is present, the trading fee is split between the protocol and the referrer.
The referral system is executed automatically by smart contracts, ensuring transparency and fairness.
WJU Wrapped Token
To handle the native token of JuChain (JU) in the AMM system, JAMM DEX provides the WJU (Wrapped JU) contract:
Supports wrapping and unwrapping of the JU token.
Fully compatible with the ERC-20 standard.
Maintains a 1:1 exchange ratio with no additional fees.
EIP-2612 Permit Support
The LP tokens in JAMM DEX support the EIP-2612 permit function:
Users can grant token approvals with a signature, without needing to send a separate
approvetransaction.This reduces the number of transaction steps, improves user experience, and lowers gas costs.
Technical Architecture
JAMM DEX features a modular design, primarily composed of the following core contracts:
JAMMFactory: Responsible for creating and managing trading pairs.
JAMMPair: Implements the logic for specific liquidity pools.
JAMMRouter: Provides a user-friendly interface for trading.
JAMMERC20: The implementation of LP tokens, supporting the
permitfunction.WJU: The wrapper contract for the native JU token.
Security
JAMM DEX incorporates multiple security measures:
Re-entrancy Guard: Critical functions are protected with a
lockmodifier.Mathematical Safety: Utilizes Solidity version ^0.8.21 for built-in overflow/underflow checks and a custom
Mathlibrary for safe square root calculations.Deterministic Deployment: Uses CREATE2 for predictable address generation.
Compatibility
Solidity Version: ^0.8.21
EVM Compatibility: Fully compatible with the Ethereum Virtual Machine.
Token Standards: Supports standard ERC-20 tokens.
Special Tokens: Supports fee-on-transfer tokens through specific functions in the router.
Getting Started
To start using JAMM DEX, you can:
Review the System Architecture to understand the technical details.
Read the Getting Started guide to make your first trade.
Refer to the Developer Guides for integration development.
Contract Addresses
Mainnet Contract Addresses:
JAMMFactory:
0x6b5d54E6F73e96Ca960DBA71D778b98221939aa6JAMMRouter:
0x3F26fb54C28Eab026e908A9A9357a456F3c8Dc87WJU:
0x4d1B49B424afd7075d3c063adDf97D5575E1c7E2USDT:
0xc8e19C19479a866142B42fB390F2ea1Ff082E0D2ETH:
0x80077F108Dd73B709C43A1a13F0EEF25e48f7D0eBNB:
0x151b6F646Ac02Ed9877884ed9637A84f2FD8FaA6
Testnet Contract Addresses:
JAMMFactory:
0xbddd716a9d6325700d1c29562c819987e5b1f6a8JAMMRouter:
0x3f8b0038023393009712D0051D192a8825dd02B9WJU:
0xb8cdb16bc2b64d42638e285a691973ff10078d8e
Related Links
Official Website:
https://jamm.funBlockchain Explorer:
https://explorer.juscan.io