SF Scala: Zihe Huang, Scorex -- the Smallest Codebase for Blockchain
Recording: SF Scala: Zihe Huang, Scorex -- the Smallest Codebase for Blockchain
I guess Meshkov definitely covered a lot about the entire blocking and how exactly a blockchain works so I guess I'll be spending more time on the application part since the whole point of using score X is to be focusing on the application side of things instead of focusing on the nitty-gritty detail of the lower-level transaction consensus all those things so a little bit of a topic project it is an open source project the goal of it is to build a decentralized the credit scoring system for small and medium sized businesses overseas so in developing countries the the goal there is is to fill this gap between international micro financing and a huge corporate debt since there is this clear gap for small and medium enterprises to say like a mining company or something in Ghana seeking funding but the bank there has a tremendous interest rate for the lungs that they're issuing typically thirty to forty percent so you can imagine how difficult it is to secure a loan there the goal there is to kind of present the companies onto the platform and present the companies to PE firms and Development Bank's in the developing country in the developed country so I guess just talk a little bit about why we are using score X I guess the first reason is that the platform needs to be public and the the I guess the entire concept itself does not require super performance public blockchain itself has never been a performant period so you can achieve certain like very fast transaction speed with a private blockchain set up but in this case we're we're talking about bringing transparency democratizing this information about companies overseas we would like it to be public and the other part of it is that we do have a privacy requirement so for the example of Bitcoin and aetherium every single transaction is public because these transactions are validated by the entire network so anything you do is basically seen by all the validators who are running full notes as Meshkov mentioned earlier so you essentially the public key that you're showing through the network is not really private in the sense that if I can figure out your pattern of spending pattern of transactions I can essentially figure out who you are and and that's that's how a lot of people are able to trace certain account holder real identity based on like you know say say say that I spent a hundred bucks you know today at 3 a.m. and there's only like two or three transactions at that time that matches this amount then people will be able to pretty much figure out who actually compare or who who actually submitted that transaction right so there are privacy blanks out there for example monaro who uses this scheme of ring signature and actually it's a it's a ring CT confidential transaction a scheme and there's also a Z cache which uses ZK snark but I guess I can talk about both a little bit so so what toppled is that the the reason we seek privacy is because for and investment firm for for a P firm to be investing in companies state they want to kind of preserve their investment strategies so I mean investment firm a doesn't want to share secrets with investment firm firm B if you are if every single transaction on the blockchain is public basically everyone can see what's going on then that is not a good thing right however what they want to see is they want to kind of verify certain companies also say that this a good example would be how should I say a a reference check when you get a new job right I don't have to know exactly who who my competitor company hires but I do want to see that you actually worked for the company that you claim to be so this this this requirement there is so that in a a mining company saying Ghana would like to get seek say say like seek future funding from Morgan Stanley or something like that but Morgan Stanley doesn't well Morgan Stanley do want to see who this mining company I had dealing previous dealing with say that he he probably secured a profit sharing agreement with some other bank or something but you know some other bank doesn't want to really see that so this is like a very unique privacy implementation that is not really out there on the on the entire crypto currency community so the closest thing that we find is some kind of scheme that is the paired up with ring signature along with the designated verifier scheme so there's some some crazy crypto stuff I'd I don't really know a lot about but those are fairly academic and hasn't been implemented yet so that was the reason that we didn't go with the cerium or or anything else we wanted to be able to customize the trend transaction to be able to preserve privacy for investors and also give certain like ability for one investor to verify previous dealings so so that was the reason that we went with score X is that there's this special need so if you are I guess you're just building an app for consumers or anything there's really no need for you to be looking at like those private stuff other than I mean you can always just go with aetherium right right solidity contract - solidity also has its own downfall and its own issues but you know scores is that this unique thing for it's kind of like a niche for people that are willing to I guess experiment and doing research for academics it has a huge values you don't have to worry about the networking part for example the message passing the house states are are applied but it allows you to be able to kind of customize certain part of it say say for example I think much called mentioned about this hybrid chain which is this example of unique consensus scheme where you have one proof of works block followed by another proof of stake block so this is like a fairly interesting scheme and if you want to swap it out to like completely just to be proof of work or proof of work combined with some other unique consensus scheme that you come up with that you think of that is really good you can easily swap it out since everything is modular the consensus part is just the de minor part so you modify that part and then you're able to kind of create a completely new block chain there and I think another reason that that we we picked score X was that our development team was fairly small and we only have two developers at that time so I think Bitcoin at that at this point has 80,000 lines of code I'm not exactly sure but that's but there are there are a lot of lines of code for Bitcoin and for a theorem as well as since I theorem has its own smart contract engine this this if they're in virtual machine built into the blockchain itself and and and they don't really have any documentation zhan like oh here here's our architecture on how we built our blockchain there there is nothing like that but the score X props for them is that they do have a nice tutorial for score X - I think although it's a little bit outdated but the key concepts are there the the four parts the state the vault the history and the mempool these are kind of the things that these are the core concept that makes every blockchain a blockchain and and that by kind of modularizing each part of it you're able to quickly understand at a very low level what is exactly going on with the blotching that you're building and I think these are kind of the the concerns that we had that time and I think score exfilled fulfilled pretty much every single requirement there and that was the reason I guess we didn't pick theory amor or anything else because I guess there are integration effort between Z cache and the theorem I think the metropolis release is coming out soon so so what that does is that it creates this the theorem virtual machine will basically implement this cryptographic primitive that's that is used in Z cache so what was the cache does is that it has this it is a private preserving transaction so I think a good example would be telling you that I have a lot of money without showing me without showing you how much money I have exactly so what I can do is I can prove that to you by buying anything that you want right anything that you can come up with I can just buy it so so that that proves that I have a lot of money right so so that kind of scheme is something called a zero knowledge proof except it's interactive in the sense that like you tell me to buy something and I'll buy it in the case of Z cash they have another algorithm but what it does is that it kind of just proves everything algorithmically and not interactively in the sense that I I present you some kind of proof and you by running this specific Z case north binary circuit that has been created you will be able to verify that I actually have the money but you don't really know how much money I have exactly so I can send money to people without telling people how much money I'm actually sending so that's kind of the thing but the downside of it is that to create those binary circuit to create those different proofs I guess this proof can be just you can think of it as like as simple as like one plus one equals to two right if I I need to prove to you that one plus one equals to 2 without telling you one plus one equals to two so you so what this the translating to code is that you can kind of create proofs for any arbitrary code that you run if I feeding like an input to a function and some output comes out I I can I can kind of just prove this to you without actually running this function at all so to be able to do this arbitrarily you need to have a very trusted set up in which sense in which like a couple people needs to share this secret key that everyone needs to destroy afterwards and if if like everyone keeps this key then you're pretty much screwed so I think you can you can read a lot about this a z cache on how they created their their opening ceremony stuff where they created their binary circuit and generated the first block and stuff there there are a lot of interesting aspect of it but this is really heavy weight and it's still like a bleeding edge research area where a lot of research generating those proofs takes like minutes 10 minutes or something just to prove some simple thing like I sent you some money that somehow other people can't really see how much money that that I'm sending so imagine like when you're talking about a piece of code that you need to prove how much time it takes there so that was kind of the reason that we kind of went away with from this ZK snark dis snark approach in terms of preserving privacy and stuff so I think I think that's pretty much how we are using I guess I talked about how why we picked score works I guess the current progress I guess is is that we only we had two developers and we started off this project in I think I think we're real development starting March I would say and we're able to create this and this is kind of like a custom thing where we swapped out the consensus algorithm into a proof of stake algorithm and we also implement it like five or six different transactions that modifies the state different way to carry out this entire process of creating a profit sharing agreement between an investor and a company so the it's still going we do have a test net on github and I think if you go to our website you can just scroll down and look at our our github or if you have any questions and stuff feel free to email me or anything but I guess I think that pretty much concludes this talk I was just just to showcase how awesome score x2 is for you know for special niche needs that you have but I'm welcome any questions that we have here I'm happy to answer them yeah I think as I think as as Meshkov said waves platform is is using that and I think so so waves platform is basically this this platform that allows you to create arbitrary tokens right you you can't you can create like a like a Doge token on um waves and you kind of just give it to people and stuff people will have like digital ownerships on like a particular token for for ways platform and I think if they're in classic as yeah yeah yeah yeah maybe you want to add something like started a year ago and every beginner that was our course they have written almost everything because you know may not need this possibility this abstraction sweetie we have they have completed limitation people change they need to be very efficient good yeah the idea of the project is correct signals to launch any kind of document you want to achieve commercial by you can talk - everything - just name description number of coins to lunch you'll have your own cryptocurrency on top of web spectral I also have decent revised exchange building so as so many your function can you can trade it without without trust to exchange so exchange the not control the money because it's a big issue now and cryptocurrencies changes broken one you extend to see here broken a lot of people who lose their money this approach Lee honey so actually the day covers my god I mean 95% o4f you know smart contracts these abilities of most mostly people use smart contracts to visualize do it much much more efficient is not the general purpose of watch from us to create this this completes my token people yes might be quite a good example for you as far as I understand your of call developers it's a good example of comma chaining permutation check it and try it it's a bit different bitter since now do not use curves they have my own features the our reason how change the research to check and you can master they have a messed up the modernization [Music] your how I have to ask them yeah the second good example of Scour cotton cryptocurrency is Marcus quiet from a video question it's also used some parts of scholars but it's also a separate idea it's also just trying to play thanks yeah yeah so I mean I think yeah so I think theorem classic is probably the biggest one because they think they use part of it but not all of it I think last time I checked they yeah they have certain parts are from like the score like certain parts they kind of just did all but but they're all under like ìoh K this big umbrella so I wish they also had like a bunch of other cool stuff I'm just such a fanboy they have a what is that day they have the first provably secure proof of stakes thing called oral brawls think I think that was going to be you that is already used in what was it called the Cardinal platform or something yeah so so this yeah so I wish is based basically this like I wouldn't say company is a company this is kind of Research Institute that kind of just does like cutting-edge research on blotching stuff they have a bunch of like papers they're a peer review then and pretty I don't know it's it's I'm also pretty powerful probably biased so given that I mean if they're in foundation haven't really published anything out regarding their Casper stuff who knows when they're actually going to switch to proof of stake and what is gonna happen there so I mean I don't know but yeah any other questions is developing world applications yeah relative Nubia in the blockchain space Grogg the general concepts like consensus so my initial thought was you know like the main problem investment developing world that they steal your money right so yeah yes not the random people the government's can steal your money yeah so the question is it demeans occur to me that consensus mechanism seems like a good way to actually prevent this by saying let's say no you're like you know all the people the country give money through taxes to roll up a project and you know basically they all want their rolls to be bills not the Minister of roads to take all the money in go the question is in you so a Purdue like you solve a different problem at this point but yeah but essentially ensure the Third Kind of transactions are not happening and let's say no if everybody wants the roads to be built the majority should be consulted before the money can be used for anything else yeah so the question is is it is it possible to you know ensure that the money that you putting onto the platform actually does what it does so I think the answer there is that I think blockchain being started off as a trustless platform the the good part of it is the correct use of it is is whenever you have something that has the problem of trust where like two parties don't really trust each other so although it's not performant publicly Florida for the pulp of witching I kind of want to I guess reiterate this this point it is very good for anything that involves trust so for example say that I I want to be willing to perform a particular service they like fixing your your sink or something only if you paid me whatever amount of Bitcoin so there are those on the ball chain it's very easy it's it's a very good way to do these escrow service it's kind of like you kind of just put the money in on the chain it is locked away in some account and until a two party or three parties all agreed upon certain things and and nobody will be able to take away your money unless certain like criterias are met and obviously this doesn't solve the problem of like you know social engineering attack where you know I somehow get a hold of your your private key or some somehow I manipulated you into sending money to do a particular bad contract but but that's kind of the the land of public ching that we're living in is that you need to be very careful of what you actually what you're actually doing with your money and if you accidentally somehow like made a mistake then there's there's no going back until there's like if there is a hard fork from the foundation or or some other like you know developer groups that is actually willing to you know roll back the chain for a particular hack or or servicer and things I mean this this part is very controversial I don't want to talk about this there there are such instance happening but I they're also so I think the the point is there there is that with the smart contract with the the emergence of the blocking tight tight technology you will see more and more things moving to to those kind of thing that doesn't really rely on a particular central authority so I think the a very good example is that some people are kind of exploring this you know Universal income kind of thing on blockchain basically you kind of just like deposit some money to a particular contract or a particular chain and it kind of just distribute they distribute the money to everybody there there it's kind of still experimental but I mean I think the trying to make is that watching is detected as the technology has a lot of hype but the reality is probably not as as spectacular as you think so the hype there is is only going to make your make you disappointed so I guess look at look at the look at the the truth of it look at the the bottom level of the thing it is the lowered the expectation I guess there are a lot of talks there there are a lot of people talking about Oh blockchain can do this fall shrinking can do that what if we do this on the blockchain whether thing is that they they a lot of the things are still experimental it is still a very house race a technology in beta you are like if you made some mistake or if the developers made some like mistake you might lose your money so that's kind of my take on it versus the government on the other side put the money in escrow and you say no like 2/3 of population of the country agrees that they're also built the manual would transfer it lets go account to building so I mean technically is the limitation of the size of I think at this point not really since I think a lot of the etherium contract if you've been following the bossing space I cos have I guess have gone crazy well there are some you know also controversial aspect of it but basically the point that the goal I guess the initial point of it is to be able to give everyone the ability to purchase a particular utility token so that you can use a particular you know software product that they built on the blockchain so there are at this point there are no limit on how many people that are on it but blockchain scaling is still a research topic nobody has figured out how to scale the blockchain to you know a thousand transactions per second public allow for for for for public chain at least yet so to be able to compete with like the network of like Visa or MasterCard there's still a long way to go but it's getting there and we both we know we can check that our it is included resulting a chain that has included correct answer we are actually voted but nobody else can link my moods results voted and that's all if you if you know contract as this this privacy properties like fifty participants yeah okay it's not usable though and then we would will cost you like yeah I guess I can't add a little bit today as well back to the yeah actually I may be too often this research person contract from Richmond University here and from University well actually as I can see from this discussion there are a lot of different skills how to achieve is important there are asking so like to promote like 1000 people ten thousand people maybe a hundred thousands of people with some limitations but it actually doesn't scale linearly it's not quadratic but it's not linear and there is no existence to the formulas Evo team with privacy and other good properties for me know people tell me no people so for some local watching the University and their company is possible to do everything participant priority it's been 500 votes and song but Sonata like yeah I guess I guess I I forgot to mention which is that for for a lot of those like you know you want to get your vote immediately case at least for the blockchain effort for the publishing there's there's this thing called like gas for etherium or transaction fee for for Bitcoin so there are certain like you know front-running things that the miners always do it's like a perverse incentive for the miners but a lot of times you did the the the fact that the block size is limited kind of limits how who's vote gets picked first and whose transaction gets actually validated so the ideal case is that you know everyone can can do that but in reality when you want I kind of just collect everything immediately when you have this urgency pulling there certain economic concerns kicks in where like you know people are going to pay and sing amount of money just to do some stuff and that's kind of the the thing that adds to all of those issues there [Applause]