Mar 19, 2025
6 min read
Moving stablecoins cross-chain using bridges is expensive, risky, and slow. With PYUSD’s new
LayerZero integration, you can now programmatically move PYUSD between Ethereum and
Solana without using third-party bridges or centralized exchanges. This new integration makes
moving PYUSD across chains simple and fast.
Let’s look in detail at the mechanics behind the integration, the advantages over bridging, and
then walk through a short tutorial to see how you can incorporate cross-chain PYUSD into your
application.
The PYUSD/LayerZero integration uses a burn-and-mint mechanism. Developers call an API
that causes PYUSD tokens to be burned on the source chain and minted on the destination
chain.
Step 1: Burn on source chain: When a user initiates a transfer of PYUSD (from
Ethereum to Solana, for example), the tokens are burned (permanently eliminated) on
Ethereum, removing them from circulation on the source chain.
Step 2: Mint on target chain: Then an equal number of PYUSD tokens are minted on
Solana.
Unlike traditional bridge 1 solutions, this solution:
The integration was designed with a mindset that prioritizes trust and reliability through multiple
layers of safeguards, including:
The integration incorporates two Ethereum Improvement Proposals (EIPs): EIP-3009 and EIP-
2612. Let’s look at each.
EIP-3009 allows “transfer with authorization” for off-chain approvals. This means:
EIP-2612 allows users to approve token allowances via off-chain signatures. This means:
Together, these EIPs create several benefits:
Specifically for the PYUSD/LayerZero integration, these combined EIPs mean that the burn/mint
mechanism can happen with minimal user involvement—one off-chain signature, no separate
approvals, and no extra gas fees required for the user. This creates an easy experience for
users.
To help with integrating transfers into your apps, LayerZero has a wide variety of integration documentation and development utility tools. These APIs are designed to work with existing dApps that extend current DeFi payment systems and allow a simple way to add blockchain payments to Web2 applications with minimal overhead.
Next let’s walk through some sample code that shows how you can easily integrate PYUSD
transfers into your apps. We’ll work from a script provided by LayerZero.
First, clone the LayerZero devtools repo and checkout the code tagged with @layerzerolabs/devtools@0.4.1.
$ git clone https://github.com/LayerZero-Labs/devtools.git
$ cd devtools
$ git checkout @layerzerolabs/devtools@0.4.1
Next, navigate to the examples/oft-solana
folder:
$ cd examples/oft-solana
Install the project dependencies:
$ npm install
$ npm install @layerzerolabs/lz-evm-sdk-v2
Next we need test tokens.
1. Get test PYUSD from the Paxos Faucet.
2. Get test SOL from the Solana Devnet faucet.
Moving USDC from Solana to Ethereum with LayerZero is simple. We’ll use the tasks/solana/sendOFT.ts
script in our repo.
In order to send funds from a Solana account, you’ll need to add the Solana RPC URL and your
Solana private key to the .env
file.
#Solana configs
RPC_URL_SOLANA_TESTNET="https://api.devnet.solana.com"
SOLANA_PRIVATE_KEY="<solana_testnet_private_key>"
Now simply run the tasks/solana/sendOFT.ts
script! The only parameters you need to
change are the <amount>
; and <to_address>
;.
Whatever amount you want to send in USD, remember to multiply by
10^6 (1000000) due to the decimal assignment. The to_address is the Ethereum address you
want to receive the PYUSD.
Running on Testnet
$ npx hardhat lz:oft:solana:send \
--program-id paxosVkYuJBKUQoZGAidRA47Qt4uidqG5fAt5kmr1nR \
--amount <amount> \
--from-eid 40168 \
--to <to_address> \
--to-eid 40161 \
--mint CXk2AMBfi3TwaEL2468s6zP8xq9NxTXjp9gjMgzeUynM \
--escrow EXJZbFNmPhrNkJxJ3tq8RyGHzzxPcxNQxSgx6HUHoRfU \
--token-program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Running on Mainnet
$ npx hardhat lz:oft:solana:send \
--program-id paxosVkYuJBKUQoZGAidRA47Qt4uidqG5fAt5kmr1nR \
--amount <amount> \
--from-eid 30168 \
--to <to_address> \
--to-eid 30101 \
--mint 2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo \
--escrow 6JHAfeFjJLrn9enjvBUsmqLSy8B8Wyobr4uXuPVKyjhT \
--token-program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Let’s look at a few of the important details of how the script works. The script:
● Debits the amount of PYUSD tokens from the env’s Solana account.
● Locks/burns them in the OFT escrow on Solana.
● Sends a bridging message so LayerZero can mint/unlock the equivalent tokens to the
specified EVM address to_address on chain to-eid (40168 for Solana Testnet and
40161 for Ethereum Testnet Sepolia).
The script will output the transaction hash and a link to layerzeroscan. For example:
✅ Sent 25000000 token(s) to destination EID: 40161!
View Solana transaction here:
https://explorer.solana.com/tx/3BY2VboN2cGfh1hcX4pFTo43mDZpnzuWocRmFBJTHiq4
zpiSxhTB9VnTi2X3C4nSD6GuNVQTunspxAe7Y8e9o6FM?cluster=devnet
Track cross-chain transfer here:
https://testnet.layerzeroscan.com/tx/3BY2VboN2cGfh1hcX4pFTo43mDZpnzuWocRmFB
JTHiq4zpiSxhTB9VnTi2X3C4nSD6GuNVQTunspxAe7Y8e9o6FM
That’s it! We were able to send PYUSD from Solana via LayerZero to an Ethereum account in
only a few seconds!
The PYUSD/LayerZero integration delivers a fast, developer-friendly solution for cross-chain
PYUSD transfers and creates a more connected, accessible, and decentralized Web3
ecosystem. For more details, you can learn more about LayerZero’s Omnichain Fungible Token standard.
Keep up with PYUSD here!
4 min read
4 min read
10 min read