Day 1: Stefan Thomas (Ripple)

Crypto Valley Conference 2018 · 20 Jun 2018 · 37:22

Stefan Thomas of Ripple speaks on Day 1 of the 2018 Crypto Valley Conference in Zug, bringing perspective from one of the earliest projects focused on cross-border payments and remittances using distributed ledger rails. The talk addresses how Ripple's approach to settlement speed and liquidity aims to outperform legacy correspondent banking. It reflects the conference's early interest in payments infrastructure alongside its academic and DeFi tracks.

Speakers

Topics

From Crypto Valley Conference 2018, hosted by Crypto Valley Association.

Transcript

[Music] he's the chief technology officer of one of the biggest and most most ambitious blockchain startups out there their goal in the words at least on their website is to bring Global Payments out of the disco area now I quite like disco myself but still so please ladies and gentlemen give it up and get down get down for Ripple CTO Stephane Thomas hello everybody I'm very happy to be

here today and big things to Elliott and all the organizers for inviting me to address you today I consider a great honor to be opening for an event that has so many amazing speakers and just such a high caliber of attendees as well this is how you get in with the audience by do I just give them a compliment right at the beginning now for me this is a bit of a special talk or special occasion because this will be my very last presentation as CTO at ripple I am starting my own company we are receiving some funding from ripple and it's building on a lot of the technology that I've been working on before and and while I was a triple but yeah so this will be somewhat of a

special occasion for me anyway and it's kind of fitting to to be speaking here in Switzerland for that because this is where I was living when I first got into Bitcoin back in 2010 I had been involved in some startups here in Switzerland that I helped to set up and after selling the last one I was kind of looking for something new to work on and you know I came across Bitcoin dot org and the rest sort of his history and I still associated a lot of fond memories especially those early days are always the most exciting for any project because it's all new and you're kind of what does it all mean and you try to

figure it out I remember we started the Swiss Bitcoin meet up and the first meetup had about six people and I hear that it's a lot more now so I think we're doing well so what I want to talk to you today and I've titled the separation of consensus and state may be more accurate would be separation of logic and state but then it wouldn't really be blockchain related so I've put in consensus and also to kind of recall the church and state idea and basically what I mean by that is we currently have these very integrated monolithic block chains and so I want to

think about other architectures and I don't expect everyone to agree that there's one right architecture I think that it's a good thing that everyone has their own ideas of how blockchain should be built but hopefully you'll find my viewpoint interesting because I think it is pretty unique now you might have heard this saying before it's a very popular sticker so if you spend any time around tech people you might see it on their laptops and obviously it's a bit tongue-in-cheek but what it's referring to is the fact that when you store your photos or your personal information in the cloud it's not this magical place that lives

outside of physical reality it's a real server somewhere that somebody's running and that could theoretically be hacked or even physically accessed and so it's sort of a reminder to be careful about what data you share and where you put your data and it's also a little bit of a rebellion against buzzwords and so I wanna introduce a similar phrase for the blockchain space which is there's no blockchain it's just someone else's computer and so what I'm talking about is even if you're using a blockchain and even if it's Byzantine fault-tolerant you're

still running on some physical computer somewhere it's important to remember that and whenever you're evaluating using a blockchain for some business purpose or even setting up your own you should always be thinking about what are the actual servers or computers that this is actually going to run on in the end because it matters because it influences the security and it impacts what you can do with it and what other people could attack it now obviously using the the most prominent example of a running production blockchain Bitcoin the physical servers that are doing the validation and that are deciding the ordering

of transactions are the minor miners more specifically the mining pools and so a lot of you might have seen this chart before this is sort of the current hash rate distribution and this has been changing a lot over time I remember there was once a very large pool called deep it which is now basically defunct and non existent and so you know new mining pools come and go but these are the the companies that are actually validating your Bitcoin transaction when you make one and most of them are in China and all of the named ones here are in China except for slush pool which is in the Czech Republic and that's actually fun fact the oldest pool now I

lied a little bit because two of these pools are actually owned by bid main so the two larges happened to be owned by bit main and so more accurately would be this kind of Hazard distribution and so when we talk about Bitcoin as this trustless system we have to think about well it is trustless as long as you don't count the trust that you have to have in bit main and some of these other mining pools and you know might some people counter well you know the miners can withdraw their support for the pool and that's true however they can't do that in real time they're going to be doing that over time if the pool misbehaves they're not going to be able to stop a double spend attack as it's

