Skip to content
CCPEDIAby Unity Nodes
VideosDaml 101: Smart Contracts explained in Three Stories [2022]

Daml 101: Smart Contracts explained in Three Stories [2022]

Nothing is loaded from YouTube until you press play, and then without tracking cookies.

About this video

📚Check out Daml Learning Center: bit.ly/LearnDaml 📖Join our forum and get started: bit.ly/tryDaml

This is a multi episode series intended to take you from the brief context behind blockchain and smart contract to the development of smart contracts using a next-gen smart contract language called Daml. The entire series can be found here: bit.ly/damlone

Daml is a development framework for creating systems of record that securely connect across business processes and data boundaries while retaining privacy, guaranteeing data integrity, and enforcing strict authorization. Allowing such systems to cross boundaries — legal, regulatory, organizational, or other — enables them to form seamless economic networks.

Transcript

1,680 words

Captions as YouTube publishes them, usually machine-generated, so names such as Daml and Canton can be misheard.

  1. 0:00

    in this episode we're going to take a look at smart contracts which is based on blockchain and i'm going to explain smart contracts to you using three stories in the last episode we took a look at blockchain and learned that it's really a digital record-keeping system and in it the record of transactions are immutable distributed duplicated and decentralized in this episode we're going to take a

  2. 0:32

    look at smart contracts which is based on blockchain and i'm going to explain smart contracts to you using three stories story number one this is professor allen goldstein one of my favorite professors at john jay college of criminal justice professor goldstein is a decorated practitioner an awesome lecturer and one of the most fantastic storytellers i've ever seen one of the stories that he told us in class i would never forget till this day

  3. 1:14

    and the story was about how he went behind prison walls to interview and inmate as a forensic psychologist it's pretty common to go behind prison walls into a room to interview an inmate perhaps they're up for parole or they're going through an appeal process so in this particular case dr ghosting started interview like he would any other interview you go through the rules and he would say that everything we talked about in this room will be written down

  4. 1:46

    the inmate agreed consented and they started talking halfway through the interview the inmates said something to the effect of you know what if i'm if i'm released did it today i don't think i will do any better and professor ghosting wrote furiously wrote down scribble whatever he just said and inmate realized what he has done wrong quickly uh told professor goldstein no no let's scratch the last part it makes me look bad

  5. 2:18

    but professor ghosting continued to scribble a new line and the inmate go time out what's going on here i i told you to scratch that and professor gostin finished writing his sentence and looked up at the prisoner and said i told you everything we talked about in this room will be written down your last line was nah let's scratch that it makes me look bad so that got us all laughing but today when i think about the story it's a

  6. 2:48

    fantastic analogy of smart contracts and blockchain smart contracts is this unstoppable engine that keeps going and it leaves behind a trail of data that you cannot edit or go back to mutate or change just like the notes of professor ellen goldstein story number two ready player one is a 2008 film sci-fi film by directed by steven spielberg a really really cool movie if you have not watched it and um sparkler alert so in the movie a game maker

  7. 3:29

    created this virtual world where people can earn coins and more importantly solve this a series of puzzles to to get keys that needs to be used to find a golden egg or something not entirely accurate i'm sure now the game maker died and left behind this program that would self-execute and any player can go in and keep trying if they fail they can keep trying and finally the main character of the movie

  8. 4:02

    unlocked the first challenge he he found the key and you would think that in the normal game that since we have a winner everything is over however the way the program was written anybody who follow the same logic and sequence and steps to solve the quest will also get that key to to be presented with that key that they will need to get to the end of the game so the main character finds it and then subsequently other players went through

  9. 4:36

    the same steps to get that first key to unlock for the golden egg and that to me was a perfect example of how a smart contract works it's self-executing and it could be duplicated many times the same rules will apply each time the same logic and every time you start from the beginning it will execute itself and carry through what it was programmed to do so that was a fantastic analogy of the

  10. 5:07

    self-executing nature of smart contracts story number three this is honest wagner honest wagner was a baseball player played in pittsburgh in the late 1800s to the early 1900s what's interesting about uh honest wagner today is that uh is something called the baseball card the baseball card is something that you would buy and trade they use obviously used to give it away in cigarette

  11. 5:38

    packs i believe in in in the earlier years but now these are so valuable that this particular card sold for 6.6 million dollars and there were people debating about whether the value of this card is really 6.6 million dollars because if you google for yourself you'll find a big well-known case of of how this cart was sold and and how it fetched such a high price and it pointed to something criminal called shill bidding

  12. 6:11

    now shill bidding is a incredibly devious process so you are familiar with ebay find an item that we want we put in a price in the auction process as a bid and if someone else wants to pay more they will win in the shield bidding the seller will create fake identities and thick bitters to put in a price just to beat you so when you put 20 they will put 21 when you put 22 another person supposedly put in 24 and 25 and so on so forth and the end result is you end up paying more

  13. 6:50

    than you're supposed to so that is a very interesting concept and in fact it's studied by by security experts in the world of smart contracts that blockchain called a civil attack not cyber attack civil attack sybil refers to a pseudonym of a patient who had uh 17 i believe split personality disorders so the word they borrowed that word sybil and to today a civil attack is when bad actors in a network are pretending to

  14. 7:36

    create consensus about a particular data point and and today there are mechanisms and security measures taken to make sure that the that doesn't happen so to understand smart contracts let's take a look at a traditional paper contract and we are going to use a vehicle bill of sale a vehicle bill of sale will have some components common in it across different templates first it will talk about who's involved in the contract and obviously it will be the buyer and the seller and it will also have a statement about what this

  15. 8:13

    contract is all about well this is about selling the car for x amount of dollars at a certain point of contract there will be data that's important data such as the date data such as the card and make the model the mileage and there will also be a point where it talks about what is agreed in this contract and at the end there are signatories people who whose signature is meaningful in making this contract real

  16. 8:47

    so i like to look at the world of smart contracts in its core components there's always a component of people or parties people who need to authorize it people who are involved in the contract and then there's data data that is about the the date and time it could be how something is measured the quantity of something and there's always an asset something that is of value that's important enough

  17. 9:18

    for us to to track in a blockchain and there's obviously a logic the rules that are applied the conditions what will happen when particular conditions are met if we bring this back to our example of the bill of sale of a vehicle we see that the asset here is the car and the people involved are is the buyer and the seller the data would be things like the date of sale the amount the price of the car and the odometer reading which is the the mileage and there's always

  18. 9:56

    logic what are what are the steps what are the sequence of things that will happen and what happens when particular conditions are met or not met another example that really helped me understand smart contracts is the world of higher musicians so if you are a venue owner you have a bar that has live music you can hire musicians to come play for you now how you compensate these musicians can get very simple or

  19. 10:28

    very complicated uh if we were to apply this to back to our model the asset is the money the revenue that is being generated from from ticket sales from merch sales and and so on so forth the people would be the venue owner and the musicians the data would be things like whether how long is the set how long is the performance and and what's the duration of the performance how much break they get information that are important to both

  20. 11:02

    parties the logic here is where the rep will be more mathematical it will be how the revenue is divided depending on what where they come from so if it's a merge sale for example uh and it's five thousand dollars then perhaps uh four thousand dollars will go to the performer and a thousand dollars will go to the rep the venue owner so we covered a lot of grounds so we started talking about blockchain a little bit about crypto and satoshi nakamoto and in this episode we dived into

  21. 11:40

    smart contracts and we even had time for a funny prison story so i'm sure you're eager to get started and that's exactly what we'll do in the next few episodes and we'll start by making sure that you are ready and set up on your system to do development so join me in the next episode