Epicenter - Learn about Crypto, Blockchain, Ethereum, Bitcoin and Distributed Technologies - Loong Wang & Taiyang Zhang: Republic Protocol – A Decentralized & Trustless Crypto Dark Pool

Episode Date: April 11, 2018

Dark pools have existed for as long as there have been financial markets. Over-the-counter, or OTC markets, are sometimes also referred to as ‘upstairs trading,’ evoking the era when firms and hig...h-net-worth individuals would meet in the upper quarters of financial markets to make large trades privately. A dark pool is a private forum where one has access to high volumes of liquidity outside the boundaries of public markets. Orders and trades represented in dark pools typically remain confidential outside the purview of the general markets, thus preventing undesirable market impact. We’re joined by Taiyang Zhang and Loong Wang, who are respectively CEO and CTO of Republic Protocol. Republic operates as a decentralized dark pool for cryptocurrency trading pairs such as Ether, ERC20 tokens, and Bitcoin. Buy and sell orders remain confidential in a hidden order book until matched without any of the parties having access to the underlying details. Trades are settled using cross-chain atomic swaps without the intervention of a trusted third party. Topics covered in this episode: Taiyang and Loong’s respective backgrounds Dark pools, their role in traditional financial markets, and their economic impact Dark pools in crypto markets The Republic Protocol and the problems it aims to address The different components and participants of the Republic Protocol The Shamir Secret Sharing Scheme and its role in protecting orders from being divulged to the public The role of nodes in Republic Protocol’s DHT network The purpose of the REN token as an incentive mechanism protecting against malicious actors Republic Protocol’s use of atomic swaps for decentralized settlement The project’s recent ICO and release roadmap Episode links: Republic Protocol GitHub - republicprotocol/whitepaper: Republic Protocol whitepaper Dark pool - Wikipedia Shamir's Secret Sharing - Wikipedia De/Centralize - YouTube This episode is hosted by Sébastien Couture. Show notes and listening options: epicenter.tv/230

