Credit System
Mishti Network has a credit system that says how many times a user is allowed to query it. Credits may be bought on mainnet for ETH. In testnet, credits are simply equal to the number $testMISHTI tokens someone has.
To query the network, a user must to have more credits than they have previously spent by querying the network. Each query spends exactly one credit.
Mishti's credit system includes two innovations that allow queries to the network to be processed without requiring consensus (i.e. asynchronous and infinitely scalable in practice). The network keeps both a local state and a global state of credits spent per user. It is able to operate largely asynchronously (and thus practically infinitely scalable) by only updating the global state at each epoch. I.e, nodes need not communicate how many credits a user has spent to other nodes.
It does this by assigning each request to a different subset of nodes, deterministically based on the request number and epoch number. This ensures that it is unlikely a user can "double spend" a request to a disjoint sets of nodes. Even though there is no global state during epochs, the probability of a user being able to successfully attack the network by having consecutive requests go different t nodes is
<TODO>
Decryption credits
Decryption requests require decryption credits as well as regular Mishti credits. Each ciphertext encrypted to Mishti is accompanied by a smart contract. This smart contract has a function, decryptionCredits(address decryptor)
, which returns how many decryption credits an address has. When Mishti receives a request for decryption, it checks the associated contract to see if the user has sufficient decryption credits. Mishti takes the minimum of decryption credits or Mishti credits to determine whether the user has sufficient credits for the request.
Last updated