Technical
Smart Contract
Architecture, interface, and security properties of the MonadInscriptions contract.
Design philosophy
The MonadInscriptions contract is intentionally minimal. Its job is not to understand token semantics — it is simply a trusted, immutable anchor that validates fees, stores nothing, and emits events. All token logic lives off-chain in the indexer.
This design means the contract can be small, auditable, and extremely gas-efficient. There are no storage mappings, no access control tables, and no upgrade proxies in the core inscription path.
Minimal attack surface
Contract interface
The primary interface exposed to users is a single function:
interface IMonadInscriptions {// Emit an inscription. Requires msg.value == PROTOCOL_FEE.function inscribe(string calldata payload) external payable;// Returns the current protocol fee in wei.function protocolFee() external view returns (uint256);// Total fees collected since deployment.function totalFees() external view returns (uint256);}
inscribe(string)
| Field | Type | Description | Required |
|---|---|---|---|
| payload | string calldata | UTF-8 JSON string conforming to the MON-20 standard. The contract does not parse or validate JSON — it only checks that the string is non-empty. | YES |
The function requires msg.value to equal exactly protocolFee() (10 MON = 10 × 10¹⁸ wei). If the value is wrong — too high or too low — the call reverts.
Events
The contract emits one event per successful inscription:
event Inscribed(address indexed from,string payload,uint256 timestamp);
| Field | Type | Description | Required |
|---|---|---|---|
| from | address indexed | The msg.sender — the wallet that signed and submitted the transaction. Used by the indexer as the initiator of the operation. | YES |
| payload | string | The raw JSON payload passed to inscribe(). Not validated on-chain — the indexer is responsible for JSON parsing and rule enforcement. | YES |
| timestamp | uint256 | block.timestamp at the time of inclusion. Used for display purposes only — the indexer uses block number + tx index for canonical ordering. | YES |
from address, allowing efficient filtering. To query all inscriptions by a specific wallet, filter Inscribed events by the from topic.Fee collection
Collected fees accumulate in the contract's ETH balance. The contract exposes a withdraw function restricted to the protocol treasury address:
// Only callable by the protocol treasury addressfunction withdrawFees(address payable recipient) external onlyTreasury;
No user refunds
Security properties
No reentrancy risk
The inscribe() function uses the checks-effects-interactions pattern. Fees are recorded before any external ETH transfer occurs. There is no external call in the mint path.
No upgrade proxy
The core contract is not upgradeable. Once deployed, inscription logic and event schemas are permanent. Future versions of the protocol will use a new contract address.
No token custody
The contract holds only collected protocol fees in MON. It never custodies user tokens because MON-20 tokens have no on-chain representation — balances are purely indexer-derived.
Deterministic ordering
Monad's consensus ensures a canonical block and transaction order. The indexer relies on this ordering to resolve conflicts (e.g. racing deploys of the same ticker).
Open source
The contract source code is publicly available and has been reviewed by the team. A formal third-party audit is planned prior to mainnet launch.
Contract addresses
The current deployment is on Monad Testnet. Mainnet addresses will be published separately at launch.