paint-brush
How to Perform Gas-Free Trades on Ethereum's 1st Layerby@BlockchainAuthor
4,545 reads
4,545 reads

How to Perform Gas-Free Trades on Ethereum's 1st Layer

by CryptoBlastoffApril 27th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

CoW Swap is a decentralized exchange allowing you to trade tokens without paying gas fees. CoW Swap uses a slick, cost-eliminating workaround by replacing an on-chain spend with an off-chain wallet signature, then front-running your trade to eliminate ETH gas on limit orders.

People Mentioned

Mention Thumbnail
featured image - How to Perform Gas-Free Trades on Ethereum's 1st Layer
CryptoBlastoff HackerNoon profile picture

This Grass-Fed DEX Will Hoof the Bill for Your Limit Orders

Transacting on the Ethereum network can be expensive.

You may be actively avoiding ETH-based staking protocols simply because — unless you’re a big whale — gas fees can swallow up a healthy chunk of your rewards.

The same problem applies to swapping tokens. Particularly when the network's congested; trading one digital asset for another can get pricey enough to make you question your decision. 

Have you ever decided to buy an asset but balked because of high gas fees? Then when you check later, the asset’s price increase outperformed the transaction you never made? Oh, just me? 🙋

L2 solutions such as Loopring are quick and cheap, but the fees for bridging are unavoidable. You’ll spend ETH every single time you move funds between layers.

And going from L1 to L2 is always the priciest direction.

The good news is that there’s a way to sidestep certain high-fee situations. This article explains how using a specific decentralized exchange lets you tell those smelly gas fees to mooove out of your way.

Harvest Like a Wisened Farmer

When it’s time to hit the buy button on a token, we all want the best price possible. It’s not like there’s a difference in product quality between fungible tokens. We’re not talking NFTs here.

One ETH in your wallet is one ETH in your wallet, whether you pay low trading fees or use robber barons like Xcoins that charge +25% fees on credit card transactions.

No matter if you're raising corn or soybeans or trying to grow your digital stash, lower trading fees generate higher profits. The point is, “Don’t lose money” is a timeless trading rule. 

My new favorite DEX makes that strategy part of its core existence, and here's what the team says about the protocol's services:

CoW Swap finds the lowest prices across all exchanges and aggregators & beats them by matching Coincidences of Wants (CoWs) while protecting you from MEV.

CoW Swap is one of 27 co-creators launching a new crypto tool, MEVBlocker, which has already undergone integration into the CS DEX.

MEV — Ethereum’s nefarious hidden tax — protection aside, CoW Swap employs a genius strategy to create a win-win trading scenario.

Slice Trading Spends in Half

DEX aggregators such as Matcha.xyz are fantastic for finding the lowest prices on token swaps. But CoW Protocol adds a clever twist.

Trading on a traditional DEX involves two distinct transactions: 

1. Allowing your MetaMask (or similar) wallet to give spending privileges to the DEX for one specific asset. ETH, WETH, USDC, etc. Each asset requires a separate gas fee to become active (but not yet spent) on the DEX.

2. Making the actual trade. This transaction, typically the more expensive of the two, spends the funds in your wallet to swap one asset for another.

Now, c̵o̵w̵ bear in mind that the 1st transaction is something we all deal with, no matter the DEX.

But for the 2nd, gas-hungry step, CoW Swap uses a slick, cost-eliminating workaround by replacing an on-chain spend with an off-chain wallet signature, then front-running your trade.

Best of all, after approving an asset, you can limit-trade that asset over and over again while paying nothing for gas. Let’s put the process into frames, and you'll see what I mean …

How to Trade on CoW Swap

Before you can make a trade of any sort — either market or limit — you must first approve an asset for use.

Notice how the ‘Swap’ button is inactive. You can’t run before you walk!

Confirm the transaction in your wallet, and begrudgingly pay the approval fee.

This is the only time you’ll pay for gas during CoW Swap limit orders. Once you activate USDC (or any other supported asset you'd like to trade), every limit order is on the house. 

Now, let’s get into the mechanics of how patience makes free trades become a reality.

Name Your Price

As the test subject, I’m choosing RFOX, which is recently celebrating five years on the blockchain. The ecosystem’s token is far from its ATH, which was during a stage of minimal public-facing product rollouts. 

I think/speculate/guesstimate that the $RFOX token will sail past its ATH when the bulls triumphantly charge back into crypto markets.

The project’s Metaverse is in its public beta phase. There are partnerships galore, VR-enabled blockchain games, plans for an educational planetarium, and custom avatars occupying distinct Metaverse quarters.

And did I mention hoverboards for avatar travel between districts?

Plus, unlike other projects trying to reclaim former price tops, infrequent token burns create deflationary tokenomics.

That’s all I’ll say for now, but you can further research RFOX’s VR-enabled creator platform and similar Metaverse tokens here:

Video Games, NFTs, and Hamburgers from The Metaverse | HackerNoon

The Sandbox Game's Open World vs. RFOX VALT's VR-Enabled Retail and Entertainment Experience.

Back to the trade; I don’t want to pay the current market price of $0.0135 per $RFOX token. So I’ll tell the cow to harvest it at my chosen price — less than a penny per unit.

Per my parameters, the order will fill only after realizing a +51% difference in order value.

Rather than allocating funds now and holding them in escrow, signing the transaction in your wallet is enough to initiate the order. CoW Swap operates similarly to an L2 DEX minus an expensive bridge in the middle.

And the same capital can hold multiple orders. In other words, you can use the same USDC to set unlimited limit orders that simultaneously race each other to see which can fill first.

There’s only one thing left to do after a successful signature …

Play the Waiting Game

The open orders dashboard tells you everything you need to know about when to expect the order to go through. Notice the difference between limit, market, and execution prices:

Although I chose 0.009 for an entry point, the DEX buying at 0.0085 is the secret sauce for making the blockchain pay for gas. 

A Tool for Impatience

Let’s assume you don’t want to wait and are looking to put some new tokens in your wallet right now

Yes, CoW Swap can help you out with that as well. Rather than selecting the 'Limit' tab, we'll use the Swap feature to trade USDT for ETH at the current market price.

Once again, initiating the trade requires only a signature. However, there is a gas fee deducted from market orders.

That said, CoW Swap put more ETH in my wallet than Matcha would have for the same USDT.

The CoW Protocol actively searches for counter trades giving you the best price for an L1 token swap.

And, for this particular swap, the protocol put more ETH into the trade than initially quoted—0.075 vs. 0.073.

I know; it's only about $5. But those little boosts can quickly add up for active traders. In other words, make 20x trades, and you're up $100 by avoiding higher fees.

Wrapping Up

With gas fees on the Ethereum network recently running hot, CoW Protocol’s solution is more relevant than ever.

The downside to high fees is trade value/gas percentages when setting a limit order. If the percentage difference between the limit price and the execution price is too high, the order is unlikely to process.

You’ll need to set higher volume orders in those instances.

So, if you have the funds plus the patience to wait for buys and sells to execute slightly lower and higher than your limit price, give CoW Swap a try. As they say, good things sometimes come to those who wait.

Know of a better DEX out there I should try using? Share your source in the comments below!

At the time of writing, the author held COW, RFOX, VFOX, and other digital assets. This article is for informational purposes only; the author neither possesses nor claims to possess credentials or qualifications to distribute financial advice. Investment decisions are at the discretion of well-researched readers, often aided by trained professionals.