Overview
TheSolana_Adapter enables the HubPool to bridge USDC from Ethereum to Solana using Circle’s Cross-Chain Transfer Protocol (CCTP). This is the first and only adapter in Across Protocol that bridges to a non-EVM chain.
Key Features
- CCTP-Only: Exclusively uses Circle CCTP for USDC transfers
- SVM Integration: First cross-chain adapter for Solana Virtual Machine
- Address Conversion: Maps Solana’s 32-byte addresses to EVM 20-byte format
- Restricted Target: Only allows bridging to Solana SpokePool
- Message Support: Can send arbitrary messages via CCTP MessageTransmitter
Contract Reference
Location:contracts/chain-adapters/Solana_Adapter.sol
Constructor
_l1Usdc- USDC token address on Ethereum (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)_cctpTokenMessenger- Circle CCTP TokenMessenger contract_cctpMessageTransmitter- Circle CCTP MessageTransmitter contractsolanaSpokePool- Solana SpokePool program address (Base58 decoded to bytes32)solanaUsdc- USDC mint address on Solana (Base58 decoded to bytes32)solanaSpokePoolUsdcVault- Solana SpokePool’s USDC ATA (Associated Token Account)
Immutable Variables
Address Conversion
Solana to EVM Mapping
Solana uses 32-byte addresses (Base58 encoded), while EVM uses 20-byte addresses. The adapter uses theBytes32ToAddress library to convert:
- Setting Solana spoke pool in
setCrossChainContracts() - Configuring pool rebalance routes
- Setting deposit routes
Core Functions
relayMessage()
Sends arbitrary messages to Solana SpokePool via CCTP MessageTransmitter.- Target MUST be the Solana SpokePool address (EVM representation)
- Uses CCTP’s
sendMessage(), notdepositForBurn()
- MessageTransmitter emits
MessageSentevent on Ethereum - Circle attestation service signs the message
- Relayer submits message + attestation to Solana
- Solana SpokePool program receives and processes message
relayTokens()
Bridges USDC from Ethereum to Solana SpokePool’s USDC vault.- L1 token: Must be USDC
- L2 token: Must be Solana USDC (EVM representation)
- Amount: Must fit in uint64 (Solana limitation)
- Recipient: Must be Solana SpokePool (EVM representation)
toparameter: SpokePool program address (validated but not used)- Actual recipient:
SOLANA_SPOKE_POOL_USDC_VAULT(SpokePool’s USDC ATA)
_transferUsdc()
Inherited fromCircleCCTPAdapter, handles CCTP bridging:
_transferUsdc() to accept bytes32 recipient instead of address.
Circle CCTP Integration
CCTP Contracts
TokenMessenger (Ethereum mainnet):- Address:
0xBd3fa81B58Ba92a82136038B25aDec7066af3155 - Used for:
depositForBurn()to bridge USDC
- Address:
0x0a992d191DEeC32aFe36203Ad87D7d289a738F81 - Used for:
sendMessage()to send arbitrary messages
Circle Domain IDs
CCTP Message Flow
- Ethereum:
TokenMessenger.depositForBurn()burns USDC and emits event - Circle Attestation: Circle’s attestation service signs the burn event
- Relayer: Fetches attestation and submits to Solana
- Solana: CCTP program verifies attestation and mints USDC to recipient ATA
Solana-Specific Concepts
Associated Token Accounts (ATAs)
In Solana, programs (smart contracts) don’t hold tokens directly. Instead, each program has an Associated Token Account for each SPL token:Base58 Encoding
Solana addresses are displayed in Base58 encoding:bytes32 (hex decoded from Base58).
Program vs Account
In Solana terminology:- Program: Smart contract logic (like Solana SpokePool)
- Account: State storage (like USDC balance in ATA)
Limitations
USDC Only
Unlike other adapters, Solana adapter ONLY supports USDC:Solana SpokePool Only
BothrelayMessage() and relayTokens() restrict the target:
Amount Limit
Solana uses uint64 for token amounts (not uint256):Examples
Send Admin Message to Solana SpokePool
Bridge USDC to Solana
Derive Solana Addresses for Constructor
Security Considerations
Address Validation
The adapter strictly validates all addresses:- Bridging to arbitrary Solana addresses
- Bridging tokens other than USDC
- Sending messages to unauthorized recipients
CCTP Trust Assumptions
The adapter relies on Circle’s CCTP infrastructure:- Circle’s attestation service must be available and honest
- Circle can pause CCTP contracts (emergency stop)
- USDC mint authority on Solana controlled by Circle
Amount Overflow Protection
Admin Verification on Solana
The Solana SpokePool program validates admin messages:Gas and Fees
Ethereum L1 Gas
Typical gas costs:| Operation | Estimated Gas |
|---|---|
| relayMessage | ~100,000 |
| relayTokens | ~120,000 |
Circle CCTP Fees
CCTP does not charge bridging fees (as of 2024). The only costs are:- Ethereum L1 gas for
depositForBurn() - Solana transaction fees for attestation submission (paid by relayer)
Solana Transaction Fees
Solana has very low transaction fees (~0.000005 SOL per signature). The relayer pays for:- Submitting CCTP attestation
- Executing message on SpokePool program
Related Contracts
Solana_SpokePool(Rust program) - Receives CCTP messages and processes admin functionsCircleCCTPAdapter.sol- Base library for CCTP integrationBytes32ToAddress.sol- Library for Solana address conversionAdapterInterface.sol- Common interface for all chain adapters
External References
- Circle CCTP Documentation
- CCTP Solana Integration
- Solana Program Documentation
- SPL Token Program
- Associated Token Account Program