Cortex: Smarter Contracts
By Ben Percifield | China Daily USA | Updated: 2018-06-09 04:21
2.Incentive Mechanism for Collective Collaboration
Machine learning researchers around the world can upload well-trained corresponding data models to the storage layer. Other users who need this AI model can make inferences by using models and paying their providers. At each inference, a full node synchronizes the model and the data from the storage tier to the local site. Making an inference using Cortex’s unique virtual machine, CVM, synchronizes the results to the whole network, and returns the result.
Every time a user initiates a transaction, performs a smart contract, or performs an intelligent inference, the user needs to pay a certain amount of Endorphin. Endorphin is the pricing unit that is required to be paid for dealing transactions or executing AI smart contracts on the Cortex chain. The amount of Endorphin required for each payment depends on the difficulty of the model operation and the model ranking. The price of Endorphin is market-driven, reflecting Cortex’s cost of executing smart contracts: The more transactions initiated or AI smart contracts executed at the same time, the higher the price of Endorphin.
Cortex also provides a submission interface for training off-chain. This will set up a bridge between computing power providers and algorithm providers for trading and collaboration. The user parses the model into Cortex’s CVM, the parameters into the storage layer, and publishes a generic interface for smart contract programmers to use. The model provider needs to pay a certain storage fee to ensure that the model can be persistently saved in the storage layer.
Part of the fee charged for inference by calling this model in a smart contract is delivered to the model provider. The provider can also withdraw and update accordingly if needed. In the case of withdrawals, in order to ensure that the smart contract calling this model works properly, Cortex will host it according to the usage of the model and keep invoking the model for a fee equal to the storage and maintenance costs. Cortex also provides an interface to upload the model to the storage layer and obtain the model hash. The provider then initiates a transaction, executing a smart contract to write the model hash into the storage, so that all users are apprised of the model’s input and output status.