Boomerang
When you throw it and it comes back, its called a boomerang. Boomerang also happens to be the internal codename for the securities exchange engine powering gTrade. But lets wind back a bit. Securities exchanges are traditionally distributed systems. While we typically associated “distributed” with clustering, fail-over, scalability and so on, “distributed” in this case is not to be interpreted in a good way. All it means is that any single component within the traditional exchange infrastructure is too brain-dead to facilitate an exchange on its own. This is not so say that there are no provision for redundancy, en contraire, but this is achieved by clustering many instances of the same… brain-dead… component. So what does it mean, to be “brain-dead” then?
A distributed system is one made of a number of physically disparate components working together to achieve a common goal. That’s where the definition stops, and where confusion begins. You see, there are two ways you could achieve what I’ve just stated. Suppose you were building a distributed system that needed to perform tasks A, B and C. Alice could build three components, each performing the roles A, B and C respectively and networking the three. To achieve redundancy, she could run two instances of each of the A, B and C components, and networking the six. Wally, on other hand, could built a single, albeit more sophisticated component that could simultaneously assume the roles of A, B and C, i.e. it could handle all three tasks. For redundancy, he could run two networked instances of this component.
At the end of the day (month?… year?) both Alice and Wally have themselves a distributed system. Which is better?
Let’s consider an order that needs to be processed by each of the functions A, B and C in some sequence. Alice’s system would delegate the order to one system, then migrate it on to the second and, finally, to the third. Because the systems are networked, the network delay cannot be taken out of consideration, and the turn-around time would be substantial, regardless of the throughput capacity and present loads on the servers. Wally’s system could facilitate the order within the confines of a single server. Sure, the load on the server would inevitably increase, hampering the capacity to process subsequent orders, but with proper load balancing we can simply spread the orders across the remaining servers, adding servers as we need to.
Back to the original question. Which is better? At this point an overwhelming majority of literature on architecture and computer science tries, in order to be seen as politically correct, to take a neutral stance on the two solutions. “There is no correct answer…”, they would say. “It all depends on…”, they would add. Hell NO! Not here! Not on this blog! Wally’s solution is better hands-down, regardless of which way you look at it. Why? Because his avoids unnecessary network hops that plague today’s distributed systems, spreading functionality across nodes purely for the sake of looking and sounding “distributed”. The result, you guessed it: “brain-dead” nodes that are incapable of standing on their own two feet and accomplishing anything in the absence of their peers. Wally’s is distributed in every regard, yet it can run with as few as a single component.
How does this relate to a securities exchange (SE)? SEs for various historical, political and commercial reasons have erred on the bad side of the distributed paradigm. There is a separate match-up engine, a clearing house and a stock registry. Not to mention the various brokerage systems that cloud around the SE because everyday investors simply aren’t admitted directly into an SE infrastructure.
The Boomerang engine backing the gTrade securities exchange does everything you’d expect of a stock exchange: a proverbial “shampoo and conditioner, all in one bottle”. The clustering aspect, along with the benefits of scalability and redundancy is outsourced completely to DTS/S1 ‘Pitch Black’: a native Java transaction-oriented object database from Obsidian Dynamics. While it is less than a year old, and not yet available to the public, DTS/S1 has already proved its worth. DTS/S1 allows applications to manipulate plain old Java objects in a way that is isolated, durable, atomic and consistent, as you would expect of a transaction processor. DTS/S1 supports the ’serialisable’ level of transaction isolation, which is the highest level of transaction isolation achievable. Simply put, you read and write to your Java objects as you would, and those changes are persisted to permanent storage without any further intervention on your behalf. More so, the changes are documented in an audit log and can be traced at any later point in time. What were the changes? Who made them and when? DTS/S1 can provide the answers when asked. Most beneficial to Boomerang is the fact that DTS/S1 is clustered internally. It runs on as many (or as few) compute nodes as required, and can write data to a clustered NAS. And its fully transparent: Boomerang still thinks that it runs on a single machine.
The gTrade business model, and hence the Boomerang workflow, is based upon a two-phase company lifecycle. Let’s come back to this later. A traditional stock exchange facilitates the trade of equity in a publicly listed company. That is, it assumes the company has made its public offering and the brokers have distributed the shares among the interested investors. Some investors eventually express a desire to sell, while others are poised to buy. This is all well and good for a well-established company, but what does this do for a start-up? The short answer is nothing. Start-ups are on their own when it comes to gathering the initial capital and working hard for a number of years to get to a point where they are fit for public listing. This also happens to be the exit point for private investors, such as Venture Capitalists who have chosen to invest in the company from the outset.
gTrade allows for everyday investors to “subscribe” to a start-up by purchasing a number of shares at a fixed price. A start-up company that passes the necessary due diligence and is considered by gTrade to be fit for listing will “expose” a part of the company for public investment in exchange for cash which is used to bootstrap the venture. For example, company StarSoft might be willing to forfeit a 40% share in return for $100,000 in cash. They could break up the public share into 100,000 tradable class A shares, fixed at $1 each. StarSoft would be listed on gTrade and given, say, 3 months to raise the capital. Investors choosing to opt-in would “subscribe” to the shares at a fixed price per share. Remember, the clearing house and the stock registries are integrated into Boomerang, allowing it to hold both the shares of StarSoft and the investor’s money in escrow, until the company is fully subscribed. In that event, Boomerang will transfer the shares to their new owners, and the cash to the proprietors of StarSoft. On the other hand, if StarSoft fails to gather sufficient investor interest by the nominated due date, and the latter is not extended, Boomerang will recover the subscriptions by yielding the cash funds back to the investors and forfeiting the shares back to the start-up, in effect reverting all that has happened within that seeding round. The favourable outcome for everyone is, of course, that the company manages to fully subscribe and the initial cash-for-stock trade is settled. At this point, and for this particular seeding round (for there could be several rounds), Boomerang switches its mode operation to a conventional, fully-automated stock exchange, not unlike NASDAQ.
Boomerang’s fully-automated matching engine and the integrated registry allows investors to trade shares in real-time, and to receive and/or forego stock and cash the moment right after the exchange has been facilitated by Boomerang. And because both the stockholder registry and the clearing house are intrinsic parts of the trading platform, Boomerang allows for optional cash and mandatory stock reservations to guarantee delivery after an exchange takes place. One of the key differentiators of an integrated systems is that activities such as naked short selling can be eliminated in their entirety. At any point in time, Boomerang is fully aware of each of the investors’ holdings, including both cash funds and their tradable stock and subscription portfolios. This allows the punter to make optional cash reservations for buy orders, ensuring his/her transaction succeeds given a matching sell order. At the same time, Boomerang applies mandatory stock reservations for all sell orders, ensuring that stock is in the physical possession of the seller, thereby guaranteeing delivery. This removes the possibility of an unscrupulous investor or stock broker from orchestrating a naked short sell.
At gTrade, there is no decoupling of the investors and their holdings. This includes their cash funds. In addition to maintaining an investor’s personal information, their investment history and their stock and subscription holdings, gTrade houses what is arguably the investor’s most treasured possession: their wallet. You cannot complete a subscription or a buy transaction without having some prior funds in your wallet. Similarly, when a sell transaction completes, money will be deposited into your wallet. On the outside, you interact with your wallet by depositing and withdrawing money; you can “top up” and “sip off” from your gTrade wallet at any time. A wallet can be seen as a pool of money that can be invested, and into which the capital gains from the investments flow. There are times, however, when not all of the money you have in your wallet is “available” for investing. This occurs if you have chosen to reserve funds in a previous transaction. For instance, suppose I have $1000 in my account, and I’m in desperate need of 100 shares of XYZ and I’m willing to pay at most $1 per share. I could put in an unreserved buy bid, and providing a willingful seller emerges I have at least $100 in my account at the time of the exchange, the purchase will go ahead. But suppose I’m engaged in multiple buys and sells at the same time: money is flowing in and out of my wallet and while I’m doing quite nicely, there is no guarantee that there will always be $100 in my account to facilitate this “special” trade, and when the right seller emerges, I simply might be out of cash.
gTrade’s Boomerang engine has facilities available to exercises more fine-grained control over your buy orders should you decide that certain orders are more important than others. In the previous example, I could have reserved $100 (or less) for this trade. This amount would still reside in my wallet, but be locked to all other operations but that particular buy order. Funds reservations are a very powerful feature of gTrade, however, they’re somewhat restrictive in that they lock down a portion of your funds. To make this feature more appealing, we have enhanced it with what we call Early Funds Release (EFR). EFR is a mechanism that reduces the amount of reserved funds to an absolute minimum, and continuously re-evaluates the reservation figures, optimising them for your current buy position. EFR is best explained with an example. Suppose we have reserved $100 for an at-limit purchase of 100 shares of XYZ at $1.00. Later, we’ve been fortunate enough to find a seller who’s willing to part with 50 shares at $0.80. We’ve acquired 50 shares, spending only $40 out of our reserved $100. After the trade, Boomerang will evaluate our current position. It will see that we’ve still got 50 shares to fill the order, which will cost at most $50, given our initial limit. Yet we still have $60 left of the reservation. Boomerang will then release $10 back into the available portion of our wallet to be used immediately with any other offer.
Finally, I would like to point out that while gTrade will at some point support external brokers via a public API, the integrated nature of the platform makes its features available to the public through our Web desktop, which we have apply named “Webtop”. Webtop is our AJAX-based rich client that takes stock trading to a whole new level; not yet complete, but well on its way, and we hope to show it off in a couple of months.
Emil Koutanov
Chief Technologist and co-founder
gTrade

