Back to Blog Overview

Molecule Protocol Whitepaper

The anatomy of the Molecule Protocol upgrade: a modular smart account that gives every research project a permanent identity and a single home for its assets.

27 min read
Phill Lee
Molecule Protocol Whitepaper

Abstract

Decentralized science requires a durable onchain foundation to manage the complexity of modern research. Historically, scientific assets within the web3 ecosystem (datasets, intellectual property tokens, provenance/history, and treasury funds) have existed as disconnected primitives across fragmented protocols. Researchers and institutions have lacked a unified entity capable of holding these assets together, accumulating an auditable history, and transferring ownership without disrupting the underlying scientific work or introducing significant security liabilities.

Molecule aims to resolve this structural deficit by introducing the Onchain Lab: a modular, NFT-bound smart account equipped with a verifiable identity layer. The protocol combines account abstraction [1], token-bound accounts [2], and attestation-gated modularity [3, 4] into a single cohesive system. Every Lab operates as a sovereign container; it possesses a permanent onchain identity and the capability to own any digital asset, while its control is entirely dictated by the ownership of a standard ERC-721 token, the LabNFT [5].

By flattening the hierarchy of scientific primitives and separating the identity of a project from the transient keys of its operators, Onchain Labs provides the primary engine for data management, scientific verification, and value accrual in decentralized science.

The Problem

Scientific progress is an iterative, persistent, and highly collaborative endeavor. It advances through a continuous cycle of hypothesis generation, experimentation, data analysis, and peer validation. When a specific line of inquiry yields a negative result, the research project itself does not conclude; the methodologies developed and the validated negative data remain valuable assets that inform subsequent investigations.

Existing web3 infrastructure fails to model this reality. The prevailing models enforce a rigid coupling between assets and specific hypotheses, framing scientific research as a binary bet on a single outcome. Furthermore, the foundational tools used to manage onchain entities introduce severe limitations for institutional collaboration:

  • Externally Owned Accounts (EOAs): Standard wallets bind identity and control into a single private key. The reputation accrued by a research project becomes permanently associated with a key that cannot be securely transferred to an acquiring entity. This act is fundamentally permanent, lacks cryptographic verification, and necessitates that the acquirer relies solely on the seller's assurance that no copies of the private keys were retained.
  • Multisignature Wallets: While multisigs distribute control and eliminate single points of failure, they are not standard tradable assets that can be listed or atomically delivered to a buyer [6]. Transitioning control requires complex key rotation ceremonies, and the entity remains fundamentally tied to its signers rather than the scientific assets it holds.
  • NFTs: ERC-721 tokens (NFTs) are highly transferable but inherently passive [5]. They function merely as pointers and possess no native capabilities to custody funds, execute transactions, sign messages, or aggregate a growing portfolio of data and intellectual property.

This architectural fragmentation complicates due diligence for investors and acquirers. When a project's data resides in one system, its governance tokens in a multisig, and its intellectual property in a fragmented collection of NFTs, stakeholders cannot efficiently assess the project's total value or risk profile.

The Onchain Lab

The defining architectural principle of the Onchain Lab is the strict separation of identity from control. We achieve this by deploying each Lab as a smart account irrevocably bound to a specific ERC-721 token, designated as the LabNFT [5].

The identity of a Lab is established at the moment of creation and remains completely immutable. This identity consists of the smart account's deterministic address and a corresponding 32-byte identifier, the OCL ID. Conversely, the control of the Lab is fully transient; the smart account itself stores no explicit owner. Instead, every authorization surface within the account dynamically queries the live ownership of the associated LabNFT [5].

This mechanism allows the Lab to act as a sovereign entity capable of holding diverse assets and executing logic on behalf of the project. A single Onchain Lab can hold:

  • Native network assets, including ETH.
  • Any standard ERC-20 token.
  • Any ERC-721 or ERC-1155 token, enabling the custody of intellectual property assets [5, 7].
  • Other LabNFTs, facilitating hierarchical research programs where a parent Lab owns and coordinates multiple child Labs [5].
  • Cryptographically verifiable links to offchain datasets and encrypted data rooms, anchored through a dedicated registry using W3C Decentralized Identifiers (DIDs) and dual-signature co-attestation [8, 9].
  • A permanent, immutable transaction history that acts as the project's complete scientific provenance, securely recording every substantive action, identity linkage, and capital allocation directly to the Lab's address.

