Smart Contracts

Digiko DEX is powered by smart contracts deployed on KleverChain mainnet, enabling decentralized token swaps with automated market maker functionality.

DGKO/KLV DEX Swap Contract

The DEX implements an Automated Market Maker (AMM) using the constant product formula (x × y = k). Users can swap DGKO-CXVJ and KLV tokens directly on-chain with automatic pricing based on pool reserves.

Contract Address:

klv1qqqqqqqqqqqqqpgq2jqc28xwmk82mng4kwpm3j9vkq3vyga8xw9qq85y6h
Trading pair: DGKO-CXVJ / KLV
Initial pool: 100,000 DGKO + 20,000 KLV
Price: 1 DGKO = 0.2 KLV (5 DGKO per KLV)
Safety limit: Maximum 50% of pool reserves per swap

How to Use the DEX

Via Klever Explorer:

  1. 1. Go to kleverscan.org and connect your wallet
  2. 2. Navigate to Create Transaction → Smart Contract → Invoke
  3. 3. Enter contract address and select swap function
  4. 4. Add token to send (DGKO or KLV) with amount
  5. 5. Submit transaction and receive swapped tokens
💡 Available functions: swapDgkoToKlv and swapKlvToDgko

Contract Features

  • Swap Functions: Bi-directional DGKO ↔ KLV trading
  • Liquidity Management: Owner-controlled pool reserves
  • View Functions: Query reserves, calculate swap outputs, check prices
  • Event Logging: All swaps recorded on-chain for transparency

Security Features

  • Owner-only liquidity: Prevents unauthorized pool manipulation
  • 50% max swap: Protects against pool draining attacks
  • Input validation: Ensures all amounts are greater than zero
  • Token verification: Validates correct token IDs (DGKO-CXVJ and KLV)

Live on Mainnet

The DGKO/KLV swap contract is fully deployed and operational on KleverChain mainnet. All transactions are verified on-chain and can be viewed on Kleverscan explorer. The contract has been tested with real swaps and liquidity operations.