project screenshot 1
project screenshot 2
project screenshot 3

Lumina Protocol

Cross-chain emotional messaging with commemorative NFTs via Hyperlane infrastructure

Lumina Protocol

Created At

ETHGlobal New York 2025

Project Description

How Lumina Uses Hyperlane for Cross-Chain Communication?

Lumina leverages Hyperlane's robust cross-chain messaging infrastructure in several key ways:

  • Hyperlane Mailbox Integration: The protocol uses Hyperlane's IMailbox interface to dispatch messages between chains (Base Sepolia ↔ Ethereum Sepolia), ensuring secure and reliable cross-chain communication.
  • Automatic Message Routing: When users send a "luminous message," the smart contract uses mailbox.dispatch() to route the encoded message data across chains, handling all the complex bridging infrastructure automatically.
  • Bidirectional Confirmation System: Lumina implements a sophisticated confirmation mechanism where the destination chain automatically sends back confirmation messages to the source chain via Hyperlane, ensuring message delivery verification.
  • Gas Fee Management: The protocol intelligently manages cross-chain gas payments through Hyperlane's fee structure, making cross-chain messaging accessible to everyday users.

Why This Project is Important for Cross-Chain Social Interaction?

Lumina Protocol addresses a critical gap in the fragmented blockchain ecosystem by creating a truly cross-chain social experience that breaks down blockchain silos and enables meaningful communication between users across different networks like Base and Ethereum. Unlike ephemeral social media posts, Lumina messages are permanently stored on-chain with emotional context through "resonance types" (Love, Serenity, Grace), creating lasting digital artifacts of human connection that transcend blockchain boundaries. The protocol's innovative approach automatically mints unique commemorative NFTs for every successful cross-chain message, gamifying social interactions while providing tangible value for meaningful connections. By abstracting away the complexity of cross-chain operations—where users simply write a message, select an emotion, and let the protocol handle all routing, confirmations, and NFT minting—Lumina delivers seamless user experience innovation that makes cross-chain communication accessible to everyone. As the blockchain ecosystem becomes increasingly multi-chain, Lumina provides essential social infrastructure that enables communities to maintain connections regardless of their preferred chain, while simultaneously building cultural bridges between different blockchain communities through permanent records of inter-chain emotional expression, ultimately fostering understanding and collaboration across the fragmented crypto ecosystem and establishing the foundation for a unified multi-chain social future.

How it's Made

How it's made #Core Architecture & Smart Contract Development

I built Lumina Protocol as a sophisticated cross-chain messaging system using Solidity smart contracts deployed on both Base Sepolia and Ethereum Sepolia testnets. The core contract inherits from OpenZeppelin's ERC721 standard for NFT functionality and implements a custom cross-chain messaging protocol through Hyperlane's IMailbox interface.

#Cross-Chain Infrastructure with Hyperlane

The backbone of Lumina is Hyperlane's interoperability protocol. I integrate directly with Hyperlane's mailbox contracts on both chains, using their dispatch() function to send encoded message data across networks. What's particularly clever is my bidirectional confirmation system - when a message arrives on the destination chain, it automatically triggers an NFT mint and sends a confirmation message back to the source chain via Hyperlane, creating a complete cross-chain feedback loop.

#Smart Contract Innovation

I implemented several notable technical features:

  • Essence-based Message Uniqueness: Each message generates a unique bytes32 essence hash combining sender, content, timestamp, resonance type, and chain ID, preventing duplicate messages across chains
  • Automatic NFT Minting: The handle() function automatically mints commemorative NFTs when cross-chain messages are received, with metadata stored entirely on-chain using Base64 encoding
  • Gas Management: Built-in gas fee handling for cross-chain operations with configurable minimum payments (0.0001 ETH)
  • Reentrancy Protection: Custom reentrancy guards protect against potential attacks during cross-chain operations

Frontend & Web3 Integration

I built the frontend as a minimalist single-page application using vanilla JavaScript with Ethers.js v5.7.2 for Web3 interactions. I chose a clean, terminal-inspired black-and-white aesthetic to emphasize the protocol's focus on meaningful communication over flashy visuals. The interface handles complex multi-chain operations seamlessly - users connect once to Base Sepolia, and the app automatically manages cross-chain message sending, status tracking, and NFT display.

Particularly Hacky/Notable Technical Implementations

  1. Dual-Chain Event Tracking: I built a sophisticated event monitoring system that tracks transactions across both chains simultaneously. The frontend queries events from both Base and Ethereum Sepolia, then correlates them to build complete transaction histories showing the full cross-chain journey of each message.

  2. Dynamic Message Correlation: Since cross-chain messages don't have direct references, I implemented a matching algorithm that correlates messages between chains based on content, sender, and timestamp proximity (within 1-hour windows), enabling accurate cross-chain status tracking.

  3. Automatic Network Switching: The app intelligently detects the user's current network and automatically prompts MetaMask to switch to Base Sepolia when needed, handling the entire network addition process if the user doesn't have Base configured.

  4. Graceful Degradation: If event querying fails due to RPC limitations, the system falls back to displaying general contract links instead of specific transaction hashes, ensuring the UI never breaks.

Partner Technology Benefits

  1. Hyperlane was crucial for several reasons:
  • Simplified Cross-Chain Development: Hyperlane's mailbox abstraction eliminated the need for me to implement custom bridge logic
  • Reliable Message Delivery: Built-in delivery guarantees and gas management Testnet Support: Excellent Base Sepolia and Ethereum Sepolia support for development Developer Experience: Clean APIs and comprehensive documentation made integration seamless
  1. Hardhat significantly accelerated my development process:
  • Local Development Environment: Hardhat's local blockchain and forking capabilities allowed me to test cross-chain interactions without constantly deploying to testnets
  • Advanced Debugging: Built-in console.log support and stack traces made debugging complex cross-chain message flows much easier
  • Deployment Scripts: Automated deployment and verification scripts streamlined the process of deploying contracts to multiple chains
  • Testing Framework: Comprehensive testing suite helped me validate the cross-chain confirmation system before mainnet deployment

Tech Stack Smart Contracts:

Solidity ^0.8.20 OpenZeppelin Contracts (ERC721, Ownable, Base64, Strings) Hyperlane IMailbox interface Blockchain Infrastructure:

Base Sepolia (Source Chain) Ethereum Sepolia (Destination Chain) Hyperlane Cross-Chain Messaging Protocol Frontend:

Vanilla JavaScript ES6+ Ethers.js v5.7.2 for Web3 interactions HTML5/CSS3 with custom responsive design MetaMask wallet integration Development & Deployment:

Remix IDE for smart contract development Alchemy RPC providers for reliable blockchain connectivity Git for version control Base Sepolia and Ethereum Sepolia testnets for deployment External APIs & Services:

Alchemy Web3 API for blockchain data Base Sepolia and Ethereum Sepolia block explorers for transaction verification IPFS-free design (all metadata stored on-chain) The entire system operates without traditional backend infrastructure - everything runs on-chain or in the browser, making it truly decentralized and censorship-resistant.

background image mobile

Join the mailing list

Get the latest news and updates