happening and so in terms of evaluating the security of a consensus algorithm you really to be fair you have to look at what can somebody do as part of the algorithm not what is some out-of-band mitigation because if you allow for out-of-band mitigation pretty much every consensus algorithm is going to be secure now choosing these validators that's sort of the fundamental problem that any consensus system has to solve if you want to have a distributed system and again we want to think about it who are the actual nodes that that system runs on well you have to choose them somehow and Bitcoin users have a process called proof-of-work as we all know and

it's a very expensive way to select validators and you might say that it's the only truly decentralized way and that's a fair statement however it's also a fact that it's an extremely expensive way of compiling a list so you could call this list the most expensive list in the world and this number is the amount of money that's been spent on mining this year so far and it's actually on pace to more than double what the network spent last year now if you wanted to put together a list of validators you wanted

to say okay who are the best nodes that we should have as the operators of our financial system you would probably say well they shouldn't all be in one country they should be globally distributed you'd probably say that you should have very secure data centers maybe you care about the their sort of mentality mindset values and so on and maybe there isn't like one set of validators that everyone in the world would agree is the best one and so it's actually not so easy to you know find that one group that that can run a global system and so you know you could say maybe we need the proof of work in order to do that but you can also take the opposite position the opposite view

and you can say you know I want to be in this business I want to be in the business of making a list and getting paid three billion dollars to do it that seems like a pretty good business to be in I'll take I'll even undercut them I'll give you a greater a better list for just one billion dollars and let's leave it at that now I've been thinking about this problem for a long time and I could be talking about XRP ledger which is a consensus ledger blockchain public blockchain that also uses a form of explicit notes elections so essentially the way it works is that if I want to participate in the extra ledger system I need to select which nodes I'm going to

be listening to other people do the same that forms a graph and we can start to analyze that graph and we can create an algorithm that has certain properties given a certain graph and by definition the validator selections will be in the interests of the users because the users are making those validated selections the downside is it's not an automated process with something like Bitcoin you get an automatic selection of notes so it's really dependent on your use case if you have a system and you want it to be totally anonymous it's very hard to select notes because if they're anonymous you don't really know who's behind them if they're trustworthy or not and so probe works a pretty reasonable way to do that

but if you actually know who the nodes are and ironically even in Bitcoin we now know largely who the mining pools are why not just select the ones that you want and save yourself three billion dollars but I'm not going to be talking about extra pre ledger today sorry for you that might be disappointing for some of you might be a relief either way not gonna be talking about that very much today but while I was at ripple I worked on a project called Co Deus & Co Deus is essentially a smart contracts platform and it came from our desire to do smart contracts on top of X RP and originally we started with an

architecture all the way back in 2013 early 2013 that is very similar to what you would now recognize as so the etherium architecture which is you have a turing-complete sandbox that is running on each node in your blockchain system and then you come to consensus on those computations and that's how you mutate your state and therefore you have a programmable blockchain now as we were working on that there were several reasons why we didn't actually deploy that solution number one we thought that it vastly increased the attack surface of the system so if you have programmability in your blockchain of options already a fairly complex system has consensus it

has state it has politics involved with it it has potentially currencies whereas economics involved with it all kinds of complex incentives and yeah general any distributed system will tend to be pretty complex or pretty difficult to reason about as hopefully there's this I know there's a lot of really top experts in the in the room so I don't have to tell you and so you we didn't want to add that that another dimension of complexity because it's not just sort of linearly increasing how complex the system is but rather it's adding a dimension to all the other axes of complexity that are already there because now people can run their own code and they can use that to interact

in weird ways with the consensus or interact in weird ways with the economics and the the incentives and so on now the other problem that we saw was if you're running it directly in the blockchain unless you're doing some something else that's clever your contacts have to be deterministic because if every node runs your contract and everyone comes to different results your block chain will fork and that's not a very good blockchain if you're constantly Forks we actually got around that problem with a little trick which is basically to come to consensus on the result of the

