MultiVM Smart Contract
Details are provisional and may be updated during development.
When to Choose Which VM
One of the most common questions is: "Which VM should I use?" The answer depends on your specific requirements, and Arichain gives you the flexibility to choose the optimal execution environment for each component.
DeFi Protocols
EVM
Rich library ecosystem (OpenZeppelin, Uniswap), battle-tested patterns, complex state management
Gaming/Real-time
SVM
High TPS, predictable fees, parallel execution, sub-second finality
Payment Systems
SVM
Fixed fee structure, optimized for simple transfers, high throughput
DAO/Governance
EVM
Mature governance frameworks, extensive auditing tools, compliance integrations
High-Frequency Trading
SVM
Ultra-low latency, parallel transaction processing, optimized for speed
Complex Smart Contracts
EVM
Rich tooling ecosystem, extensive libraries, proven security patterns
EVM Deployment Guide
Deploy your existing Ethereum contracts without any modifications. The execution environment is identical to Ethereum mainnet.
// contracts/MyDeFiProtocol.sol - Your existing contract
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
contract MyDeFiProtocol {
ISwapRouter public immutable swapRouter;
constructor(address _swapRouter) {
swapRouter = ISwapRouter(_swapRouter);
}
function swapTokens(
address tokenIn,
address tokenOut,
uint256 amountIn,
uint256 amountOutMinimum
) external returns (uint256 amountOut) {
// Your existing DeFi logic - works identically
// All OpenZeppelin contracts work as-is
// All Uniswap integrations work as-is
ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({
tokenIn: tokenIn,
tokenOut: tokenOut,
fee: 3000,
recipient: msg.sender,
deadline: block.timestamp + 300,
amountIn: amountIn,
amountOutMinimum: amountOutMinimum,
sqrtPriceLimitX96: 0
});
amountOut = swapRouter.exactInputSingle(params);
}
}SVM Deployment Guide
Deploy your existing Solana programs without any modifications. The runtime environment is identical to Solana mainnet.
Your First MultiVM dApp
While your existing code works unchanged, Arichain enables powerful new capabilities by combining both virtual machines in a single application. This section shows how to leverage both EVM and SVM strengths simultaneously.
Hybrid Architecture Pattern
The most powerful pattern on Arichain is using each VM for what it does best:
Migration Guide
From Ethereum to Arichain
Your existing Ethereum applications can be deployed on Arichain with minimal changes, while gaining access to SVM capabilities for performance-critical components.
From Solana to Arichain
Your existing Solana programs work identically on Arichain, with the added benefit of EVM integration for complex business logic.
Last updated

