Main entities


Consumer

Consumer is a SONM's user, which buys and uses the computing resources of other users (Suppliers) through the system. The purpose of the Consumer is to perform a specific task in an optimal way (most quickly, most cheaply, by the price / speed criterion, most reliably, or others).

Every Consumer should have his own Ethereum account, that is his unique identifier.

For Consumer main algorithm of using SONM is:

  • Download and configure SONM components
  • Get SONM tokens
  • Go to the Marketplace
  • Chose resources, place an order
  • Get the most suitable offer and make a deal
  • Start the task on the purchased resources
  • Get task results back

Full description about getting started as a Consumer is here.


Supplier

Supplier is SONM user, that is the resourse owner. Suppliers can earn tokens by selling computing power peer-to-peer to Consumers and perform their calculations.

Every Supplier should have his own Ethereum account, that is his unique identifier.

For Supplier main algorithm of using SONM is:

  • Download and configure SONM components
  • Compose resource slots for rent
  • Place orders to the Marketplace
  • Monitor deals
  • Get income. All resources are bought out on the market at the best price

Full description about getting started as a Supplier is here.


Account

Account is the Ethereum blockchain address. Сryptocurrency Ether and Ethereum tokens (SONM token and others) can be transferred between accounts.

Keys

When user creates an account there is generating a cryptographic set of numbers: private key and public key (address).

Account information can be presented and stored in the form of keystore file (UTC/JSON). In keystore file private key are encrypted by user's password that user enter before creation. SONM user can generate new account and its keystore file in SONM Wallet / CLI or in another application (for example, MyEtherWallet).

Account address is an unique identifier of SONM's user.

Using keys

Every Consumer and Supplier in SONM has an account.

Consumer's SONM component:

  • Wallet/CLI requires Consumer's account (keystore file (UTC / JSON) and password) to identify user.
  • Client node uses Consumer's account to interact with Marketplace, Hub, Smart contract.

Supplier's SONM components:

Worker nodes have their own accounts one for each to interact with Hub.


Resources

Resources are computer capacities (may be virtual) for performing computational tasks. The bearers of resources are Supplier's machines - Workers.

Resources may include one or more Devices. Resources are characterized by parameters:

  • CPU - number of central processing unit cores
  • RAM - amount of random-access memory
  • GPU - number of graphics processing units
  • Storage - hard drive capacity, MB
  • Connection incoming - maximum incoming network traffic, B
  • Connection outgoing - maximum outgoing network traffic, B
  • Network type - admissible connection (in/out, out, no)
  • Properties - special user's properties of resource devices, pairs of values: (name: value).

Resource slot

Slot is set of resources for rent. Suppliers make slots for placing ask orders on the Marketplace. Consumers make slots for searching ASK orders on the Marketplace.

