How 3DPass Leverages the Substrate Framework for Object Tokenization

3DPass is a Substrate-based blockchain that uses Parity's FRAME pallet system, consensus primitives, and runtime architecture to power its "Ledger of Things" for 3D object tokenization.

3DPass positions itself as the "Ledger of Things"—a specialized blockchain infrastructure designed to tokenize real-world 3D objects through its unique Proof of Scan (PoScan) technology. At its core, 3DPass and the Substrate framework are intrinsically linked, with the project building its entire stack atop Parity Technologies' modular blockchain development kit. This article examines how 3DPass extends Substrate's core primitives to create a domain-specific chain for object authentication and decentralized manufacturing.

Core Runtime Dependencies in 3DPass

Substrate Crate Integration

The relationship between 3DPass and the Substrate framework begins at the dependency level. In runtime/Cargo.toml, the project imports fundamental Substrate crates directly from the ParityTech repository at revision b0777b4c7f7:

[dependencies]
frame-support = { git = "https://github.com/paritytech/substrate", rev = "b0777b4c7f7", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", rev = "b0777b4c7f7", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "b0777b4c7f7", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", rev = "b0777b4c7f7", default-features = false }

This direct dependency chain ensures that 3DPass inherits Substrate's runtime primitives, cryptographic utilities, and serialization standards while maintaining the ability to pin specific stable versions.

The FRAME Pallet Architecture

3DPass utilizes Substrate's FRAME (Framework for Runtime Aggregation of Modularized Entities) system to compose its blockchain logic. In runtime/src/lib.rs, the construct_runtime! macro assembles both standard Substrate pallets and custom 3DPass modules:

construct_runtime!(
    pub enum Runtime where
        Block = Block,
        NodeBlock = opaque::Block,
        UncheckedExtrinsic = UncheckedExtrinsic
    {
        // Standard Substrate pallets
        System: frame_system,
        Balances: pallet_balances,
        Timestamp: pallet_timestamp,
        Treasury: pallet_treasury,
        
        // 3DPass-specific pallets
        ValidatorSet: pallet_validator_set,
        Poscan: pallet_poscan,
        MiningPool: pallet_mining_pool,
        SerialNumbers: pallet_serial_numbers,
    }
);

This modular approach demonstrates how 3DPass extends the Substrate framework by plugging domain-specific pallets for object tokenization alongside battle-tested Substrate primitives for balances and governance.

Consensus and Networking Through Substrate Primitives

PoScan Hybrid Consensus Implementation

3DPass implements its unique Proof of Scan (PoScan) consensus—a hybrid PoW/PoA mechanism—using Substrate's consensus primitives. The runtime integrates sp_consensus_poscan alongside standard Substrate consensus pallets in runtime/src/lib.rs:

// PoScan consensus configuration
impl pallet_poscan::Config for Runtime {
    type Event = Event;
    type Currency = Balances;
    type AuthorityId = sp_consensus_poscan::AuthorityId;
    type MinAuthorities = ConstU32<3>;
    // ... additional configuration
}

// GRANDPA finality gadget
impl pallet_grandpa::Config for Runtime {
    type Event = Event;
    type WeightInfo = ();
    type MaxAuthorities = ConstU32<32>;
    // ... standard GRANDPA configuration
}

The networking layer leverages Substrate's libp2p implementation through the sc-network crate, allowing 3DPass nodes to discover peers, propagate transactions, and synchronize blocks using the same robust networking stack that powers Polkadot and Kusama.

Off-Chain Worker Integration

Following Substrate patterns, 3DPass utilizes off-chain workers for asynchronous operations that shouldn't burden on-chain execution. The runtime implements frame_system::offchain traits to enable validators to fetch external data or perform heavy computations:

impl frame_system::offchain::CreateSignedTransaction<RuntimeCall> for Runtime {
    type AccountId = AccountId;
    type Signature = Signature;
    // ... implementation for signed transactions
}

impl frame_system::offchain::SigningTypes for Runtime {
    type Public = <Signature as Verify>::Signer;
    type Signature = Signature;
}

These off-chain workers follow the standard Substrate pattern defined in runtime/src/lib.rs, allowing 3DPass to interact with external systems while maintaining the security guarantees of the on-chain runtime.

EVM Compatibility Through Frontier Integration

3DPass extends its Substrate framework foundation to support Ethereum-compatible smart contracts through Frontier—the Substrate EVM integration maintained by Parity. The runtime imports Frontier primitives in runtime/src/lib.rs:

