hello world it’s Suraj and block chains are so 2017-2018 is gonna be the year of block DAGs directed acyclic graphs you might be thinking what did you just say and that’s okay because I’m gonna explain what I just said this video is about a crypto system called iota okay so it’s called iota and it uses a distributed ledger similar to bitcoins blockchain except it solves a lot of the issues or it aims to solve a lot of its issues and it’s getting really popular and it’s about number seven or number eight on the coin market cap website it’s getting really popular and I’ve gotten a lot of requests for this video so I’m gonna do a video on this I’ve been studying it all day and yesterday so and I’m and I’m pretty excited about what I’ve what I’ve studied so far so I’m gonna share with you what I’ve learned about this system today okay so before we go into why iota is awesome I want to start off with the problem with block chains because block chains are awesome however they’ve got their problems 99 of them but no not 99 problems just some problems okay I just wanted to slip that in there okay so here we go with the problems the first problem with block chains are scalability issues right there are endless debates on Twitter on slack on Bitcoin forums on scalability and there’s a million-in-one solutions to scalability right so bitcoins blockchain takes about 10 minutes to confirm a transaction that’s a long time right 10 minutes to confirm a transaction is a very long time for a system that’s meant for micro payments right micro payments for machines the machine to machine transfer we want machines to be transferring millions of transactions per second ideally just giant mesh networks a machine just transmitting value faster than any human could but for 10 minutes that’s way too long right and that’s what it’s become there are currently 200,000 unconfirmed transactions on the Bitcoin blockchain so if we open this list this real-time list of transactions okay this is real time we’ll see that there are about 100 83,000 unconfirmed transactions and it is flowing in right now just like that that’s a lot of unconfirmed transaction and at ten minutes per transaction that’s just way too long okay so that’s a lot of unconfirmed transactions because it’s taking so long to confirm them and this is annoying right why would you want to wait or pay a higher fee for a faster transaction validation or deal with transaction uncertainty let’s say you’re a multinational corporation like IBM or you know Chase Bank and you want to use blockchain technology to sync up your different branches across the world you know use its ledger to sync up the data and in a in a permissionless trustless way but if you’re having to wait ten minutes per transaction that’s way too long so check this out visa has two thousand transactions per second visa is the network globally it is the network for transmitting value currently bitcoin is nothing compared to Visa okay look at that five to seven transactions a second that is nothing we weigh more than that so in comparison PayPal is way more so how are we going to get up to that visa level you know what I’m saying how do we get up to that visa level and there’s been so many different suggestions there’s Segway there’s a Lightning Network there’s all these solutions so I’m gonna go into those a bit but that’s the first issue with blockchains scalability it’s hard to scale a blockchain right you’ve got massive amounts of computing power you’ve got the speed of transactions decreases as a network increases in size and you don’t want to store data on the blockchain right there’s this there’s this thing called blockchain bloat where you don’t want to store data directly on a blockchain you want to have a pointer to data that’s living somewhere like in a distributed hash table right so scalability is one there’s number two are fees right so the mean transaction fee that is the the average transaction fee for a transaction and the Bitcoin network is a dollar that might not seem like a lot of money but that’s a lot of money for a network meant for micro payments right that’s that’s the whole point visa has that 2% what is it two percent charge for for each transaction the coin was all about okay and we don’t need that anymore right we have we have felis transactions or there’s a very minimal fee well now it’s a dollar so anything under that is worthless right because the fee is going to be greater than the transaction so micro payments under $1 are virtually useless or impossible now and this can be more than the transaction amount itself right so solutions include increasing the block size using lightning network central servers for off chain transactions like using coinbase for example side chains tree chains there’s a lot of proposals and there’s a lot of ways that the core developers and just the the Bitcoin community is doing to fix that I’m not saying that they are not trying to fix it they are but it’s still it’s still it’s not fixed right that there are still the fee still exists so if we look at the fee over time it’s just going straight up it’s just exponentially over time for transmitting even 0.01 BTC which is what this graph is so there’s a lot of computing power required to maintain the Bitcoin blockchain as well as you probably know and mining has become somewhat centralized by these giant mining pools right in China mostly but that’s that’s a lot like just I take a look at this chart right here of the distribution of Bitcoin mining power right if you look at gee hash and BTC guild together they make up 55% of the network two pools make up the majority of the network’s mining power now that is centralization okay that is a lot of centralization for supposedly decentralized network and transaction speed declines as the network increases in size as more transactions compete for the limited block spaces so it’s gonna take more and more computing power to mine the same amount of Bitcoin you got to buy these Asics if you want to be a miner you got to put the money in okay you got to buy some giant a six ideally if you want to make some profit and then you know meter your electricity costs etc let me just look at this this is the hash rate you know that the cost it takes to mine a block just going straight up which means you need way more computing power to mine the same amount of Bitcoin that you would otherwise okay and lastly one more problem they’re vulnerable to quantum attacks right so Bitcoin and other proof of work based block chains are susceptible to being broken by a powerful quantum computer so here’s why the proof-of-work algorithm and I’ve talked about this in previous videos but the proof-of-work algorithm is trying to solve random mathematical problems right it takes a certain amount of time to solve these problems so for a minor to generate a suitable hash to generate a block they’ve got to check around 2 to the 68th nonces that means numbers only used once to find that suitable hash so a quantum computer would need the square root of n operations to solve a problem that would normally need n operations on a classical computer that’s let’s this is an order of a magnet or of an order of magnitude difference so a quantum computer would need if we calculated it out which I did right here is a quantum computer would be 17 billion times more efficient in Bitcoin mining than the classical computer right so right so the network requires lots of computing power to maintain its security and if a bad actor could gain control of more than 51% of nodes that means they have more than 51% of computing power then they would be able to double spend that means change a transaction history and spend money that they don’t actually have and that would break the entire network and everything is based off of classical computing right the laws of classical computers however quantum computers could do this 17 billion times faster so with just one very powerful quantum computer an attacker could break the entire network and this is very dangerous and we don’t have a quantum computer like that right now and it’s all theoretical but there are advances being made in this space and it’s it’s gonna happen so we need some sort of quantum attack resistance mechanism and I’ve got this little infographic here on how a quantum computer works but the most basic li5 explanation I can give right now is that classical computer only computes ones and zeros so there are binary operators where as a quantum computer uses instead of a bit a qubit which can be both a 1 a 0 and a 1 and 0 at the same time so it’s a superposition of two different bits and this allows for the types of computation that would not be possible on a classical computer I have to have a great video on this and a part of my math of intelligence series it’s called quantum computation so check that I just search Siraj quantum computation let’s keep going here okay so those are all the problems with the blockchain so let’s talk about why iota as a crypto system is different from a blockchain so the first big difference is the structure so like I said blockchain tour so 2017 iota uses what’s called a block dag okay a directed acyclic graph I just want to talk about the directed acyclic graph for a second okay so DAGs are not new a dag is just a hierarchy of nodes that are connected to each other where no node is a descendant of itself that means there are no cycles that’s the word a cyclic there are no cycles right so it’s just a hierarchy of nodes that are connected to each other in one direction so there are a million different ways that you could structure a dag but that’s the basic idea no cycles in this graph you could think of a file system as a dag right because it’s just a hierarchy of nodes right folder within a folder within a folder get the the protocol that github uses that’s a DAC ipfs is ipfs the interplanetary file system that’s a dag in fact you can even think of a blockchain as a dag right because a blockchain doesn’t have cycles but it’s a very specific type of deck in that it’s a singly linked list it’s a glorified singly linked list that is a that is secured by the proof-of-work algorithm a dag is more general like so here’s here’s an image right here so block chains are just blocks that are pointing to each other in one direction and tangle which is what they call which is what Iota calls its it’s another word for its tag I’m just gonna call it that guys I know of you I know the iota guys are watching this right now let’s just call it dag please let’s not add more terminologies to this just for adoption so block chains are sequential chains where blocks are added in regular intervals right but I Oda’s data structure the dag is able to achieve high transaction throughput by parallel parallelizing validation no transaction fees occurs occur for any transaction as it grows more participants make transactions and the overall system becomes more secure and faster with confirmation times transaction finality going down what that means is as more nodes are added to the network the network’s transactions actually get approved faster and that’s in direct contrast to the blockchain the more nodes there are the slower the transactions are approved right and the longer it takes for a transaction to be approved whereas in the block tag that iota uses the more nodes there are the faster the transactions are approved which is a much more scalable architecture and you might be wondering why is this but I’m going to that in a second okay so it’s still a distributed database it’s still a peer-to-peer network it still relies on consensus and a validation mechanism so those things are all the same it’s just a structure that is different and the type of consensus and validation mechanism that’s different – right and it scales like I said it scales as blockchain scale the usability goes down as I Oda’s dag scales the usability goes up so here’s the big difference here’s big difference number two there are two big differences right so the first one is a structure the second one is consensus so there are no minors so people who want to be minors too bad you can’t be minors that’s okay this is a good thing for the network here’s why so in so blotching consensus is achieved by requiring multiple parties to race against each other in an attempt to add the next block to the blockchain and get the block reward right so miners are competing to mine the next block the fastest using their computing power and whoever is first to do it gets to mine it and they get the reward but because of this consensus is decoupled from transaction generation you have this whole separate group of nodes in the Bitcoin network that are dedicated to mining right and then all the participants in the network that are not miners all they do is just generate transactions right I want to pay for this I want to receive this I want to pay for this I want to receive this and because it’s decoupled that leads to further centralization right because the these mining pools can occur but in iota there is no decoupling the all the nodes are miners in a way or they’re not miners here’s how it works so an iota every participant in the network making a transaction also actively participates in the consensus here’s how every time you make a transaction you reference two transactions directly and and in a way other transactions in the sub dag indirectly just by referencing two so there are no blocks in the classical sense instead a single transaction references to past transactions right so here’s here’s a here’s the graph it bundles all transactions in a directed acyclic graph it’s self-regulating consensus no longer decoupled to a set of minors and it’s very scalable with a low overhead proof of work to prevent spam so check this out the green blocks are transactions in which consensus was achieved the red blocks are transactions where we are still uncertain on their full acceptance and the gray blocks are unconfirmed transactions ideally we want all of these transactions to be green right so from right to left or left to right depending on how this works eventually all the nodes will be verified if the nodes pointing to it verify that it is indeed a valid transaction and there are no transaction fees because there are no miners you when you make a transaction you have to approve to other transactions and then you have to perform the proof-of-work algorithm so in a way you get paid by not having to pay a fee right so because you’re computing this proof of work which is for civil resistance right because you’re computing that proof of work you get to make a transaction without there being a fee and that is your reward so there are no transaction fees which is awesome so instead of a smaller subset of the network being responsible for the overall consensus ie the miners the entire network of active participants ie the devices making the transactions are directly involved in the approval of those transactions and so consensus in iota is no longer decoupled from the transaction making process it’s an intrinsic part of it and that’s what lets it scale without any transaction fees oh and one more thing like I said before it’s quantum it’s quantum resistant it’s not success susceptible to quantum attacks and why is this well it uses an how them call the winter knits one time signature I can make an entire video on how winter knits one time signatures work I’m not gonna do that because it would be too long but check out the link right here in this Jupiter notebook which is in the github by the way okay so here’s a little picture of it alright okay so here okay so you might be confused by this process of making a transaction let me clarify it so it’s a three-step process it’s a three-step process so the first step like let’s say I want to pay you know I’m a machine I want to pay this other machine or even I’m a human you know I want to pay this other human here’s how it works the first step is to sign the transaction input with your private keys what that means is you’ve got a unique set of private keys that identify you as a unique individual node in the network when you sign a transaction that you are hashing you’re creating the hash of that transaction using your private unique unique 25 character key which means a transaction will be both unique and linked to you so you sign it with your private key then step 2 is tip selection right so tips are the what Iota calls these unconformity the Monte it uses the Markov chain Monte Carlo algorithm to randomly select two tips these are unconfirmed transactions which will be referenced by your transaction and in the code these are called the brand transaction and the trunk transaction right so once you’ve signed your transaction you then point to two unconfirmed transactions that you’re gonna have to approve before your transaction is generated and validated so that’s that’s what you’re paying for this and step three is to perform the proof-of-work algorithm in order to have your transaction accepted by the network you need to do some proof of work similar to Hashcash similar to Bitcoin right and this is for civil resistance right it’s all about the computing power right you don’t want any of the nodes in the network that gain control of the network by having the majority of the computing power and that’s what proof-of-work prevents because everyone has to compute this you know random mathematical problem a node would have to have more computing power than the rest of the an attacker would have to have more computing power and then half the network in order to double spend so proof of work as for double spending tip selection is computed using the Markov chain Carlo process I also have a video on how this works it’s a part of my reinforcement learning series I could go into a whole video on that but it’s called Monte Carlo prediction just google that but in short this is a probabilistic algorithm that samples randomly using distributions so it’s some so Markov chain Monte Carlo methods sample from a set of nodes randomly using a distribution function okay so once you’ve competed completed these three three steps your transaction will be broadcast to the network and someone else will come along choose your transaction in the tip selection process and validate it and just like that your transaction is confirmed so that’s why if the network gets faster transactions get faster as it network scales because the more people there are in the network then the faster your transaction will be validated because there are more people available to confirm your transaction right so that’s why it scales as there are more people okay so I do want to say one thing so there is this concept of the coordinator right now in iota and so the coordinator is is run by the iota foundation the people who you know made iota and the coordinator checkpoints valid transactions which are then validated by the entire network it cannot go rogue as this coordinator is being checked and validated by the entire network but what this means is first of all it’s very hard to bootstrap a blockchain right because you need it’s you need a certain amount of nodes there for the computing power to be greater than what an attacker would have right in order to gain control the network because bitcoin is so big as an as a system the amount of computing power an attack would need is way too big right but when you’re starting a blockchain that relies on the proof of work mechanism you got to have some kind of system in place to prevent a bad actor from taking over some sort of civil resistance so the way the i/o the iota Foundation has sought to prevent this is by creating this coordinator that is run by that so it’s centralized yes it’s a centralized node that validates transactions temporarily they’ve been clear about this since the beginning which I like and yeah it’s centralized that’s a bad thing but it’s it’s a temporary thing and I think that I mean their goals and their their aims and their white paper its it all seems to be pointing in a decentralized direction but it’s a temporary mechanism to validate transactions at the start but eventually they’re not going to need it or want it and it’s gonna go away so I just want to mention that okay so use cases right so first is data integrity right so there’s this mechanism to send messages secure messages between different nodes in the iota Network which allows for nodes to communicate data right and because there is this distributed ledger that there is consensus on that is permissionless and trustless you can you can ensure that the data that is being passed between these nodes is is valid and data integrity is super useful for any kind of Hospital Records or you know any kind of secure records that we need to you know government law legal you know anything that needs a lot of security this would be great in a trustless permissionless systems supply chains right importers exporters shipping liners logistic companies right they’re all over the world they’re global and they need to sync up on data and you know what the what the status is of you know delivery and what the status is of this and this and this and this and that’s a perfect use case for distributed Ledger’s like iota right and I mean this this system was meant for the Internet of Things right so and when it comes to the Internet of Things we are we need ways to share a bandwidth computing power resources you know data all sorts of these things and that is what this would be good at or any kind of grid as well solar grid micro grid services electrical grid just anyways to share resources that doesn’t need a human in the loop just automatic systems that are trustless permissionless that coordinate scarce resources amongst groups of people this would be a great use case right so it’s key features are infinite scalability No Fee microtransactions and quantum resistance three key features that would be awesome to have so I mean the network already has a hundred million in transactions that have occurred without fees yes it’s using a coordinator right now eventually it doesn’t need to or they don’t want it to be there and I think it’s pretty cool I mean the promise of No Fee transactions and a network that scales really well and gets better in terms of the speed of transactions over time that is a that is a promise that I like okay and I want that to happen we should want that to happen iota is a proof of concept I mean everything in this space is a proof of concept Bitcoin is even a proof of concept what what I mean by that is it is not production ready yet nor is Bitcoin even but I like where this is going I mean these guys seem to have know their stuff like they worked on next which was this this first asset transferring service that uses block chains in 2010-2011 so they’ve been in the space for a while and you know they’re they’re pre mine was modest I think something like 500k and all the coins are are generated all of them that can be created have been created so it’s I think it’s a cool system and I want to see more of it I want to see more development of it more interest more excitement because yeah we need no fee we need no fee distributed ledger services right that’s how we’re going to really get this Internet of Things of things that are communicating and transmitting value at millions of transactions per second faster than Visa or is a magnitude faster than Visa screw Visa we just go million times a second okay that’s what we want to be and if we can just bypass all of these issues that are coming up as a Bitcoin blockchain scales and use something like iota that would be awesome so I think that yes there’s still some problems and they have a lot of promises but if they can come through with them and I think that they can that would be awesome for everybody okay so let’s let’s look at the code for a bit so they’ve got this GUI client which is really cool if you want to just the easiest way to get started this would be it it’s built in JavaScript you can use NPM to install it it’s base of the electron wallet and instructions are here in this github repository one more thing is the client library in Python so the base library is in Java but they’ve got client libraries and Python and JavaScript and in C I think C as well but it’s all on their github right here at iota ledger which you can look at right here Java they’ve got the command line app they’ve got an Android wallet yeah they’ve got they’ve got a lot of repositories here to play with in some different languages but what I’m gonna do is I’m gonna just download this and just run it just just cause so let me download that and I’m going to open in terminal let’s see let me go right into that folder okay so pip install Toyota okay there we go right sudo pip3 install Toyota all right so I’ve got I owe to up and running I have a full node running on my computer and using once I have this node running I’ve downloaded the Java client and then I can use any of the Python or the JavaScript CLI libraries to then you know integrate this into a web app or a mobile app or whatever kind of app I want but it’s a pretty lightweight client and it’s easy to integrate into a web app or mobile app so you can use it for you know having an online wallet or whatever payment system or or any kind of system you want to create the last thing is how to buy iota so I found this great tutorial on BitFenix calm which is this website this is it’s an online exchange on how you can buy iota with Bitcoin so it’s a five step process but first first step is to make sure your funds are on the exchange wallet so they have three dedicated wallets that you could use and you can instantly move your funds from one wallet to another on the wallets page which is right here and so you can go to the trading page and choose the pair you want to trade and then there’s an order form and the exchange tab you could click exchange buy and then the order is going to appear if you you’ve got to have Bitcoin in order to buy I owe to coin and if you want to buy Bitcoin then I would suggest using coin base as a the most reliable way to buy them it’ll require you can do this from virtually any country I think at this point but you link up your credit card or debit card or bank account by Bitcoin and then transfer that Bitcoin to a wallet and then from that wallet by Iota on BitFenix or there’s a couple of exchanges actually but I think bit finnex is is the one to do please subscribe for more programming videos and for now I think I’m gonna go buy some iota so thanks for watching

Leave a Reply

Your email address will not be published. Required fields are marked *