Contract-Based Transactions

Add in Programmability to the Knox System via APIs

Knox Networks has implemented a system that separates the programmability layer (Contract negotiation) from the asset transfer layer (Contract fulfillment) that lives within the Transaction Validator Service. A Contract-Based Transaction fulfills a transfer of assets that is stipulated in a successfully negotiated Contract. Contracts help to create modular transactions that cover a wide range of use cases, including atomic multi-party and multi-asset settlements (PvP, DvP), cross border payments, escrow, etc., and support industry recognized techniques such as Hashed Timelock Contracts (HTLCs).

Contract-Based Transactions reduce costly errors, limit exposure to counterparty failures, and enforce compliance by allowing institutions to stipulate regulatory requirements before any transfer of assets takes place. All assets are transferred atomically: if any participant fails to deliver on any of their commitments then all assets retain their original owner. The figure below shows a simplified view of a sample contract between two parties, Alice and Bob, in an FX transaction.

Simplified View of a Sample Two-Party Foreign Exchange (FX) Contract

Contract Structure

Knox Contracts stipulate a series of Commitments and Conditions to be fulfilled by Participants. Here is a sample Contract flow:

  1. A Contract Originator proposes a Contract to all other Participants. Any participant can decide to accept or reject a proposed Contract based upon their own criteria.
    1. If a Contract is rejected, a newly proposed Contract can be created by any party.
  2. All Participants sign the Contract as proof of agreement and acceptance.
  3. Once a Contract is in place, each Participant submits the required assets corresponding to their Commitments, which are then locked (so the same assets cannot be double spent).
  4. When all Commitments are in place (committing the respective assets to the new owner) and all Conditions are met, the Transaction Manager atomically completes the transfer of all assets. If Participants do not submit their assets by the timeout Condition specified in the contract, the system atomically reverts ownership of previously locked assets to the original owners.
    1. Examples of other Conditions besides timeouts include: AML/CFT/Sanctions checks, valid address checks, etc..

The figure below showcases a simplified Contract-Based Transaction execution for a simple atomic swap between multiple-parties.

Sample Contract-Based Transaction Execution Flow