LRC-20 Bridgable Extension
Optional extension of the fungible token standard to support native bridging operations via burn and mint
Abstract
This extension adds bridge-specific burn and mint functions to LRC-20 tokens, enabling native cross-chain asset transfers via the Lux Teleport Protocol.
Motivation
Bridgable tokens allow seamless interoperability across chains without wrapping, improving security and liquidity for cross-chain applications.
Specification
interface IERC20Bridgable is IERC20Mintable, IERC20Burnable {
/**
* @dev Burns `_amount` tokens from caller for cross-chain bridge.
*/
function bridgeBurn(address to, uint256 amount) external;
/**
* @dev Mints `_amount` bridged tokens to `_from` upon cross-chain arrival.
*/
function bridgeMint(address from, uint256 amount) external;
}
Rationale
By combining mint/burn with bridging semantics, this extension standardizes cross-chain token movement and aligns token contracts with the Lux Teleport protocol requirements.
Backwards Compatibility
This is a backwards-compatible extension built on LRC-20, LRC-20Mintable, and LRC-20Burnable. Core token functionality remains intact.
Test Cases
Standard tests should cover:
- bridgeBurn and bridgeMint flows
- Integration with Teleport Protocol engine
- Supply consistency across burns and mints
Reference Implementation
See the IERC20Bridgable interface in the standard repository:
/standard/src/interfaces/IERC20Bridgable.sol
Implementation
LRC-20 Bridgable Token Contracts
Location: ~/work/lux/standard/src/tokens/
Core Contracts:
LRC20.sol- Base implementationERC20Bridgable.sol- Bridge extensionERC20Mintable.sol- Minting capabilityERC20Burnable.sol- Burning capability
Bridge Integration (Teleport Protocol):
- Location:
~/work/lux/standard/src/bridge/ TeleportMessenger.sol- Cross-chain messagingBridgeRelay.sol- Message relay
Bridging Implementation:
// Example from ERC20Bridgable.sol
function bridgeBurn(address from, uint256 amount) external onlyBridgeRelayer {
require(from != address(0), "Invalid address");
_burn(from, amount);
emit BridgeBurn(from, amount);
}
function bridgeMint(address to, uint256 amount) external onlyBridgeRelayer {
require(to != address(0), "Invalid recipient");
_mint(to, amount);
emit BridgeMint(to, amount);
}
Testing:
cd ~/work/lux/standard
forge test --match-contract ERC20BridgableTest
forge coverage --match-contract ERC20Bridgable
Gas Costs
| Operation | Gas Cost | Notes |
|---|---|---|
| bridgeBurn | ~45,000 | Token burn + bridge event |
| bridgeMint | ~50,000 | Token mint + bridge event |
| setBridgeRelayer | ~20,000 | Access control update |
Security Considerations
- Ensure strict access control on bridgeMint to prevent unauthorized minting.
- Validate correct burn amounts and cross-chain message proofs.
- Only bridge relayers can invoke bridgeBurn/bridgeMint.
- Implement rate limiting to prevent bridge floods.
- Verify message signatures from the Teleport Protocol.
Copyright
Copyright and related rights waived via CC0.```