DEX Trading Bots: Custom Automated Trading Strategies Are (Finally) Coming to DeFi

CoinDesk - Unknown

Decentralized exchanges (DEXs) have become increasingly popular in recent years, and for good reason. DEXs provide greater transparency and control over one’s assets than centralized exchanges. However, despite their many advantages, DEXs still face some significant challenges, such as low liquidity, poor user experience and limited trading options.

One solution to these challenges is the use of trading bots, which are automated programs that can execute trades based on predefined strategies. Trading bots can help users take advantage of market opportunities, execute trades more efficiently than humans and reduce the risk of emotional trading decisions.

While trading bots are popular in traditional and centralized finance, automated trading has remained largely unavailable in decentralized exchanges – until now.

Carbon is a new DeFi protocol that allows users to create and customize their own automated trading and market-making strategies. Carbon strategies are composed of custom limit orders and range orders that exist as onchain liquidity and stand ready at all times to buy and sell tokens in specific target price ranges.

Say you expect ETH to trade up and down in a sideways market. You can set a Carbon strategy to buy ETH when it falls in the $1800-$1900 range and sell it in an upper range of $2100-$2200. Unlike existing onchain liquidity solutions which require multiple liquidity positions to perform strategies in distinct price ranges as well as oracles and third-party managers to move liquidity between ranges, Carbon strategies can be deployed with only a single liquidity position that automatically rotates liquidity between preset ranges as markets move with no oracles or external dependencies, maximizing capital efficiency and ease of use.

To use Carbon, you can simply go to, connect your wallet and choose a trading pair (e.g., ETH/USDC). Then choose if it is a one-time or recurring strategy. Set the buy and sell ranges and amounts. Hit create, and you’re done.

CoinDesk - Unknown

A wide range of automated trading strategies can be deployed on Carbon – with no coding required and no need to hold tokens on a centralized exchange. Carbon is non-custodial and fully onchain, so you always maintain control of your funds and full transparency into trading.

Some example strategies include:

  • Use an ETH / USDC strategy to buy cheap ETH at support levels, and sell at resistance levels.
  • Grid trade in the ETH / WBTC pair.
  • Perform recurring arbitrage on pegged-asset pairs (e.g., rETH / ETH) or stablecoin pairs (e.g., DAI/USDC) as assets de-peg & re-peg.

So why has automated trading remained largely unavailable in DeFi? The reason lies in the underlying architecture powering modern-day DEXs.

Today’s most popular DEXs are based on automated maker-makers or “AMMs” – which have historically served a “one-size-fits-all” trading strategy. Users who provide their liquidity to AMMs effectively opt into a trading strategy that seeks to earn trading fees greater than the cost of impermanent loss. Users can choose which tokens to provide, however they are forced to opt into the strategy of the AMM.

Carbon takes the opposite approach. Instead of prescribed strategies, it allows users to personalize their own buy and sell ranges. Ranges can be placed above and below a set price based on where a user expects a given token will trade. As market prices move into your selected ranges, your orders get executed by “takers” – users who spot trade on Carbon as arbitrageurs, through DEX aggregators, or via the app.

Carbon’s functionality follows a natural progression in the evolution of onchain liquidity. The first generation of AMMs (based on “constant product”) required liquidity providers to buy and sell tokens across an infinite range of prices. The second generation of AMMs (“concentrated liquidity”) gave liquidity providers the ability to choose a specific price range in which their tokens are bought and sold. Carbon is the first protocol to offer “asymmetric liquidity” – a new form of concentrated liquidity where users can distinguish between their buy and sell ranges.

CoinDesk - Unknown

Carbon’s asymmetric liquidity is:

  • Irreversible: Unlike existing onchain liquidity protocols where users must manually monitor and withdraw their liquidity upon execution in order to finalize a limit or range order, Carbon orders trade in a single direction and are final upon execution, eliminating the risk of order reversal.
  • Adjustable: Order updates can be made in a highly gas-efficient manner, without needing to withdraw and re-add liquidity, via exposed parameters in your order.
  • MEV Resistant: Spot trading is completely resistant to the most common form of Maximum Extractable Value (MEV), sandwich attacks.

Carbon recently launched in beta with a sleek front-end and permissionless support for any standard ERC20 token, including ETH, WBTC, LINK and more. By fusing the feature-rich trading functionality of a centralized exchange with the access and transparency of onchain automated market-makers, Carbon is poised to unlock the future of decentralized trading.

Interested in creating your own MEV-resistant DEX trading bots? Join the beta and start building.

Key Links: