What is KongSwap?
KongSwap is the one stop token shop. Allowing users to trade across all chains with ease.
TL;DR
KongSwap is a decentralized exchange (DEX) offering seamless, bridgeless cross-chain trading across multiple blockchains like Bitcoin, Ethereum, and Solana. It addresses common DeFi issues such as high fees, liquidity fragmentation, and complex user experiences by utilizing Chain Fusion technology and stable memory within the Internet Computer Protocol. This enables direct, efficient interactions without relying on external bridges. The platform is fully decentralized, operating entirely on-chain, with both frontend and backend hosted within smart contracts. Developed by a team with strong backgrounds in blockchain and finance, KongSwap aims to provide a robust and user-friendly DeFi experience.
Why do we need another DEX?
Despite the large number of decentralized exchanges (DEXs) in crypto, there is a need for a DEX that will address key DeFi challenges such as liquidity fragmentation, high gas fees, scalability limitations, and complex user experiences. Existing DEXs often operate within isolated blockchain ecosystems, requiring users to navigate multiple platforms and deal with interoperability issues when trading across different chains. This fragmentation not only increases transaction costs and time but also exposes users to additional risks associated with external bridges and wrapped tokens.
KongSwapemerges as a platform that addresses these shortcomings by offering seamless, bridgeless cross-chain interoperability, enabling users to trade native assets across multiple blockchains from a single, user-friendly platform. By leveraging advanced technologies like stable memory and operating entirely on-chain through the Internet Computer Protocol, KongSwapreduces transaction costs, enhances scalability, and simplifies DeFi interactions, making DeFi more accessible and efficient for a broader audience across multiple blockchain ecosystems.
How Does Multichain Work on KongSwap?
KongSwap utilizes Chain Fusion technology to achieve true cross-chain interoperability without relying on external bridges or intermediaries. By building on the capabilities of the Internet Computer Protocolās Chain Fusion, KongSwap can natively integrate with multiple blockchain networks at the protocol level. This integration allows for direct communication and transactions between different blockchains, enabling users to seamlessly trade, lend, and borrow assets across various ecosystems in a secure and efficient manner. The initial integrations will include firstly native bitcoin, afterwards Ethereum and Solana thereafter.
Chain Fusion technology enables us the aggregation of liquidity from multiple chains, reducing fragmentation and improving trading efficiency. It also supports the execution of complex smart contracts and the storage of large datasets on-chain, enhancing the platformās ability to offer advanced DeFi services. Through Chain Fusion, KongSwap delivers a robust, scalable, and user-centric platform that transcends the limitations of traditional DEXs, providing unparalleled access and functionality in the decentralized finance landscape.
Architecture of KongSwap
KongSwap is an innovative DEX built on the Internet Computer Protocol, utilizing stable memory within the canister smart contracts to manage all state and operations. The architecture is designed for efficiency, scalability, and cross-chain interoperability, leveraging advanced cryptographic techniques and the unique capabilities of the ICP.
Key Components
Kong Frontend Canister (kong_frontend)
This canister hosts the user interface of KongSwap, developed with React and JavaScript. It handles all user interactions, including initiating trades, adding or removing liquidity, staking in pools, and viewing transaction histories. The frontend canister communicates with the backend canister to execute these operations securely.
Kong Backend Canister (kong_backend)
The backend canister is the core component of KongSwap, written in Rust. It manages the stable memory and business logic required to operate the liquidity pools, process trades, manage staking, and maintain the state of user accounts and tokens. This canister is responsible for the following key operations:
- Wallet Login Management: Tracking login and transaction history, and managing referral systems per connected wallet.
- Liquidity Operations: Managing liquidity pools, including adding and removing liquidity, calculating pool balances, and updating pool states after transactions.
- Token Swaps: Executing token swaps by calculating the exchange rates, processing transfers, and updating pool balances accordingly.
- Staking and Rewards Management: Managing staking pools where users can stake their LP tokens to earn additional rewards. The distribution of rewards to different pools is governed by the community through DAO voting.
- Claims Management: Tracking IOUs for users due to failed transactions or airdrops, allowing users to claim their tokens later.
Liquidity Pools
The liquidity pools are the backbone of the KongSwap DEX. Each liquidity pool is represented within the backend canister as a StablePool structure, which tracks the token pairs, pool balances, fees, and transaction history. Users provide liquidity by depositing token pairs, receiving LP tokens in return.
Staking Pools
The staking pools allow users to stake their LP tokens to earn additional rewards, which are distributed based on DAO governance. The more LP tokens a user stakes and the longer they are staked, the higher the potential rewards. The staking pools are managed within the backend canister, which tracks the staking activity and ensures rewards are distributed according to community decisions.
Component Features
DEX in Stable Memory
Stable Memory Utilization ā The core of KongSwapās architecture revolves around stable memory, a feature of the ICP that allows for large-scale, persistent data storage directly within canister smart contracts. All the state related to liquidity pools, swaps, and liquidity management is maintained in stable memory, ensuring that the DEX can handle vast amounts of data without the need for constant snapshots or upgrades.
State Management ā The DEX operates by managing all liquidity pool states in stable memory. This includes tracking individual liquidity positions, swap transactions, and adding or removing liquidity. The stable memory enables the platform to store detailed historical data on trades, liquidity changes, and price movements directly within the canister, facilitating complex operations and analysis without relying on external databases or oracles.
Single Canister Architecture
Single Canister DEX ā KongSwap backend operates within a single canister smart contract, which handles the entire state of the DEX, including all liquidity pools and user transactions. This unified approach simplifies the architecture, reduces the overhead of managing multiple contracts, and ensures that all operations are tightly integrated and consistent.
Liquidity Pools as Positions ā Unlike traditional DEXes where liquidity pools are represented by tokens (e.g., LP tokens), in KongSwap, liquidity pools are managed as positions directly within stable memory. Each position is a data structure stored in stable memory, tracking the amount of liquidity provided, the corresponding share of the pool, and other relevant metadata. This approach reduces complexity and enhances the efficiency of the system.
Multichain Pools with Advanced Cryptography
Threshold ECDSA and Schnorr Signatures ā KongSwap utilizes threshold ECDSA and Schnorr signatures to create and manage multichain pools. These cryptographic techniques enable the DEX to sign transactions across multiple blockchains securely and efficiently, facilitating cross-chain swaps and liquidity management without requiring traditional bridging mechanisms.
Cross-Chain Interoperability ā The use of threshold cryptography allows KongSwap to support native assets from various blockchains (e.g., Bitcoin, Ethereum) within the same liquidity pools. This interoperability is key to KongSwapās vision of a seamless, bridgeless DeFi experience where users can interact with assets across different chains without worrying about the underlying technology.
Fully On-Chain Backend and Frontend
On-Chain Backend ā The backend of KongSwap, responsible for processing transactions, managing liquidity, and executing swaps, runs entirely within the canister smart contract. This design ensures that all core functionalities are decentralized, resilient, and fully transparent.
On-Chain Frontend ā In addition to the backend, the frontend of KongSwap is also hosted on-chain within the canister. This includes the user interface code, which users interact with through their wallets. By keeping the frontend on-chain, KongSwap eliminates the dependency on centralized servers for UI delivery, ensuring that the platform remains accessible and functional even in the face of external disruptions.
Direct Wallet Integration
Direct Connection to Kong Canister ā User wallets connect directly to the Kong canister smart contract, enabling seamless interaction with the DEX. This direct connection ensures that all transactions, from swapping tokens to managing liquidity positions, occur on-chain without the need for intermediaries.
On-Chain Operations ā All interactions, including those initiated by wallets, are processed entirely within the canister, ensuring that both the backend logic and the user interface are fully decentralized and on-chain. This architecture provides a high level of security and transparency, as all actions are recorded and verifiable on the blockchain.
Whoās Building KongSwap?
KongSwap is developed by experienced developers with expertise in blockchain development, traditional finance, and ecosystem development. The teamās combined experience includes roles and successful projects within major organizations such as Sygnum Bank, UBS, Deutsche Bank, DFINITY, and others. Our diverse backgrounds in building on blockchains like Ethereum and the Internet Computer Protocol, including projects like Helix Markets, equip us with the knowledge and skills necessary to drive innovation and deliver a cutting-edge DeFi platform.
Learn more
App: https://www.kongswap.io/
Whitepaper: documentation/kong_whitepaper.md at main Ā· KongSwap/documentation Ā· GitHub
Source Code:https: //github.com/KongSwap/kong
Code Audit: documentation/sig9_kongswap_audit_report.pdf at main Ā· KongSwap/documentation Ā· GitHub
SNS settings: documentation/sns_init_kong.yaml at main Ā· KongSwap/documentation Ā· GitHub
Socials
X: x.com
Telegram: Telegram: Contact @kong_swap
Open Chat: OpenChat