computation instead of the computation itself that's something you can do in consensus systems that are more along the lines of traditional and consensus systems like pbft a type systems or you can do it with something like X if you led your consensus you can't really do it with proof of work because there's one note that chooses the next block and so everyone else needs to be able to come to the same result to be able to verify it but if you have some form of voting about what the next block should be then you can tolerate some difference on the result and so you can use that to to come to consensus and what the result should be and so what that does is it means that people can write contracts aren't always 100% deterministic as long as they tend to be deterministic it'll still work anyway another big limitation

of doing your calculations in the blockchain itself is that it's very hard to add to address other systems to talk to the outside world and people have traditionally gotten around that by using something called an Oracle so the idea is that rather than having your actual business logic call out directly to other systems you have a separate installation system that looks at these outside systems and writes the data into your blockchain now just from how I explained it you can probably tell that that's a fairly clunky thing to do it's not what we do in traditional enterprise software architecture where if you want to call some outside API you go call that outside API and so you really

restrict you restrict yourself by having your code run alongside your data and that's something that people already discovered way back in the 70s when we were using mainframes and we had big big large-scale databases and we would write our code as you know what's known as stored procedures so really you just write your business logic right next to your data in your database and that works great as long as all your data is in that one mainframe but if you're dealing with another company or maybe another branch of your own company that has a different mainframe things tend to get very complex very quickly because that's not a very flexible programming model so with koteas our big idea was to copy that lesson to basically learn from

the past and say ok we move away from mainframes we moved away from stored procedures well what did we move towards and what we move towards was separating our state from our logic so we would have these stateful systems which are complex enough and and all they're really supposed to do is worry about holding that state and then we have a bunch of stateless systems which is where we implement our business logic and this architectures become so successful it's basically ubiquitous and that's how most enterprise or even other kinds of applications are written today and so with koteas we try to imitate that architecture so basically our works is a koteas house this sort of isolated system there is no built-in consensus

mechanism there is some level of a distributed network because you need to find those hosts and so there is a gossip network that is used for discovery but other than that the hosts don't really interact with each other as part of the the core protocol so if I'm a user and I want to run a smart contract well all I would do is I would implement a smart contract and I would upload it to however many hosts I want so I can say hey I want this more contract to be ultra decentralized I want to choose a hundred hosts or I can say hey you know I just need a small number of hosts have some Byzantine fault tolerance but it's not like the end of the world if this if this goes down so I'm only gonna upload it to a

few hosts or maybe my particular application that I'm trying to upload is very performance sensitive can't handle a lot of nodes and so for that reason I want to use fewer ones so whatever your constraints are you can kind of choose the number of hosts that you want and what koteas does like you might say this looks a lot like just hosting and you wouldn't be too far from the truth it is mostly just hosting but there's one thing that courteous dust that's unique which is after you upload the code the host tells everybody what's the code that you upload it and crucially it doesn't let you change it so if I upload something to a table us I can later come in and modify what it's doing I can you know take an image of the hard drive and

download it koteas won't let you do any of those things it basically just says you know give us a immutable image of your code you can upload that and we'll run that for you but we won't let us Sh in or anything like that and so what that means is that if I'm now somebody else is kind of looking at that I can verify that the code that's running is the code that I want to have as much more contract or application or whatever it is and I can trust the fact that the uploader didn't tamper with it now of course some of the hosts could be malicious and we'll deal with that in a second but I don't have to trust the the uploader as long as I verify that that image which you always have to do so suppose you have this you know classical

consensus application it has a fault tolerance of three FS one so you have you can tolerate two faults for these seven seven nodes and let's say two of the hosts fail and our uploader is also malicious so in this particular case this application would still be running correctly because the algorithm that's running on the Seven hosts has that fault tolerance and we're not trusting the uploader we can trust the honest nodes that are saying hey we're running this particular hash that they are actually doing that because they're honest nodes by definition and the hosts that are Byzantine don't matter because the algorithm doesn't doesn't break down if we have two failures so that's the basic idea behind koteas it's a system for

