One-Step Closer to Decentralized MEV: Unlocking Circular Swaps
Why Carbium supports circular arbitrage swaps ((TokenA) -> (TokenB) -> (TokenA)) and why other providers gatekeep them to protect their own MEV revenue.
In the high-stakes world of Solana MEV (Maximal Extractable Value), knowledge is profit. Yet, as the percentage of SOL held by MEV bots and their equivalents rises toward increasingly risky levels, the ecosystem faces a growing centralization threat. For years, the most lucrative strategies, specifically Circular Arbitrage (Full-circle swaps), have been the exclusive domain of elite searchers and validator-aligned trading firms.
Today, Carbium is changing the game. By natively supporting circular swaps via our DEX API, we are taking a massive step toward democratizing MEV.
The Forbidden Trade: What is Circular Arbitrage?
A circular swap is the purest form of market inefficiency. It involves routing a token through one or more intermediate assets and returning to the starting token, profiting from price discrepancies across pools.
The Loop: SOL → USDC → SOL
If you start with 10 SOL and finish the loop with 10.05 SOL, you have extracted value from the network risk-free (atomic execution). This is the most ethical form of MEV. It supports market efficiency.
![Mermaid chart for Circular Swap (Arbitrage) handled by Carbium API. graph LR START((Token A)):::start subgraph LEG1["Leg 1"] Q1[getQuote<br/>A → B]:::quote AMM1[AMM1]:::amm end MID[(Token B)]:::token subgraph LEG2["Leg 2"] Q2[getQuote<br/>B → A]:::quote AMM2[AMM2]:::amm end FINAL[(Token A')]:::token CHECK{A' > A?}:::check YES[Execute]:::execute NO[Skip]:::skip %% Connections START --> Q1 Q1 --> AMM1 AMM1 --> MID MID --> Q2 Q2 --> AMM2 AMM2 --> FINAL FINAL --> CHECK CHECK -->|Profit| YES CHECK -->|No Profit| NO YES -.-> START](https://blog.carbium.io/content/images/2025/12/Screenshot-2025-12-30-at-14.07.13.png)
Why Don't Other APIs Support This?
If you look at the documentation of major DEX aggregators or RPC providers, you will rarely find native support for circular routing. Why?
It eats their bread.
Many infrastructure providers operate in a conflict of interest. They have internal trading teams or exclusive deals with top searchers. If an API provider spots an arbitrage opportunity:
- They capture it themselves (internal MEV).
- They sell the signal to a preferred partner (often users with exclusive "all-access" API tiers).
- They arbitrage their own users' trades, effectively trading against the clients who trust them.
- Last priority: They let you, the public API user, see it.
Building an API that makes circular arbitrage easy for the public effectively destroys their own alpha. They are incentivized to keep the barrier to entry high.
The Proof is in the Profits
To understand why this access is gated, one only needs to look at the revenue generated by the top arbitrage programs. These exclusive bots extract millions of dollars in value from the network monthly.
Data via Sandwiched.me (Last 30 Days)
| Rank | Arbitrage Program | Profit (SOL) |
|---|---|---|
| #1 | JUP6L...TaV4 |
3,196 SOL |
| #2 | King7...cb7T |
2,584 SOL |
| #3 | NA247...TUV |
1,589 SOL |
| #4 | CroWg...7aK |
1,257 SOL |
| #5 | 9GCBb...vQQ |
1,236 SOL |
These 5 programs alone captured over 9,800 SOL in pure profit in just one month. This is the "bread" that legacy providers are reluctant to share. In the worst case, the bad performance you experience with different protocols is because you're being harvested.

The "Solana Centralization" Problem
The massive accumulation of wealth shown above isn't just a matter of fairness; it represents a structural risk to the Solana network. When MEV extraction is restricted to a small circle of elite players, SOL accumulates in fewer and fewer hands.
This concentration creates two critical threats:
- Validator Leverage: Large MEV entities often stake their accumulated SOL with specific validators to gain favorable treatment or faster inclusion. This creates a "pay-to-play" dynamic where independent validators struggle to compete against those backed by MEV cartels.
- Censorship Risks: As fewer entities control the transaction supply chain, the network becomes more susceptible to censorship. If a dominant searcher or block builder decides to exclude certain transactions to protect their own strategies, the fundamental promise of a permissionless blockchain is compromised.
By keeping circular arbitrage tools exclusive, legacy providers are inadvertently accelerating this centralization.
The Technical Unlock
Historically, participating in this level of arbitrage required writing complex Rust programs, deploying them on-chain, and managing your own Geyser plugins to index state. You needed geographically placed high-performance servers starting from $200 a month just to compete. It was an engineering barrier that kept 99% of developers out.
With Carbium, the complexity moves from your infrastructure to our API. You can now detect and execute circular swaps using simple, off-chain logic in JavaScript or Python.
Here is what the logic looks like:
// A simple "Circular Loop" check using Carbium API
async function checkArbitrage(amountIn) {
// Leg 1: Quote SOL -> USDC
const leg1 = await getQuote(SOL_MINT, USDC_MINT, amountIn);
if (!leg1) return;
const usdcAmount = leg1.outAmount;
// Leg 2: Quote USDC -> SOL
const leg2 = await getQuote(USDC_MINT, SOL_MINT, usdcAmount);
if (!leg2) return;
const finalSolAmount = leg2.outAmount;
// Did we make money?
if (finalSolAmount > amountIn) {
const profit = finalSolAmount - amountIn;
console.log(`Arbitrage Opportunity! Profit: ${profit} lamports`);
// Execute atomic transaction...
}
}
Our API handles the heavy lifting, validating the routes, checking liquidity depth, and bundling the instructions into a Versioned Transaction that you simply sign and submit. If the opportunity disappears between the quote and execution, the transaction reverts, saving you from bad trades.
The Carbium Philosophy: MEV is for Everyone
At Carbium, we believe that a decentralized blockchain deserves decentralized MEV. We don't run internal bots to frontrun our users. We build the highway, we don't block the traffic.
Our Quote API is designed to be agnostic. If there is a profitable route from Token A back to Token A, our engine will find it and serve it to you with the same speed and reliability as a standard swap.
How We Enable It
- Atomic Execution: Our API constructs the full transaction (all legs of the swap) into a single, atomic Versioned Transaction. If one leg fails, the whole trade fails, protecting you from holding "bags" of intermediate tokens.
- Zero-Conflict Execution: We forward your transaction directly to the leader. We don't inspect it for our own profit.
- Binary-State Management: With sub-100ms latencies on our data streams, you see the opportunity at the same time as the "pros."
The Inevitable Shift
The amount of Solana held by MEV extractors is becoming a growing problem on Solana. As capital concentrates in the hands of a few gatekeepers, the risk of centralization increases. By opening these strategies to everyone, we dilute this concentration and distribute value back to the broader developer community.
Business-Scale MEV extraction is a long-term risk for Solana in the same way concentrated mining is for Bitcoin.
The days of gatekept markets are numbered. It was always just a matter of time before institutional-grade tools became the standard for everyone. Carbium is accelerating the inevitable shift in the paradigm.
If you are coding your first bot or optimizing a complex engine, the playing field is finally level. Dive into our documentation, now fully optimized for AI-assisted development, to start building today.


Technical Reference & Resources

