Immutable on-chain communication protocol. One contract, eight chains, permanent messages. No owner, no admin, no upgrades.
OnChain Message is an immutable smart contract protocol that enables anyone to send permanent, censorship-resistant messages on the blockchain. Messages can be broadcast publicly or sent directly to any Ethereum address.
The protocol is deployed at a single deterministic contract address across 8 EVM-compatible chains: Ethereum, Base, BNB Smart Chain, Arbitrum, Polygon, Monad, Sonic, and HyperEVM.
The contract has no owner, no admin keys, no upgrade proxy, and no pause mechanism. Once deployed, it cannot be modified by anyone. This is a deliberate and permanent design decision. The protocol charges a flat, tiered fee per message based on length, with all fees forwarded to an immutable fee recipient address.
Blockchains are excellent at transferring value but terrible at transferring information. There is no native mechanism in the EVM for one address to send a human-readable message to another address.
Whitehat communication. When a protocol is exploited, the only way to reach the attacker is to encode a message in a transaction's input data field. This requires technical knowledge most users and even most protocol teams do not possess. Critical negotiations are delayed by hours or days.
Anonymous contact. Pseudonymous developers, artists, and operators have no public inbox. Twitter DMs can be disabled. Discord requires joining a server. Email requires doxxing. An on-chain message to their deployer address is the only truly permissionless way to reach them.
Permanent public statements. Tweets get deleted. Websites go down. Blog posts are edited. There is no widely-used tool for making permanent, immutable public statements on-chain.
Existing solutions are inadequate. Etherscan's Input Data Messages (IDM) feature requires users to manually encode hex data. It has no recipient field, no inbox, no notification system, and no cross-chain support. It is a developer tool, not a user-facing product.
The protocol is governed by five immutable design principles:
Immutability. No owner, no admin, no upgrade proxy, no pause mechanism, no selfdestruct. Once deployed, behavior is fixed forever.
Permissionless. Any address can send a message to any other address. No registration, no approval, no KYC.
Simplicity. One function: sendMessage(address to, string message). The entire contract is under 80 lines of Solidity.
Deterministic deployment. Same contract at the same address on all 8 chains using CREATE2.
Transparent pricing. Fees are hardcoded as constants. They cannot be changed. Users always know exactly what a message costs.
The contract exposes a single external function and emits a single event:
function sendMessage(address to, string calldata message) external payable event MessageSent( address indexed sender, address indexed to, string message, uint256 timestamp )
The sender and to fields are both indexed, enabling efficient filtering by either party. Frontend applications can query for all messages sent by a specific address, all messages sent to a specific address, or both.
Messages are stored as event logs, not in contract storage. Event logs are part of the blockchain's permanent record and cost significantly less gas than SSTORE operations. This is the correct tradeoff: messages are write-once, read-many data.
The contract follows the Checks-Effects-Interactions (CEI) pattern. Execution flow: (1) validate message length, (2) determine tier pricing, (3) validate msg.value, (4) emit MessageSent event, (5) forward payment to fee recipient. The external call is always last, preventing reentrancy.
The fee recipient is declared as a constant (not immutable), meaning it is embedded directly in the bytecode at compile time. There is no function to change it, no function to withdraw stuck funds, and the receive() function reverts unconditionally.
Message fees are determined by byte length. All thresholds and prices are hardcoded constants.
| Tier | Max Bytes | ~Characters | Price |
|---|---|---|---|
| Short | 560 | ~280 | 0.005 ETH |
| Medium | 2,000 | ~1,000 | 0.01 ETH |
| Long | 200,000 | ~100,000 | 0.05 ETH |
The byte-length approach ensures consistent pricing across all encodings. ASCII = 1 byte, multi-byte UTF-8 (emoji, CJK) = 2-4 bytes. Exact msg.value must match the required tier; overpayment and underpayment both revert.
Public Broadcast. When to = address(0), the message is a public broadcast visible in the Global Feed. Suitable for announcements, statements, and on-chain proofs.
Direct Message. When to = any non-zero address, the message is directed at that recipient and appears in their Inbox. Important: direct messages are still publicly visible on the blockchain. "Direct" affects routing, not privacy.
Self-Message. When to = msg.sender, the message functions as an on-chain note-to-self or personal timestamp. Appears in both Sent and Inbox views.
The contract is deployed at the same deterministic address across all 8 chains using CREATE2. Users interact with a single address regardless of chain.
| Chain | Chain ID | Native Token |
|---|---|---|
| Ethereum | 1 | ETH |
| Base | 8453 | ETH |
| BNB Smart Chain | 56 | BNB |
| Arbitrum One | 42161 | ETH |
| Polygon | 137 | POL |
| Monad | 143 | MON |
| Sonic | 146 | S |
| HyperEVM | 999 | HYPE |
Messages on different chains are independent. The protocol fee is the same across all chains; only the network gas fee varies. L2 chains offer significantly lower gas costs.
The frontend is a single static HTML file hosted on Cloudflare Pages (free tier). No backend, no database, no server-side logic, no API keys. All blockchain interaction happens client-side via ethers.js and free public RPC endpoints.
Wallet connection uses EIP-6963 for multi-wallet discovery, allowing users to select from all installed browser wallets via a modal.
The frontend implements a "Last 25" query pattern. Rather than scanning a time range, it queries backward from the latest block and stops at 25 messages. This scales to infinite volume with constant query cost.
ENS names are resolved against Ethereum mainnet and cached in-session. Full 42-character addresses are always displayed alongside ENS names to prevent address poisoning attacks.
Contract security. CEI pattern. External call (fee transfer) always last. Custom errors for gas efficiency. No loops, no unbounded arrays, no delegatecall. receive() reverts unconditionally.
Frontend security. All user content escaped via textContent to prevent XSS. No API keys exposed. Address inputs validated via ethers.isAddress(). Free public RPCs with rotation fallback.
Anti-spoofing. Full 42-character addresses displayed everywhere. Never truncated. All addresses link to the chain's block explorer for independent verification.
Whitehat negotiation. After a protocol exploit, message the attacker's address to request return of funds or establish communication.
Anonymous contact. Reach pseudonymous developers, artists, or operators via their on-chain address without requiring social media.
On-chain proof. Timestamp a statement, prediction, or commitment permanently with cryptographic proof of authorship.
DAO communication. Proposals, announcements, and governance messages recorded permanently on-chain.
Public declarations. Open letters and manifestos that cannot be edited, deleted, or censored.
Cross-chain presence. Maintain separate on-chain message histories across multiple chains from a single address.
All message fees are forwarded to the immutable fee recipient in the same transaction. No accumulated balance, no withdrawal function, no way to change the recipient. Revenue flows directly and immediately.
The tiered model incentivizes short messages (high volume, low friction) while capturing higher value from longer content. At scale, the effective average revenue is approximately 0.008 ETH per message.
Phase 1 — Launch (Q1 2026). Contract deployment and verification on all 8 chains. Static frontend on Cloudflare Pages.
Phase 2 — Growth (Q2 2026). Dune Analytics dashboard. Share-to-X viral loop optimization. Community outreach to whitehat and security communities.
Phase 3 — Scale (Q3-Q4 2026). Subgraph/indexer if volume exceeds 5K messages/day/chain. Shareable OG previews via Cloudflare Workers. Additional chain deployments.
Phase 4 — Ecosystem (2027+). Third-party frontend integrations. Wallet-native messaging partnerships. Multi-language support. Reply threading.
OnChain Message is a protocol, not a product. The contract is immutable. The frontend is a convenience layer anyone can rebuild. The messages are permanent. Even if every frontend disappears, every message ever sent remains on-chain, readable by any node, any block explorer, any application, forever.
This is not a communication platform with terms of service or content moderation. It is a piece of immutable infrastructure — a public good for the EVM ecosystem. The contract charges a fee for sustainability, not for access. Anyone can read messages for free. Anyone can build a frontend. The protocol simply exists.