Skip to content

Transactions

Gabrielle Zhou edited this page Sep 29, 2018 · 2 revisions

CYBEX implements a variety of operations besides simple transfers of funds. For instance, in order to operate the decentralized exchange we need support for buy, sell orders as well.

Simple Transfers

A simple transfer operation moves funds from user A to user B. In contrast to most other blockchain-based financial networks, we do not use addresses or public keys for transfers.

Instead, all that is needed for transfers is:

  • source account name
  • destination account name
  • funds (amount and asset)
  • memo (optional)

A transfer may contain a memo with arbitrary text.

Proposed Transactions

CYBEX allows users to propose a transaction on the blockchain which requires approval of multiple accounts in order to execute.

At any time, a proposal can be approved in a single transaction if sufficient signatures are available, as long as the authority tree to approve the proposal does not exceed the maximum recursion depth. In practice, however, it is easier to use proposals to acquire all approvals, as these leverages on-chain notification of all relevant parties that their approval is required. Off-chain multi-signature approval requires some off-chain mechanism for acquiring several signatures on a single transaction. This off-chain synchronization can be avoided using proposals.

The user proposes a transaction, then signatory accounts use add or remove their approvals from this operation. When a sufficient number of approvals have been granted, the operations in the proposal are evaluated. Even if the transaction fails, the proposal will be kept until the expiration time, at which point, if sufficient approval is granted, the transaction will be evaluated a final time. This allows transactions which will not execute successfully until a given time to still be executed through the proposal mechanism. The first time the proposed transaction succeeds, the proposal will be regarded as resolved, and all future updates will be invalid.

This simplifies the signing coordination problem, enables people to change their mind before the threshold is reached, and applies the transaction immediately upon receipt of the final approval.

  • The process for executing a transaction that requires multi-signature authority is as follows:
  • Someone proposes a transaction and approves it with their account.
  • Other account holders broadcast transactions, adding their "Yes" or "No" to the proposal.
  • When the proposed transaction has the approval of all accounts, it is confirmed.

The proposal system allows for arbitrarily complex or recursively nested authorities. If a recursive authority (i.e. an authority which requires approval of 'nested' authorities on other accounts) is required for a proposal, then a second proposal can be used to grant the nested authority's approval. That is, a second proposal can be created which, when sufficiently approved, adds the approval of a nested authority to the first proposal. This multiple-proposal scheme can be used to acquire approval for an arbitrarily deep authority tree.

Place Order

In CYBEX, almost any asset can be traded with all other assets. Once we have picked two assets, we usually refer to a market pair. For instance, we can trade USD against EUR in the USD:EUR pair.

For sake of consistency, we will use the generalized terms base and quote such that pairs are represented as:

quote : base

and for instance with base being USD and quote being EUR, denote the EUR:USD pair.

To place a trading order, it is required to fill the form on either the ask or the bid side (respectively, buy or sell side). You will need to define a price and an amount to sell/buy. The cost for this order will be calculated automatically. Note that there will be an additional fee required to actually place the order.

开发者社区

了解CYBEX

文档中心

DEVELOPERS

GETTING STARTED

DOCUMENTATION

Clone this wiki locally