 I'm Lars, I'm Director of Education for IOHK, so I do Haskell courses, just did one for two months on Barbados, but I also feel it's important not to just do education but also do some, get your hands dirty. So I'm also leading the incentives work stream in Cardano and I'm in Hamburg today at the Blockchain Mania meet-up and want to explain our ideas for the incentives at Cardano and I hear that the audience is very technical, so that's quite exciting, so I hope that I can go into quite some depth and explain how it really works, why it's important, what we hope the outcome will be and how we hope to achieve that. In general, the point of incentives is to incentivize the participants in a blockchain system to do the right thing and in our concrete case of Cardano that means we want a certain distribution of stake, so we want that basically there are stake pools, not too many, not too few and that most of the stake is somehow concentrated in one of these stake pools and the idea is that those stake pools actively participate in the protocol and are online when they are supposed to be online and do the things that the protocol demands of them and the point of incentives is now what we have been busy with over the last months to set up incentives in such a way that if everybody follows his own rational financial interest then the outcome will be this nice distribution of stake that we would like to have. Okay, thank you very much for having me here tonight and I want to talk about incentives in Cardano, explain in general what incentives are good for and how we plan to do them in Cardano. So first a couple of words about myself. So I'm actually a mathematician, I have a PhD in pure mathematics from Regensburg University here in Germany and I did one year as a postdoc at Cambridge University in the UK, then worked 10 years in normal software development doing stuff like .NET, C-Sharp, even JavaScript I'm ashamed to say and but during my time in Cambridge I first got into contact with Haskell so I've been an enthusiastic Haskell hobbyist for more than 15 years and then when the frustration got too big in this normal software development then I joined IHK in November 2016 first part time so full time I'm now almost exactly a year and I'm the director of education so that means for example that I spent a lot of time doing Haskell courses, I just spent January and February in on Barbados doing a Haskell course there and last year two months in Athens and we also do things like internal and external trainings on other topics as well not just Haskell but I feel that somehow it's not good to just do education you must also really get your hands dirty so in addition to that I am also leading the incentives work streaming Cardano and that's why I'm here tonight and what I want to talk about tonight so I'm leading it so that means I don't actually do the work so the the team that mostly works on incentives is our chief scientist that IHK was also professor at Edinburgh University professor Kialias Agalos he is also the main inventor of the Robos protocol that Philip introduced then Elias he's a professor at Oxford University game theorist and also senior research fellow at IHK and then Katarina also at Edinburgh University who is Agalos student so as an introduction to incentives so what are incentives well in the most general sense at least in the context of cryptocurrencies it's just the way to encourage people to do what they should do to follow the protocol and participate in it and follow it faithfully and for example for Bitcoin that means mining blocks and including transactions into the blocks to make Bitcoin work and in Cardano as Philip explained it means being online because remember there's this election process we have these slots and each slot gets elected a leader and when it's your time when this slot comes up then you are supposed to be online and actually create the block and you are also Philip explained this thing with people sitting around the table throwing dice and then they have to reveal their number at a certain time so for this process people are also supposed to be online and participate in this protocol so somehow we want to incentivize people to do these things and even though as Philip also explained participating in Cardano is far less expensive than participating in Bitcoin you don't need server farms you just need a normal laptop nevertheless I mean you have some investment and you have to spend time and so on so it's just fair that you also get reimbursed somehow for your trouble and when I talk about incentives then in this talk I mostly will talk about monetary incentives so you get some ADA for your trouble and so I mean monetary in this context of course doesn't mean euro or dollars it means you get ADA our cryptocurrency but that being said one should not forget that there are other types of incentives as well like being idealistic or moral and just the general desire to do the right thing and that should not be underestimated as an example in Bitcoin there's this story from Coin Desk from 2014 there was a big mining pool that accumulated 42% of total mining power and as we know the close-eyed gets to 50% that's the more dangerous it becomes and then what happened was that people members of this mining pool voluntarily left and in a matter of two days it dropped from 42% to 38% and they didn't do that because it was financially good for them on the contrary rather they just did it because they believed in Bitcoin and believed in decentralization and just wanted to do the right thing and ideally of course these two things would align so it should what is in your own best selfish interests financially speaking should also perfectly align ideally with moral with doing the right thing and as we have seen in this example with the mining pool in Bitcoin that's not the case I mean people had to choose between making more money and doing the right thing and our goal in Cardano is to align these two things so that when you maximize your profit you automatically do exactly the right thing and just right and I say we strive for that so I'm not claiming that we achieve that but at least we want to somehow get there and get closer than Bitcoin does right so what exactly is it that we want to incentivize in Cardano so we want to incentivize stakeholders to be online and they have to participate in the protocol for example when they have been elected slot leader for a certain slot then they should be online at that slot to create the block and on the other hand I mean there may be people that are just not interested in doing that or don't have the technical know how to to set up the software in the way that makes it possible or maybe they don't have the time or whatever and it will also be possible for those people to delegate the stake to a stake pool same as in similar to mining pools in Bitcoin there will be so-called stake pools in Cardano and I'll explain more about delegation later right and this is describing what exactly we want so we have these people that own ADA and they can somehow join in pools and actually what we would like ideally would be that about 80% of all the stake all the ADA should be delegated to a number of K stake pools where K should be probably something around 100 so we would like that 80% of all ADA is organized into stake into about 100 stake pools and those stake pools then should be power users that are online when needed and they should also provide additional network infrastructure so-called relay nodes that we need to to make the network traffic more efficient and the it's okay if the remaining 20% that probably will belong to small stakeholders they can if there's a wish also participate in the protocol on their own or they also can just ignore it and don't do anything so that should be fine but this is the configuration we aim for and somehow we want to set up our incentives in a way that achieve that so if everybody does what is in his own best financial interest personal interest then the outcome should be this right so I mentioned delegation so let's talk about this and that's another team we see Agalos again as I said he's chief scientist in at IHK so he does a lot of things so he's involved in coming up with the delegation scheme then one of his students Dimitris was also at Annenberg University and researcher at IOHK and then Mario who is originally from Brazil I believe and who is at a lecturer or professor at Tokyo Institute of Technology and also research fellow at IOHK and so steak in because as Philip explained Cardano is a proof of steak system so holding steak means more than it means for Bitcoin to hold Bitcoin so I mean on the one hand Cardano is a normal cryptocurrency so of course by owning ADA you can just use it as any other cryptocurrency you can use it to spend it to buy something to buy stuff but in addition to that I mean you don't only have this buying power the payment power but in addition to that holding ADA as Philip explains also means that it comes with the right and obligation to participate in the protocol and to create blocks and these two uses of ADA can be separated by the delegation mechanism so somebody that owns ADA can keep the spending power so it's still his money but he can delegate the power to to participate in the protocol to somebody else the idea is exactly for people that maybe technically not very versed or whatever don't have time don't want to worry about it just want to use it to as money and are not interested in the protocol that they then can give their rights away to a power user to a pool that can do the technical things and as I said before but let me just stress that so delegation does not mean that you lose control over the money you can still spend it at any time it just means that the right to participate in the protocol is delegated not the right to spend the money and this is now a bit technical but it's only a couple of slides so this is how the delegation mechanism actually works so there will be three different types of addresses basically accounts types of accounts and each is associated with a key or key pair in the cryptographic sense one for payments one for staking and as far as payments is concerned all these three types of accounts are exactly identical the differences in the staking so there's this base address where both key the staking key is directly linked to it and there's a so-called pointer address where it's more indirect so the address points to a point in the blockchain and at that point in the blockchain there's some meta data that defines the staking key and then finally enterprise addresses where that can stake and this letter type is meant for exchanges because there we have the situation that an exchange from the point of view of the blockchain is extremely rich because all the money that people store at the exchange from the point of the blockchain belongs to the exchange but we but legally the money of course doesn't belong to the exchange but to to the people that deposited it there so for exchanges we don't want them to use basically their clients money to participate in the protocol so the idea is that they have special enterprise addresses where they can just transfer funds but can't do staking can't create blocks and so on I mentioned here for the pointer addresses I mentioned a pointer to a delegation certificate so what's that it's a piece of I mean a signed cryptographically signed piece of meta data in the blockchain not necessarily in the blockchain I come to that that transfers staking rights from one staking key to another and we can probably see where this is going this is then used to delegate if you want to delegate to a mining pool and it can be published in the blockchain in that case it's called a heavyweight certificate and pointer addresses that I mentioned on the previous slide can reference it and and the way that technically happens is there will be a transaction which ends up on the blockchain and this transaction can have meet meta data and part of this meta data will be this delegation certificate and that in particular sorry come to that so right I just wanted to say this first so you also automatically then have to pay for for these delegation certificates the heavyweight ones because in order to get this transaction transaction into the blockchain you have to pay the normal transaction fees so it comes with a small cost to to do these delegation certificates right and then this middle sentence is about conflicting I mean you could of course delegate your money to somebody and then to somebody else so you could have two delegation certificates and there must be some rule to break the tie and the rule is simply the later one wins so whatever is later in the blockchain over rules everything that's before it then there are also lightweight certificates so they are not published on the blockchain and not part of the meta data of of a transaction they only become public as part of a block so those are included in the headers of blocks by the creator of the block to prove that he actually has the staking rights for the address that was elected slot leader and then there's another ingredient so for these staking pools they will have to formally register so it's it's written in the lecture on the blockchain registration certificate also embedded in a special transaction so basically you have to pay a fee to create a pool one of these staking pools and in this transfer so you pay the system basically this fee and you embed your certificate and the certificate contains the staking key of the pool leader so people that want to join this pool will then create a delegation certificate where they transfer their staking rights to that staking right a staking key of the pool leader and right and they do that in the form of a heavyweight certificate and this is all quite complicated but for good reason so if you think about it there are these pointers and there can also be chains so I can point to to some staking key and then there can be another delegation certificate that transfers that staking key to yet another one and so on so there can be several hops so it can be quite complicated but that means that lots of scenarios are some are modeled with this so you can have regular user wallets offline user wallets with cold staking enhanced privacy staking pool wallets exchange wallets and and that's why it's so relatively complicated to to cover all these use cases so I don't want to go into more detail but it's quite interesting how how depending what you want how much security you want how much privacy you want you can set use these different types of addresses to get quite interesting scenarios right so this is how delegation works and now I want to explain the incentive mechanism itself so first of all I want to say where the money actually comes from I mean we want to incentivize people but the money to do that or the ADA to do that must come from somewhere and there are two sources same or very similar to Bitcoin actually first is transaction fees so let me briefly talk about transaction fees I mean the second reason is topic of this talk to fund incentives for the stakeholders and the stake pools and so on there's another reason the prevention of distributed distributed denial of service attacks so that is an attack by an attacker tries to create hundreds or thousands or millions of transactions and flood the blockchain with it and overload the system and the idea is if if you can't do that for free if you have to pay even a small amount of money for each transaction and it becomes prohibitively expensive to to create all these flooding transactions so that's the other reason why you need transaction fees and how it works is when similar to other cryptocurrencies there's a rule what actually in Cardano we have specific rules so it's not just convention so it's hard coded for each transaction what the minimal fees are and then in each transaction you have to include at least the minimal fees so the inputs to your transaction have to are larger than the outputs of the transaction and the difference must be at least as large as the minimal fees it can be larger if you feel generous and it's a very simple formula that we use at the moment to calculate these minimal fees so it's just a linear function so some constant term a plus b times the size of the transaction where the size is not the size in ADA but the size in bytes and yeah there are the values of these constants right now so you always pay at least this 0.15 ADA that's the constant term and then for each byte you pay this 0.00043946 ADA and as an example if you have a typical transaction of size 200 bytes then you would add this constant term a plus the b times 200 and you get something like 0.16 ADA and the justification for that form is so we have the a for this distributed denial of service attack prevention so the idea is no matter how small and trivial your transaction is you always have to at least pay this a so you no matter how small it is there's always this cost a and that a should be high enough so that it makes it too expensive for you to create thousands of transactions or millions and the b is basically for fairness so the idea is I mean you should pay for the strain you put on the system and if you have a large transaction then people that run the Cardano protocol they have to save store your data on their computers so they have to basically buy memory so somehow it makes sense that the bigger the transaction is the more expensive it should be we might later add other terms to that for example one idea was the the number of UTXOs you have so so if your wallet gets more and more complicated that that also makes it more expensive for people actually to store your data so there could be a term for that another idea that we had was to also add a term for the actual size in ADA so that if you transfer large amounts of ADA not necessarily large in bytes but in ADAs that it should maybe also depend on that like yeah but right now this is the formula we use so that's the one source of income or for incentives and right so so this a and b is as I said hard-coded but we anticipate that probably at some point that might have to be adjusted I mean yeah depending on the course of ADA and also on the use statistics of the of the system right and the second source of incentives as in Bitcoin will be monetary expansion so what does that mean the total supply of ADA today is circa 31 billion ADA it's a bit more but less than 32 and the maximal supply is 45 billion ADA so there's still this gap of almost 14 billion ADA available and the ideas to use those for incentives as well obviously even though it's a large amount it's a it's a finite amount so the idea is to do something similar to what Bitcoin does to to have an exponential in decrease over time so it slowly gets less and less the percentage that's used of that for incentives so and the reason for that is that the hope of course is that Cardano will be hugely successful and more and more people will use it and so the transaction fees will go up and then there's less and less need for for this extra monetary expansion money and just as an example how that what it could look like but this is purely arbitrary so this 5% is just really an example no idea how high that will be but for example if we start with this 14 billion and each year spend 5% of the still available money on incentives then the first year we would have 5% of 14 billion which is 700 million and then of course the available money goes down and so slowly over the years it becomes less and less but it's quite a graceful decay so but of course maybe 5% is too high maybe will be useless so it's just an example what that would look like right so these are the two sources where the incentives come from now how are they actually distributed amongst people and as Philip mentioned in Cardano we have this strict division of time into so-called epochs and slots so slot last 20 seconds and for each slot one coin is randomly chosen and the owner has the right to create this block in that slot and then epoch contains 21,600 slots and if you multiply that you see that's exactly five days and epoch this is when this election and randomization process happens so every five days the people roll their dice and generate a new random number seed and the slot leaders for the next epoch for the next 21,600 slots are elected at that point so each epoch right and the plan is to distribute incentives not as in Bitcoin on a block by block base but on an epoch by epoch base so all in some all transaction fees of all the blocks of an epoch plus the monetary expansion will be put into one reward pool for the whole epoch and then this whole pool will be distributed amongst the people that were active or important in this epoch which I explain on the next slides and so the basic the basic idea is it's okay and I explained that in two steps first I explain how this rewards pool is distributed amongst pools and then afterwards I will explain how one pool then further splits it between the members of the pool so now we're just talking about how the whole reward pool is split amongst pools and the basic idea is to do it proportional to stake so the your split of the reward pool is proportional to your stake and there are two ways to actually realize that you just look at the stake and do the calculation or you could also look at the number of slots in that epoch that the pool was elected slot leader and not the number of blocks it actually created but the number it was elected pool leader and this of course looks different at first but if you remember I mean as Philip explained the proper the probability of being elected slot leader is proportional to a stake so if you do some basic probability theory 101 you see that these two methods would lead to the same expected outcome so that's the basic idea so the more stake you have in the system you bigger your part in the rewards pool is and then there are two refinements to that first refinement I mentioned that we have this number K of desired number of pools which should be around a hundred so we want around a hundred pools if you think about it normally it would make if we just had this proportional rule then it would make sense for pools to become bigger and bigger because they would still get the same reward but they would have lower costs because over it somehow I mean if bigger pool has not much more over it than a small pool so there would be a tendency to big big blocks and in order to prevent that we will just cap the the maximum part of the rewards pool you can get at 1 over K so in the example of K 100 we want 100 pools that means no matter how high your stake is you can never get more than 1% of the rewards pool for the epoch so in this in example if you have two state pools and B one has 0.3 percent of stake and one is 1.2 percent of stake then a will get 0.3 percent of the rewards pool according to his stake but B will not get 1.2 percent but only 1% nobody will get more than one and the hope is of course that this will have the effect that pools won't grow too large because then there some other part they get from the reward pool decreases and doesn't increase it doesn't decrease but it doesn't increase any longer right and the second refinement is I mean so far this was all only dependent on the stake the stake pools have but not on the work they actually do so there somehow there must be a mechanism that checks whether they actually create the blocks when they were elected and so there will be some sort of predicate that checks that so it looks at for which slots in a given epoch the pool was elected leader and checks which of these slots the pool actually did its work and did actually create blocks and depending on these two inputs it will decide whether you are entitled to get your rewards or not and just as a remark this predicate I mean you can think something like okay I must do I must create at least 90% of the blocks I was elected to create in order to get my reward it can't be quite that simple because if you think about it say you have been elected for 100 slots in epoch and you already created 90 blocks then you could just switch off your computer and ignore the last 10 because you already reached this threshold of 90% and if everybody did that then that would mean that at the end of an epoch everybody would switch off their computers which wouldn't be good for obvious reasons so it must be a bit more complicated than that some randomization maybe or maybe just looking exactly at the number of created blocks divided by the number of elected blocks and and use that number directly or something like that but this is the general idea so you only get your rewards if you actually did the work okay and yes this is the example I just explained why it can't be that simple right and if you think about it so there are two reasons why you get could get less than your stake one if you have in this example of k equals 100 if you have more than 1% of stake you won't get this the amount that's over 1% or if you don't do your work you also don't get the rewards so that means not not the whole reward pool is actually distributed and it's it's important that the rest does not get distributed amongst people so that's just not distributed at all but that's actually not a bug but a feature because as Philip also mentioned we have this treasury thing and the treasury of course also needs funds so we will just put this unused rewards into the treasury so it's not lost to humanity it's just lost to these pools right and an important consequence of this is that there's no competition between pools so nothing one pool does can somehow have an impact on how much reward another pool gets so it's not as if everything I gain somebody else's loo else loses there's this strict fencing in of right so it means that there's no incentive for any pool to sabotage another pool it's not as if if I sabotage you and you can't create your blocks I get your rewards as I explained on the previous slide the rewards then just go to treasury I don't get them so that means the polls are completely independent in this epoch and no matter what they do they can only influence their own rewards but not somebody else's rewards and that means that classical attacks on Bitcoin like selfish mining for example a block withholding just cannot work because these the pools are fenced off in this sense from each other this it's not that my gain is your loss it's completely independent so this is a very important property of the scheme right finally I want to say now we have determined each pool gets on so much of the rewards pool what then happens to the pool members which means the people that have delegated their staking rights to this pool and that will depend on will follow two guidelines first that the pool leader itself the one that runs the pool the one that registered the pool filled in this registration certificate published it on the blockchain and paid the fees and she also has the I mean she has the hardware and she must be online and so on so she should get more than the others and the second rule is that the pool members that are not the leaders should be rewarded proportional to the stake that delegates simply proportional and last slide isn't just an example to what that would could look like so but I must stress the fact this is completely arbitrary so it's not reflecting actual incentives it's just an example to explain the rules so we have three people Alice Bob and Charlie Alice has 0.2 percent of stake and she runs a pool with Bob and Charlie as members Bob has 0.1 and Charlie is 0.2 and let's say that in this epoch in the rewards pool there are five million ADA and that Alice's pool beautifully did all the greater blocks so she doesn't I mean she fulfills this predicate and she gets the full share of her reward and if you see the whole pool has 0.2 percent plus 0.1 plus 0.2 is 0.5 which is less than 1% so she also doesn't get kept off so she gets full the whole pool gets full 0.5 percent of the stake which if you do the calculation is 25,000 ADA so that's what the pool gets and now with these two guidelines the Bob has open 1% of stake and Charlie has 0.2 so Bob will get half of what Charlie gets but Charlie and Alice have the same stake but Alice has the overhead of running the pool so Alice will get more than Charlie and Bob will get half of what Charlie gets and let's just assume that this additional compensation for running the pool in this case will be 5000 ADA so Alice upfront takes 5000 of the 25,000 and 20,000 are left and now those 20,000 are exactly distributed according to the stake so Alice to Bob to Charlie is like 2 to 1 to 2 and if you do the calculation that gives 8,000, 4,000, 8,000 so Alice gets these 8,000 plus her special 5,000, 13,000 and Bob and Charlie get 4,000 and 8,000 so that's the idea so important to just sum up important thing that for a whole epoch the incentives are pooled it's not like in Bitcoin where it's on a block by block base it gets pooled then it gets distributed according to the stake of the pools but kept at a certain number to prevent big pools and also you can lose your rights to part of the reward if you don't do your job and money can not be distributed it then goes to the Treasury which means there's no competition amongst pools and then finally once you have determined how much one pool gets it gets distributed amongst pool leaders according to their stake with the exception that the pool leader herself gets a pool members everybody according to stake but the pool leader herself gets a bit more and the details are still being worked out but this is the general idea so that was right and as I said before this is purely fictional so please now don't start making calculations how much you can earn buying Ada right and yes so that's all I wanted to say thank you very much I just wanted to encourage you to subscribe to the IOHK YouTube channel where for example the talks from tonight will also be put online soon I hope and to also follow us on Twitter that's input output HK thank you very much