This guide is intended for developers who want to understand the technical implementation of the bridge mechanism. For user-friendly instructions, see Deposit Tokens.
The bridge utilizes a dual consensus architecture (Plasma + PoS platform) to prioritize speed and decentralization, with deliberate enabling of arbitrary state transitions on its sidechains along with EVM support.
How State Sync Works
To natively read Ethereum data from the Shibarium EVM chain, the mechanism utilized is known as ‘State Sync’. This process facilitates the transfer of arbitrary data from the Ethereum chain to the Shibarium chain. The essential steps involve validators on the Heimdall layer listening for a specific event called ‘StateSynced’ from a Sender contract. Once this event is detected, the associated data is written to the Receiver contract.1
Deploy Sender Contract
Deploy the Sender contract on Sepolia (Ethereum testnet). The Sender contract’s primary function is to call the
syncState
function on the StateSender contract.Use Remix to deploy the contract and note the address and ABI for later use.
2
Deploy Receiver Contract
Deploy the Receiver contract on Puppynet (Shibarium’s testnet). The Receiver contract is invoked by a Validator when the ‘StateSynced’ event is emitted.
3
Map Sender and Receiver
Use the deployed addresses or deploy custom contracts and request a mapping through the Shibarium bridge interface.
The
StateSender.sol
contract must be aware of each sender and receiver, and a mapping request should be initiated.4
Send and Receive Data
Write a node script to send arbitrary hex bytes, receive them on Puppynet, and interpret the data.
Contract Addresses
StateSender Contract Addresses
Network | Address |
---|---|
Sepolia | 0x0844c0ca42F24972e89233F476B033F763C2355a |
Ethereum Mainnet | 0x3a122785bC4d951D132B2CAD31FC187D6DC7A21C |
Token Transfer Process
When your token crosses the bridge, it does not change its circulating supply:- Token leaves Ethereum: Shibarium mints the same number of tokens (1:1) as a pegged token
- Token returns to Ethereum: Tokens are burned on the Shibarium network and unlocked on the Ethereum network
This 1:1 ratio ensures that the total circulating supply remains constant across both networks.
Security Considerations
Always verify contract addresses and ensure you’re interacting with the official Shibarium bridge contracts.
- The bridge utilizes both Plasma and PoS security mechanisms
- Validators on the Heimdall layer ensure data integrity
- State Sync events are validated before processing
- Contract mappings must be approved through official channels
Troubleshooting
Transaction not appearing on Shibarium
Transaction not appearing on Shibarium
- Verify the StateSynced event was emitted on Ethereum
- Check that your Receiver contract is properly mapped
- Ensure validators have processed the checkpoint
- Wait for the standard processing time (45min-1.5 hours)
Mapping request failed
Mapping request failed
- Ensure both contracts are deployed on the correct networks
- Verify contract addresses are correct
- Check that contracts follow the required interfaces
- Contact support if issues persist
Gas estimation errors
Gas estimation errors
- Ensure sufficient ETH for gas fees
- Check network congestion on Ethereum
- Verify contract state and parameters
- Consider using gas price optimization tools
Next Steps
- Learn about Shibarium to Ethereum transfers
- Understand token compatibility requirements
- Explore deposit token procedures