Week 14 at Blockfuse Labs
This week was all about building. Here’s a deep dive into what we worked on:
As blockchain ecosystems evolve, interoperability across chains is becoming increasingly important. Token bridges are the infrastructure that enable seamless asset transfers between networks.
In this post, I’ll walk through how we implemented a Lock & Mint token bridge for ERC-20 tokens, including the smart contract logic, the relayer role, and how we bridged tokens between Base and Sepolia testnets.
Bridge an ERC-20 token (BBT
) from Base to Sepolia, and back.
The Lock & Mint pattern works by:
This ensures a controlled token supply — no tokens are created out of thin air, just value moved across chains.
Flow (Base → Sepolia):
Lock → Emit Event → Relayer → Mint
Return (Sepolia → Base):
Burn → Emit Event → Relayer → Release
This function:
BridgeInitiated
event for the relayerbridgeOperations
Smart contracts on different chains can’t communicate directly. A relayer listens for BridgeInitiated
events on Base and then calls mintTokens
on Sepolia to complete the transfer.
The user receives wBBT
on Sepolia, fully backed by the 30 BBT locked on Base.
To reverse the bridge, we follow a mirrored process.
This burns the wrapped tokens and emits a new BridgeInitiated
event.
The original tokens are released from the Base contract and returned to the user.
The full working implementation is available here:
https://github.com/chain-builders/Token-Bridge
Token bridges like this unlock real utility, especially in ecosystems where different chains are optimized for different goals — such as low-fee L2s or isolated testnets.
By combining event-driven smart contracts with a trusted relayer, our Lock & Mint bridge offers a simple, secure, and extensible way to move tokens between networks.