// Frontier EVM integration
impl pallet_evm::Config for Runtime {
    type FeeCalculator = BaseFee;
    type GasWeightMapping = pallet_evm::FixedGasWeightMapping<Self>;
    type WeightPerGas = WeightPerGas;
    type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;
    type CallOrigin = EnsureAddressRoot<AccountId>;
    type WithdrawOrigin = EnsureAddressNever<AccountId>;
    type AddressMapping = HashedAddressMapping<BlakeTwo256>;
    type Currency = Balances;
    type RuntimeEvent = RuntimeEvent;
    type Precompiles = FrontierPrecompiles<Self>;
    type ChainId = ChainId;
    type BlockGasLimit = BlockGasLimit;
    type Runner = pallet_evm::runner::stack::Runner<Self>;
    type OnChargeTransaction = ();
    type FindAuthor = FindAuthorTruncated<Poscan>;
}

Additionally, 3DPass implements custom pre-compiles that bridge Solidity contracts to native Substrate pallets. For example, the serial-numbers pre-compile allows Ethereum-style contracts to interact with 3DPass's object serial number registry:

// Solidity contract interacting with 3DPass pre-compile
interface ISerialNumbers {
    function verifySerial(bytes32 objectHash, uint256 serialNumber) external view returns (bool);
}

contract ObjectVerifier {
    ISerialNumbers constant serialRegistry = ISerialNumbers(0x0000000000000000000000000000000000000802);
    
    function checkAuthenticity(bytes32 hash, uint256 serial) public view returns (bool) {
        return serialRegistry.verifySerial(hash, serial);
    }
}

Summary

The relationship between 3DPass and the Substrate framework represents a complete implementation of a domain-specific blockchain leveraging Parity's modular toolkit:

  • Foundation: 3DPass imports core Substrate crates (frame-support, sp-runtime, sp-core) directly from the ParityTech repository at revision b0777b4c7f7, establishing a stable, audited foundation for blockchain primitives.

  • Modular Runtime: Through the construct_runtime! macro in runtime/src/lib.rs, 3DPass composes standard FRAME pallets (balances, treasury, GRANDPA) alongside bespoke modules for Proof of Scan consensus and object tokenization.

  • Consensus Integration: The hybrid PoW/PoA PoScan consensus plugs into Substrate's pallet_authorship and pallet_grandpa, utilizing libp2p networking for peer discovery and block propagation.

  • Ethereum Interoperability: Frontier integration (pallet_evm, pallet_ethereum) enables Solidity smart contract deployment, while custom pre-compiles bridge EVM logic to native Substrate pallets like pallet_serial_numbers.

Frequently Asked Questions

Is 3DPass a standalone blockchain or a parachain?

3DPass operates as a standalone Layer-1 blockchain, not a parachain. While it uses the same Substrate framework that powers Polkadot and Kusama, 3DPass maintains its own independent consensus mechanism (PoScan) and does not rely on the Relay Chain for security or finality. The project compiles to a native Rust node (poscan-consensus) that can be run independently using Substrate's client APIs.

What version of Substrate does 3DPass use?

3DPass pins its Substrate dependencies to a specific git revision (b0777b4c7f7) from the ParityTech repository. This revision corresponds to a stable release branch that provides the frame-support, frame-system, sp-runtime, and other core primitives used throughout the 3DPass runtime. Pinning to a specific commit ensures deterministic builds and compatibility across the hybrid consensus and Frontier EVM modules.

Can developers deploy Solidity smart contracts on 3DPass?

Yes, developers can deploy Solidity smart contracts on 3DPass through its Frontier EVM integration. The runtime includes pallet_evm and pallet_ethereum, which provide full Ethereum compatibility. Additionally, 3DPass implements custom pre-compiles (such as the serial-numbers registry at address 0x000...0802) that allow Solidity contracts to interact with native Substrate pallets for object verification and tokenization features unique to the 3DPass ecosystem.

How does 3DPass consensus differ from standard Substrate?

3DPass implements PoScan (Proof of Scan), a hybrid PoW/PoA consensus mechanism that differs from standard Substrate's default GRANDPA finality or Aura consensus. While it still uses Substrate's pallet_grandpa for finality gadgets and pallet_authorship for block author tracking, the mining and validation logic relies on the sp_consensus_poscan crate. This allows validators to prove they have scanned physical objects via 3D recognition algorithms before producing blocks, creating a unique consensus layer that bridges physical assets to the blockchain while maintaining Substrate's networking and runtime upgrade capabilities.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →