How to Swap Crypto Onchain
Ah, the age old question – “Where’s the best place to buy crypto?”
We hear this so often in our Milk Road PRO Discord that we decided it’s better to write a whole-ass blog about it.
There are 3 main ways to buy crypto:
- Centralized exchange (CEX)
- Decentralized exchange (DEX)
- Directly from your non-custodial wallet
We’ll first break down the key differences between CEXs and DEXs; then, we’ll guide you step-by-step through methods #2 and #3. After all this, we’ll break down problems you might have encountered along the way and how to deal with them.
Feel free to use the table of contents on the right (bottom of the screen if you’re on your phone) to jump to any section you’re interested in.
Alright, enough chit chat. Let’s get into the good stuff now.
Centralized Exchanges vs Decentralized Exchanges
I’m just gonna pause and be real with you here.
Trading on decentralized exchanges (DEXs) can be painful:
- You need to get the right token address
- Find a DEX that trades that token
- Make sure you have the correct wallet
- On top of all this, you need to have enough gas fees for each network you trade on.
Why is there no “one-stop solution” for all this?
Well, there actually is and it’s called a Centralized Exchange (CEX).
With CEXs, there’s no token address to worry about, no wallet setup, and no gas fees. Just simple, straightforward trading.
So, why does this blog focus on how to swap crypto onchain instead?
Because CEXs aren’t as perfect as they seem. They come with some serious drawbacks, like:
- They are centralized… duh
- They often exclude smaller tokens.
- They have geographical restrictions.
Let’s dive a little deeper into each drawback:
They are centralized… duh
Centralization = your funds are at the mercy of the exchange.
If it collapses, your money could vanish just overnight.
Just ask our GM, Tyler—he was holding most of his $BTC on Celcius when it collapsed…
He now solely trades on DEXs because he can’t lose his hair for a third time now.
They often exclude smaller tokens
Since CEXs are centralized, they have to perform significant due diligence before listing a new asset.
So, when you discover the next big token trending on Twitter, chances are it won’t be listed on a CEX yet because it hasn’t been approved yet.
DEXs, however, allow trading of any token as long as you have the correct token address.
They have geographical restrictions
Crypto regulations differ by country, meaning not all CEXs operate everywhere.
For instance, Coinbase is mostly dominant in North America, while OKX is big only in Asia.
DEXs, on the other hand, are permissionless and can be accessed by anyone, anywhere—no restrictions.
Due to these major drawbacks, we prefer to swap crypto onchain.
As promised, below is a step-by-step guide on how to buy tokens on a DEX (method #2) and directly through your wallet (method #3).
How to Swap Crypto Onchain Using a DEX
Step 1: How to Find the Token Address
Crypto is rife with scams. A common trick? When a new token launches, scammers create a similar token with a nearly identical name to trap unsuspecting buyers. People end up purchasing the fake token and, worse, get their wallets drained.
We’re not here to scare you, but it’s something you should be aware of.
The good news? There’s an easy way to avoid this: always verify the correct token address using platforms like CoinGecko or CoinMarketCap.
Token address? What’s that?
It’s the unique identifier for a specific token. There can be many tokens with the same name but none with the same token address.
To find the token address, my go-to poison is CoinMarketCap so here’s a quick walkthrough to get you started. 👇
How to use CoinMarketCap to find a token address
Let’s say I want to buy some $TREMP.
Step 1.1: Head to CoinMarketCap and search for “Tremp.”
Sometimes the token you’re looking for might not appear, it’s likely not prominent enough. In that case, try DEXScreener—it’s a solid backup for smaller, less popular tokens (but beware there’s a bunch of scam tokens on DEXScreener).
Step 1.2: Once you’re on the token’s page on CoinMarketCap, find “Contracts” on the left side of the page.
Step 1.3: Hit the copy button and you’re good to go.
Once you’ve copied the address, you can be confident you’re trading the legitimate $TREMP token—not a random scam.
The next step? Find a DEX to trade this token.
Step 2: Which DEX do I Choose?
This step involves using CoinMarketCap again.
Step 2.1: Head to CoinMarketCap and search for “Tremp.”
Step 2.2: Scroll down the section of “Markets”.
Here, you will find all the markets where the token is tradable.
More often than not, this list is dominated by centralized exchanges (because the majority of trading volume comes from CEXs).
To find the major DEXs that trade this token, just click on “DEX” to filter out all the other exchanges. 👇
You now have the list of DEXs that trade this token.
We would recommend choosing the exchange with the highest volume and liquidity. In this case, Raydium (first row) is the best option.
Once you play around with multiple DEXs, you’ll find one that fits your vibe.
But if you’re looking for recommendations, here’s what we suggest:
- For Ethereum, Arbitrum, or Base: CowSwap
- For other EVM-compatible networks (like Avalanche or Optimism): Uniswap
- If you wanna trade Solana tokens (like $TREMP): Raydium or Jupiter
Just like there are scam tokens, there are also scam DEXs.
Take Raydium, for example—the biggest DEX on Solana. Scammers create fake versions of it to trick you into connecting your wallet, only to drain it instantly.
Here’s the best way to find the real DEX:
- Head to DeFiLlama Directory
- Search for the protocol you need
- You will be redirected to the legit website
DeFiLlama is a serious and committed team so this method is the safest.
If, for some reason, you wanna find it all yourself, this is what we would recommend:
- Head to X (Twitter if you’re an OG) and search for “Raydium”
- Look for an account with a blue or gold checkmark
- Check if it’s followed by Milk Road for extra credibility (you can never be too safe)
- Click the link in their bio to access the official site
Step 3: Paste the Token Address on the Decentralized Exchange
You currently have:
- The token address
- The DEX you want to trade on
The next step is simple: Paste the token address on your desired DEX.
In our example, you paste the address on Raydium, and voilà—the legit $TREMP token will show up.
Step 4: How to buy a token on a DEX
Congrats, you’ve now reached the final step of this process.
Step 4.1: Click on “Connect Wallet”
There will be a pop-up with multiple wallet options.
Choose the wallet you are most familiar with but we’re going to go ahead with Phantom.
If you’re new to crypto, download Phantom wallet asap (it’s the only wallet where you can transact across Bitcoin, Ethereum, Solana and Base).
Step 4.2: Input the amount of $TREMP you wish to buy.
Check how much the transaction will cost under “Estimated Fees”.
Note: You will need to hold extra $SOL in your wallet to pay gas fees for your transaction.
Step 4.3: Click on “Swap”
This will trigger a pop-up from your Phantom Wallet.
Click on “Confirm” and you’re all done.
You have successfully bought $TREMP from a DEX!
That’s it for Method #2—let’s move on to Method #3.
How to Swap Crypto Onchain Inside Your Wallet
Step 1: Which wallet do I use?
There are (too) many wallets in crypto.
And each one only works on specific networks.
So before you go scour the web on which wallet you should use, we’ll give you the answer right here.
Here are the 3 wallets we would recommend:
Milk Man’s Favourite Wallets | Networks Supported |
Phantom Wallet | Solana, Ethereum, Bitcoin, Base and Polygon |
Coinbase Wallet | Ethereum, Solana, Bitcoin, Dogecoin, Litecoin and multiple Ethereum Layer 2 (L2) networks. |
Rabby Wallet | Most EVM-compatible networks |
We’ve tried plenty of wallets (MetaMask, Coinbase Wallet, you name it), but Phantom is hands-down the easiest to use.
That’s why the rest of this guide is all about how to buy tokens directly through your Phantom wallet.
Step 2: Find the Token Address
We’re not going to walk through this again.
It’s the same process outlined in step 1 of method #2. Scroll up to check it out if you haven’t already.
Step 3: Paste Token Address on Wallet
Step 3.1: Open your Phantom wallet and click on “Swap” or the middle toggle at the bottom of the screen.
Step 3.2: Here, you can paste the token address and the legit $TREMP will pop up.
Step 4: Buy Token on wallet
Step 4.1: Input the amount of $TREMP you wish to buy.
This is how your screen might look:
There’s a lot happening in this picture so let us break it all down:
Provider: Raydium via Jupiter
This is telling you where your transaction is taking place.
As Phantom doesn’t have a DEX of its own, it gathers quotes from Solana-based DEXs.
In this case, Raydium (using Jupiter on the backend) is providing the best quote for the swap.
Fees: $3.24
Total fees = Solana gas fees + Phantom’s transaction fees
While it’s true that buying crypto through your wallet is simpler, convenience comes at a cost:
- Raydium: Fee rate of 0.25%
- Phantom: Fee rate of 0.85%
That’s more than 3x the cost on Phantom! This is why we prefer trading on Raydium.
Anyhoo, let’s get back to the walkthrough.
Step 4.2: Once you’ve reviewed the details for the transaction, click on the “Swap now” button.
Note: You will need to hold extra $SOL in your wallet to pay gas fees for your transaction.
Once you see the confirmation below, you have successfully bought $TREMP directly from your Phantom Wallet. 🎉
Problems you might face when you swap crypto onchain
Most of you probably had a smooth experience, but some of you might have hit a snag along the way.
No worries—here’s a list of common issues you might’ve faced. Simply click on the dropdown for step-by-step guidance to resolve them.
There are two ways to deal with the issue:
- Buy crypto directly in your wallet
- Transfer funds from a CEX to your wallet
Buy crypto directly in your wallet
We’re going to stick to using the Phantom wallet for this explanation.
Step 1: Log into your Phantom wallet and click on “Buy”
Step 2: Choose the asset you wish to buy. We always pick Solana.
Step 3: Input the amount of $SOL you wish to buy.
Then, click on Credit & Debit Card via Moonpay.
Step 4: You can now see all the different ways you can buy crypto:
- Apple Pay
- Credit & Debit Card
- Google Pay
Choose the option you are most comfortable with.
We always use Credit & Debit cards to buy crypto and we’ve never had an issue with it.
Step 5: Once you’re happy with your payment method, click on “Buy” in the bottom-right corner.
Step 6: You will then be redirected to Moonpay’s website.
You can sign up with your email, put in your card details and you’re all set.
Now, onto the next method.
Transfer funds from a CEX to your wallet
We would recommend you to buy crypto on your wallet if you don’t hold crypto anywhere else.
But if you do hold some crypto on a centralized exchange (CEX), it’s better to transfer it to your wallet.
Step 1: Log in to your CEX account.
We’re going to use Binance for our example (the process is similar across most exchanges).
Step 2: Head to the page that shows your crypto balance.
Find the “withdraw” button on the right side of the screen.
Step 3: Select the coin you wish to withdraw.
In this case, it would be Solana.
Step 4: You now have to paste your wallet address and the network you wish to use.
Step 5: Head to your Phantom wallet and copy your wallet address.
You can find this on top of your wallet, next to your wallet name.
Step 6: Paste the wallet address into Binance.
The “Select Network” row should be autofilled by itself.
In case it doesn’t, click on Solana under Networks.
Step 7: The last step is to input the amount you wish to withdraw and then click the “Withdraw” button.
The withdrawal might take a few minutes but you will soon have Solana on your Phantom wallet.
To make transactions on a blockchain, you’ll need to pay gas fees.
Each network uses a different currency for its gas fees:
- Ethereum Network: Uses $ETH for gas fees
- Solana Network: Uses $SOL for gas fees
So, if you’re transacting on the Solana network, you’ll need to hold some $SOL in your wallet to cover the gas fees.
Don’t have $SOL in your wallet? We gotchu.
Just click the dropdown above titled “I don’t have funds to swap crypto onchain.”
It outlines two simple ways to get $SOL into your wallet (which you can use to pay for gas fees).
To Sum It Up
Long story short: we prefer to swap crypto onchain compared to CEXs.
Within onchain trading, DEXs are our top choice—they’re significantly cheaper than buying directly through a decentralized wallet.
That said, centralized exchanges are a great starting point for beginners.
Once you’ve got the hang of things, consider switching to decentralized exchanges like CowSwap, Uniswap, or Raydium to take full control of your tokens.
Frequently Asked Questions
Yes, but it depends on the wallet. Popular wallets like Phantom (for Solana) and Coinbase Wallet (for Ethereum) allow you to swap crypto directly within the wallet.
However, swapping in your wallet is usually more expensive than trading on a decentralized exchange (DEX).
There are 3 main ways to swap crypto:
- Swap on a decentralized exchange
- Swap on a decentralized wallet
- Swap on a centralized exchange
Not on centralized exchanges—they always charge fees.
On DEXs, however, you might get paid to swap crypto. Platforms like CowSwap share a portion of the MEV savings with you.
CowSwap is the cheapest platform for swapping crypto, thanks to their MEV-saving features.
It depends on your country. In the U.S., swapping one cryptocurrency for another is considered a taxable event by the IRS. Always check local regulations.

Uphold Rewards: Boost Earnings, Gain Insights, and Beat the Crowd
Uphold Has Launched a Rewards Program Uphold has launched its very own rewards program, offering exclusive benefits for both new and existing users. It’s designed to give everyone—from beginners to experienced traders—a bunch of extra value while using the platform. If you’ve been thinking about trying Uphold, this might just be the perfect time to…