Ontology Developer Center
DISCOVERCOMMUNITYSUPPORT
  • Introduction
  • Discover Ontology
  • Getting Started
  • Glossary
  • Decentralized Identity and Data
    • ONT ID
      • Decentralized Identifiers
        • Method Specification for Ontology
        • Method Specification for Ethereum
        • Method Specification for BSC
      • Verifiable Credentials
        • Anonymous Credentials
      • ONT Login
        • Scenarios
        • Protocol Specification
        • Front-end JavaScript SDK
          • Integration and Usage
          • API Reference
        • Front-end UI SDK
          • Integration and Usage
          • API Reference
        • Back-end Go SDK
          • Integration and Usage
          • API Reference
        • Back-end Java SDK
          • Integration and Usage
          • API Reference
      • ONT TAG
        • Workflow
        • API Reference
      • Mercury
      • OScore
    • DDXF
      • Components and Interfaces
      • GREP
      • Overall Scheme
      • Solutions
        • Marketplace
          • Deployment
          • Scenarios
          • SaaS Tenant
          • Java SDK
        • Data Storage
          • Deployment
          • Java SDK
        • Resource Auditor
        • Offline Judge
      • Use Cases
        • E-Shops
  • ONTOLOGY ELEMENTS
    • Smart Contracts
      • Types of smart contracts
    • Token Protocols
    • Consensus Mechanism
    • Ontology Oracle
      • Oracle Process Flow
  • GUIDES & TUTORIALS
    • Development Guides
      • dApp Development
        • Using the dAPI
        • Data Synchronization
      • Smart Contract Development
        • EVM Contract
          • Development Environment and Tools
          • Wallet Setup
          • Contract Development
          • How to Deploy a Smart Contract with GetBlock
        • NeoVM Contract
          • Development tools and environment
          • Launching the IDE
          • Writing and editing program logic
          • Deploying and testing on private net
        • WASM Contract
          • Development Environment
          • Project Initiation - Hello World
          • Creating your own project
          • Development using SmartX
          • Runtime API
          • Contract Fundamentals
          • Inter-contract Interaction
          • Developing Contracts in C++
        • Publish Contract Source Code
    • Integration Guides
      • dApp Integration
        • dAPI Integration
          • Chrome Plugin
          • Mobile wallet dApp
          • QR code mechanism
          • Wake call mechanism
        • Cocos 2D-x
        • Unity 3D applications
      • Mobile Wallet Integration
        • SDK integration
        • dAPI Integration
          • In-wallet applications
          • QR code mechanism
          • Wake call mechanism
        • Stake
      • Using ONT ID
      • Exchange Integration
        • Exchange Docking Guide
        • Exchange API
      • Ontology for dApp Stores
    • EVM & Token Decimals Upgrade
  • ONTOLOGY NODE
    • Abstract
    • Node Deployment
      • Standard Node
      • Rosetta Node
    • Interacting with a Public Node
  • DEVELOPER TOOLS
    • dApp Development Framework
      • Punica CLI
      • Punica boxes
      • Solo Chain
    • IDE
    • APIs
      • HTTP API
        • Restful
        • WebSocket
        • Remote Procedure Call (RPC)
      • Explorer v2 API
        • Block
        • Address
        • Contract
        • Token
        • Transactions
        • ONT ID
        • Summary
        • Node
      • Native Token API
        • ONT Contract API
        • ONG Contract API
      • ONT ID Contract API
      • Web3 API
      • OScore Open API
      • Rosetta Node API
        • Data API
        • Construction API
      • DToken Contract API
      • DDXF
        • Marketplace Contract API
        • Storage API
      • Governance API
    • Digital Wallet
      • Chrome Plugin provider
      • Chrome Plugin dAPI
      • Mobile version provider
      • Mobile version dAPI
    • SDKs
    • Signing Server
      • Installation
      • API reference
  • COMMUNITY
    • Ecosystem Programs
    • Community Libraries
    • Community Events
    • Community Channels
    • Core Contributors
  • SUPPORT
    • FAQ
      • Basic blockchain concepts
      • Ontology Nodes
      • Ontology token protocols
      • Smart contracts
      • SDKs and APIs
    • Contact Us
Powered by GitBook
On this page
  • Marketplace Resources
  • Marketplace Runtime
  • 1. Calling resource data mapping and upload
  • 2. Fetching a claim from the resource auditor
  • 3. Generating a data identifier
  • 4. Choose a marketplace model
  • 5. DToken exchange
  • 6. Incentive sharing
  • 7. Transaction evaluation and rating
  • Hosting a Resource Exchange Platform

Was this helpful?

  1. Decentralized Identity and Data
  2. DDXF
  3. Solutions

Marketplace

Data resource exchange platform

PreviousSolutionsNextDeployment

Last updated 4 years ago

Was this helpful?

This model allows one to register a marketplace and then register off-chain resources or data to the platform to allow exchange between the provider and the consumer. The exchange process of the All the roles and components described below have been defined in, and are derived from the . Please refer to the protocol specifications for more details.

Marketplace Resources

The marketplace basically facilitates resource exchange on an open platform.

The process one would follow to enable the marketplace to be able to publish resources can briefly be outlined in the following manner:

1. Domain registration

