DEX
A DEX is an exchange implemented as smart contracts, where trades settle on-chain from your own wallet instead of an internal exchange ledger.
/ quick answer
Decentralised exchanges match trades through automated market makers or on-chain order books. You keep custody, sign each trade and pay gas; listing is permissionless, so both new tokens and scams appear instantly. Aggregators route a trade across several DEXs to reduce price impact. Every DEX trade is public, which is why on-chain analytics work at all.
What is DEX?
Decentralised exchanges match trades through automated market makers or on-chain order books. You keep custody, sign each trade and pay gas; listing is permissionless, so both new tokens and scams appear instantly. Aggregators route a trade across several DEXs to reduce price impact. Every DEX trade is public, which is why on-chain analytics work at all.
What is an example of DEX?
Swapping a stablecoin for a token through an aggregator that splits the order across three pools to cut slippage.
Why does DEX matter for AI and automation?
A DEX is an exchange implemented as smart contracts, where trades settle on-chain from your own wallet instead of an internal exchange ledger. It connects to the workflows, prompts and tool stacks linked on this page, so you can move from definition to execution without leaving Onexial.
/ continue exploring
Related concepts
The vocabulary this page depends on.
- →DeFi
DeFi is financial infrastructure built as open smart contracts — lending, trading, staking and derivatives that anyone can use or compose.
- →Liquidity Pool
A liquidity pool is a smart contract holding two or more assets that traders swap against, with prices set by the pool's formula rather than an order book.
- →Slippage
Slippage is the difference between the quoted price and the executed price, caused by pool depth and by other transactions landing first.
- →Stablecoin
A stablecoin is a token designed to hold a fixed value, usually against the dollar, used as the settlement layer of on-chain activity.
Related workflows
Turn this into a repeatable process.
- →DEX Trading Workflow
Execute an on-chain swap deliberately: research, liquidity check, route comparison, sized order, then position monitoring.
- →Compare DEX Prices And Routes
Find the genuinely best execution for a swap by comparing net output after slippage, fees and gas across venues and chains.
- →Monitor Liquidity
Watch the pools you depend on for exit liquidity, so a position becomes unexitable only in theory, not by surprise.
- →AI Crypto Research Workflow
A repeatable research loop: turn a question into market data, on-chain evidence and a written risk view before any position is considered.
Related tool stacks
The tools that run it in production.
- →DeFi Execution Stack
Web3 wallet, DEX aggregator, DeFi protocols and a portfolio tracker — the toolset for actually deploying capital on-chain.
- →AI Crypto Research Stack
A read-only research stack combining an AI assistant, web search, market data and on-chain analytics to screen assets quickly.
- →Crypto Automation Stack
Automation platform, data APIs, alerting and optional wallet execution — the operational layer for monitoring and recurring actions.
- →Crypto Trading Stack
Market data, charting, DEX access and a Web3 wallet — the minimum toolset for deliberate on-chain trade execution.
Related prompts
Reusable prompts for this job.
- →Crypto Risk Analysis Prompt
Runs a pre-mortem on a position or protocol: enumerates failure modes, likelihood, impact and observable early warnings.
- →Crypto Market Analysis Prompt
Produces a structured market brief: regime, liquidity conditions, sector rotation, catalysts and what would change the view.
- →DeFi Protocol Research Prompt
Decomposes a protocol's yield source, contract risk, oracle dependency and exit path into a written risk verdict.
- →Recurring Crypto Workflow Prompt
Specifies a safe recurring on-chain automation with spend caps, idempotency, failure handling and a kill switch.
Related use cases
How people apply it, and what came out.
- →Compare DEX Prices
Comparing net output instead of headline quotes recovered around 1.9% on a $180k swap by splitting it across two routes.
- →Monitor A Crypto Portfolio
Aggregating six addresses across three chains revealed that a portfolio believed to hold 14 positions actually held one concentrated bet.
- →Use DeFi With A Web3 Wallet
A first-time DeFi user moved from an exchange to self-custody with a test-transfer routine and a 2% allocation cap, avoiding two protocol failures.
- →Build An AI Crypto Research Agent
A read-only research agent produced daily briefings on a 30-token watchlist, cutting a 90-minute manual routine to a 10-minute review.
Comparisons & alternatives
Pick between the options.
- →DeFi vs Traditional Finance
DeFi offers open access, composability and transparent rules; traditional finance offers legal recourse, insurance and stability.
- →CEX vs DEX
Centralised exchanges optimise for liquidity, fiat access and convenience; DEXs optimise for custody, permissionless listing and on-chain transparency.
- →Stablecoins vs Bank Transfers
Stablecoin transfers settle in minutes on public rails; bank transfers settle slower but come with reversibility and regulated protection.
- →On-chain Data vs Exchange Data
On-chain data shows verifiable wallet-level behaviour; exchange data shows aggregate price discovery. Serious research needs both.