Transcript
Discussion (0)
Starting point is 00:00:00 This is Epicenter, Episode 230 with guests, Taiang Zhang, and Lung Wong. This episode of Epicenter is brought you by Knosis, an open platform for businesses to create their own prediction market applications on top of the Ethereum Network. They recently launched KynosisX, a challenge inviting developers to build apps on top of the Knosis platform. To learn more, go to Epicenter.tv slash Knosus X. Hi, welcome to Epicenter. The show has talked about the technologies, projects, startups driving decentralization and the global blockchain revolution. My name is Sebassin Kutjir, and today we're here to talk about the Republic Protocol and Darkpools. And so to talk about this, I have with me as our guests, Tai Yang Zhang and Lung Wong, who are respectively the CEO and
Starting point is 00:01:24 CTO of the Republic Protocol. And so the Republic Protocol is a new protocol that is a decentralized dark pool. And so a dark pool is an exchange platform, is a platform where traders will come on board and essentially trade large amounts of assets in a way that is obfuscated from the rest of the market. So traditionally, dark pools were in sort of traditional financial markets called upstairs trading, but dark pools still exist today in traditional markets as well as in crypto. And so the Republic Protocol allows for a decentralized and trustless dark pool in a way that high net worth individuals and traders can execute large trades for pairs like Bitcoin, Ether, and ERC trading tokens. So very excited to have you on, guys. Thanks for being on the show.
Starting point is 00:02:28 Yeah, thanks for inviting. us, Seb. Yeah, thanks for inviting us. Happy to be here. Great. So before we get started, let's talk a little bit about your respective background. So perhaps starting with Taang, please tell us how you got involved in the space and what led you to starting this new company and building the Republic Protocol. Yeah, sure. So perhaps it's best to start where I guess the power of distributed systems first came in for me. So I started out as a program around my teenage years and got quite heavily as many people do into like the sort of hacking systems and distributed denial of service systems so I think that that was the first time that
Starting point is 00:03:13 you sort of realized that distributed systems are actually very powerful and then so I went to the Australian National University which is where I met at Lung and and also we worked together previously at a startup doing big data for help and more recently we founded new code which was a software development agency so we did a lot of work all around the place so the different clients sort of government agencies logistics geospatial etc so more recently i i got into the cryptocurrency space because one of my friends asked me to write the i guess the trading algorithms rhythms and architecture behind a fund called Virgil Capital, which I co-founded. So that was early last year, and the fund is still running. It's doing very well. So primarily
Starting point is 00:04:10 arbitrage strategies. But the way I really got deep into crypto was we were trading Bitcoin and with a fully hedge strategy and it was very, it was very lucrative, of course, because Bitcoin is quite a volatile beast. And then we started looking at that. into ETH and I guess the whole Ethereum platform and really started getting into smart contracts and looking at the power of what you could really build in a sort of decentralized application or protocol. And I think that there are many new governance structures
Starting point is 00:04:47 and exciting applications that can be built. So that's where I really started. Yeah, distributed systems for me has always been a big passion of mind. So when I went to the Australian National University, and I first started learning about concurrency, I kind of came into it with the mindset that I think a lot of people do, which is that it's just a way to make you computers go faster by doing more at once. And the more I got into it, the more I learned that it's a completely different world.
Starting point is 00:05:17 And I guess my passions in that area were always going to lead me to blockchain, as these things are probably the biggest and most interesting decentralized systems that we have. I did a lot of research at Australian National University around these kind of systems. So while I was doing research as a student, through the ANU I collaborated with Kray, who's a supercomputing company and helped them with their supercomputing language chapel. And then I went on to do my honest thesis in the same area, area and built my own language which specialized in systems that were only concurrent, only distributed and had no notion of doing things in order. And yeah, I'd work together with Tai for
Starting point is 00:06:06 several years at New Code. And so when he came to me with the idea of working in blockchain space in the decentralized space, there was no way I was going to turn that up. So Tai Yang, you mentioned that you were doing some trading previously when you found Virgil Capital, can you talk about what that experience? You're working in a quant trading firm. How did that experience play into your idea for a public? Well, I think that, I mean, as you trade on multiple exchanges, you start to realize that although these exchanges process billions of dollars of liquidity every day, cumulatively,
Starting point is 00:06:49 there is a lack for lack of avenues for OTC trades. I mean, so there are particular strategies that you can run on sort of lit exchanges, which are essentially exchanges where the orderbook is visible. And there are just some sort of trades that you don't want to place there. So I think that even though there are ways for you to execute, I guess trades without, with minimal market impact on traditional sort of exchanges, in crypto, if you can call them that, the market impact is still quite great. So, I mean, that's where the need for the dark port really comes in.
Starting point is 00:07:28 When you say market impact, so could you describe, when you're a large trader, when you're trading, say, I don't know, you want to make a trade for like $400 million in Bitcoin, what are the types of things that you have to watch out for? Like, how does that trade play out if you're using a traditional market? or maybe you have a strategy where you're executing some of that trade on an open market and some of that trade through an OTC. Can you describe sort of as a trader or a hedge fund? Like, how would you go about doing something like that without a dark pool?
Starting point is 00:08:04 I mean, unless your intentions are to manipulate the markets, which is highly illegal, the most important thing is to have the best price for your order. So, I mean, you always want the best price. If you're selling Bitcoin, for example, you want the highest price possible. So, I mean, this is where you might be able to source from different avenues and many different exchanges for liquidity. And that's probably the single most important thing for many of these Algo hedge funds or quant funds. So I think that's the primary reason why you would want to source liquidity from a dark pool like this. initially we do expect that
Starting point is 00:08:44 a lot of the guys who will be using a dark ball like ours would be your big OTC players in this space so guys like you know like Genesis, Cambolein mining and a circle and a couple of other guys like that they all need more liquidity to source from so I mean this is where we really play in let's just take a step back here and perhaps
Starting point is 00:09:10 to talk about the phenomenon of a dark pool in traditional markets. I mean, this is nothing new. It's not necessarily unique to the crypto space. So dark pools exist in traditional financial markets. In fact, most large banks have dark pool markets or markets that are not open to the public. Can you give us a bit of a background on that? And how much, how much do these markets represent in terms of liquidity? Yeah, so dark pools have been around for perhaps 30, 35 years or so, roughly speaking.
Starting point is 00:09:49 A lot of exchanges, a lot of broker dealers, they own dock pools. So, for example, there are a couple of large independent dock pools like Chaix, LiquidNet, and Instanet. And then you have the more broker-deal-owned dockports like JP Morgan, Deutsche, Fidelity. etc. And even the New York Stock Exchange or the ASX, the Australian Stock Exchange, they all have their own Darkforce. So there are many people tackling this space on a traditional Equities Forex sort of space. And you're typically looking at, I mean, the estimates sort of vary, but you're looking at roughly 15% of equities volumes being traded on dark pools. I mean, the number difference between U.S. and European markets.
Starting point is 00:10:34 Okay, so 15% of training volumes go through dark pools. Can you give us an idea of like how important are dark pools to the overall economic wealth of a market? Because I think of it, I mean, through doing this research, I mean, I wasn't super familiar with the concept of a dark pool, but it kind of makes sense. I mean, if you're a high net worth individual and you're looking to make these trades and not necessarily, you know, manipulate the market, it would be ideal to have some sort of a, a liquidity pool where, you know, you're not going to sort of manipulate the market in a way that your own trades potentially be less advantages. But if you look at it from the other side, sort of from a like free market perspective, you know, some would criticize dark pools as being antithetical to the views of a, of an open and transparent and free market. Can you give us some sense about, like, how important is a dark pool to the overall, economic health of a market. Well, I like to think of it as, you know, Dark Paul's work created out of a need. And that need is really that, you know,
Starting point is 00:11:45 I have a large volume order and I want to trade it in the best possible way, right? So, I mean, this is where the need comes from. And coming to the point on sort of transparency and the need for open markets, I think that, I would like to frame it, in a way that, you know, the issue that most regulators have
Starting point is 00:12:09 are surrounding the Dark Force rules and the way that people are trading on the exchange. So for example, I won't quote any exact incidents, but there have been many large banks or institutions who have in the past sort of given priority liquidity to customers who pay more. And that's something that's sort of seen as not fair in the markets.
Starting point is 00:12:31 So I think that if we're developing fair and provable markets, the rule set that everybody is trading on must not change. And you should not be able to bribe your way into the system, so to say. So, I mean, this is where I think a decentralized dark pool is very important because the rule set on where everybody is trading is very transparent, and it's the same for everyone. And it's provably fair. Dialing back now and coming down to the crypto level and the crypto markets,
Starting point is 00:13:00 You mentioned that 15% of liquidity on traditional markets goes through dark pools. Do you have any idea? Do we have any estimates of how much liquidity goes through dark pools on crypto markets? I think the difference is because I guess reporting is not necessarily mandatory in crypto markets. It's very hard to see the exact amount that's going through dark pools. And so, I mean, the estimates that we've been looking at have been directly derived from traditional equity markets. So I think that crypto trading has the potential to do the same, if not more, in the short term, purely because of the size of the market. So, I mean, we're still at a very nascent stage and a relatively small market cap for, you know, the entirety of cryptocurrencies.
Starting point is 00:13:51 currencies. So I think that, which means that large trades are more impactful than ever on public markets. So I think the estimate of 15% is quite reasonable, but again, it's all just sort of a guess at this stage. And where these trades occur? So we mentioned that in traditional markets, broker-dealer houses and banks have their own darkpools that they operate, they're regulated, they're a product offering that as a high net worth individual or fund I can have access to. In the crypto space, though, you know, most people would just, you know, find some exchange and do their trades there. You know, but if I'm a minor or a large exchange and I need to access high amounts of liquidity, where do I turn to?
Starting point is 00:14:46 So where can I execute a high value, a high liquidity trade in the crypto space today? Yeah. So I mean, just coming back to the point on the $400 million trade, which we saw published, I think it was probably two months ago. That was for a purchase of Bitcoin. So these trades are typically happening face-to-face or over the phone, over Skype. I mean, these are sort of the avenues that people are choosing the trade right now. Of course, you know you have your large OTC desks, which the majority of people are currently going to.
Starting point is 00:15:25 But I think these are the two primary avenues on which these trades are happening right now. If I'm doing these trades over the phone, where am I discovering the other side of this trade? Are there sort of platforms, a centralized platforms where I can discover people trading? Yeah, so a lot of it is happening through word of mouth. So people are just connecting people together. As far as the OTC desks go, I mean, these are entities that you can just go to, and they will help you source liquidity.
Starting point is 00:15:58 So, I mean, they might have an algor on the other side sourcing liquidity from public markets, or they know a couple of other people looking to buy or sell huge quantities of crypto assets. Okay, so there seems to be a need then for something like Republic, because I would assume that discovering another side of a trade through order of mouth is not necessarily the most efficient way of going about it. Yeah, it's not the most efficient, but I think that it will definitely exist for a long time. All right, so then let's dive into the Republic Protocol. So this is a new protocol that you're launching. Explain then, so at a high level, what are the different components of this protocol?
Starting point is 00:16:48 So looking at the protocol and the different components, the most important thing for us is, you know, it's quite counterintuitive to develop a decentralized dark pool where the order book is hidden, yet everybody still owns it, and you're still able to match orders and settle them in a way that's a non-interested. until execution. So there are various components of the protocol. So we have, you know, the settlement layer, which is on the relevant chain. So BTC, ETH, and that layer is currently an atomic swap. We are looking at other solutions, but right now that's the most stable one. And then we also have in the system, we have an order book which is propagated through a peer-to-peer network. So it's not a blockchain.
Starting point is 00:17:35 purely because we don't require consensus for it. And it would be inefficient if we were to create a blockchain for that. So, yeah, those are the primary components. So a hidden order book. And then we have people who match orders. So these nodes match orders, and then they're settled. So those are all the components. There's an atomic swap mechanism that essentially allows two parties to settle a transaction peer-to-peer.
Starting point is 00:18:02 So we'll talk a bit more about that later in the discussion. A decentralized order matching system, which allows two parties or more parties, and we'll get deeper into that, but multiple parties to match orders without knowing necessarily the underlying details of the larger order. And a decentralized order book where the orders are hidden. why is it important for the orders to be hidden? So it's important for the orders to be hidden because, let's just say that I do want to trade legitimately a huge amount of crypto assets. So we saw last year, I think it was around the April, May period,
Starting point is 00:18:49 in which G-Dax had a flash crash. It was just a very large order that triggered the market and triggered a lot of margin calls, essentially. And then the price of ETH just sort of crashed down to a very low point. I can't remember the exact amount. So it's really, I think that that's, I mean, that's the primary reason. So walk us through then a trade. Let's imagine that all three of us are involved in the trade.
Starting point is 00:19:23 So Tai Yang, you know, you're a high. high net worth individual and you've got $400 million of Bitcoin that you want to sell for ether. And on the other side of that trade, there's myself and Lung. And let's say I have $100 million in ether and Lung has $300 million. And we're participating in the Republic Protocol as traders. So could you walk us through then that trade? How does that play out for all of us? Yeah, so what happens is that each of us has to take our order and we follow the Republic Protocol encoding of that order and we break it up into a bunch of fragments. Now these fragments aren't smaller orders.
Starting point is 00:20:10 They're informational, theoretic, secure cryptographic encodings of this order and you need a large number of them to get together to rediscover what the original order actually was. And so Ty would take his $400 million order, and he would split it up into these fragments, and he'd submit one fragment to each node in the network, or some subset of nodes. And you and I would do the same for our orders. Now these dark nodes would engage in the order matching game, where they take these fragments and they compare them locally without sharing them. And when they reach the end of their computation, they eventually do get together and share them,
Starting point is 00:20:48 and they reveal a bullion, true or false, that says, yes, there's a match here or no there is not a match here. At that point, we can observe that match and the network is expecting us to execute on that. And we deploy our atomic swapping contracts to Ethereum and Bitcoin respectively. And then we observe the deployments of these contracts, make sure that everything is as we expect. And if not, the network is able to inspect them and see which one of us is actually acting maliciously. and then assuming everything is going fine, we execute the atomic swap tie with myself and tie with yourself.
Starting point is 00:21:27 From a user experience perspective, just so we get an idea here of how long this trade would occur. Let's say that, you know, Teng puts up his order for 400 million to Bitcoin and the liquidity, the ether liquidity is there, to match that order, right? Let's assume that the liquidity is there instantly. How long will it take for this trade to occur once it's been sent to the network? So this actually depends on how many impending orders there are in the system.
Starting point is 00:22:03 Because of the dark nodes have no information about the order or very little information about the order, they really have no choice but to do a brute force computation where they check every possible comparison. Assuming the liquidity is there and assuming that you're handling a couple hundred orders per second, which is how much we expect the network to be out of handle, then you would expect to see a match within a couple of seconds. And the atomic swap itself will settle in a how long? Well, that's dependent on the underlying blockchain. So at the moment we're picking atomic swaps because they're the most stable and sort of tried and tested solution,
Starting point is 00:22:39 they take a couple minutes if you're trading Bitcoin to Ethereum. but they can take up to 24 hours if both parties aren't cooperating heavily. And so this is why we're sort of exploring other avenues as well. Okay. So let's come back to this example and maybe break it down a little bit. So when Tang puts up his order for 400 million, you said that he breaks it up into fragments. Can you explain what you mean by that exactly? What are these fragments and what do they represent with regards to the order itself? So it all comes down to this idea of being out to build lines from points.
Starting point is 00:23:19 So if I want to have a secret number, and I don't want anyone to know what it is, but I want a bunch of people to be able to get together and know what it is, I can take that number and put it on the Y intercept of a two-dimensional graph. Now, if I want two people to do out to discover this order, I can create a line that goes through that Y intercept. Now if you had two points, you would be able to reconstruct that line. be able to reconstruct that line perfectly and you'd be able to see exactly where on the Y intercept it touches and then you'd be able to see my secret. But with only one point
Starting point is 00:23:50 on that line you have no chance of knowing exactly what it looks like and where my secret actually is. And it turns out that this property holds for arbitrary dimension polynomials. So if I want three people to have to get together to discover my line, I create a polynomial of degree two and if I want four people to get together I create a polynomial of degree three and so on and so on. So you construct a network that has a large number of nodes in it and and you take your order or parts of your order, and you encode them as numbers, and you put them on the Y intercept of a polynomial,
Starting point is 00:24:20 and then you take points on that polynomial, and you give a different point to each node. And these sets of points that make up an order are what we call a fragment. Okay, so this is the concept of the... This is Shemir secret sharing. Okay, so for non-engineers, non-mathematicians, such as myself,
Starting point is 00:24:43 Just to sort of give an analogy to this, you're giving the analogy of a graph on an X and Y axis. And so I can have a point on this graph. With only one point, I cannot determine the trajectory of a line on this graph. So, however, with two points, I can determine the trajectory of this line. So what you're doing is you're taking this line and breaking it up into several points and sharing that information about the individual points with nodes who, unless they collude, and we'll get back to the incentive model a bit later, but unless they collude, won't be able to reconstruct the entirety of the information that makes up this line.
Starting point is 00:25:40 That's correct. Okay. And so once this order has been broken up into fragments, it is sent to nodes on the network. So could you explain who are these nodes and what kind of software they're running and what is there a role, I guess, in the system? Sure. So these nodes can be run by any member of the community. As long as that member of the community has taken an amount of rent, which we call the bond. And they've registered that on Ethereum, and they've submitted that, which is essentially a good behavior bond. And that ties into the incentive model.
Starting point is 00:26:19 It's also a way to bound adversaries. We assume that no adversary has an unlimited amount of money, so they wouldn't be out to register some huge number of nodes if there's a financial requirement to do so. And so these nodes, the software that they're running is any implementation of the Republic Protocol. We provide a reference implementation in Go, and we'll be providing reference implementations
Starting point is 00:26:44 in other languages. And these are open source and available in our GitHub for anyone to go and check out. And the way that they work is that they take these points that they were given. And one of the interesting properties of polynomials when they're used in this way is that you can perform computations on just the points that you have.
Starting point is 00:27:04 And then when you get together and reconstruct the resulting polynomial from the new new points after they've been computed on. The result has the same computation but applied to the secret. So I can construct a computation that essentially asks the question, do these two orders match? And instead of asking that question on the orders, I ask them on the points that I've been given, that make up my fragment of that order.
Starting point is 00:27:29 And then once I ask that question, I have this result which is actually meaningless. It represents a new point on a polynomial. I get together with all of the other dark nodes. We reconstruct this line and we look at the ultimate answer which will say yes or no. The actual underlying orders did or did not match. And so these nodes participate in a network that is not part of the Ethereum network. It's another independent network of the Ethereum chain, but it's not a blockchain, correct? Yeah, that's great.
Starting point is 00:28:04 Okay, so it's a Dht. Right? Yep, that's correct. So it's a peer-to-peer network. So it's a peer-to-peer network where there's information sharing between the nodes. Why not build this on, why do you choose to build this as Dht and not like a tenement blockchain or some other distributed ledger tech in particular? The major problem with blockchains that a lot of blockchains are facing at the moment is the publicity of information. So the whole point of these fragments is that you don't want them to be shared publicly,
Starting point is 00:28:39 because if you had enough of them, you could get together and reveal the secret. If you would have post these fragments to the blockchain, you'd have a lot of issues because everyone could see them. And if you posted them to the blockchain in an encrypted form, then the computation that you have to do on these fragments to get some result out is incredibly computationally expensive. It would have a lot of associated fees. It may not even fit into a single block. even if you're doing a simple kind of transaction on Ethereum, it can take several minutes before
Starting point is 00:29:06 that computation is actually confirmed, whereas we can do it off-chain in a couple of seconds, because we don't have to reach this sort of consensus that every single node has all of the same information. This episode of Epicenter is brought you by Gnosis. Gnosis is an open platform for businesses to create their own prediction markets on the Ethereum network. Prediction markets are powerful tools for aggregating information about the expected outcome of future events. So this can be used for things like information gathering, incentivizing behaviors, making governance decisions, or even creating insurance products. So in order to turn Gnosis into the most powerful forecasting tool in the world, they recently launched Gnosis X.
Starting point is 00:29:48 It's a challenge that invites developers to build applications on top of the platform. And the best applications per category will be rewarded up to $100,000 in GNO tokens. So throughout the year, Gnosis will announce different. categories for the challenge and the current challenge has categories for science and R&D, token diligence, and blockchain project integration. Gnosis also provides the SDK, which allows you to easily get started with everything you need to get coding. And they also provide dedicated support channels throughout the challenge for teams and solar builders. Are you up for the challenge? Get started now. To learn more and to sign up, go to epicenter.tv slash connoissex.
Starting point is 00:30:27 We like to thank Gnosis for their support of Epicenter. Okay, then describe maybe the dynamics in between because Republic is built as a as an Ethereum smart contract and from what I've read Republic could also be deployed as a smart contract in another blockchain just you've chosen the Ethereum because it's the one that has sort of the most you know like the the the most secure security model and sort of easiest deployment options available at the moment it's the most mature smart contract blockchain I guess if we could put it that way so that but describe So then the dynamic between this GHT network that sort of sits off-chain where computations are executed by individual nodes and the Ethereum Smart Contract that, I guess, executes the traits.
Starting point is 00:31:20 Is that a good way to put it? Yeah. So there's actually a very minimal amount of interaction. The only interaction that they really is is that the dark nodes, when they want to join the network, they have to, register their Wren bond, and they have to do that on-chain. And that registration becomes public because it's on the Ethereum blockchain to all the other nodes. So the nodes kind of passively observe the Ethereum
Starting point is 00:31:44 blockchain, and they get to see who else is registered. And this prevents a potentially malicious node from coming along and saying, hey, I'm a dark node. I'd like to participate in this computation. And you could verify whether or not that was true by observing the information that they were meant to put onto the Ethereum blockchain. And you could verify that.
Starting point is 00:32:02 that their bond was in fact there, that the signature that they're meant to be producing is the signature that they are producing. But the actual distribution of orders, that happens completely off-chain and the computation happens completely off-chain. And the only time it comes back on chain is when the order are executed and the fees are taken.
Starting point is 00:32:20 So as a trader, participating in the network and executing trades on the network, am I interacting with this DSG network, or am I interacting with Ethereum? It seems like the Ethereum network is only used for the bonding mechanism that serves as the incentive network.
Starting point is 00:32:39 So initially you interact with the Republic Protocol Network that's off-chain. And once you discover a match, you go ahead and you execute the atomic swap on-chain. Right. So I execute the atomic swap on-chain, but say if I'm selling Bitcoin, I'm not interacting with Ethereum. I'm not interacting with the Ethereum smart contract.
Starting point is 00:33:00 That's right. interact with whatever smart contract you need, sorry, whatever contract you need to on the relevant blockchain to execute the trade. So if it's Bitcoin to ether, one of you will be on Bitcoin and one of you will be on ether. Okay, so just to summarize then, so there are the dark nodes that that make up this, the Republic Protocol network. And I think in some of your documentation, you call this network the ocean? Yep, the dark ocean. The dark ocean, okay.
Starting point is 00:33:29 and there is the Ethereum Smart Contract that serves as the bonding mechanism where the rent tokens are bonded by the nodes that are executing the computations on the trades. And then there are the individual blockchains themselves. So it could be Ethereum, it could be Bitcoin, where the traders are interacting with that blockchain once the order has been. executed once the trade has been executed and confirmed, then I post my trade to my relevant blockchain, whichever one I'm interacting with, could be Bitcoin, ether, or whatever other blockchain you support, and I execute the Atomic Swat on that blockchain. Yeah, that's correct. Okay. Interesting. So as a trader, then I don't necessarily interact with the, I guess I only interact with the, with the dark ocean when I'm posting my trade,
Starting point is 00:34:28 presumably using a client or an app or something like that that is connected to the DHD network. Yeah, that's right. So each of the nodes in the network provides an API that you can interact with. And this is because the majority of traders and OTC desks aren't a guy sitting at a computer interacting with a user interface. They're doing some kind of algorithmic trading. But there is going to be the Republic Terminal, which will be a decentralized app, which high network individuals who don't have that kind of trading approach can interact with a visual interface. So in your documentation you also talk about pools.
Starting point is 00:35:06 So there are nodes, individual nodes, and you have pools of nodes, and nodes can group up into pools, and then pools constitute the ocean. What's the role of a pool? So that idea of saying that we have, because the nodes don't know anything about the orders, They can't filter this down in any way and do anything but a brute force computation. So by breaking the nodes down into pools, we can parallelize the processing of the order book.
Starting point is 00:35:32 So instead of every node just crunching through computations one at a time, you can have multiple pools and each of them are processing a separate part, and you gain performance through parallelization. The other significant aspect of that is that the secure multi-party computations that these nodes do are not actually that cheap to do. They're quite expensive in terms of... in terms of computational time. And the larger, the group of nodes
Starting point is 00:35:56 that are participating in one of these secure multi-party computations, the longer it takes. And so by breaking them down into randomly sampled pools, you can maintain similar security thresholds, but massively increase your performance. So what kind of computations are we talking about here? Does one require special hardware to perform these computations?
Starting point is 00:36:20 These computations are, what actually slows them down is the network communication that happens. So when you have a large number of nodes participating in one of these computations, there's a big strain on the network where every single node has to communicate with every other single node. Obviously the fewer nodes, the rather less communication is happening and the faster this happens. Compared to that, the computational requirements of secure multi-party computations are not actually that high. So GPUs and those kinds of mining equipment might give you some computational.
Starting point is 00:36:50 educational edge but not a huge one. Okay, so just about anybody then can participate in, with a CPU, you know, can participate in the... That's right. All of our testing operates on sort of your basic everyday laptop for CPU, 16 gigs of RAM. I mean, maybe not on everyday laptop, but certainly a consumer available laptop. And we provide our reference implementation packaged up into cloud-friendly images so that that you can quickly deploy a dark node to the AWS cloud. And of course, to err away from the side of centralization,
Starting point is 00:37:27 we'll be providing images for varying platforms, cloud platforms. Interesting. So let's talk about the security model a little bit and the incentive mechanisms that secures the network. So one of the premises of Republic is to have a private order book. And the whole point here, as we discussed earlier, so that, you know, this dark pool and the trades happening on this dark pool don't, you know, disrupt the price of the assets on the public networks or on the public exchanges and public markets.
Starting point is 00:38:07 And so, you know, I might have an incentive. One might have an incentive to disclose the information that is within the dark pool, within a Republic protocol on an open platform. So if I'm a malicious actor, I may have an incentive to take the information that I am retrieving as a node and post it, so the information about trades and post that on an open forum. Talk about the incentive mechanisms that prevent this sort of behavior
Starting point is 00:38:40 and the sort of attack vectors that Republic Protocol can mitigate against. Sure. So there's two sorts of. adversarial models to consider here. One is the non-adaptive adversary, and the other is the adaptive adversary. So in the non-adaptive adversary case, you're assuming you've got one person or one very close-knit
Starting point is 00:39:02 trusted group of people that are trying to attack the network up front. And to prevent against these kinds of adversaries, all you can really do is make sure that that adversary doesn't make up a large portion of the network. And so this is true of, of pretty much every blockchain where you need 51% of the mining power to be honest in order to make sure that the security of the blockchain holds.
Starting point is 00:39:29 In Republic Protocol, we decide to set the threshold for Shemir Secrets at two-thirds. So unless you have two-thirds of a pool, it's impossible to actually reconstruct the order at all. And if you have two-thirds less one, you have just as much information as if you only had one. if you only had one. So against the non-adaptive adversary, these Wren bonds prevent someone who is financially bound from attacking the network at scale.
Starting point is 00:39:59 And acquiring that much rent in order to attack the network in that way would be quite expensive. For the adaptive adversary, this is one where you sort of say, oh, look, it has become apparent that all of us are in the same pool together. Why don't we decide to collude and we'll share fragments with each other, discover the orders, and take advantage of that in the market. The incentive that stops you doing this is that the trader and the nodes, when they exchange fragments, they enter an agreement by signing the hash of the fragment.
Starting point is 00:40:30 And if anyone at any point can reveal the actual fragment that hashes to this hash, they gain a reward by slashing the bond of the node that was in charge of this fragment. And so in the adaptive adversary case, it's very unlikely that we are highly trusting each other, or that we were already working together. And so there's nothing stopping us sharing the fragments with each other, manipulating the market or getting inside into the market
Starting point is 00:40:55 and taking advantage of it there, and then also taking our fragments and attacking each other by extracting our bonds. And so you provide an economic incentive not to reveal fragments by saying that if the fragment is ever revealed, you will lose your bond. as as an actor wishing to manipulate the market or get inside information so what prevents me from simply extracting certain information about the
Starting point is 00:41:24 about the fragment that wouldn't allow me to sort of reconstruct that fragment not so like not not publishing the fragment itself but only publishing some amount of information about the fragment that on its own wouldn't allow a third party to look at that fact look at that information reconstruct the fragment itself and then extract the bonds. So you can show that unless you actually have the fragments in full,
Starting point is 00:41:48 that you don't get any kind of information. So you can verify mathematically that unless you do have two-thirds of the fragments proper, there's no way to extract any information from it. Having some information about some of the fragments gives you absolutely nothing at all. Okay, so I would need to have two-thirds of the fragments in order to extract any sort of information and this is because of the way that these fragments are constructed in the Shamir secret sharing scheme. Yes, that's right.
Starting point is 00:42:20 Okay. Interesting. Do you know of any other blockchain systems that are using this Shamir secret sharing scheme? It's kind of a mouthful. Yeah, there are two that I'm aware of. There's Keeper and Enigma. So Keeper is focused on secret keeping and having secret information on the blockchain. Specifically, they focus on keys and providing signatures. Enigma is attempting to provide arbitrary computations using secret chain.
Starting point is 00:42:50 Where that differs from what we're doing is that we acknowledge that we've got a very specific focus with our computations. We're not trying to do arbitrary computations. We're just trying to do an order matching computation, which at the end of the day is quite simple. You take two numbers, you subtract one from the other and you check whether it's greater than zero. This is far from being arbitrary, but it's just trying to do an order-matching computation, it means that we can create a lot of optimization that allow us to do this orders of magnitude faster than current industry standards. And how does this secret sharing method relate to zero knowledge proofs and ZKP circuits? Are they similar?
Starting point is 00:43:28 There's some similarity in the sense that they provide a level of zero knowledge, and you can verify the computations are completely correct, and so you can know some information about some inputs without knowing anything about the inputs, but they're not based on the same principles. Do you use ZKPs and ZKP circuits in any way? We use very small, very efficient zero-knowledge proofs when it comes time to challenging an opponent to check whether or not they've done a computation faithfully,
Starting point is 00:43:57 but no, other than that, we don't usually touch them. Or we don't touch them at all. And they're not zero-knowledge-proofs in the way that they're traditionally seen in the rest of crypto. Okay. So let's talk about the atomic swap part. So we've covered posting the odors, how the others are matched, the incentive models, but then when it comes down to it, I mean, you really want your trade to be executed,
Starting point is 00:44:23 and that happens through an atomic swap. I mean, we have talked about atomic swaps in the past to some extent, but we haven't really gotten into detail about how they work. I don't think anyway, I don't recall having, but could you describe and how an atomic swap works and how it pertains to the Republic Protocol? Sure, so they're based on a thing called hash time lock contracts, which is a fancy way of saying that I'm going to put my ether up in a contract and I'm going to send it to you, but only if you can reveal the pre-image of a particular hash. and we'll call that hash the lock. So I have some hash and if you can reveal the thing that becomes that hash, then you can extract the money.
Starting point is 00:45:12 And I have this secret. Then you take the same lock and you send me money on the condition that I can reveal the pre-image. Now I have the pre-image, which means once you've set that up, I can go and submit that to your blockchain and extract the funds that you wanted to send me. But the point of the blockchain is that it's all public information.
Starting point is 00:45:34 So as soon as I do that, I've revealed my pre-image. And you can now take that and submit that and get my Ethereum. And where the time aspect of it comes in is just a way of getting refunded if either participant decides to stop that process and just not participate. So currently, or at least when you launch, the Republic Protocol will support Bitcoin and Ether and ERC 20 tokens. can you talk about what makes it possible today for those pairs to work and why are we limited to these three pairs? Is it more technical on your side or does it have to do with compatibility with other blockchains?
Starting point is 00:46:22 Yeah, so I'll just jump in here. The primary reason we're looking at these three pairs is not necessarily because of technical limitations. The primary reason is that we want asset pairs that are traded heavily. So there's no point picking, I guess, two tokens or different chains that support these tokens. There's no point choosing them to be supported in our protocol if they have no liquidity. So, I mean, the whole purpose of Republic Protocol is for large trades. For small trades, it makes no sense to trade on our protocol. It's actually more efficient to trade on the public markets.
Starting point is 00:46:58 So, I mean, with, it's just, it's very evident that BTC, ERC 20 tokens, and ETH are traded very heavily, along with the tether pair for many exchanges. So I think those are the things that we look to support initially. As for other chains, I mean, there are, I do know that Zcash, for example, has hash time like contracts built in, like coin, vertcoin, de-cred. I mean, these are all chains that do support such trades, but we really look to focus on a few initially to bootstrap liquidity. So how common are atomic swaps at the moment? I mean, do a lot of trades happen on, say, for instance, like Bitcoin Ether through atomic swaps? Not really. They're a fairly new concept. I think really popularized last year. I think Charlie Lee did the get the swap with from like coin to decred and and that really kicked off a whole wave of media but so far people haven't really sort of executed it in a way that um is massively used
Starting point is 00:48:09 just to stay on this topic what what is so you the only real requirement is that the blockchain supports these uh these lockdown contracts as you mentioned like coin supports that bitcoin ether What does it look like in terms of ecosystem adoption for lockdown contracts and just being able to do atomic swaps between any blockchain? Well, I think that for adoption, it's less about having the technology there, but making it usable. Similarly for our system, we have a lot of complex moving pieces, but to the user, it's very simple. They can interact with it through an interface. So it's the same thing for atomic swaps. There just hasn't been a lot of this sort of auxiliary UI and UX built for them yet to make them feasible for the general public.
Starting point is 00:49:06 And there are quite a few people working on this. Yeah, because I suppose you also need not only the sort of user interface aspect, but you would also presumably need some sort of price discovery mechanism and like a way to match buyers and sellers in a trade. Yeah, so an interesting one that I have seen is some larger OTC desks working on atomic swaps for their clients. So that's quite an interesting one. I think that it's a very applicable use case, but such things won't be sort of popularized by the media, which is why we don't hear about them. So yeah, I think it's a very interesting technology that can be used in many different places.
Starting point is 00:49:49 And it's just a matter of time before we see it popping up. around the place in many different forms. What are your thoughts on how atomic swaps might affect the exchange business model in the future, sort of centralized exchanges? I think centralized exchanges have many sort of efficiencies compared to decentralized exchanges and atomic swaps. So, I mean, I think the fact that all the auto books are sort of centralized and auto-matching can happen in a centralized way.
Starting point is 00:50:25 And when you deposit money into an exchange, it becomes a number in a database that can be freely traded. I think that these are things that centralized exchanges will have over decentralized exchanges and atomic source for a long time. So I see it being less of a harsh impact. I'm not going to take the view that one is necessarily better than the other at a particular time.
Starting point is 00:50:50 I see. And regarding Republican, protocol then I mean, you know, being a decentralized dark pool, couldn't you also deploy a similar network that doesn't have all of the privacy and just have it be like an open public decentralized exchange? Have you thought about that? Yeah, we have thought about that as well. I think that the dark pool is suited for a few reasons. And one of the reasons is that while blockchain scale, we're still able to capture this market because people who are trading millions at a time, perhaps are not so concerned about the split-second change.
Starting point is 00:51:30 Of course, there will be people who are concerned, but it's not a necessary requirement for a lot of these traders. So, for example, if I call up an OTC desk, maybe they take, you know, at a minimum one day to fully execute my trade. And I think that for us, you know, the maximum time lock for an atomic swap contract is 24 hours anyway. So I think that speed limitations are less worrying for us. Of course, if we do want to, so in the future, we want to support sort of second layer scaling solutions so we can bring on these high frequency traders. But in the short term, it's better that we tackle this problem first compared to making it a public sort of public decentralized exchange, so to speak. Now, in your, I believe it's in your white paper where you mentioned that the Republic
Starting point is 00:52:22 Protocol could be, could also run on other blockchains. So for instance, you know, could run on EOS or could run on another blockchain like TASOS, presumably, or any platform that supports smart contracts. Is this something, so why, why, is this something that? you're looking to do at some point in the future, why would you choose to deploy it in other smart contract platforms? So I think that with regards to that, we're really talking about the the rent token and the rent ecosystem. So really, rent tokens interact with the Ethereum blockchain at a minimal capacity. So as long mentioned before, we use them to register traders, we use them to
Starting point is 00:53:08 register nodes. And pretty much the advantage for registering a node is that you can start earning order fees in the ecosystem. But coming back to the point on why we would not deploy on another chain, these set of contracts, there is no reason why. I think that Ethereum is just the most stable ecosystem that we've seen so far. So speaking of this ecosystem, I'd like to come back to one topic that just occurred to me we failed to discuss during the show. And that is the amount posted by the bonders or by the network participants.
Starting point is 00:53:51 What defines this amount? Is there like an algorithm that defines how much one would have to bond in order to secure the network? Yeah, for registering a dark node to enable you to match orders, the current sort of preliminary number is 100,000 rent tokens. So the reason we pick this is because there are a total of 1 billion rent tokens for the supply. And if we choose a number like 100,000 per node, that means that there can be an absolute maximum of 10,000 nodes in the system, which is sort of a billion divided by 100,000. So I think that the reason we pick such a number is that the more nodes that we have in the system, the slower it becomes. But the more nodes that we have in the system, the more security is.
Starting point is 00:54:43 So it's always a trade-off between security and speed. And also the sort of the profitability for that particular node to earn fees. So this is the reason we've picked such a number. So before we wrap up, I'd like to talk about both the company that you're building. And so you recently completed an ICO. Can you talk about your ICO? How much did you raise? And who were your investors?
Starting point is 00:55:09 Yes, so we finished our public ICO on the second of February. So we raised 5,000 in the public ICU and 30,000 in the private pre-sale. Some of two of our lead investors for the round were FBG and Polly Chain. And also Cignam Capital and Hyperchain have been very helpful to us in Singapore. So, yeah, that was the race. So the company is based in Singapore? Yeah, the company is based in Singapore. And you have operations also in Australia?
Starting point is 00:55:39 So our development team is spread across Singapore and Australia. Okay. And any particular reason why you chose Singapore as a place to launch this company? I think Singapore has a very vibrant ecosystem when it comes to the sort of cryptocurrency community, whereas spaces like Australia are still sort of getting the hang of it and the ecosystem is developing there. it's at a much earlier stage. So I think the number of connections that we can have in Singapore to projects, to founders, to funds is much greater. So this is the reason we pick Singapore. I would definitely agree.
Starting point is 00:56:19 I mean, I've been, I'm actually in Singapore at the moment. And I've been here for about a week. Our listeners might recall a few weeks ago, we did an episode with Anson Zeal, who is part of access, the sort of cryptocurrency Starups Association in Singapore. And we were talking about the ecosystem and the fact that it's actually quite an active ecosystem. There's a lot of startups here. Actually, we met you and I at the decentralized Singapore conference, which was just last week. And there's, I mean, I was quite surprised to see so many companies here. And I mean, sort of in the West and like Europe and the U.S., we don't necessarily get to experience what's happening in this part of the world.
Starting point is 00:57:06 But one thing that was quite clear to me is that there are quite a few companies here doing a lot of interesting things. And so I was very pleased to be able to take part in that and sort of witness that firsthand. Yeah, it's great. I think that unlike other areas, if you want to visit a company here, it's just a walk away. Yeah, I know. It definitely feels like the ecosystem is quite tight-knit. And even with other Asian countries and sort of Southeast Asia, I mean, at the conference, there were people from China, from Thailand, from Korea. We had a lot of delegates from India as well.
Starting point is 00:57:47 So it does kind of, I mean, it was my first time in Asia, actually visiting Asia. So it kind of sort of felt like Europe in a sense where it. Every country is sort of just a skip and a hop away and like a cheap flight away. And so you have this very tight-knit ecosystem and Singapore seems to be a place where all that is kind of codifying. Yeah, definitely agree. Yeah, so those who are interested in sort of seeing the talks from that conference decentralized Singapore. The website is decentralized with a z.sg. And I believe the talks will be online in the coming day.
Starting point is 00:58:31 So just about when this comes out, you know, the talks will be made available online. So definitely check out the website and we'll put some links in the show notes to where you can find those videos. So in terms of roadmap, tell us when will the Republic Protocol launch publicly? So we're looking at TestNet very soon. So within this quarter. And the public main net released will be in the third quarter. So roughly around July. And so if one is interested in becoming a node on the network or participating in the project in some capacity, how can one do that?
Starting point is 00:59:12 So one can just follow our Medium blog. We post updates semi-off and we will be having an update about, I guess, the criteria for running a node and how you can get in touch and start running those. great terrific well guys thanks so much for for being on the show today it was a pleasure having you and it was a pleasure meeting you here in singapore yeah thanks said you too yeah thanks it was enjoyable and thanks to our listeners for once again tuning in you can find new episodes of epicenter on iTunes sound cloud or wherever you get your podcasts you can also get the video version on youtube and of course we release new episodes every week. If you're interested in supporting the show,
Starting point is 00:59:59 you can obviously leave us a review on iTunes and help people find the show and we're also very grateful at seeing your reviews. And you can join our community. We're on Gitter at epicenter.tv.tvacr. So thanks so much and we look forward to being back next week.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.