Lesson 18: XRPL EVM Sidechain - Smart Contracts Today
Learning Objectives
Understand the EVM Sidechain architecture and its relationship to XRPL
Explain the Axelar bridge mechanism and its trust assumptions
Evaluate when to use the EVM Sidechain vs Hooks vs waiting
Recognize development patterns for building on the sidechain
Assess trade-offs between Layer 1 and Layer 2 approaches
The XRPL ecosystem offers multiple paths to programmability. The EVM Sidechain stands apart:
XRPL PROGRAMMABILITY OPTIONS (November 2025)
HOOKS:
βββ Status: Xahau only (not XRPL mainnet)
βββ Native: Yes
βββ Language: C
βββ Production: Limited (Xahau)
XLS-101:
βββ Status: Proposal/Development
βββ Native: Yes (planned)
βββ Language: TBD
βββ Production: No
EVM SIDECHAIN:
βββ Status: LIVE (June 2025)
βββ Native: No (Layer 2)
βββ Language: Solidity
βββ Production: YES β Available now
```
The XRPL EVM Sidechain is an EVM-compatible blockchain connected to XRPL:
EVM SIDECHAIN OVERVIEW
Technical Basis:
βββ EVM-compatible execution environment
βββ Proof of Authority consensus
βββ Connected via Axelar bridge
βββ XRP as gas token (bridged)
βββ Full Solidity support
Relationship to XRPL:
βββ Separate chain (not XRPL mainnet)
βββ Assets bridge back and forth
βββ Uses XRP for gas (bridged eXRP)
βββ Can interact with XRPL via bridge
βββ Independent validator set
βββββββββββββββββββ βββββββββββββββββββ
β XRPL Mainnet β β EVM Sidechain β
β β β β
β - XRP native β β - eXRP (gas) β
β - DEX, AMM β βββ β - Smart β
β - Native β BRIDGEβ contracts β
β features β β - Full EVM β
β - No custom β β - PoA β
β contracts β β consensus β
βββββββββββββββββββ βββββββββββββββββββPROOF OF AUTHORITY (PoA)
How It Works:
βββ Approved validators run nodes
βββ Validators take turns producing blocks
βββ No mining/staking for consensus
βββ Fast block times (~seconds)
βββ Trust in validator set
Trade-offs:
βββ Pro: Fast, predictable blocks
βββ Pro: Low fees
βββ Pro: Energy efficient
βββ Con: Centralized validator set
βββ Con: Trust required in validators
βββ Con: Not trustless like XRPL mainnet
Validators:
βββ Selected by governance
βββ Known entities (not anonymous)
βββ Reputation at stake
βββ Different model than XRPL mainnet
```
BRIDGING XRP β eXRP
Step 1: LOCK
βββ User sends XRP to bridge address on XRPL
βββ XRP locked in multisig
βββ Transaction confirmed on XRPL
Step 2: VERIFY
βββ Axelar network observes lock
βββ Validators confirm transaction
βββ Consensus on locked amount
Step 3: MINT
βββ eXRP minted on EVM Sidechain
βββ Equal amount to locked XRP
βββ Sent to user's EVM address
βββ 1:1 ratio maintained
BRIDGING eXRP β XRP
Step 1: BURN
βββ User burns eXRP on EVM Sidechain
βββ Transaction confirmed
βββ Amount recorded
Step 2: VERIFY
βββ Axelar network observes burn
βββ Validators confirm
βββ Consensus reached
Step 3: UNLOCK
βββ XRP unlocked on XRPL mainnet
βββ Sent to user's XRPL address
βββ 1:1 ratio maintained
```
BRIDGE TRUST MODEL
You Trust:
βββ Axelar validator set (honest majority)
βββ Bridge smart contracts (secure code)
βββ Custodial multisig (no theft)
βββ Cross-chain message integrity
Risks:
βββ Bridge hack (smart contract exploit)
βββ Validator collusion
βββ Network congestion delays
βββ Temporary imbalances
βββ Smart contract bugs
Mitigations:
βββ Axelar security track record
βββ Audited contracts
βββ Insurance/reserves (varies)
βββ Monitoring systems
βββ Rate limiting
Reality Check:
βββ Bridges have been hacked in crypto
βββ Axelar has good track record
βββ Not risk-free
βββ Consider amounts at risk
βββ Production-grade but not trustless
```
BRIDGEABLE ASSETS
Native:
βββ XRP β eXRP (primary gas token)
βββ Full 1:1 backing
Via Axelar (Cross-Chain):
βββ Assets from 55+ connected networks
βββ USDC, WETH, etc.
βββ General Message Passing
βββ Cross-chain contracts
Example Flow:
βββ User has USDC on Ethereum
βββ Bridge USDC to EVM Sidechain
βββ Use in XRPL ecosystem DeFi
βββ Bridge back when done
```
EVM SIDECHAIN DEVELOPMENT STACK
Languages:
βββ Solidity (primary)
βββ Vyper (alternative)
βββ Any EVM-compatible language
Tooling:
βββ Hardhat
βββ Foundry
βββ Remix
βββ Truffle
βββ OpenZeppelin
βββ Standard Ethereum tools
SDKs:
βββ ethers.js
βββ web3.js
βββ viem
βββ Standard EVM libraries
Wallets:
βββ MetaMask
βββ Any EVM wallet
βββ Configure for sidechain RPC
```
EVM SIDECHAIN NETWORK DETAILS
Mainnet:
βββ Chain ID: 1440002
βββ RPC: https://rpc.evm-sidechain.xrpl.org" target="_blank" rel="noopener noreferrer" class="text-cyan-400 hover:text-cyan-300 underline hover:no-underline transition-colors inline-flex items-center gap-1">https://rpc.evm-sidechain.xrpl.org">https://rpc.evm-sidechain.xrpl.org
βββ Explorer: https://evm-sidechain.xrpl.org" target="_blank" rel="noopener noreferrer" class="text-cyan-400 hover:text-cyan-300 underline hover:no-underline transition-colors inline-flex items-center gap-1">https://evm-sidechain.xrpl.org">https://evm-sidechain.xrpl.org
βββ Currency: eXRP
βββ Documentation: xrplevm.org
Testnet (Devnet):
βββ Chain ID: 1440001
βββ RPC: https://rpc.devnet.xrplevm.org" target="_blank" rel="noopener noreferrer" class="text-cyan-400 hover:text-cyan-300 underline hover:no-underline transition-colors inline-flex items-center gap-1">https://rpc.devnet.xrplevm.org">https://rpc.devnet.xrplevm.org
βββ Faucet: Available
βββ For development
MetaMask Setup:
{
"chainName": "XRPL EVM Sidechain",
"chainId": "0x15F902", // 1440002 in hex
"rpcUrls": ["https://rpc.evm-sidechain.xrpl.org"]" target="_blank" rel="noopener noreferrer" class="text-cyan-400 hover:text-cyan-300 underline hover:no-underline transition-colors inline-flex items-center gap-1">https://rpc.evm-sidechain.xrpl.org%22%5D">https://rpc.evm-sidechain.xrpl.org"] ,
"nativeCurrency": {
"name": "eXRP",
"symbol": "eXRP",
"decimals": 18
},
"blockExplorerUrls": ["https://evm-sidechain.xrpl.org"]" target="_blank" rel="noopener noreferrer" class="text-cyan-400 hover:text-cyan-300 underline hover:no-underline transition-colors inline-flex items-center gap-1">https://evm-sidechain.xrpl.org%22%5D">https://evm-sidechain.xrpl.org"]
}
```
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/**
- @title SimplePaymentSplitter
- @notice Splits incoming payments to multiple recipients
- @dev Demonstrates basic EVM Sidechain development
*/
contract SimplePaymentSplitter {
address[] public recipients;
uint256[] public shares;
uint256 public totalShares;
event PaymentReceived(address indexed from, uint256 amount);
event PaymentSplit(address indexed to, uint256 amount);
constructor(address[] memory _recipients, uint256[] memory _shares) {
require(_recipients.length == _shares.length, "Mismatch");
require(_recipients.length <= 10, "Too many recipients");
recipients = _recipients;
shares = _shares;
for (uint i = 0; i < _shares.length; i++) {
totalShares += _shares[i];
}
}
receive() external payable {
emit PaymentReceived(msg.sender, msg.value);
_distribute();
}
function _distribute() internal {
uint256 total = address(this).balance;
for (uint i = 0; i < recipients.length; i++) {
uint256 payment = (total * shares[i]) / totalShares;
if (payment > 0) {
(bool success, ) = recipients[i].call{value: payment}("");
require(success, "Transfer failed");
emit PaymentSplit(recipients[i], payment);
}
}
}
}
```
// deploy.js (Hardhat)
const hre = require("hardhat");
async function main() {
const recipients = [
"0x1234...", // Recipient 1
"0x5678..." // Recipient 2
];
const shares = [70, 30]; // 70/30 split
const Splitter = await hre.ethers.getContractFactory("SimplePaymentSplitter");
const splitter = await Splitter.deploy(recipients, shares);
await splitter.waitForDeployment();
console.log("PaymentSplitter deployed to:", await splitter.getAddress());
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
```
USE EVM SIDECHAIN WHEN:
β Need production smart contracts NOW
β Have existing Solidity expertise
β Porting existing EVM codebase
β Complex DeFi logic required
β Cross-chain interoperability needed
β Standard EVM tooling preferred
β Composability between contracts essential
β Flash loans, complex patterns needed
DON'T USE WHEN:
β Need trustless XRP on Layer 1
β XRPL native feature integration critical
β Can't accept bridge trust assumptions
β Transaction filtering/guarding needed
β Must use native XRPL accounts directly
β Hooks meet all requirements
```
FEATURE EVM SIDECHAIN HOOKS (Xahau)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Status Live mainnet Live (Xahau)
Asset Bridged eXRP Native XAH
Trust model Bridge trust Direct on-chain
Language Solidity C
Tooling Mature Developing
Composability Full Limited
Flash loans Possible Impossible
Security model EVM standard Constrained
Transaction guard No Yes
Learning curve EVM familiar Hooks specificUSE CASE BEST PLATFORM
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Simple payment filter Hooks (Xahau)
Auto-forward payments Hooks (Xahau)
DEX aggregator EVM Sidechain
NFT marketplace EVM Sidechain
Lending protocol EVM Sidechain
Account protection Hooks (Xahau)
Cross-chain DeFi EVM Sidechain
Simple escrow Either
Governance/DAO EVM Sidechain
Token vesting EVM SidechainBRIDGING XRP TO EVM SIDECHAIN
- PREPARE
- INITIATE
- RECEIVE
BRIDGING BACK
- INITIATE
- RECEIVE
BRIDGE CHARACTERISTICS
Time:
βββ XRPL β EVM: ~5-15 minutes
βββ EVM β XRPL: ~5-15 minutes
βββ Varies with network conditions
βββ Not instant (verification required)
Costs:
βββ XRPL transaction fee (minimal)
βββ Bridge fee (varies, ~0.1-0.5%)
βββ EVM gas (paid in eXRP)
βββ Total: Generally small but not zero
Minimums:
βββ May have minimum bridge amounts
βββ Check bridge interface
βββ Typically reasonable (e.g., 10 XRP)
```
EVM SIDECHAIN SECURITY
Smart Contract Security:
βββ Standard EVM security applies
βββ Reentrancy guards needed
βββ Access control important
βββ Audit for production contracts
βββ OpenZeppelin for standards
Bridge Security:
βββ Limit amounts bridged
βββ Don't bridge more than you need
βββ Monitor bridge status
βββ Have contingency if bridge issues
βββ Understand trust assumptions
Operational Security:
βββ Secure private keys
βββ Use multisig for high-value
βββ Monitor contract activity
βββ Have upgrade plan if needed
βββ Test thoroughly on devnet
```
PERFORMANCE
Block Time:
βββ ~2-3 seconds
βββ Fast finality
βββ Predictable
Throughput:
βββ Higher than XRPL mainnet
βββ PoA enables speed
βββ Suitable for most applications
Gas:
βββ Lower than Ethereum mainnet
βββ eXRP as gas token
βββ Predictable costs
βββ Budget appropriately
```
ONGOING OPERATIONS
Monitor:
βββ Contract state
βββ Bridge health
βββ Gas prices
βββ Validator status
βββ Security alerts
Maintain:
βββ Keep dependencies updated
βββ Watch for new vulnerabilities
βββ Plan for upgrades if needed
βββ Document everything
βββ Test changes on devnet first
```
β EVM Sidechain is production-ready. Live since June 2025, functional, growing ecosystem.
β Axelar bridge works. Assets transfer, track record established.
β Full EVM compatibility. Standard Solidity contracts work.
β οΈ Long-term bridge security. No major incidents, but bridges are attack targets.
β οΈ Ecosystem growth. Will developers and users adopt?
β οΈ Relationship with native XRPL. How will ecosystem evolve?
π΄ Treating bridged eXRP as identical to native XRP. Trust assumptions differ.
π΄ Bridging more than necessary. Minimize bridge exposure.
π΄ Assuming EVM security patterns are perfect. EVM has known vulnerabilities; audit carefully.
The EVM Sidechain is the only production-ready XRPL smart contract option as of late 2025. It offers full Solidity support with reasonable trust assumptions. The trade-off is using bridged assets on a Layer 2 rather than native contracts on Layer 1. For many use cases, this trade-off is acceptable. For others, waiting for Hooks on mainnet or XLS-101 may be better.
Assignment: Deploy and interact with a contract on EVM Sidechain testnet.
Requirements:
Configure MetaMask for EVM Sidechain testnet
Get testnet eXRP from faucet
Document setup steps
Token contract (ERC-20)
Simple NFT (ERC-721)
Voting contract
Escrow contract
Clear comments
Events for key actions
Basic access control
Deploy to testnet
Verify on explorer
Document contract address
Screenshot of successful deployment
Call at least 3 contract functions
Document transactions
Show state changes
Verify events emitted
Working environment (20%)
Contract quality (30%)
Successful deployment (25%)
Complete interaction documentation (25%)
Time investment: 4-6 hours
Value: Hands-on EVM Sidechain experience
Knowledge Check
Question 1 of 4What is the production status of the XRPL EVM Sidechain?
- xrplevm.org - Official documentation
- EVM Sidechain Explorer
- Axelar Network documentation
- Hardhat documentation
- OpenZeppelin contracts
For Next Lesson:
We'll look at the future of XRPL programmabilityβupcoming features, ecosystem evolution, and strategic planning.
End of Lesson 18
Total words: ~4,200
Estimated completion time: 55 minutes reading + 4-6 hours for deliverable
Key Takeaways
EVM Sidechain is live and production-ready.
The only XRPL smart contract option available today.
It's a Layer 2 with bridged assets.
Not native XRPL; requires trust in bridge.
Full EVM compatibility.
Standard Solidity, standard tools, familiar patterns.
Bridge trust assumptions matter.
Understand what you're trusting.
Evaluate trade-offs for your use case.
Layer 2 may be fine; Layer 1 may be worth waiting for. ---