deploying decentralized applications one thing I want to point out is that surprisingly the system is useful even if you just upload something to one host and what's kind of important about that is because writing applications that are centralized are actually is actually totally different in writing distributed applications again a lot of extras in the room they don't have to explain this too and so there is a lot of use cases where let's say you know I'll have an example later but let's say I want to do some sort of minor contract over a few dollars I'm not really expecting that AWS will risk their reputation Amazon will risk their reputation to defraud me

right and so if I have a reasonably trusted host that I can upload things to that's very useful and crucially kotya still protects from a malicious uploader because again the hosts still verifies that hash or this host still provides that hash that any other party can verify so it's useful even if you're just uploading it to one server it's just quite interesting so this is a really weird comparison but I threw it in here just because most people today when they think about okay I want to write a smart contract they think about doing it on aetherium and to the extent that people have built working smart contracts most of those are on aetherium so I think it bears comparison so if you write a contract for a theorem the consensus mechanism of

that contract will be proof of work and whatever else that if there are migrates to and actually this migration aspects pretty interesting because you know I'm not necessarily saying that koteas is better I'm just saying that it's different and one of the advantages of something like a theorem is that you don't have to worry about any of this upgrading that the theorem network might do so if a theorem switches store different kinds of this mechanism and that ones better you didn't have to do anything you were basically along for the ride now you can flip that and you can say well what if they make a change I don't like well you're still along for the right so that's the trade-off next in a theorem all the state is global so everyone kind of sees all the state of everyone with koteas generally the state

would be you're writing you're decentralized application you're uploading it to these hosts and so they might share state with each other but it's kind of contained and the only way that you would share state is through api's so if I'm just a client of the of the internet and I'm looking at these this coding system I can't see any data of any contracts so that could be again the benefit or it could be a downside if you're looking for that transparency it could be a downside although if you trust the house you'll still be able to have an API where they provide that data either unconditionally or under certain conditions so I think this one is one that the additional flexibility that CODIS provides actually very powerful because you can't have private data without having to resort to any kind of

really complex so knowledge proofs or anything like that in terms of the virtualization so if theorem has its own virtual machine you VM there's a lot of talk about using other technologies but that's what's there today and koteas uses the Xen hypervisor so I'm actually don't this is true well it's using hardware virtualization and I'm actually just I'm not sure at then but it's hard for virtualization and then next you have the programming language with the theorem you can write in the solidity and a handful of other sort of EVM compatible languages and what that means is your contract has to be deterministic so you can't just go ahead and make an HTTP call I think that you have to have something that a self-contained only

access to state in aetherium and then you're good with koteas you can write in any language so that already opens it up to vastly more developers which once again is said to a two-edged sword because you know those developers might not all be great at writing smart contracts next let's talk about the hosts own validator so with aetherium there's a certain set of hosts that are that have a majority of the hashing power and the same will be true once the switches over to proof of stake there will be certain hosts that have a lot of steak and so that would be your base of validators you don't have any control over that in koteas it's once again as is cry before a choice of the individual uploader of the contract what host that it uses and one thing that's interesting

is that the upload of our contract can be another contract so what that means is that you could write a contract that has some kind of logic for how it migrates two different sets of hosts so there could be a feature that lets the users of the contract vote on which set of hosts to migrate to to add a host to remove a host and things like that so there's a lot of flexibility but once again it's up to the uploader to figure that out and then finally the cost is very different and it's hard to actually compare because in a theorem you pay per transaction so essentially every write you do to your transaction state costs you money whereas in koteas you're paying for hosting so you're paying per host per month and so if theorem could be much

cheaper if you have an application that doesn't do many many rights and and runs for a long time with few users but if you're trying to build a very scalable application with a lot of users almost certainly koteas would be cheaper because you know five dollars a month during that month it could be doing millions of Rights and so it could be millions of times cheaper and that's an error now we launched koteas it's an open source project about two weeks ago and thankfully you got featured on coin desk instead of a bunch of people started pay attention to the project and so there's already a 150 hosts out there up and running and it's actually highlighted a lot of bugs and the

implementation that we're working through so bear with us but I would call that fairly successful I'm actually very excited about this map which is the actual locations of these hundred 50 hosts according to geoip and so it's a fairly distributed system and what's empowering to me about that is you know if I'm using something like Bitcoin or a theorem I'm pretty much restricted to that very you know 81% China located set of validators I don't have any control over that with Cody as I can today make a contract that is entirely Australia based if I want to and so I have a lot of lot of control and I will give you some examples of what you could do with that control so the first use case would be something

