Marketplace
Data resource exchange platform
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 Generic Resource Exchange Protocol (GREP). 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 Ontology generic marketplace server for your solution, or deploy your own. The next step would be configure the marketplace you deployed.
3. SDK invocation
Link to the data storage provider 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 resource auditors and offline judgers 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
The RP needs to fetch a verifiable claim from their resource auditor.
3. Generating a data identifier
Use the marketplace API or SDK method to fetch the QR code to authenticate the DataId
for the respective data items using ONT Auth.
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:
The RP needs to link the
DataId
with the resources after pre-uploading the dataRP uploads the data and passes the necessary parameters to generate the token
The RC makes a purchase on the marketplace, the token is generated, and the ownership is transferred to the RC
RC can use the token to gain access to the data resource and the meta data
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:
The RP needs to generate and link the
DataId
with the resources after pre-uploading the dataAfter the
DataId
is generated, the parameters to generate the DToken need to be passed, such as the amount of tokens to be generated, etc.The
DataId
and DToken are linked and the data is uploaded to the platformThe RC can make a purchase by choosing to either buy all the tokens, or a certain amount with respect to a particular resource
RC uses the token to access the resource meta data
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:
Data quality verification
Publishing the meta data
Publishing the price
Lock the safety deposit to the marketplace smart contract
Define a offline judger candidate list for the transaction contract
Publish the resource on the platform
5. DToken exchange
In the case of an E-shop, 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 ONT Auth.
Sample Parameters:
The API can be used to verify the authentication result. The QR code parameters can be fetched using the SDK method or the storage API. After the DataId
and the tokens are linked the data can finally be uploaded to the platform.
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
Incentives and profit are shared based on the respective fixed policies. Please refer to the resource incentive sharing section in the over all scheme for details.
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
Please follow this link to access the Java SDK repository.
Step 4: Proceed with the flow specific to your scenario
Last updated