Transaction speed benchmark tool for Universal Account SDK.
sendTransactionTotal Statistics:
Runs: 10
Mean: 371.41ms
Median: 351.11ms
Min: 131.30ms
Max: 770.58ms
Std Dev: 185.00ms
All values: [131.30, 167.83, 187.09, 308.68, 345.29, 356.92, 439.08, 451.32, 555.95, 770.58]
Source Chain: SOLANA , Target Chain: SOLANA
sendTransactionTotal Statistics:
Runs: 5
Mean: 628.31ms
Median: 548.05ms
Min: 512.46ms
Max: 911.04ms
Std Dev: 148.50ms
All values: [512.46, 527.08, 548.05, 642.91, 911.04]
Source Chain: BASE , Target Chain: SOLANA
sendTransactionTotal Statistics:
Runs: 5
Mean: 1194.21ms
Median: 1107.94ms
Min: 948.53ms
Max: 1759.93ms
Std Dev: 290.49ms
All values: [948.53, 1019.25, 1107.94, 1135.38, 1759.93]
Source Chain: SOLANA , Target Chain: BASE
- Transaction speed testing for Universal Account
- Support for multiple chains (Solana, BSC, Base, Ethereum, etc.)
- Dual confirmation mode: WebSocket and polling race simultaneously, whichever completes first wins
- Statistical analysis of transaction times
- Classic and EIP-7702 mode support
npm installCopy .env.example to .env and fill in your credentials:
cp .env.example .envRequired environment variables:
PROJECT_ID: Your Particle project IDPROJECT_CLIENT_KEY: Your Particle client keyPROJECT_APP_UUID: Your Particle app UUIDPRIVATE_KEY_SOLANA: Private key for Solana transactionsPRIVATE_KEY_BSC: Private key for BSC transactionsPRIVATE_KEY_BASE: Private key for Base transactions
# Run with default settings (1 run on Solana)
npm start
# Run multiple times
npm start -- --runTimes=10
# Use EIP-7702 mode
npm start -- --uaMode=7702 --runTimes=10
# Test on different chains
npm start -- --sourceChain=solana --targetChain=bsc --runTimes=5
# Adjust fee rate and MEV settings
npm start -- --feeRate=2 --bribeAmount=0.001 --mevProtection=1
# Show help
npm start -- --help- Use
--runTime=0to get the Universal Account addresses - If your are using
--uaMode=7702, evm chain' Universal Account address is also the EOA address
--uaMode=<classic|7702>: Universal Account mode (default: classic)--runTimes=<number>: Number of benchmark runs (default: 1)--sourceChain=<chain>: Source chain (default: solana)--targetChain=<chain>: Target chain (default: sourceChain)--feeRate=<number>: Priority fee rate (default: 1)--bribeAmount=<number>: Solana MEV tip amount (default: 0)--mevProtection=<number>: MEV protection level (default: 2)--help, -h: Show help message
- Solana
- BSC (BNB Smart Chain)
- Base
- Solana
- BSC
- Base
- Ethereum
- X Layer
- Monad
- Optimism
- Arbitrum
- Polygon
- Berachain
- Mantle
- Sonic
- Avalanche
The benchmark measures the following timing metrics:
- getTokenPair: Time to fetch token pair information
- createBuyTransaction: Time to create buy transaction
- sendTransaction: Time to send transaction
- getTransaction: Time to confirm transaction (WSS and polling race simultaneously, prints which method won)
- sendTransactionTotal: Total time from send to confirmation
Statistics provided for each metric:
- Mean
- Median
- Min/Max
- Standard Deviation
- All individual values
---- Using RPC - https://universal-rpc-proxy.particle.network ----
---- Using WSS - wss://universal-app-ws-proxy.particle.network ----
---- Creating WSS connection for racing with polling ----
Running benchmark 5 time(s)...
Your UA EVM Address: 0x...
Your UA Solana Address: ...
Run 1/5:
createBuyTransaction: 1234.56ms
sendTransaction: 234.56ms
Explorer URL: https://universalx.app/activity/details?id=...
getTransaction: 2345.67ms (used: wss)
sendTransactionTotal: 2580.23ms
...
Run 2/5:
createBuyTransaction: 1100.00ms
sendTransaction: 200.00ms
getTransaction: 1800.00ms (used: polling)
sendTransactionTotal: 2000.00ms
...
getTokenPair Statistics:
Runs: 5
Mean: 1234.56ms
Median: 1230.00ms
Min: 1200.00ms
Max: 1280.00ms
Std Dev: 25.34ms
...
Source Chain: SOLANA , Target Chain: SOLANA
Using RPC: https://universal-rpc-proxy.particle.network , Fee Rate: 1 , Bribe Amount: 0 , Mode: WSS+Polling Race
# Build TypeScript
npm run build
# Run from source
npm run devMIT