that a lot of people have run into which is okay I've implemented my smart contract on hyper logic fabric and now I'm ready to deploy it but my consortium has three members and I want to have a Byzantine fault tolerance of two so I need seven hosts what do I do and so one option you could do is you could upload it to code yes you could pick the number of hosts that you want upload it you can pick the criteria that you want so you want to have it geographically distributed or whatever you can put that in so it's actually a very powerful way to run private blockchains now right now koteas only offers HTTP access so it's not actually possible to do this today but I'm

working on a solution for that which is basically a VPN solution that ties your hosts together so that they get a virtual IP arranged and then you can have any applications running on there so that should come out in the next couple weeks so this is a really good use case and this is something that resonates with me as well at Ripple because we needed to get our extra fee ledger a blockchain running on a bunch of different validators and it was basically a business development efforts it was going out to companies saying hey here's why you should run a validator here's the benefits for you and so that's a very manual and time consuming process and this basically turns that into a single click right I can say

upload 220 house now actually 30 hosts there you go now you can get even crazier because koteas is accessible over HTTPS is not behind a weird custom blockchain protocol it's just HTTP and so you can actually run something like content delivery network so you can have and this is not an application that you need to worry about your security because you can use integrity hashes in the browser that make sure that the content only loads if it's the right hash and so you could have a piece of JavaScript figures out what's the nearest koteas host and then load some content from it so it's it's useful for totally different use cases as well another example would be what if I won

my block to be really low latency so kind of think of a game maybe like a game where latency is very important and so I don't want globally this rooted boxing it takes two seconds to come to a consensus I want something that's more faster and and and the best way to do that is to make it regional because it speeds up consensus systems quite a bit if the latency between hosts is smaller and then finally this example I came to that earlier which is hey if I just need to make a little bet on the World Championships or the World Cup why don't I just upload it to one host it's not like AWS is gonna defraud me just they can steal the 50 bucks on my sports bat now we built this all the way back in 2015 we had a fully working prototype of

koteas well I say fully working well with one exception which is what I'm about to tell you which is how do you actually pay the host so we could say hey you know you can upload things to my server but you got to pay me for that right and we could have said well you pay with X or P and so it's it's kind of tied to the extra P ledger the problem with that was that well as you all know you know ripple has a certain reputation in the blockchain space I would have excluded a lot of people from wanting to use it and so you would have ended up with an extra P code yes and then a different theorem courteous and a Bitcoin courteous over there and it would have all been mutually not interoperable and so despite the fact that we had all this developed in 2015

we kind of sat back and said we can't do this this is not we there's something missing we can't do it as is we don't want to tie it to any particular legit it should be across all the ledgers and in order to do that across all the Ledger's you really have to solve this problem how do you pay hosts without saying like oh you pay them with token X and the reason this is an issue is because today's blockchain is sort of weird monoliths so they're integrated if payments and tokens and consensus all bunched into one and so this is the problem that we need to address here we go here's another view of that so if you have crypto kiddies that's running on a theorem that can't you can't pay with

extra P for that or Bitcoin unless you do something outside the box in to convert it and so a lot of times these applications stay within the community that created them rather than being sort of usable on any on any system now this reminded us of a certain other system that solves a similar problem and I'll show you this so imagine if somebody wrote Skype but they wrote it on top of Ethernet and so it only works on Ethernet and you can't do Skype calls over Wi-Fi and that's exactly what we're talking about it's like you have a single network and within that network your application works but as soon as you go to a different network or even across networks it stops working and the same with be torn the same with email and so

on now what was the solution you'll know it it's the Internet which acts as an abstraction layer and as well as a routing layer to go from one network to the other so I can actually not just can I use any network but I can be in one network you can be on another network and we can be part of the same interaction incredibly powerful and this is why the internet became so Vegas because it has insane network effects because we can be on the plane emailing you know and this is something hasn't happened for the blockchain world yet so this is what we set out to fix back in 2015 we released a white paper intelligent white paper in October of that year and I'm happy to announce that IntelliJ is done it works and we're starting to