When the LabNFT is transferred to a new wallet, the entire container transfers with it. The new owner assumes immediate control over the Lab's permanent address, its accumulated balances, its module configuration, and its verifiable history, requiring no asset migration or key rotation. Furthermore, any authorizations or signatures granted by the previous owner become invalid within the exact block the transfer occurs. Reputation and scientific provenance accrue directly to the Lab's permanent address, ensuring that the value generated by the research remains with the project itself, rather than dissipating across transient contributors.

Architecture and Composability

Onchain Labs synthesizes multiple Ethereum standards into a single, cohesive account implementation. This composition delivers a robust primitive without requiring the user to navigate the underlying cryptographic complexity.

  • ERC-6551 (Token-Bound Accounts): This standard provides the fundamental mechanism linking a smart account to an NFT [2, 10]. While the standard permits multiple accounts per token via different cryptographic salts, Onchain Labs collapses this variance into a single, canonical account for each LabNFT. This one-to-one mapping guarantees that a project's assets and history are aggregated into a definitive onchain location.
  • ERC-4337 (Account Abstraction): To resolve the onboarding friction typical of web3 environments, the account logic implements the complete validation pipeline for gas-sponsored transactions [1, 11]. By incorporating this gas-sponsored validation logic, Lab operators can conduct research activities and perform complex interactions without the overhead of managing native network assets, representing a substantial advancement in user experience.
  • ERC-7579 (Modular Accounts): Labs accept the installation of executor and fallback modules to expand their operational capabilities, while strictly prohibiting the installation of custom validator modules [3]. As a result, operators can augment their Lab's capabilities by integrating additional functionalities into the execution logic, or by authorizing verified third-party entities to perform administrative or automated, time-based interactions. Furthermore, the account utilizes a permanently sealed root validator, ensuring that the fundamental authorization logic, which defines who controls the Lab, remains uniform, secure, and auditable throughout the account's lifetime.
  • ERC-7484 (Attestation Registry): Modules can extend the capability of an account, which introduces inherent security risks. We mediate this risk through an attestation gate [4]. A module can only be installed, and its execution paths only invoked, if it maintains active approval from a trusted attester. In addition, each owner maintains absolute governance over their account's modular extensions and as such serves as the exclusive authority permitted to manage the installation or revocation of modules.
  • ERC-1271 and ERC-7739 (Smart Contract Signatures): Since the Lab is a smart contract, it must be able to sign messages to interact with external protocols. We implement a two-tier signature validation scheme that binds signatures strictly to the account's specific domain [12, 13]. This prevents malicious actors from taking a signature intended for one Lab and replaying it on a different chain or across a different Lab controlled by the same owner.

Features, Benefits and Use Cases

The Upgrade Model

Smart contract immutability is essential for trust, but fleet-wide security requires an upgrade path. Hence, progressive decentralization is often the preferred compromise. Onchain Labs balances these requirements through an architecture composed of a proxy, an immutable router, an upgradeable beacon, and the core implementation logic [14, 15].

The account proxy hardcodes its delegation target to a stateless router contract [14]. This router reads the current implementation address from the central beacon contract on every call and forwards the execution [15]. This design allows governance to execute a single atomic upgrade on the beacon, which instantly retargets every Lab in existence. Projects never have to migrate their assets to a new contract version, and the protocol never needs to iterate over the growing set of deployed accounts.

The Verifiable Identity Layer

Every Lab generates a self-descriptive 32-byte identifier, the OCL ID, strictly derived from its network environment, token ID, and account address. This ID facilitates the development of high-performance indexing architectures, enabling the autonomous verification of a Lab's origin whilst bypassing the requirement for registry lookups.

