InkoDEX is a decentralized exchange (DEX) built on Inkochain, enabling trustless token swaps, liquidity provision, and on-chain price discovery.
This repository focuses on the core smart contracts and architecture required to launch a DEX on the Inkochain ecosystem.
- 🔄 Token swaps (AMM-based)
- 💧 Liquidity pools
- 🧮 Automated price calculation
- 🏦 Liquidity provider (LP) tokens
- 🔐 Fully non-custodial
- ⚡ Optimized for Inkochain performance
├── contracts/ │ ├── Factory.sol # Creates and manages pools │ ├── Pair.sol # Liquidity pool logic │ ├── Router.sol # User-facing swap & liquidity API │ └── Libraries/ │ └── Math.sol │ └── Pricing.sol │ ├── scripts/ │ └── deploy.ts │ ├── test/ │ └── dex.test.ts │ └── README.md
- Factory deploys new liquidity pools
- Pairs hold token reserves and enforce AMM rules
- Router simplifies interaction (swap, add/remove liquidity)
- LP tokens represent user share in pools
Classic constant-product formula:
Where:
xandyare token reserveskremains constant after swaps (excluding fees)
- Solidity / Ink! (depending on Inkochain VM)
- Hardhat / Foundry
- TypeScript
- Inkochain SDK
git clone https://github.com/yourname/inkodex
cd inkodex
npm install
npm run test
npm run deploy --network inkochain
🔐 Security
⚠️ This project is experimental.
Do NOT use in production without:
Full audit
Extensive testing
Economic attack simulations
🗺️ Roadmap
Basic AMM pools
Fee distribution
Frontend interface
Governance module
Cross-chain liquidity
🤝 Contributing
PRs and discussions are welcome.
Open an issue to propose improvements or new features.
📜 License
MIT License
---
# 💡 Moje pomysły na kolejne repozytoria (ekosystem DEX na Inkochain)
### 1️⃣ `inkodex-core`
**Smart contracty**
- Factory / Pair / Router
- Fee logic
- LP token standard
> Najważniejsze, najbardziej „audytowane” repo
---
### 2️⃣ `inkodex-frontend`
**Frontend DEX-a**
- React / Next.js
- Wallet connect (Inko wallet)
- Swap UI, liquidity, stats
Bonus:
- Dark mode 🌑
- Slippage protection
- Price impact preview
---
### 3️⃣ `inkodex-subgraph`
**Indexowanie danych**
- Pool volumes
- TVL
- Historical prices
- LP rewards
Idealne pod analytics i dashboardy.
---
### 4️⃣ `inkodex-governance`
**DAO & governance**
- Token governance
- Proposal system
- Fee voting
- Pool whitelisting
---
### 5️⃣ `inkodex-launchpad`
**Token launch + liquidity**
- Fair launch
- Auto LP locking
- Anti-bot rules
---
### 6️⃣ `inkodex-bridge-hooks`
**Cross-chain integracja**
- Hooki pod mosty
- External liquidity sources
- Price oracle sync
---
### 7️⃣ `inkodex-docs`
**Dokumentacja**
- Whitepaper
- Dev docs
- AMM math
- Security assumptions
Mega ważne, a często olewane 😉
---
Jeśli chcesz, w kolejnym kroku mogę:
- 🔧 **dopasować README pod konkretny VM (EVM / Ink!)**
- 🧠 **wymyślić tokenomics dla DEX-a**
- 🧪 **rozpisać test cases**
- 🎨 **zaprojektować UX flow DEX-a**
Daj znać, w którą stronę idziemy 🚀