Key Terminology
| Term | Definition |
|---|---|
| RootChain | Polygon's base chain (Ethereum Mainnet or Goerli) hosting staking contracts |
| ChildChain | Polygon mainnet or Mumbai testnet |
| RootToken | Original token on Ethereum blockchain |
| ChildToken | Equivalent token on Polygon blockchain |
Bridge Types in Polygon
Polygon offers two bridge solutions for asset transfer between chains:
Plasma Bridge
- More secure due to Plasma's exit mechanism
- 7-day withdrawal period from Polygon to Ethereum
PoS Bridge
- Faster transactions (single checkpoint period)
- Preferred for most use cases
๐ Discover how to optimize your cross-chain transfers
How PoS Bridge Works
The PoS Bridge consists of several smart contracts:
1. Token Mapping Creation
To enable cross-chain transfers:
- Submit mapping request via Polygon Mapper
- Polygon team adds the RootToken-ChildToken relationship in Registry.sol
function mapToken(
address _rootToken,
address _childToken,
bool _isERC721
) external onlyGovernance {
require(_rootToken != address(0x0) && _childToken != address(0x0), "INVALID_TOKEN_ADDRESS");
rootToChildToken[_rootToken] = _childToken;
childToRootToken[_childToken] = _rootToken;
isERC721[_rootToken] = _isERC721;
IWithdrawManager(contractMap[WITHDRAW_MANAGER]).createExitQueue(_rootToken);
emit TokenMapped(_rootToken, _childToken);
}2. Ethereum to Polygon Transfers
Process flow:
- User initiates transfer via DepositManager
- Tokens get locked on Ethereum
- StateSender notifies Polygon chain
- After checkpoint period, tokens minted on Polygon
Key components:
- DepositManager.sol (Ethereum)
- ChildChain.sol (Polygon)
- ChildToken contract (implements deposit/withdraw)
// Deposit function in ChildERC20
function deposit(address user, bytes calldata depositData) external {
uint256 amount = abi.decode(depositData, (uint256));
_totalSupply = _totalSupply.add(amount);
_balances[user] = _balances[user].add(amount);
emit Transfer(address(0), user, amount);
}Polygon to Ethereum Transfers
The withdrawal process mirrors the deposit mechanism:
- Tokens burned on Polygon
- StateSender notifies Ethereum
- After checkpoint, tokens released on Ethereum
๐ Learn advanced bridge strategies
FAQ Section
Q: How long does a PoS Bridge transfer take?
A: Typically completes within one checkpoint period (~10-30 mins).
Q: Can any token use the PoS Bridge?
A: Yes, after proper mapping approval by Polygon team.
Q: What's the difference between Plasma and PoS Bridge?
A: Plasma offers higher security but longer withdrawal times (7 days vs minutes).
Q: Who maintains the bridge contracts?
A: Polygon team deploys and manages core bridge components.
Q: Is there a transaction limit for PoS Bridge?
A: Yes, maximum ERC20 deposit amounts are enforced for security.
Q: Can I map my own token without Polygon's help?
A: No, token mapping requires Polygon team approval for security reasons.