use it for stuff and so I could imagine some sort of future crypto kitties that builds on integer instead of aetherium and so you know I can use bitcoins I can use extra P I can use ethers doesn't matter I can interact with this application regardless of whatever blockchain I like and so this would allow this industry to start building applications with much greater network effects than was possible before now just a few points about intelligent allege is a streaming payment solution so it sends very small packets of money so rather than sending whatever amount you're trying to send all at once it actually splits the payment up into tiny

chunks since the individual chunks across and then kind of reassembles it you lose that to Mississippi with that but you gain a lot of cost-efficiency and so once again it's sort of a trade-off and I kind of compared to packet switching versus you know circuit switching which is how the phone system used to work so in circuit switching you get a dedicated channel and so then you can have your phone call over that channel and the internet introduced packet switching which is essentially your data gets split up into tiny packets now if you're trying to make a phone call splitting up into tiny packets can actually be quite of quite terrible because you know your your phone call cuts out and you know there's like delays and so on and so it's not the

ideal solution for all use cases but having everything on one system is so powerful that even phone calls are now done often over IP so it's a very interesting paradigm and somehow we realized that it applies to money which didn't I don't think that it would but it does and so if you think about all the different kind of token systems that are out there and all these different icos and whatnot and I picked three and I really don't want to be you know talking negatively about them or anything like that the reason I picked these three was because I looked at the list of the largest I SEOs and I picked three that could actually understand what the hell they're trying to do which

you know eliminated a good chunk of the top 50 and so take this as a compliment for these three not as a knock but basically what I want to say is that this concept that we used within koteas as a way to make a if you want to call it that at a different kind of aetherium it actually applies to a lot of different use cases a lot of different use cases people are currently imagining that they would build block chance to go to serve and so you can reorder tag all of those using intelligence so suddenly you can have paid ipfs and you can pay with ether you can pay with extra PE you can pay with Bitcoin so your token becomes your tokens become universal and I mean it's not surprising because you

don't go to the clothing store and you spent your clothing tokens you you go to a clothing store and you spend dollars most of the time and there might be loyalty programs but are intentionally non fungible so I think they're not a good comparison to most utility tokens that people talk about although there is there's some similarity and so if you think about some user and some post and they're currently transacting using let's say file coin again I don't want to pick on any one particular insert whatever your favorite or maybe your least favorite utility token and so the hypothesis that people will use it for that particular use case but think about it from a

perspective of a file host if I'm a file host and I'm accepting payments for people to store data on my server I'm gonna have costs and other that's denominated in other currencies like maybe dollars maybe other crypto probably dollars and so I need to actually convert that and so the more liquid the token that I accept the better and so I'm gonna start accepting also you know Bitcoin extra P other more liquid tokens whatever has the lowest cost to me and I prefer those because why not like it makes my life easier it lowers my costs and finally enough the same thing is true for the user side as a user I don't want to have to go and convert whatever tokens I have to file corn first before I transmit them I just

want to use whatever is the most liquid and the most efficient and so the key takeaway that for at least for me and and I'd be interested to see if you guys agree or not is wouldn't this apply to most use cases wouldn't this just be easier to use universal tokens and so my hypothesis is that users will choose the most liquid the lowest fee tokens regardless of what use case they're trying to address all right so with that here's a bit of a summary I think that this is a total different view on the blockchain world this is a totally different architecture that I don't hear talked about a lot so I hope you guys can now go out there and talk about it

and yeah I'd be interested to see if people agree if people disagree so feel free to tweet at us I am just moon by the way I did not pick that name with moon the the blockchain term in mind I picked that that term back in 2004 or something and then my new company is called coil so you can also find us there on Twitter and then all of this stuff I talked about with koteas the best place to go right now is to go on medium we're posting a bunch of tutorials there so if you want to play around with that and try it out go to medium go to github and try it out so yeah that's about it thank you to Stefan for kicking things

off in such spectacular style as you mentioned I think they you're you're leaving ripples soon as that yes yes CERN your new company is called coil yes so when we see you next year on the stage at crypto Valley that's up to you 2019 you'll be here you'll be here from coil that's right yes okay well I'm sure you'll join me wishing a Stefan best of luck in his new endeavors and thank you very much thank you [Applause]