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. ---