Skip to content

Latest commit

 

History

History
93 lines (58 loc) · 4.31 KB

mep-1004.md

File metadata and controls

93 lines (58 loc) · 4.31 KB
  MEP: 1004
  Title: Non-Fungible Tokens Tied to IoT Radio Base Station Miner
  Status: Draft
  Type: Standards
  Created: 2023-04-20

MEP-1004 Non-Fungible Tokens Tied to IoT Radio Base Station Miner

Abstract

This MEP proposes a new standard for Non-Fungible Tokens (NFTs) tied to IoT Radio Base Station Miners. The proposed NFTs can be used to provide identity for devices through S/N codes, which are minted by an LPWAN server upon receiving the request from the device owner. The NFTs can be inserted into slots within MEP1002 tokens. The maximum number of MEP1004 tokens that can be inserted into a single MEP1002 token slot is limited, and rules for removing bindings are specified.

Motivation

The use of IoT devices is rapidly increasing, and there is an emerging need for NFTs to represent the identity of these devices. In particular, radio base stations used for mining cryptocurrencies require a way to uniquely identify devices and bind these identities to other tokens.

This MEP proposes a new standard for NFTs that can be used to represent

Specification

Required Interfaces

This MEP builds upon the existing EIP-721 (NFTs). Therefore, the required interface for this MEP is:

Token Properties

Each MEP1004 token will represent the identity of an IoT radio base station miner. Each token's properties will include:

  • SNCode: The device's encrypted S/N code, which is a 256-bit string generated by the device manufacturer and encrypted with a symmetric key to protect privacy.

Metadata URI Scheme

The metadata URI scheme for MEP1004 tokens will include the following attribute:

  • SNCode: The encrypted S/N code to identify the miner.

Solidity Interface

This MEP introduces a new interface, MEP1004, for Non-Fungible Tokens Tied to IoT Radio Base Station Miners. This interface inherits from the ERC-721 interface with the following additions:

/// @title MEP-1004
pragma solidity ^0.8.16;

interface IMEP1004 /*is IERC721*/ {
 struct LocationProof {
      uint256 MEP1002TokenId;
      uint256[] MEP1004TokenIds;
      string item;
      uint256 timestamp;
  }

  event NewLocationProof(
      uint256 indexed MEP1002TokenId,
      string indexed item,
      LocationProof locationProof
  );

    // Submit the location proofs of anything.
    function LocationProofs(uint256 _MEP1002TokenId, uint256[] memory _MEP1004TokenIds, string memory _item) external;

    // get the latest location proofs of anything.
    function latestLocationProofs(string memory _item) external view returns (LocationProof memory);
}

NOTE: The actual situation may be more complex, for specific details please refer to https://github.com/MXCzkEVM/core-contracts/blob/main/contracts/token/MEP1004Token.sol

Implementation

The implementation of this MEP can be done on the MXC ZKEVM blockchain as a smart contract written in Solidity. The smart contract will be responsible for minting and managing MEP1004 tokens, including the associated metadata and location verification and proof of ownership functions.

Backwards Compatibility

This MEP is backward-compatible with EIP-721 (NFTs), as it builds upon the existing standard. Applications that rely on EIP-721 will be able to easily integrate MEP1005 tokens into their existing infrastructure.

Security Considerations

As with any blockchain-based system, security is a significant concern. The use of symmetric key encryption for S/N codes and the rules around the insertion and removal of MEP1004 tokens from MEP1002 tokens are designed to ensure the security and privacy of device owner information.

However, it is important to note that the smart contract implementation of this standard must undergo rigorous security assessment to ensure the system's integrity and prevent attacks or exploits.

It is also essential to ensure that the maximum number of MEP1004 tokens that can be inserted into MEP1002 tokens in each slot is set to a reasonable limit, preventing centralization and ensuring fair distribution.

References