Ambient founder touts advantages of single-contract DEX architecture

A single contract structure allows a DEX to behave like one market, Colkitt says

article-image

NaturePicsFilms/Shutterstock modified by Blockworks

share

Uniswap, the largest crypto decentralized exchange by volume, recently broke news of a series of planned updates, including the introduction of a single contract pool structure.

The “singleton contract” is not yet implemented on Uniswap, but similar technology can already be found on the Ambient decentralized exchange, or DEX

Founder of the competing DEX, Doug Colkitt, spoke to Blockworks on an upcoming episode of the 0xResearch podcast (Spotify / Apple) about the advantages of the new slimline design.

“The big deal” with the new architecture, Colkitt says, is that in previous DEXs, “every time you had a new pool, you had to stand up a new contract.”

“It meant that every single contract was individually managing its own collateral.”

“Standing up a pool,” Colkitt explains, is a relatively “heavyweight” task that deploys a costly contract to the mainnet. 

“You’re talking about a few hundred dollars,” which isn’t much for a larger-scale project, but to experiment on the cheap, he says, “it’s not great.”

More importantly, Colkitt says, a single contract allows a DEX to behave like one market rather than a collection of separate ones interacting with each other. Without the new design, “I’m trading between different markets,” he says.

Trading between two tokens and ether (ETH) would normally involve numerous steps, jumping from one pool to another to complete the trades, with gas fees incurred at each step. “That’s pretty heavyweight and unnecessary.”

“At the end of the day, ETH just winds up back at the market.”

“The tokens are all in a central location. The pools are separate, but they’re just lightweight data structures inside a larger contract.”

This design reduces restrictions between markets, making them more efficient, according to Colkitt. It also adds some interesting trading possibilities that were not possible under the previous multi-contract architecture.

“You can do interesting stuff with flash accounting,” he explains. “You can trade in one pool and you don’t actually need to fill in those tokens until the end of the trade.” 

“So it also makes arbitrage a lot lower cost.”

Reducing toxic flow

Podcast host Dan Smith notes that transferring tokens incurs about half the gas cost of an ERC-20 trade on DEXs like Uniswap or Curve, reducing the capacity for arbitrage.

Colkitt says that the single contract design lowers the profitability threshold on arbitrages. Thus, prices will “stay in line” with markets more efficiently over time because arbitrages can be performed at “smaller discrepancies.”

Additionally, lowering the barriers to arbitrage could potentially reduce “toxic flow,” a problem whereby predatory traders can cause market makers to provide liquidity at a loss.

“If you lower the barriers to arbitrage,” Colkitt says, “it actually decreases the total amount of toxic flow” on any particular trade. Increasing the number of trades at smaller increments is better for liquidity providers, he explains.

“Ultimately,” he says, “you get the same total toxic flow, but you get a lot more arbitrage trades.” Therefore, liquidity providers collect more fees over time, resulting in “a better deal.”

The fact that Uniswap is also planning, among its improvements, to build a single contract is “good validation” for Ambient, he says. 

Colkitt explains that when the team started working on the new design, people were skeptical, asking, “Is that a good idea? Should you put everything in one contract?”

“At least I never have to answer that question again.”

Subscribe to 0xResearch on Spotify or Apple so you don’t miss this episode!


Start your day with top crypto insights from David Canellis and Katherine Ross. Subscribe to the Empire newsletter.

Explore the growing intersection between crypto, macroeconomics, policy and finance with Ben Strack, Casey Wagner and Felix Jauvin. Subscribe to the On the Margin newsletter.

The Lightspeed newsletter is all things Solana, in your inbox, every day. Subscribe to daily Solana news from Jack Kubinec and Jeff Albus.

Tags

Upcoming Events

Salt Lake City, UT

MON - TUES, OCT. 7 - 8, 2024

Blockworks and Bankless in collaboration with buidlbox are excited to announce the second installment of the Permissionless Hackathon – taking place October 7-8 in Salt Lake City, Utah. We’ve partnered with buidlbox to bring together the brightest minds in crypto for […]

Salt Lake City, UT

WED - FRI, OCTOBER 9 - 11, 2024

Permissionless is a conference for founders, application developers, and users. Come meet the next generation of people building and using crypto.

recent research

Research Report Templates (1).png

Research

Solana Mobile is a highly ambitious foray into the mobile consumer hardware market, seeking to open up a crypto-native distribution channel for mobile-first applications. The market for Solana Mobile devices has demonstrated a phenomenon whereby external market actors (e.g. Solana-native projects) continuously underwrite subsidies to Mobile consumers. The value of these subsidies, coming in the form of airdrops, trial programs, and exclusive NFT mints, have consistently covered the cost of the phone and generated positive returns for consumers. Given this trend in subsidies, the unit economics in the market for Mobile devices, and the initial growth rate and trajectory of sales, it should be expected that Solana mobile can clear 1M to 10M units over the coming years. As more devices circulate amongst users, Solana Mobile presents a promising venue for the emergence of killer-applications uniquely enabled by this mobile-first, crypto-native distribution channel.

article-image

Plus, breaking down Donald Trump’s shifting crypto stance

article-image

Markets are holding relatively steady despite the supply shock

article-image

Analysts are looking ahead to August, a historically volatile month made more interesting this year by the US presidential election

article-image

Plus, a look into Lighting Labs’ newest feature

article-image

Crypto’s Wild West era is over — it’s time to embrace regulation to secure the future of digital assets

article-image

Plus, Solana has now surpassed Ethereum in trailing 30-day decentralized exchange volume