Deal is a contract between Customer and Supplier on the basis of their ASK and BID orders through the Ethereum smart contract in SONM blockchain, confirmed by SONM blockchain consensus and paid automatically through SONM blockchain tokens.

Deal can be time-bound (forward) or spot.

Forward deals have fixed duration (days, hours, minutes) guaranteed by Worker. That means Worker can't stop the Deal before it finishes. Still Customer can stop the deal at any moment.

Spot deals don't have any specific duration. The deal can be closed by any side at any moment.

Deal settlement can be set up via two options:

  • Client node of Customer or Supplier's Worker placed their orders and found matching ones. One of them initiates deal settlement on base of two orders. Final orders checking is performed in smartcontract in SONM blockchain, cutting down risks of participants cheating.
  • Another option is quick-buy. It may be used in SONM GUI or SONM CLI. In that case Customer doesn't create order, but instructs Market to create deal directly based on selected ASK order.

Deal example (use sonmcli deal status command in CLI):

ID:           2260 (Spot deal)
ASK ID:       34576
BID ID:       34565
Status:       DEAL_ACCEPTED
Price:        0.000001111111111111 USD/sec
Total payout: 1.330242938671702 SNM
Consumer ID:  0xcB9Bb24E33A4F0f482f7060e6D4a4C178609B0ba
Supplier ID:  0xc364C71bAFAA85671C4d45E5Cf61bf19E0225AEb
Start at:     2018-07-25T22:34:37Z
Last bill:    2018-07-27T14:41:13Z

Deal's billing

Billing is used to make payments for the deals. It works automatically.

  1. After creation of the BID order manually by Customer (quick-buy was not used) the amount of SNM tokens for the first period (1 hour for the spot, 24 hour for the forward deals, or if it less - all deal price) are frozen on the Market from the Customer's account.
  2. After the matching orders was found the deal are setteled. If the quick-byu was used, at this moment the amount of SNM tokens for the first period (1 hour for the spot, 24 hour for the forward deals, or if it less - all deal price) are frozen on the Market from the Customer's account.
  3. After the first period frozen tokens transfer to Supplier's account. And tokens for the next period from the Customer account are frozen on the Market. This two operations are billing.

Attention: Deal price is allways in USD. But your payments are in SNM tokens using current exchange rate. If the rate changes between the billings next billing will thansfer to Supplier not a frozen sum of tokens, but more or less. And amount to freeze for the next period will be changed relatively.

  1. For the spot deals billing is made every hour after the creation. For the forward deals billing is made every 24 hour after the creation.

Attention: Customer should have enough SNM tokens for the next deal period before next billing. If it's not enough the deal will be finished automatically after the current period.

  1. If the tokens could not be frozen, the Deal is autmatically closed.
  2. The final billing is made before the deal finishing. It thansfers tokens to Supplier from a frozen sum in proportion to the last period of time if it less then standart. The remaining amount of tokens will be returned to the Customer account.

Change request for the deal

Both Customer and Supplier can initiate Change request for changing Deal duration or/and price using SONM CLI. Other side should approve duration or price change for changes take effect.

Deal finishing

Customer can stop spot or forward Deal at any moment using CLI or GUI. Customer can indicate to blacklist the Supplier while the Deal is closing, if he understands that resources provided are lower than he ordered.

Supplier can stop only spot deal at any moment also using CLI or GUI.