DeFiSeptember 14, 2026by
EmpoorioChain Core
EmpoorioChain Core

The Native DEX: pallet-dex, Per-Pool Treasuries and the Day the First Swap Settled

An automated market maker on Ethereum is a contract; on EmpoorioChain it is pallet-dex (runtime index 44). This post explains how it works, and tells the story of why it did not — for months — despite compiling, passing tests and being listed as done.

Pools and swaps

pallet-dex holds liquidity pools between native assets — DMS and any pallet-emp-assets asset such as DUSD — with constant-product pricing. Liquidity providers deposit both sides and receive pool shares; traders call dex.swap with an input asset, an output asset, an amount and a minimum acceptable output. The measured testnet fee for a swap is 0.000180 DMS.

Because the pool is runtime state, every wallet and indexer reads reserves and prices from metadata without an ABI, and the fee split (80 % burned, 20 % treasury) applies to swap fees as it does to everything else.

The treasury that did not exist

Each pool has a treasury account that collects its fee share. In Substrate an account exists only once it holds at least the existential deposit. The DEX treasury account (emp/dext) had never received anything — so it did not exist — so every swap's attempt to pay fees into it failed, so no swap had ever settled on the live chain. The pallet was wired; tests with mock state passed; the explorer showed no swaps and nobody asked why.

On 14 September 2026, in runtime 220, the treasury was reorganised per pool, one DMS was sent from sudo to create the account, and the first real swap settled on the public testnet. The rule the ecosystem drew from it: nothing is free — a feature that has never executed a real transaction on the live chain is not done, whatever the tests say.

MEV protection

pallet-mev-protection (index 86) offers commit–reveal ordering: a trader commits a hash of the swap, the block author includes commitments in order, and reveals execute in that order — so a front-runner cannot see the trade before it is sequenced. It also provides private order flow and fair queues at the protocol level, the native counterpart to Ethereum's out-of-protocol relay market. Events are TxCommitted and TxRevealed (the explorer's indexer was listening for names that did not exist and is being corrected).

Intents

pallet-intents lets a user express what they want — sell X for at least Y of Z — and lets solvers compete to fill it. The hackathon plan lists a limit-order system on intents as a track example.

What proprietary means here

On Ethereum, "proprietary AMM" describes a private market maker running its own pricing off chain and settling on it. EmpoorioChain's DEX is the opposite: one public pallet, one pricing function, fees enforced by the runtime. Market makers can still quote through intents; they cannot own the venue.

Status

  • Pools on the testnet: DMS/testUSDC, DMS/testWETH, with test assets.
  • Swaps settled on the live chain: one as of 14 September, then Eoonia's verified swap flow.
  • Audit: the DeFi audit the mainnet gate requires (DEX, lending, vaults) is not commissioned; the AMM invariant has no formal proof yet.
  • Liquidity allocation for mainnet: 100 M DMS, multisig not yet constituted.

Based on PALLET_REFERENCE.md, EIP_COVERAGE.md, the runtime 220 notes, FEE_MODEL_AND_LOW_COST_STRATEGY.md and MAINNET_GATE.md.

Share this article