The domain that helps identify the marketplace needs to be registered on the blockchain and in the Ontology system. It involves these steps:

  • ONT ID registration: Identifies the marketplace and the owner

  • Payer registration: Account that pays the operation costs

  • ONS registration: Registering the domain name on the Ontology name server

2. Marketplace setup

You may choose to use the for your solution, or . The next step would be configure the marketplace you deployed.

3. SDK invocation

Link to the by invoking the marketplace SDK in your application. The ONT ID for your application also needs to be enabled at this point.

4. Resource auditors

Choose the and for your marketplace platform.

Marketplace Runtime

The process to enable the marketplace for your end users is as follows:

1. Calling resource data mapping and upload

The RP needs to set up a storage service for the data resources that are to be published on the marketplace. Once the storage service is in place, the marketplace API or SDK methods can be used to generate DataId for the respective data items and then link them to the marketplace platform using this ID.

2. Fetching a claim from the resource auditor

3. Generating a data identifier

The SDK method or the API can be used to confirm if the authentication was successful. If the authentication is successful, the platform automatically links the DataId and the respective data resources.

4. Choose a marketplace model

There are two marketplace models available currently.

Pay-as-you-go

pay-as-you-go model is as such:

  1. The RP needs to link the DataId with the resources after pre-uploading the data

  2. RP uploads the data and passes the necessary parameters to generate the token

  3. The RC makes a purchase on the marketplace, the token is generated, and the ownership is transferred to the RC

  4. RC can use the token to gain access to the data resource and the meta data

  5. Once the purchase is deemed successful, the transaction costs are allocated to the marketplace as per the fixed policy

Pre-order

This model involves generating DTokens to carry out transfer of off-chain data on the data storage provider. The exchange process of the pre-order model is as such:

  1. The RP needs to generate and link the DataId with the resources after pre-uploading the data

  2. After the DataId is generated, the parameters to generate the DToken need to be passed, such as the amount of tokens to be generated, etc.

  3. The DataId and DToken are linked and the data is uploaded to the platform

  4. The RC can make a purchase by choosing to either buy all the tokens, or a certain amount with respect to a particular resource

  5. RC uses the token to access the resource meta data

  6. Once the purchase is deemed successful, the transaction costs are allocated to the marketplace as per the fixed policy

Publishing a resource on the marketplace platform consists of the following steps:

  1. Data quality verification

  2. Publishing the meta data

  3. Publishing the price

  4. Lock the safety deposit to the marketplace smart contract

  5. Define a offline judger candidate list for the transaction contract

  6. Publish the resource on the platform

5. DToken exchange

Sample Parameters:

{
  dataId: "did:ont:aaaaaaa", // Data ontid
  ontid: ontid, // RP ontid
  pubKey: 1,
  contractVo: {
    argsList: [{
      name: "account",
      value: "Address:aaaaaaa" // wallet address
    }, {
      name: "dataId",
      value: "String:" + dataId // data ontid
    }, {
      name: "ontid",
      value: "String:" + ontid	// RP ontid
    }, {
      name: "index",
      value: 1
    }, {
      name: "symbol",
      value: "String:aaa"
    }, {
      name: "name",
      value: "String:aaa"
    }, {
      name: "amount",  // Token amount to be generated
      value: 12
    }, {
      name: 'transferCount',
      value: 12
    }, {
      name: 'accessCount',
      value: 12
    }, {
      name: 'expireTime',
      value: 16121212		// Token expiration time
    }],
    contractHash: "06633f64506fbf7fd4b65b422224905d362d1f55",	// contract hash
    method: "createTokenWithController",	// contract method
  }
}

Once the RC makes a purchase, the transaction will be carried out with the token amount selected. In data mode, the defined amount of tokens will be generated and the ownership will be transferred to the RC.

6. Incentive sharing

7. Transaction evaluation and rating

After the transaction is completed, the RP and the RC review each other. The review can be about the resources or users. The MP can provide a review system and the post-transaction reviews are stored in the MP's local database. When the on-chain review system is well-established, the MP can use a combination of the on-chain review system and local review system to present a more accurate rating.

Hosting a Resource Exchange Platform

Step 1: Deployment

Refer to the link below for details on marketplace deployment process.

Step 2: Smart Contract API Integration

For API and SDK reference please follow the links below.

Step 3: Marketplace SDK Invocation

Step 4: Proceed with the flow specific to your scenario

The RP needs to fetch a verifiable from their resource auditor.

Use the marketplace API or SDK method to fetch the QR code to authenticate the DataId for the respective data items using .

In the case of an , carrying out a transaction with would involve token generation using the passed parameters which would determine the total volume of the tokens, the contract is then invoked and the action can be authenticated using .

The API can be used to verify the authentication result. The QR code parameters can be fetched using the SDK method or the . After the DataId and the tokens are linked the data can finally be uploaded to the platform.

Incentives and profit are shared based on the respective fixed policies. Please refer to the section in the over all scheme for details.

Please follow link to access the Java SDK repository.

Generic Resource Exchange Protocol (GREP)
Ontology generic marketplace server
deploy your own
data storage provider
resource auditors
offline judgers
storage API
Deployment
Marketplace Contract API
Storage API
this
E-shop
claim
resource incentive sharing
ONT Auth
ONT Auth