To connect this onchain identity with offchain research data, the protocol employs a Decentralized Identifier Registry. This registry records links between the Lab and decentralized identifiers representing external data rooms [8]. To ensure the integrity of these links, the system utilizes a dual-signature co-attestation verifier. A valid link requires a raw signature from the data infrastructure provider proving control over the offchain environment [9], paired with a domain-bound signature from the protocol confirming the specific request [16]. The cryptographic evidence is published entirely onchain, allowing any third party to independently verify the connection between a Lab and its datasets. The framework empowers the protocol to interface seamlessly with diverse storage providers, architectures and data formats. It serves as a cryptographically verifiable anchor, formally establishing the scope of scientific assets and datasets under the Lab's sovereign ownership.

Streamlining Due Diligence and Technology Transfer

Institutional investors, BioDAOs, and pharmaceutical acquirers historically face significant friction during the due diligence process. Evaluating a web3-native research project often requires auditing scattered data silos, disjointed financial histories, and complex intellectual property arrangements.

The Onchain Lab packages these elements into a single, auditable primitive. An acquiring entity can trace the exact timeline of dataset uploads, capital allocations, and peer validations directly through the Lab's immutable transaction history. When the evaluation concludes, the technology transfer is executed via a standard transfer of the LabNFT. The acquirer takes immediate, cryptographically secured custody of the complete research program, bypassing the administrative overhead associated with transferring individual assets across multiple jurisdictions and platforms.

Safe Ownership Transfer

Transferring a smart account introduces specific security vectors, primarily the risk of a seller installing a hidden backdoor module prior to listing the LabNFT on a marketplace, allowing them to drain the account after the buyer takes custody [17].

Onchain Labs mitigates this composite threat through a strict set of transaction lifecycle guarantees:

  • Tamper-Evidence: The protocol increments a public state counter upon specific mutative actions, including module installations and removals. A buyer or escrow service records this counter when an acquisition is initiated and verifies it at settlement, ensuring the account's state has not been altered during the transaction window.
  • Executor-Owner Binding: When an executor module is installed, the protocol records the current owner of the LabNFT. During execution, the account verifies that the caller matches the owner recorded at installation [17]. If ownership of the Onchain Lab is transferred, this binding breaks; the module becomes immediately inert and requires re-installation by the new owner to resume function. By decoupling the execution logic from the previous administrator, the protocol effectively neutralizes the threat of adversarial module installations designed to compromise the account following a change in ownership.

Frictionless Onboarding

By implementing the validation pipeline required by the ERC-4337 account abstraction standard, transactions originating from a Lab can be sponsored through dedicated paymaster contracts [1, 11]. This architecture ensures that researchers establishing a Lab, performing routine actions or executing multi-step interactions do not need to manage native network tokens to cover gas costs. Fee payment is cleanly decoupled from the account itself, and as such, a third-party sponsor, institution, or decentralized application can fully fund a user's initial onboarding and all subsequent onchain operations.

In practice, this means a researcher's first Lab can be completely provisioned without them holding any ETH. Furthermore, this abstraction allows scientists to authorize operations using the standard wallets they already possess, entirely removing the technical friction of managing specialized cryptocurrency balances just to participate in decentralized science.

Extensibility Without Migration

The research lifecycle inevitably requires new operational capabilities as a project scales from a preliminary hypothesis to a capitalized entity. Through the ERC-7579 modular smart account standard, Labs can install new fallback handlers to expand their functional capabilities and executor modules to initiate complex onchain actions [3]. This allows a project to adopt sophisticated asset management, automated treasury operations, or distribution mechanisms as needed, without ever migrating its treasury or altering its foundational identity.

To guarantee long-term security, this extensibility is heavily guarded by an ERC-7484 attestation registry [4]. A Lab will only install and run modules that carry current, valid attestations from a governance-curated set of trusted attesters. Crucially, this security check is actively repeated at every single dispatch; if an installed module is later found to be defective and has its attestation revoked, it is instantly disabled across every Lab in existence. Finally, while modules can greatly expand a Lab's execution capabilities, the core authorization root remains strictly protected: the root validator that determines ownership is permanently sealed at the Lab's creation, ensuring no module can ever alter who is in charge of the project.

A Single Crosschain Identity

The protocol enforces a strict deterministic deployment discipline. Contract deployments are executed via CREATE2 utilizing fixed salts [18], ensuring that the account implementation, the core registries, and the factories occupy identical addresses across different EVM chains. Consequently, an Onchain Lab resolves to the exact same account address regardless of the network it operates on, providing a singular, coherent identity capable of managing assets across multiple chains.

