Insight into the world’s first FX transaction by DeFinity on the WeOwn Layer 1 blockchain

Rylan
Definity Network
Published in
4 min readMay 6, 2022

DeFinity is a decentralised DeFi exchange, specialised to trade traditional and digital FX, with a focus to provide real-time settlement and clearing for spot FX trading. Bridging the power of decentralisation with a traditional broker and liquidity provider community, it is specifically tailored and geared towards the future support of CBDC’s (central bank digital currencies) and decentralised financial services for FX. DeFinity is a layer 2 DEX solution based on WeOwn’s $CHX layer 1 blockchain.

The DeFinity solution seamlessly integrates with the existing trading universe of DMALINK, one of DeFinity’s two joint venture partners with a total trading volume of over $185 billion and an average trading size of over $585kUSD.

High-level architecture of DeFinity’s FX platform

The solution is basically divided into three architectural layers:

  1. Front-End

At the top level, a comprehensive application is available for institutional traders with Clarity Pro, which allows traders, to execute FX trades, monitor PnL and utilise the reporting blotter to send deals to the back-office. The Clarity Pro GUI offers deep liquidity with access to multiple pools resulting in tighter spreads and optimal fill rates.

For retail traders, the existing Clarity App will offer an interface in the near future to participate in DeFinity’s FX and digital asset trading.

2. Layer 2 Pre-Trading FX Trade Matching Platform & Risk Engine

Here, the trading orders of liquidity takers and liquidity providers are processed. As a first step, all trades pass through various validation routines before the matching engine determines the best price with different liquidity providers. After the matching process, trades pass through the risk engine, which again contains a large number of validation routines and ensures that all parameters defined for the partners involved are adhered to. Otherwise, the trade is reversed. If all check algorithms are successfully passed, the finalised trade is transmitted to the layer 1 via a FIX gateway or so-called drop copies.

3. Layer 1 Post-Trading Clearing & Settlement

All incoming trades first pass through the drop copy engine, which parses all FIX messages and ensures that all defined FIX parameters are met. Similar to the process in layer 2, matched trades pass through the post-trade risk engine, which ensures that the traded assets are in fact available. This information is provided by the LP and LT via an interface. When this check is successfully completed, the final clearing and settlement takes place on the layer 1 blockchain, the corresponding transactions are generated, and the result is transmitted to all parties involved.

Structure of the first FX transaction

The starting point of transaction is two drop copies according to the FIX message specification of the type “Trade Capture Report (AE)”. The following example shows such a FIX message of a specific trade between the US dollar and the Euro:

The result of a successful FX transaction is stored in WeOwn’s Layer 1 Blockchain in two consecutive steps:

  1. First, the assets necessary for trading (in this case currency pairs) are generated.
  2. And finally, the specific details of the trade are transmitted as a transaction consisting of several actions. While most public or private blockchains only know the concept of transactions, a single transaction on WeOwn’s Layer 1 blockchain can consist of almost any number of actions. This reduces the number of transactions to be validated and thus allows for increased scalability of the blockchain, as is specifically required for FX trading.

Execution of the first FX transaction on the Layer 1 Blockchain

On 02/08/2021 at 08:34, FX transactions processed in the Layer 2 pre-trade matching engine as a set of 2 transactions with multiple actions were stored on the Layer 1 blockchain on Testnet for the first time. This was the first time that an institutional FX transaction could be settled end-to-end and stored on the blockchain.

The following image shows transaction Ag6VF4vUY8ug56jDuFkPgHe6CcqssA3p6HA6Rc3TpNkQ in the WeOwn Explorer, which shows the creation of the required assets:

The following illustration shows transaction fXY2w22Nqp6T57szYaGrJVC8utwYWBs9CJJQmztoqdf in the WeOwn Explorer, which has generated the transaction required for the FX trade with the associated actions:

Further reading

General technical information about the WeOwn Blockchain (architecture, consensus mechanism, validators and the general concept) can be found here. For more details about our technology, please refer to the Blog section on the WeOwn website.

Stay up to date with DeFinity:

· Telegram Official Community — https://t.me/DeFinity_Community

· Telegram Announcements — https://t.me/DeFinity_ANN

· Medium — https://medium.com/definity-network

· LinkedIn — https://www.linkedin.com/company/definitynetwork

· Twitter — https://twitter.com/definitynetwork

--

--