Slot has resourses parameters and additional parameters:

  • Duration since - date and time of start deal
  • Duration until - date and time of end deal
  • Supplier's rating - Marketplace Supplier's raiting value (for Consumer's slot), or
  • Consumer's rating - Marketplace Consumer's raiting value (for Supplier's slot),
  • Supplier's geolocation (country, city, latitude, longitude)

Within the one worker Supplier can make several resource slots and place ask orders on the Marketplace for rent. But Supplier can not combine resources from a few Workers in one slot.


Device

Devices are the following SONM Worker's components:

  • central processing units (CPU)
  • graphics processing units GPU).

Device parameters

CPU device has parameters:

  • num - CPU number on a board.
  • vendor Id - vendor id as a string, for example "GenuineIntel"
  • model - short model name
  • model name - full model name, for example, "Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz"
  • int32 cores - numger of cores
  • clock frequency - maximum clock frequency of the processor in MHz
  • cache size - CPU cache size.
  • stepping - CPU stepping level
  • repeated string flags - supported extensions on a CPU

GPU device has parameters:

  • name - full GPU device name
  • vendorId - vendor id
  • vendorName - vendor name, for example "NVIDIA" or "AMD".
  • maxMemorySize - Total maximum memory size the device can hold.
  • maxClockFrequency - Maximum configured clock frequency of the device in MHz.
  • openCLDeviceVersionMajor - OpenCL major version.
  • openCLDeviceVersionMinor - OpenCL minor version.

Device properties

For each device on Workers Supplier can set benchmarks, for example, Ethereum Hashrate (MH/s), ZCASH Hashrate (sol/s), Rendering: OctaneBench/hour (OBh).

Benchmarks values are included to Suppliers ask orders on SONM Marketplace.

Consumers may use benchmarks to search orders on Marketplace and include them to their BID orders.


Orders

Order is a placed offer on the Marketplace:

  • by Supplier for rent resourses (ASK order), or
  • by Consumer for buy resourses (BID order).

Order is characterized by the following parameters:

  • price - order price (rent per hour)
  • order type - order type BID or ASK
  • Duration since - date and time of start deal
  • Duration until - date and time of end deal
  • Supplier ID - Supplier's Ethereum address (for ASK)
  • Supplier rating - Marketplace Supplier's raiting value, or
  • Consumer ID - Consumer's Ethereum address (for BID)
  • Consumer rating - Marketplace Consumer's raiting value
  • slot - information about resourses:
    • CPU - number of central processing unit cores
    • RAM - amount of random-access memory
    • GPU - number of graphics processing units
    • Storage - hard drive capacity, MB
    • Connection incoming - maximum incoming network traffic, B
    • Connection outgoing - maximum outgoing network traffic, B
    • Network type - admissible connection (in/out, out, no)
    • Properties - special user's properties of resource devices, pairs of values: (name: value).

Market can search for orders on the parameters.

ASK order lifecycle

Supplier makes a resourse slot for his Hub node using CLI. After that Hub automatically places appropriate ASK order on the Marketplace.

When deal starts, Hub node automatically cancel this ASK order.

When deal has finished, Hub node automatically place ASK order on the Marketplace again.

BID order lifecycle

Consumer places a BID order directly on the Marketplace using CLI.

When the order is placed Consumer's Client node starts matching BID order and current ASK orders published onto Marketplace.

When deal starts, Consumer's Client node automatically cancel this BID order.

When the deal has finished, Consumer may place a BID order using CLI again.


Deal

Deal is a contract between Consumer and Supplier on the basis of their ASK and BID orders through the Ethereum smart contract, confirmed by Ethereum and paid automatically through Ethereum.

When Consumer’s Client node is aware of the Hub’s node ASK order, it then directly communicates with Hub. Both parties check, that offers match each other and if everything is good, they place a deal on the blockchain. Consumer makes first move and proposes a deal, Hub then accepts it. A deal is a record inside a “Deals registry” smart contract on Ethereum blockchain.

Deal's parameters

  • Consumer ID - Consumer's Ethereum address
  • Supplier ID - Supplier's Ethereum address
  • Deal status - current deal status (Pending, Accepted, Closed)
  • price - deal price
  • start time - date and time of start deal
  • end time - date and time of end deal
  • specification hash - SHA-256 of the ASK order hash
  • work time - deal duration, h
Start status Operation Available for End status Description
(deal not exist) Propose Consumer Pending This operation creates a new deal. Consumer initiates a new deal and creates a record on the blockchain. Deal price is transferred form consumer account and frozen within deal
Pending Accept Hub Accepted Hub must accept new deal. After deal is accepted it is considered as working.
Accepted Preterm close Consumer Closed Consumer may close the deal early, prior to deal end time. Deal price (to be paid to hub) must be calculated proportional to deal time (time - start time). Other tokens are returned back to consumer.
Accepted Close Anyone in the world (Criteria: deal must reach end time) Closed After deal reaches it's end time, anyone must be able to close it. The "Close" handle must be available for anyone. Hub is expected to close deal, because it is in his interests. Deal price is paid to Hub

Task

Task is a computational or other task, which can be performed on computer resourses for a certain time.

Task is characterized by the parameters of the resource, which is necessary for its implementation and additional parameters.

Docker is used to perform Consumer's tasks in SONM. Task can be packaged in a Docker container and then effectively performed on Supplier's resourses.


SONM token

Virtual currency used for payments in SONM is SNM token.

It is a ERC-20 standard token, based on Ethereum.

Token has a function of payment equivalent of computing powers. Token is designed as an utility token (not a securities) according to Singapore law (SFA, FAA), juridical practice and MAS definitions.

Token usage

Each deal has a price in virtual currency - SONM tokens.

Deal price first appears on the Marketplace as price attribute of an order. Then, when deal is proposed and accepted, price is set as an attribute of deal.

When Consumer proposes a deal, it immediately provides a deposit for the whole amount of the deal price. This deposit is made a payment towards deal record inside Deal registry smart contract.

When the deal is fulfilled, Consumer’s deposit is transferred to Hub. This is the payment for the deal.