This universal identity also future-proofs the Onchain Labs ecosystem by allowing it to permissionlessly integrate with novel technologies as they emerge. As new EVM-compatible networks with specialized capabilities are developed, including zero-knowledge rollups, confidential computation environments, and AI-focused execution layers, a Lab's deterministic identity on those networks allows it to immediately engage with these new environments [18]. This enables Lab owners to incorporate cutting-edge tools and assets from across the Web3 landscape into their research portfolio, ensuring Onchain Labs remains at the forefront of technological innovation.

Labs as Verifiable Logs

An Onchain Lab creates an immutable, timestamped, and publicly auditable record of the entire research lifecycle. Every significant action generates an onchain transaction:

  • Dataset Upload: Researcher uploads raw experimental data → transaction timestamp proves when data was generated and onchain data reference connects the Lab to the data.
  • Data Analysis: External collaborator accesses dataset for computational analysis → transaction creates audit trail of who accessed what and when.
  • Funding Received: Funds deposited into Lab's treasury → transparent record of funding sources and amounts.
  • IP Licensing: IPNFT licensed temporarily (via ERC-4907 rental [19]) to pharmaceutical partner → immutable record of commercialisation attempts.
  • Peer Validation: Independent Onchain Lab publishes replication study → onchain proof of reproducibility.

This creates what can be described as a "chain of custody" for scientific knowledge. Every step from hypothesis to publication to commercialisation is cryptographically linked and permanently recorded.

Role-Based Access Control

To protect sensitive research, each Onchain Lab features a role-based access control system that manages who can view encrypted data-room files. Instead of storing or encrypting files directly onchain, the system uses an authorization contract that acts as a gatekeeper for offchain encryption services. The mechanism relies on a clear hierarchy of permissions, cleanly separating project ownership from day-to-day team access.

At the top of this structure is the Lab Owner, an authority derived from whoever currently holds the project's LabNFT [5]. Beneath the owner are two explicit roles that can be assigned to team members: Contributors and Viewers. Lab owners have full authority to grant or revoke Contributor and Viewer permissions for their specific Lab. To streamline routine administration, active Contributors can invite or remove Viewers, but they cannot assign or alter other Contributors.

Permissions are linked directly to the Lab's unique onchain identity and can be set with an optional expiration date. Both human collaborators and AI agents can receive these permissions as first-class members of a research team. Because the Owner role is tied dynamically to the LabNFT rather than a static wallet address, selling or transferring the LabNFT automatically transfers data room ownership to the buyer [5]. Furthermore, if a Lab is owned by a multisig wallet [6], its individual signers are recognized as owners without requiring extra configuration. When a user attempts to access an encrypted file, the offchain encryption layer checks the onchain contract to verify their active role before releasing the decryption key. This design ensures that data access remains secure, auditable, and seamlessly aligned with the project's overall governance.

Future Vision

The current architecture provides the bedrock for a broader transformation in how scientific research is organized, funded, and verified. The following capabilities represent planned architectural expansions and the long-term direction of the protocol.

Protocol Roadmap

  • First-Party Executor Modules: We are designing a suite of treasury management modules to support complex financial operations directly from the Lab, including milestone-based disbursement.
  • Agent Guardrails: Future modules are planned to allow Lab owners to grant scoped, session-based execution keys to agentic systems. These architectural guardrails empower Lab administrators to establish rigorous, session-based parameters for AI agents, guaranteeing that all agentic interactions remain cryptographically secure, operationally stable, and entirely predictable.
  • Multichain Rollout: Leveraging the established deterministic deployment infrastructure, the protocol is designed for expansion to additional EVM networks [18].
  • Substrate for Autonomous Research Agents: The Onchain Lab represents the ideal environment for autonomous intelligence to integrate within decentralized science. By utilizing the Lab's secure and guardrailed architecture, AI agents can safely conduct research, purchase data and access to wet labs, and store their findings directly within the container. Every action the agent takes is permanently recorded onchain, establishing a fully auditable trail of its work and allowing it to operate as a transparent, first-class participant in the scientific economy.
  • Confidential Computing: We are exploring the integration of Fully Homomorphic Encryption (FHE) to permit verifiable onchain computation over sensitive, encrypted datasets, enabling fair-market intellectual property acquisition and meritocratic funding.

