 at the back there yep it's good okay good evening and thank you for coming this evening I'm Isaac I work with Lee how who's just a film to look after his kids my colleague and Melinda who organizes the closure meetup at flybot we build games on closure so I'm originally from New Zealand my lovely wife here is originally from Kenya so we're both expats in Singapore and one thing as expats and travelers that we often do is transfer money overseas or send money internationally and the next video kind of illustrates in a completely unrelated how I feel about that every time I come up against it so this guy comes off the track and then he stands up his bike and runs along and then it doesn't go fast enough and he has to stand up but he had to get him run along and then he gets back on the track and bam he's just like what why I'll play one more time in case you missed that so it's can be really frustrating to send money and why because you can make a Skype call or a FaceTime call when I'm on the IMRT and talk to my mum or dad in New Zealand um on video in real time but if I want to send the money I have to call the bank or go online through this long complicated multi-effect authentication process and write a lot of details out that aren't obvious like swift codes and account numbers and names and addresses to write out these reasons for transferring money which is understandable because you know we have unfortunate terrorism and crime these days but it's very complicated it takes days to weeks uh last time I sent money to New Zealand it cost me $60 and fees which is outrageous in my opinion um this has cost me that much and it wasn't a lot of money but I just need to send some money overseas uh and you can't even check the status of your transaction like you send it and it just goes into a black box with the banks and you hope that it arrives and you put in the details quickly but there's nowhere you can go to see how long it's going to take or if it's been completed successfully until the money just magically appears in your account on the other side and my opinion that's not the experience that uh is on par with other things we have in the modern world um it's an old technology uh I think the banks have failed to innovate because they've been the key holders for a while and basically you know the system has got so painful to a point where it's actually restricting our ability to move forward in terms of the free flow capital in terms of investment um startups businesses um doing trade in the world it's just too hard it should be as easy as perhaps sending email or chatting or making a video call so who's heard of bitcoin most people yeah so it's uh the original cryptocurrency or blockchain um I think about 2008 or 2009 I don't remember my crypto history that well so forgive me if I'm not entirely accurate uh when the first bitcoin transaction started occurring and um we don't really know who satoshi is the man who created it but someone created it for a purpose obviously and it happens to solve this problem pretty well there you can send money overseas it's completely secure no one can debate that the money was or was not sent and it's very fast compared to the old web doing things you know and bitcoin's gone pretty slow these days in order of tens of minutes but it's still much faster than the old web doing things and you can see exactly what happened I mean there's a digital account that you can check up to the minute of what's occurring with the bitcoins that are being transferred so it turns out that this concept of a blockchain which is really if you put in rule layman's terms it's just like a excel spreadsheet that you've shared with everyone who wants to verify that that excel spreadsheet is the same as their copy and that everyone is broadcasting new rows to or new entries in the excel spreadsheet to to everyone else who's participating all the time so if you add a new row to that excel spreadsheet you tell everyone else about it and everyone verifies it that's really simplified version of what this blockchain concept is it's you can call it a distributed database or just a history of things that everyone agrees on you know who's participating and it's done in a cryptographic way so it's signed it's secure it's guaranteed that that is the actual history and it turns out this concept of a blockchain whereas there's a verified agreed history that is not verified by a third party it's something really new and useful and it's on right that's independent from bitcoin so before bitcoin if you wanted to verify any kind of information other than just believing me when I gave it to you you had to go to a third party you had to go so I gave you a piece of paper saying I I'm transferred money to your account if you wanted to really verify that that was true you had to take it to the bank and say is this transaction number correct is this actually a transaction on account or after bitcoin we can do that now without the third party so you can actually have two people directly agree that this thing has occurred and it's a mutable verifiable piece of history that in itself can be as a wide-ranging applications not only in fintech and payments but in everything from voting I mean in Africa for example we have unfortunately some very corrupt governments so if we had a voting system based on blockchain you could potentially eradicate voting fraud or any debate around who voted who how many votes there were there's a lot of problems in Africa with counting of votes with agreeing like on authenticated authenticity of voting papers and things like this nature you could raise capital in a different way you'd record healthcare in terms of your health records or your prescriptions or where your drugs are supplied from in a reliable authenticated way another problem we've had in Africa is that 80 to 90% of prescription drugs are counterfeit so there's no verification of the supply chain into that market whereas if we put in a blockchain you actually say this is the drug that I've been prescribed I'm not just taking some random concoction of chemicals so some people believe this will usher in fourth industrial revolution that is as significant as the steam engine that was part of the first industrial revolution or the digital and analog electronics that was part of the third industrial revolution which is still ongoing that's up for debate but it's possibly an extremely disruptive technology to be able to have direct free-flowing verified information just not only in finance but in general and in all areas of life so just a disclaimer the information I'll be giving you I'm not a financial advisor and I'm not a your financial advisor crypto currencies are highly speculative you can lose money it's a high-risk investment so if you're going to buy crypto after this do your own research you know it's I'll say a lot of stuff but I'm just a guy who's a patient about crypto and programming I don't really know anything so it's important to check it out first so I'm going to talk about the stellar network so stellar describes it self as a distributed payments infrastructure and a distributed exchange of values that means you can send payments over a distributed network to someone else anywhere in the world and you can exchange arbitrary things for other things like say you've got oil and you want to exchange it for USD you can do that from different sides of the world on the stellar distributed payments network so say I want to send something euro to my friend how does that actually work so as we all know the internet is a distributed network it has a lot of computers connected to it phones servers and they will run your web servers your your game servers everything they connect to to achieve your tasks so stellar is exactly the same in that respect and that it has a distributed network of servers run by different third parties who run this maintain the stellar network so that it's available for you to submit transactions or query transactions from the difference between having a central authority like a bank or a government and the stellar network is that it's open source and it can be run by anyone so instead of just being one authority that you're trusting it's thousands of completely independent organizations or individuals so powers a distributed ledger so that's what i've been saying before about the excel spreadsheet all the ledger is is on counting terms you just have credits and debits so you have an account which is uniquely unidified as you and as a balance which is made up of positive credits and you're taking money out when you're paying make opponents other people when you add all those up and you get a balance it also has other operations that it can record on there on the ledger other than credits and debits like it can record create issuing offers for assets like oil or usd can record trust lines like who you trust on the network in terms of if you trust people to promote assets to you or if you trust people to buy assets from you can record different settings and options are just part of the maintenance of the network itself and of your account for example supports things look like multi-signature wallets so you can set options that require a certain number of people to sign transactions out of an account so those are all entries that go on the ledger of accounts for stellar and that ledger is distributed to all the servers participating in the stellar network and then every server participating verifies it and if there's any problem that's taken off and not doesn't become part of history so you can't submit something that's fraudulent or incorrect because it has to be signed by the correct participating people so it's by the cryptographic key so obviously this system is more robust more different people running servers and also the more you trust those people who are running the servers if the people running the servers can't be trusted then you can't trust the network so at the moment I think there's some hundreds of verifying nodes and there's thousands of read-only replicas so there are quite a few different people um stellar has some very big partners who are participating in running nodes in the network like IBM is using stellar for uh it's global banking um projects uh Deloitte is using and uh running stellar there's uh for payments and uh auditing so there's some very big conglomerates who are putting real commercial weight behind making sure that networks up to running and secure sorry does stellar have miners as well sorry does stellar have mining uh this is a very good question so mining is like a bitcoin where um you prove that you've verified transactions uh by doing a lot of cryptographic work and it takes a lot of computing power um and you get a reward for that um so in bitcoin they claim that's uh part of what gives bitcoin scarcity and here in web value stellar takes a different approach in that it's pre-mind so they issue all the coins at the inception of the network and then um um the scarcity just comes from the supply cap like there's a certain limit on supply cap of stellar and the value comes from the utility of what stellar provides rather than from uh the act of mining something so to speak does that make sense yeah so so also a very good question so they tried to just reach some of it to existing bitcoin holders and uh I think a little bit to existing ripple holders which is another cryptocurrency that didn't play out very well so they I think just have been giving it away in batches um because I think only a small percentage of bitcoin holders actually claimed it at the time it wasn't worth much back then it was like 2015 or 2016 and the price has gone up a lot since then but they haven't done that since so now they're just giving away some and uh to basically network participants like people who do remittance companies people who want to do fiat exchanges people who are contributing to the projects um they've auctioned off some to exchanges to raise funds for their development um so there's quite a few different ways they try and kind of split it around there's still a large supply that has not been distributed which they say will be distributed uh over the next 10 years to people who will most impact the growth of the network so um under banked areas of the world you know people would actually use the need access to financial services and also people would be providing the apps for those services or providing um development for the network sorry who is the initial day the initial what sorry day like the first the first uh uh I think it was 2015 I've not been using it for very long yeah initially the stellar development foundation which is a separate entity to the stellar network who's responsible for promoting the technology it's a non-profit yeah so actually if you know uh jed mcaleb who founded ripple um he's also I think he's at edonki back in the day and uh mount gox which is a bit coinix the first bit coin exchange which he sold uh he founded ripple and then he left ripple and he founded stellar and uh founded the stellar development foundation to promote the technology which was a non-profit registered in the us yeah but uh it's mainly the commercial users like ibm and delete her have a commercial interest in applying the technology who actually had driver's adoption I think um through commercial use does that answer all the questions sorry that's a good question so the incentive is unlike bitcoin and ethereum where you don't mine and get rewards uh there's no payment for hosting a node so you're not incentivized payment wise the incentive of hosting a node is around the utility so if you're running a remittance company or you're running uh a bank or someone who uses the network then you run a node because it enables you to connect directly uh to that local node to submit transactions and get information out of the ledger whereas if you don't have a local node you have to connect to someone else's node which means less reliability slower maybe price quotas on the number of quests you can make so the incentive is just in your own reliability of service like in your own utility of using the stellar network to achieve what your business does and uh there's some big remittance companies and banks already looking at using it like for example in uh asia pacific um i think new zealand australia fiji in indonesia are all going to be doing their international remittances uh via the stellar network so if there's any payments from new zealand to australia it'll be going via stellar so that's a big deal how would they handle the volatility of the stellar that's also a good question i'm not qualified to answer um there's a problem with any highly volatile um thing is that uh if you agree to pay for something when you send the payment it could be worth a different amount to when you receive it and um i think you have to ask an economist like somebody who's like got an economics degree or something that question in terms of how they can stabilize uh it's been remarkably stable just as a casual observation during the recent downtrends um in days when most of the currencies were going in the red it was just sitting basically break even or a few percent in the green in terms of growth over 24 hours so it has shown resilience so far but i don't know what the drivers that are this company has some sort of trade to fund their uh channel so i'm guessing that some from human yeah i also uh this is jumping a bit ahead but you can also trade like i mentioned before you can trade assets on the lumen network so lumens are the base currency uh which you pay fees in for transactions but uh you can issue any asset like oil or gold as a token and that token represents a promise from the issuer to redeem that token for whatever it is like gold so if you've got a gold token and one gold equals one kg you're trusting whoever's issued you that token that they'll give you a kg of gold when you turn up with a gold token or whatever maybe they held a contract that they've got gold locked away somewhere but um perhaps you could uh trade tokens instead of the base currency will be one way it would not to have so much volatility because then they would be in a greed um unit of value but like i don't know enough about it how does that work i mean who verifies that i have a kilo of gold let's say you do it has to be a consensus no uh you trust the issuer to do that so if you you're a different participants confirm that yes we trust this person or yeah that's your own business that's not stellar's function all it does is verify that you got the token and that you got the token from the person you think you got it from and that you paid for that token it doesn't verify what the token means yeah you have to agree between yourselves you just have to trust the person that you're getting it from like say it's a ocbc or a major bank you probably trust ocbc that if they give you a token that it's going to be uh redeemable it's something like that something like that there must be a way to verify something so this contract is somewhere off-chain yeah off-chain yeah that's not built for that purpose i think there are some other projects that built that but it's not what i'm uh going over this evening that's a very good question um so i'll go on uh yeah just point out that that mechanism of agreeing is called consensus this is the stellar consensus protocol which is how everyone agrees on the ledger so an anchor in uh stellar technology is anyone who issues a token so anyone who has an account on stellar network can be an anchor and um any token issuer is an anchor so as soon as you issue a token you become an anchor for that token and in order to trade in the token you have to establish a trust line with that anchor which is a sign transaction on your own account that you've signed that you trust that person to issue that token so you can't just spam the network uh like ethereum erc20 tokens and with random tokens like useless ethereum token um and have people see that on their wallet or see that on the exchange or try to buy it you have to explicitly actually go through a trust process you establish this is something i'm interested in um someone isn't just sending you spam and uh i really do want to engage in trade for this asset from this person uh anyone who chooses to make a sale of that token determines the exchange rate so if you hold something and you sell it you determine the rate because it's what you will sell it for exchange rate i mean between uh usd and ethereum um it's a good question let me get to that because i don't i just want to answer on the next slide yeah so credit say i'm paying usd to get my euro which is your question uh i go to an anchor exchange i trust i give them usd and they issue me a usd token on the blockchain and return for that physical deposit maybe it's a bank transaction or maybe it's cash doesn't matter so now i have usd tokens on the blockchain i want to send those to euro now i can just create an offer on the stellar network that i have usd and i want euro and that will go out onto what's called the stellar distributed exchange so it's an on blockchain exchange so uh if you're familiar with cryptocurrencies what happens at the moment is that there's central exchanges like benance or bitrix where you go and you create an account with a central party and you log in to their website and they have a database and a program running on the server that you conduct trades or exchanges between different currencies and different uh cryptocurrencies um in order to exchange one currency for another stellar is distributed in that you don't need that central server anymore the exchange offer occurs on the blockchain so it's actual on on the ledger you issue an offer to buy or sell something and then anyone participating on the blockchain can fulfill that offer so the exchange happens completely independent of a central exchange like uh benance or bitrix there's no need to transfer your money to a exchange wallet you trade directly out of your native blockchain wallet um for that asset something else how do they handle the cryptocurrency? like okay i want to trade usd for euros but maybe there's nobody else in the network wants to do the same and my order just sits there for like weeks that is a very real problem if you didn't have users so luckily um there's some major remnants companies already committed to using the stellar network um for uh i think in china um aud um i think usd euro is already there so they've already got existing customers because they're established businesses so they have uh existing cash flows going overseas and they're putting that on the stellar network so they want to issue and redeem tokens for different currencies but then they control the price the market controls the price but if it's just one or two yeah who it's a valid point so i guess whoever has stock of trustworthy tokens that is tokens they actually mean something not just random spam and on the network and want to engage in the market control the price depending on how much they have you notice of the more you participate the more you control the price um but i mean it's both buyers and sellers right like if they just like i hold all the usd so i'm gonna set the price ridiculously high um no one's gonna buy it so then it won't work so if they want to actually trade they're gonna have to set it at a price where someone will buy if there's some like some currency that nobody uses and there's only one big provider like one big uh company that provides it you can just set anything right sorry what was the question like i put one yeah if there's just one one kind of like assets that only one company controls they'll get a company that they'll yeah they'll have some measure of control over the market but there's enough participants in the market they can just do whatever they want yeah but you can't force people to buy something if you really want to yeah i mean exactly if you want to you'll do it but you have to agree you know you can't hold so it's up to you to or you can sell for something else you know maybe if you've got euro and you're trading for usd and it's not gonna work maybe you go to australian dollars instead um that's an interesting point there's a channels they're gonna have to overcome uh so i'm talking about the distributed exchanges so we've got the usd and we want euro so stellar has on blockchain multi path um asset transactions which means it can go through multiple assets to get to the desired asset at the desired price or desired price range and it has atomic trades which means all will succeed or none will succeed so uh for example the best way to get to euro was via a u d via another party on the network it would automatically find that path through offers and buys um to trade from the usd to the a u d to the euro and the user actually sending euro would never see that or participate in that um exchange they've just created an offer that says i want euro uh and if it only got halfway so for example you know that traded the usd for the a u d but then for some reason a u d never got traded for the euro it wouldn't complete you wouldn't end up holding a u d it would just all fail or all succeed for the complete multi path uh exchange on the verified on the blockchain this is not done like on a central server or on exchange like benance um so that's really the market that stellar is trying to target is the payments infrastructure that's what cool themselves and um asset trading and asset exchange so when your friend actually gets the euro they can go and redeem those tokens with a provider they hopefully trust for physical euros i have another question sure related to my previous one is there a way for stellar network to get information from the outside world somehow or only these participants determine everything in the network do you mean like prices or like prices yeah because these companies they can kind of collude or have some kind of agreements between themselves yeah to keep the prices either too low or too high it's a really good question so uh can you get information from the outside world into the blockchain no but that's not really what you'd be trying to achieve because uh the blockchain only handles the account of the transaction so the blockchain just says this transaction occurred at this price at the state between these two parties it's a record it's not a um you still have to interact with uh a website or a mobile app or a server or something it doesn't matter where it's running whether it's your phone or a server to actually submit that transaction to the blockchain so that's just a general purpose program so if you have an app that's running on your phone it can do everything in the app could normally do it could go off and make requests to your own server that you control to get information about prices it could make third party api requests i mean if i were to use stellar as an exchange network then i would i would like to to have my prices be the market prices yeah not some random prices that somebody said so you mean when you sell your usd you'd like to sell it for the market price yeah so you could so when you make that offer to sell usd uh that's code that i'll show you shortly that you'd write in your choice programming language so i've written it in closure so in that when you write that closure code you could go and get the price from another source you trust like xe.com or some of that currency exchange website yes yeah it doesn't provide that part yeah but you're free to get i have all the everything that's available to you with a general purpose programming language you have that available when you submit offers to the lumen network yeah that's very simple there don't try to provide more than the accounting of the transaction yeah cool so why stellar for this problem domain i already mentioned brilliant fast two to five seconds bitcoin and ethereum getting quite slow i don't know if you've heard of crypto kitties but there was an app on ethereum to trade cats and um it basically brought the whole network to a standstill they can't scale because it was something like four to eight transactions a second worldwide um yeah i think it was i didn't get read too much into it was it physical cats or was it was a virtual cat no it's like it's a token on the ethereum network that's somehow in every token is unique or something like that yes but is it redeemable for real cat or is it just a virtual cat all right so it's a game apparently i didn't even look into it in much depth but it's pretty ridiculous what what uh is it fast only because it doesn't have a long history or that's a good question so you know ethereum used to be fast right here i go uh stellar is fast because simple terms doesn't use peripheral work so you don't have to do mining to verify transactions just a small point so on the bitcoin network the propagation itself is also quite fast but right just in the memory pool of the nodes to get it confirmed to get it inside the block that's yeah long yes this is correct yeah thanks for um pointing it out so you're right propagation on most blockchains is very fast but the confirmations to actually verify that it's a real transaction not a spam is very slow now and you know there's different solutions that may or may not play out like bitcoin lightning network and sharding and all sorts of things they're talking about but um i think for the domain of uh just sending payments overseas and trading assets on distributed market where you want fast trades there's some value that a protocol like stellar can offer there regardless of how well scaling goes on ethereum and bitcoin um the fees are really cheap like i mentioned before ibm and um delete involved um they've got stripe payments um they just go to their websites uh they have can't uh let's press exit can be out of there um on the stellar website they've got um their partners directory so you can see anchors they've got quite a few different uh these are all remittance companies or payment gateways so you've got like a bank in india Sierra Leone, Uganda, Rwanda, Philippines, even CNDEX in Singapore um and got the quite some quite big payment uh companies and consulting companies and ibm involved commercially when you say these companies are used to what extent uh so these anchors they're all using stellar in order to conduct their transactions internationally so or using it in a large way for international remittances because to be an anchor that's what it means is to issue credit on the network and trade um and distributed exchanges they've got hardware support which is this this is a legend nano so you can put in a pin code here on the screen and unlock it and the private key if your account actually never goes to the macbook i can use it on like a windows machine i don't trust or something it's completely compromised and just sign the one transaction and the transaction gets sent to the nano it signs it and then it sends back the sign transaction to the computer so my private key never leaves this device um i don't even know my private key unless i tried to export it yes it's cross-platform so it's just a chrome um app it's open source so you can run the chrome apps on linux mac windows and they're really easy to install they don't have a lot of dependencies so as long as you got google chrome you can use it anyway you don't have to take your own machine with you and not all currencies have a support bitcoin ethereum some other ones have it but a lot of the old coins don't have the legend nano support so i found that really useful with stella so i'll just go over some of the basic concepts and stella and show you in the repo um how to use them with closure i mean closure meetup so the reason that i wrote the closure stella sdk it's at the moment it's just wrapping the java and the javascript sdks using cljc cljc is the uh file extension closure that will compile both for uh javascript closure script target and the closure jvm target um so you can run the same code on a web browser and a java server um so eventually that might get ported over to some purely native closure code without java or javascript dependencies i haven't got to that point yet i'm just focusing on the closure interfaces and apis um working out what those should look like getting user apis correct and once it's actually uh usable and um working well then if there's some value proven and porting some of it over or port it over otherwise i'll just keep tracking upstream dependencies so for a stella account you need uh what's called a key pair or a public and private key so the public key is also your address that's what you give to someone when you want to receive funds it's just a long string of um characters and digits and private key is what you need to sign any changes to that account so if you want to send money out of that account to someone else or you want to change any of those options or establish trust lines like i was talking about or offer an asset for sale from your account all those are operations that have to be signed by your private key so you keep that secret and safe i gotta keep mine on my hardware wallet or some people keep paper wallets which is actually they print out a piece of paper with their secret key and they don't keep it on their computer and that's their physical um unhackable copy so as i already mentioned lumens a ticker symbol xlm is the native currency but you can also trade um other currencies as well so we'll create an account so generate a random keep here because you don't really care what your address is and you need matching private public key um that you're called somewhere safe and you have to fund with a minimum balance of one xlm from another existing account uh i've just got some notes here so i can cheat a bit a bit faster it's just starting up a repo um i'm using a boot build tool and there's a plugin for that called book tool steps which is the new tool depths alpha namespace of closure one nine to resolve dependencies um so it lets you keep your dependencies in a idiomatic separate file called depths dot idiom which is like the closure one nine way of doing things so i just have to run that plugin in order to resolve my dependencies first it looks like um okay it looks like this so it's just uh a depth map and you specify the versions and any like other properties over on the right no map so this is just depending on the java SDK at the moment uh so that might take a little while because i last ran this on my iMac so it's just downloading all the dependencies uh apologies for that there any questions in the meantime all the dependencies download sorry oh there's zsh yeah but it's configured to look like fish if you're familiar with the fish shell yeah so it's um cheating it's a zsh version that's got some hacks because i couldn't i used uh normal uh bash or zsh for so long like 20 years that um i could never get used to fish so i just but i liked some of the features so i just uh that stole those uh so this is the code i'm going to be running um so there's a bunch of namespaces that provided um like for working with accounts key pairs the network creating options is to create uh options operations uh sweet it's loaded payments and so on so for generating a key pair you need the key pair namespace and you can just run key pair random and it'll give you a random uh stellar key pair which you can inspect with um if you want the account id that's the same it'll give you the public key string so i've got a random one there and then i've generated a random one again here but this time i've just requested to get the public key portion which is also known as the account id or you can get the secret seed which looks like pretty much a similar string but it's just a different um string and then you can also create a key pair from a seed so if you're sending uh money to someone you need to provide a key pair but you only need to provide the public portion of the key pair so you can create a key pair from a public key but it wouldn't be able to sign anything because it doesn't have a secret the secret key it doesn't know the secret key uh if you are signing any transactions you need a key pair but um you need to create it from the secret because it needs to be able to sign for that account so you need the secret and the public but you only need to provide one so you don't need to provide both the secret and the public string when you create a key pair for signing if you just create the secret one um and it will automatically work out with the public cares so you can just go key pair from secret seed i think and if i do that then it'll create the same key pair object that um i just created randomly up here but i just copy and pasted the secret seed so you can save that secret key somewhere and then recreate that key pair every time you need it uh so these are some existing accounts that i've created so you can get the balances of course you need to require industry name space first which is account and server so you can see this account has only native assets so if it had other assets that would return a collection with other asset types but this only has a native which is xlm or lumens because it's a native asset it doesn't have any asset code and its balance is 9.5k lumens so it just returns as a map say you want to generate a new account if you're a friend called john you'd find the key pair so that's now john refers to a random key pair i'll just create some other existing accounts from secret seed so this is an account the account that i just showed you the balance of i'll call that isac um and i'll put one for Sharon here so those are now three different key pairs so then i can call account create and i pass in um the source count which is the account that's going to fund the new account with a minimum balance um the target key pair which is the john key pair that i created randomly and um balance of lumens that i'm going to transfer from my account isac to john's account so i can call it a hundred ah so now it's told me i need to select a network um so there's a difference between server and network so network is the blockchain that's like um actually the raw uh transaction ledger whereas server is actually like a higher level api that you run on top of the blockchain so there's at the moment you specify two connection points you specify the network like whether you're going to connect to uh the public or the test network which isn't real money and the um server as well which is the test or public or maybe you're running your own local instance of the api server that runs on top of the blockchain so go use public um and there's some other functions in there like you can uh inspect i think the passphrase of the current network and i'll tell you that uh i want to use test net actually not public yeah so now i'm on the right network so the network passphrase is just a string that identifies the current network that you're on so i want to be on the test stellar development foundation network from september 2015 so now i can go back and i can do the create account again and it will take a while because it's actually going and creating the account on the ledger so that was success and that is the transaction hash returned as a map enclosure so you can take this transaction hash and you can go to stellar laboratory and go to endpoint explorer transactions single transaction you can put the hash in here you're submit and here's the api endpoint of that transaction and you can see all the metadata about it who signed it so forth there's also some more like user friendly goodies obviously for seeing this information like stellar expert the only problem with these is when doing a live demo they lag it behind about a minute or two so i found out testing today that wasn't going to be practical but um you can usually go in and see exactly the same information uh given a transaction hash or account you can use this to view it in a more user friendly way so we're up to we're up to creating so we can also do payments so into a native payment which is just a lumen payment from me to this new account of 150 lumens and you again you have to remember to require the namespaces the payment namespace which has some payments for assets and lumens oh sorry some functions oh that's interesting i might have changed the api of that since i wrote my notes so you need to provide the server as well so server testnet from source to destination and 150 so that's actually submitting and signing a transaction between two accounts to the stellar ledger using the those two predefined key peers the isaac and john and it's returned back to transaction hash and again you can go to the actual live stellar lab and put that in and inspect that has done and all the links to get more information so if you go to this account um so we keep here account id of john you can see that the balance of native is 250 because the initial fund was 100 and then i did another transaction for 150 so that's correct uh so that's all pretty standard so far it's not very exciting um so i thought got more interesting is for stellar actually have smart contracts so this means you can have multi-segment share you can have crowdfunding accounts you can do escrow accounts you can do time limited transactions um you can do atomic multi-path transactions really it's quite complicated but i thought i'd do an example of crowdfunding so say we're launching a new token for the closure meetup i'm gonna raise funds for pizza i'm gonna call it clga sg and you know if useless ethereum token made millions of dollars you know maybe we'll make some money you never know so you create because we don't trust people not going to spend all the money on pizza we've created a holding account with that we can um issue the tokens from receive the funds and then we'll create multiple signatures on that holding account so that's you have two people who are trusted to withdraw the profits rather than just one person who'll run off with all the money and all the pizza um so we have generated a new random holding account uh the same thing like i use an existing account to fund that account with xlm that i already hold and isaac keep here so that's successful already um now i can do a single transaction to add multiple signers to the account so copy and paste is a little bit buggy here with this large font size so i just have to be careful but um so what's this do what this is doing is is submitting a transaction to the test net uh on the holding account and this vector is the set of operations so the first operation is creating um a set options with a signer keep here of me and a signer weight of one so that's adding me as a signature to the account with an arbitrary weight of one weight is only relative to other weights on the account so if i have one and something else is 100 obviously doesn't mean much but if i have one and something else is one that means we have equal uh weights in order to sign for the account so it's a relative um say weighting or percentage if you add them all up so also add Sharon my wife is a signature on the account and then i'd set another option which is different to those signer options which is setting the master weight to zero so this means that the holder or the holding keep here is the master keep here because that's what created the original account right it's the private public key for that account so that's the master key setting the weight to zero which means you can't do anything on the account with that key anymore it's just an address to send lumens to you or assets to it can't has no authority to conduct any operations on the account anymore one of these other signers has to conduct signing on behalf of the account now that would be fine but either me or Sharon could do it wouldn't it wouldn't have to be both of us um because i've added both as signers so i always have to set some other options called thresholds so there's low threshold medium threshold and high thresholds so thresholds are like how many signing signers do you need to conduct an operation on this account and low medium and high as there's different operations that are predefined weights so like sending i think money or establishing a trust line is like high threshold or there's some other things that you can do on the ledger that are low threshold because they're not like very much risk so like canceling an offer maybe or something like that but i don't remember off the top of my head what all the thresholds are but you can just go on the documentation online on the stella website and it'll tell you what all the thresholds are for various operations ah and again i've gotten the transaction names first i used to do a lot of closure scripts and in closure scripts you can define a um repo init function uh and i used to like alias all my namespace is automatically on my repo init function but i haven't found out how to do that yet and boot so if anyone knows how to do that it'll be really helpful because uh it's quite inconvenient having to require them all one by one does anyone else here use the boot build system no line again just uh yeah everyone uses line again that's all good so it's all good now that's submitting to the network to set some options so success has given a transaction hash that actually refers to the transaction on the ledger for setting those options for the account and then lastly you can start selling our crowdfunding round for c l g s g c l j s g sorry closure meetup group so submitting another transaction to the test net um from the holding account uh this time we're creating an offer slash sell operation and we're selling a token called c l j s g for close Singapore meetup um the issuer is this holding account it could be a different key pair by the issuer of the token um so for example i can sell things that are issued by other people i don't have to be the issuer and the seller at the same time but in this case i am so the issuer is specified separately and uh this is the quantity so we'll sell a thousand tokens quite a low supply cap at two xlm's bargain um per piece just one moment and then the last section uh is the signers for this transaction so if you look up here at the previous transaction call there's nothing at the end so this is a multi-arrot function it just defaults to the source account as the signer if you don't specify signers but if you do have a multi-sig account you can specify signers as a separate parameter as the last option which is just a vector of key pairs and the offer namespace of course we couldn't finish without one more no such namespace error uh so that is being submitted so success so now there is an offer on the testnet to sell closure of Singapore tokens for two xlm and you could go buy those if you thought that was something uh so this concept of smart contracts is actually thought up by um i can't pronounce that probably nick is zaza zabo zizabo 997 um basically it just means reliable way to encode the agreement around um a digital contract so stellar support smart contracts via um multi-sigs and all the other things i already mentioned as far as that definition is is concerned you can have digital contracts on the blockchain um it's not yes um in the previous bit you just asserted that those were the two signers yes basically yes it doesn't really sound like sign but secrets are also in the environment ah so you mean in terms of uh it doesn't sound like signing in terms of the way i held both keys yeah yeah exactly so in a normal scenario you wouldn't hold both keys but um and you could uh actually encode that transaction in what's called xdr format which is like a text format and give it to the other person and they could load it and sign it separately oh so but i kind of cheated because it's over there so there was that it was the fact that you had both of the keys yes yeah yes sorry for that that's a very good point um question is that i shouldn't it's not really multi-signature if i am signing it with both keys but i'm just doing that for the purpose of demo because it's a meetup and uh it's a complex system but uh in a normal scenario you'd take longer and you'd have some means to share the transaction and both both sign it but until it is executed from the ledger it is just data shared between the parties yes correct you can even uh pre sign a transaction offline for some smart smart contracts and still that's how they implement some so-called smart contracts uh for more complex examples like escrow counts uh you can pre sign a transaction to get your money back and then hold that offline and not submit to the network because you don't actually want your money back until it fails um so there are scenarios where you just hold a serialized transaction that's been signed by another party or you serve a very good point and that is the end of my slides so thank you for listening to me about stellar is there any other questions yes please repeat that maybe not the difference but why why do you have to have the server and the network like server uh test server and test network yeah so it's good so why do you need server network so the way the stellar architecture works is there's stellar core which runs the consensus algorithm and the blockchain so that's called the network like it's uh either the that's what the passphrase refers to like the stellar public network which is the live for money network or the test net which is the stf test net which is just the fake you can get funded for free um network um and for that you when you're submitting transactions you're actually connecting directly to stellar core in some instances that only does some low level things when you want to when i displayed uh the endpoints on the stellar laboratory website where it showed some json um going into a from an htp endpoint that's coming from a different server stellar core called horizon which is actually um a high level api server that talks to stellar core so it uses stellar core as well but it's a separate instance that runs instead of just running the blockchain it runs like high level historical kind of account stuff um it's not responsible for consensus it doesn't involve it's not involved in like making sure the ledger is verified or shared or anything like that it's purely just like a convenience kind of a gateway to high level api functions so that's called the server in stellar stk's so i just followed the terminology that used in um the java and the javascript stk's because there are instances where people might actually run a local stellar core node but they won't run a horizon server so they'll have to connect to the public uh test or production server for horizon but they want to connect to a local ledger server like stellar core and so that you can't really put both the concepts in together or automate it um because that's the way the architecture works unfortunately it's kind of an artifact of the implementation yeah is that fully answer the question sweet any other questions okay awesome thanks um if you're interested i can just show one other thing which is the actual stellar distributed exchange uh because it's still got a few minutes um would you like to see that like a gooey of it so this is a publicly available client called stellar term you can either download it or run it on the website uh so you can log in directly off the ledger uh so there's different apps that come up on there there's the stellar logo you just hit both to open the stellar app on the lcd screen and then you can click ledger and click sign in with ledger so this is actually signed in to my wallet on the stellar network and even though it's a website and all that i don't care if it's secure or not because i have to physically approve every transaction with the button on here so you go to markets so for example there's a slt which is a sustainable agricultural investment um it's actually being audited by deloitte so uh they invest in sustainable agriculture projects and they it's fully audited that they actually exist and the money's being invested in that agriculture so it's very verifiable in that respect in terms of an earlier question um but it's off chain and that deloitte's responsible for doing providing that information as an authority so if i want to go in here there's the buy offers and sell offers for slt so you can currently there's some people selling like that's not even one slt so it's selling 0.04 like six slt for 1.67 so i can go here and buy one like slt i'm sorry that's sell buy and then it'll ask me if i want to confirm this is creating an offer on the exchange to buy so ask me if i want to confirm on here sell xlm so it says on here sell xlm for this price for slt hit the tick and then it's successfully created an offer on the distributed exchange and so this has come up down here there's a current offer and when that's fulfilled there will just be no offers and my balance of slt will increase and my balance of xlm will decrease you can see it's already partially fulfilled because i purchased one but it's now down to 0.21 so it's someone partially filled at the 0.8 which is kind of weird to be honest but that's what happened in a lot of demo so that is life trading on the distributed exchange on blockchain so like there have been some problems with centralized exchanges recently like binance went down for almost a week people's deposits were in binance they couldn't trade them they couldn't utilize those assets liquidity this can't go down sorry yes so everything fulfilling an order or managing an offer like creating an offer or canceling an offer all entries on the ledger on the blockchain yes yeah well it's partial in the sense that i created an offer to buy and then there's been subsequent transactions to fill it so it doesn't like keep a running balance it just adds it up over time so there's so much information on the network and it must be very big in size it's about 35 gigabytes at the moment yeah so it's yes can you run a private network outside of this that are absolutely it's a good question it doesn't make sense yeah so what do you run a private network they actually advocate that so it's a very good good question because they made the technology open source for everyone to use i think Deloitte actually do run a private network for internal use i don't know what they use it for but the applications that would be if you want to do any kind of asset or information record management into that small obviously it's not made for like PDFs or like sound files and you don't want to pay base fees so you want to do a lot of them you wanted to manage the service yourselves you didn't care about that being widely distributed across a large number of nodes then you could just use it take the server off the shelf change the passphrase to your own passphrase and run it internally on your own pro network and that would work so would IBM run a private network if i understand IBM at the moment are using public network because they actually run public network nodes some of the main uh some of the biggest public validating nodes are IBM nodes yes they would just get destroyed because the the loans are free in the first place if you're running a private network you never paid for the the currency yeah because you never bought it from anyone you bought it into existence so to speak yeah but fees just get slowly destroyed over time but there's so many loans the supply cap is very high i think it's so many billions tens of billions it'll you'd take like a hundred years to run out so by that time we'll be using another blockchain maybe in 10 20 years we'll be using another blockchain true um yeah any other questions or anything else you'd like to see about stellar or closure any questions about the closure library or how that was built cool oh thanks everyone