Thanks

The author would like to thank María Sanmartín, Kevin Noessler, Manuel Meinert, Vladimir Demidov, Tom Ploem and Nour Karoui for their invaluable contributions.

References

[1] V. Buterin, Y. Weiss, D. Tirosh, S. Nacson, A. Forshtat, K. Gazso, T. Hess. 2021. ERC-4337: Account Abstraction Using Alt Mempool. https://eips.ethereum.org/EIPS/eip-4337

[2] J. Windle, B. Giang, S. Jang et al. 2023. ERC-6551: Non-fungible Token Bound Accounts. https://eips.ethereum.org/EIPS/eip-6551

[3] zeroknots, K. Kopp, T. Lee, F. Makarov, E. Poon, L. Min. 2023. ERC-7579: Minimal Modular Smart Accounts. https://eips.ethereum.org/EIPS/eip-7579

[4] K. Kopp, zeroknots. 2023. ERC-7484: Registry Extension for ERC-7579. https://eips.ethereum.org/EIPS/eip-7484

[5] W. Entriken, D. Shirley, J. Evans, N. Sachs. 2018. ERC-721: Non-Fungible Token Standard. https://eips.ethereum.org/EIPS/eip-721

[6] Safe Ecosystem Foundation. 2023. Safe Smart Account. https://github.com/safe-global/safe-smart-account

[7] W. Radomski, A. Cooke, P. Castonguay, J. Therien, E. Binet, R. Sandford. 2018. ERC-1155: Multi Token Standard. https://eips.ethereum.org/EIPS/eip-1155

[8] W3C. 2022. Decentralized Identifiers (DIDs) v1.0. https://www.w3.org/TR/did-core/

[9] Kamu Data. 2024. Open Data Fabric: Protocol Specification. https://docs.kamu.dev/odf/

[10] Tokenbound. 2023. ERC-6551 Reference Registry and Implementation. https://github.com/erc6551/reference

[11] eth-infinitism. 2025. ERC-4337 EntryPoint v0.8 reference implementation. https://github.com/eth-infinitism/account-abstraction

[12] F. Giordano, M. Condon, P. Castonguay, A. Bandeali, J. Izquierdo, B. Masius. 2018. ERC-1271: Standard Signature Validation Method for Contracts. https://eips.ethereum.org/EIPS/eip-1271

[13] vectorized, S. Lee, F. Giordano, H. Croubois, E. García et al. 2024. ERC-7739: Readable Typed Signatures for Smart Accounts. https://eips.ethereum.org/EIPS/eip-7739

[14] P. Murray, N. Welch, J. Messerman. 2018. ERC-1167: Minimal Proxy Contract. https://eips.ethereum.org/EIPS/eip-1167

[15] OpenZeppelin. 2025. OpenZeppelin Contracts v5.x (UUPS, UpgradeableBeacon, EIP-712, ERC-7739 signer). https://docs.openzeppelin.com/contracts/5.x/

[16] R. Bloemen, L. Logvinov, J. Evans. 2017. EIP-712: Typed structured data hashing and signing. https://eips.ethereum.org/EIPS/eip-712

[17] Cyfrin. 2026. Molecule OnChainLab Security Review, v2.0 (May 12 2026). https://github.com/Cyfrin/cyfrin-audit-reports/blob/main/reports/2026-05-12-cyfrin-molecule-onchainlab-v2.0.pdf

[18] M. Zoltu. 2019. Deterministic Deployment Proxy. https://github.com/Arachnid/deterministic-deployment-proxy (maintained fork)

[19] Anders, Lance, Shrug. 2022. ERC-4907: Rental NFT, an Extension of EIP-721. https://eips.ethereum.org/EIPS/eip-4907

About the author

Phill Lee

Phill Lee

With a PhD in Nanotechnology and experience leading Web3 projects for global brands, Phill applies a rigorous, analytical approach to designing scalable decentralized systems. Driven by decentralized science’s potential to reshape innovation.