[Music]
all right amazing to be here so many
people that I love in the audience it's
amazing DEFCON 3 very special time so
this talk is going to be on crypto
economics programmable incentives it
should give you a nice little overview
of what it is to you know what is crypto
economics anyway so hopefully the next
button will work eventually all right it
worked so programmable incentives we
have a new spell aetherium gives us a
new spell and that is the smart
contracts and that allow us to program
with incentives and so this will you
know hopefully give you an idea of where
to go so first public blockchains have a
secret sauce there are two components to
the secret sauce the first one is open
access that means that anyone is able to
deploy a smart contract or send a
transaction this is critical to the
guarantees that we want to have so this
durable can send a transaction this
durable can sent a transaction even a
robot can send a transaction and there's
no distinction everyone can do it
the second key piece is trusted
execution so that means that all these
smart contracts and transactions are
going to execute exactly as defined that
is critical and that gives us
programmable money so programmable money
we've got our main character this
durable Sam is sending a deploying a
smart contract and you know great coder
here and this is a hat token contract so
what does that mean that means you can
mine tokens by wearing a hat
pretty simple pretty simple stuff that
is the programmable money now these
other terrible's they see the smart
contract they're like oh that looks
pretty cool I should I should you know
maybe maybe all
mind some of these tokens now that's the
programmable incentives we're like
incentivizing these gerbils to do
whatever so they see the smart contract
boom they start wearing hats right this
is a pretty magical thing this this
gerbil right here Sam didn't know these
two other gerbils just uploaded some
code that code was able to be verified
and caused the wearin hats
amazing so when we have programmable
money from public blog chains that gives
us programmable incentives and when you
have programmable incentives you can
program people it's pretty crazy pretty
crazy stuff and it's a little bit scary
like program people not necessarily the
thing that it's a little bit too much
power almost so what we want to do is we
want to program good outcomes this is
critical if we're going to be using our
newfound crypto economic powers we need
to program good outcomes so how are we
going to do this well we can use crypto
economics so crypto economics can give
us the ability to say okay these are our
incentives this is going to be the
outcome that they will produce or at
least give us some certainty around the
this outcome and the the kind of
technical definition is the application
of economics and cryptography to achieve
security information goals but I'll give
hopefully some insight around what that
really means mmm so first quote from
Vitalik you can't reason about
blockchain consensus protocols without
thinking about economics this is
fundamentally a core component of what
makes the blockchain special and what
makes these systems work it's people
we're talking about people working
together and cooperating we have two
nice things in our tool belt
cryptography I'm going to spoil it
economics is the second one but first
we'll start out with cryptography so
we've got hash functions we've got
digital signatures we've got merkel DAGs
we've got zk snarks right so like these
are just a few of our of the many tools
that we have
to work with incentives and this is the
next part you know economics the
incentive stuff so we've got tokens
voting rights etc and what we can do is
we can combine all of these things in
our like utility belts to create crypto
economic mechanisms so I personally work
on caspere this is what I spend most of
my time on because it's you know the
first most interesting application of
crypto economics in my opinion but you
know there are many actually ok not most
interesting the one the most interesting
one is out here somewhere and I don't
even know about it so this is crypto
economics right so in Casper I use we
use hash functions digital signatures
tokens voting rights to create a cool
protocol so this is a overview of you're
not gonna learn Casper here
unfortunately there's a few other talks
which let you do that and there's all
sorts of stuff online it's there's a
there's a whole bunch of literature but
you can see here that we're creating new
blocks and each block has a pre patch
right so okay there's the hash we've
also got tokens that the blockchain is
giving out the validators tokens okay
there's our token incentive and we've
also got these validators see at the
bottom they are voting on the next block
so there we got we have voting so all of
these all of these protocols kind of use
a combination of these core tools and if
you squint hard enough just quit a
little bit right now you can see they're
actually those gerbils from you know the
first first few slides great we they're
all just these people we don't know them
we're coming up with economic rules
they're playing the game and it's
causing a good outcome
it's gerbils all the way down folks
gerbils all the way down called the TEC
so so here's some good outcomes and
there's some bad outcomes right so we
want to promote the good outcomes and we
want to discourage the bad outcomes that
means we want trusted execution the
first two things that we had in in the
you know first few slides the blockchain
secret sauce there's also open access
which allows us you know everyone
concentran
actions and we have fast finality and a
number of other things and you know I'll
give a there's some other talk so you
can learn really about this stuff so
that is just one of a huge number of
crypto economic mechanisms and to be
honest it's relatively boring compared
to what is possible so the potential for
these mechanisms is humongous I I'm like
very excited to see what comes out so
I'm gonna give an overview of any
automated market maker contract and so
this is something that Vitalik came up
with and I think it's a really nice
simple mechanism which can give a little
bit of a foundational intuition for what
these systems can do and how maybe to to
build them so first if I were sitting
down and like wanting to create a
project on aetherium I would say okay
first I need to design a mechanism
easier said than done
but let's assume we did it analyze some
incentives so okay my mechanism has
these people playing in it I'm going to
see ok this will happen and that person
will you know react accordingly and then
make a website and logo publish analysis
observe the behavior and record findings
so this is honestly very similar to the
like scientific method we have a
hypothesis that we come up with we test
our hypothesis and we iterate and this
is like how we can actually further the
like science of these protocols super
exciting so here's the the market maker
example we are first we have our main
character a rich gerbil has a hundred
even a thousand Unni the rich gerbil
will deploy a market maker contract to
the blockchain send it to the miner the
miner will mind that transaction and
create an market maker contract so this
market maker has a hundred even a
thousand unit in it and allows us to
send and receive uni that's the whole
point so so it's really just like a
decentralized exchange kind of so the
way that this
works is you see those numbers on the
right-hand side that is the invariant
100,000 is the environment so this is
what calculates the exchange rate from
eath to uni or you need to either so
we've got these durables once again they
don't know anything they're just
watching the blockchain they see it and
they're like well I want to I want to
trade my eath for a uni so one of them
sends a need to the contract and now we
have 101 eath in our contract but we
don't know how much uni we should have
so that we equal 100 thousand right we
always want to keep that 100,000
constant so we recalculate we do 100,000
divided by 101 and we get nine hundred
and ninety point zero nine so this is
how much a uni we will have after that
transaction is sent and what we'll do is
we'll send the excess uni to the person
sending the eath so this is like a super
easy exchange right I sent one either I
got back nine point zero one uni cool
and I also give a little fee to the
market maker so they have a reason to
actually put up this money so we've got
an exchange rate before and an exchange
rate after and we can actually see you
know the more eath you send the more
expensive uni will be the more uni you
send the more expensive eath will be so
this is a really simple mechanism it
doesn't require a token it just you know
execute exactly as defined great so now
let's analyze incentives this is a
critical part right this is where the
actual crypto economic learning is going
to come in so this is a participation
incentive overview so you can analyze
tons of incentives for you know all day
but this is you know one example so the
exchange Creator is a key player where
they're going to be the they're gonna
front to the the tokens and they have
this passive fee income which will which
they'll receive for for creating the
market but they'll also have this
capital lock-up cost they'll also have
to maintain a 50/50 hedge of those
tokens so when you create one of these
markets what's going to happen is it's
going to always equal out you're always
going to have this 55
50 hedge you also have the token buyers
they're pretty simple they're just you
know sending transactions they the only
downside for participating is you know
the exchange fee and then we have the
token arbitrage errs so these guys play
a important role in keeping our exchange
rate correct so what they'll do is if
they see the price is you know out of
whack versus another exchange they'll
buy some tokens here and sell them over
there and call it a day right make some
easy profit so here are some open
questions that may or may not have good
solutions that but we can get closer and
closer to you know better and better
justifications so first fees is it a
race to the bottom well it'll probably
you know hit some equilibrium based on
the like cost of capital etc but you
know we can we can kind of like model
this out and play around with it we can
also say oh is it worth it in the first
place
like what tokens is it worth it for so
if you think that one token is going to
just go plummet then you probably don't
want to create a automated market maker
for that token we can do some analysis
there so what what kind of market depth
do buyers need right so we depending on
how much how many tokens are fronted in
the first place the exchange rate will
change more or less so if you have more
tokens and in the beginning from the
exchange creator the more tokens the
people can buy before the exchange rate
gets out of whack and how closely will
these arbitrage how closely will the
token price match other exchanges
basically like what's the cost of this
arbitrage and you can come up with like
models for this and you know there's a
million things that I haven't even
thought of but what we can say is we can
say okay if these incentives hold true
or these assumptions hold true then our
market maker will act within you know as
we expect within these bounds and that
is going a long way because that gives
us a real hypothesis something that we
can test something that we can iterate
on also will it promote good outcomes
then we cannot forget that we're trying
to build a better future
some good outcomes right we've got
easier exchange and trustless trades but
there also some bad outcomes may be no
kyc right so maybe you want a kyc your
token holders who knows another thing is
now we just deploy to production right
we actually see if this thing works so
to go live super simple
code it up in Viper shout out to Viper
open source it put it on either scan
verify your smart contract and publish
it you know this is this is something
that everyone has access to every single
developer can make a website code up a
smart contract post on reddit not hard
anyone can deploy a smart contract which
can hold millions of dollars this is
something that just wasn't possible
before we are entering a new space where
we have the capability to just recreate
financial systems and anyone can do it
it's pretty crazy
so in our you know our little gerbils
they're using the site going live this
is a loading screen because they're like
using it anyway and my friend even like
in a weekend we coated this up and made
a little website it's super simple
anyone can do it so learning from
mistakes this is a key point right we
created this thing but now let's learn
from it
oh wait what's happening oh my god oh
geez minor front-running
what happened so that guy looks a little
scared I'll give him bunny ears so our
incentives from the previous thing turns
out it was incorrect we didn't really
reason about it properly we forgot about
the minor frontrunners right these it's
super low risk profit so essentially
what happens is a miner receives a
transaction it's a huge buy order they
say oh well actually let me slip in my
own transaction before that play the buy
order on top of it and then sell for you
know a quick profit right so they can
make just like print a little bit of
money right and that's crazy and that's
something that we didn't necessarily
account for and so people would not know
about this if we
weren't sharing our findings so maybe we
can disincentivize this somehow right
well let's think about it okay well
maybe we can have a flat rate per block
I mean not really it kind of mitigates
the problem but it's not great maybe
trust a transaction or during an Oracle
hmm or just accept it as a minor tax
like a minor tax so now we want to
adjust our previous models right now
another thing that we may not have
expected okay so we thought these token
arbitrage errs we're going to our bar
our system well it turns out they
automated themselves away now they're
just BOTS and hats and this is something
that can that is actually very normal
what we're going to see is we're going
to see these crypto economic mechanisms
deployed people are going to start out
playing the game themselves and then
they're going to be like oh wait I can
just automate what I'm doing away and
it'll run on its own and so this is both
really cool because like Oh awesome a
shoe a fishin see but also really scary
because it's like Oh BOTS own all the
money kind of scary so once again good
outcomes bad outcomes we need to think
about these things so maybe BOTS get
richer it's not rich get richer BOTS are
getting richer and we have miner
front-running that we didn't consider
previously so important step we have to
share our findings right we've got all
this information and all the people need
to know so gives people ideas helps
everyone out spreads the love really
good so we have the opportunity to
create a brighter future with these
incentives programming really exciting
more equitable world superpowers for
makers right the the magic spell that we
have the smart contracts these
programmable incentives we can use them
to really reshape what the world looks
like financially and we've got these
tools to do it right we have aetherium
we've got ipfs warm you know torrenting
etc and way more of course
and not just our superhero but like our
main character everyone can do this
every single person in this room so
incentives drive behavior and open
access to programmable incentives sets
the stage for radical change right this
is a really unique moment in history so
this change can be good or this change
can be bad right we can program
incentives which promote cooperation and
you know equitability and you know
general happiness everyone's goal uh key
or we can create incentives which prop
up a few people and give them way more
power than they already have right this
is like kind of terrifying and we've got
BOTS that could you know not only could
it be people that are propped up it
could be bots that are just running our
lives and because I have you know a
little extra time I'll give my theory so
I'm really into this idea of like ai ai
ethics being built out of robust crypto
economic mechanisms so essentially if we
do have like super powerful AI maybe we
can actually defend against that by
creating economic systems that they play
in that promote good behavior right so
if we have kind of bad incentives then
our AI just playing the games just as
defined are going to call us even more
havoc than than previously so anyway
we've got these big problems you know
energy markets that we can you know
mitigate with carbon credits or any
other cool incentive structures we've
got financial tools that currently
people don't have access to but we can
you know create decentralized exchanges
so that they do we can also reward
content creators with you know more
interesting incentives than you know
just like maybe patronage or even cooler
stuff like curated lists that you know
you want to get on or whatever there's
so many options when you unlock this
ability to program incentives and you've
got you know tons of people who may or
may not have identification can give
them some decentralized identity or
network neutrality like
let's make some mesh networks be awesome
so we need to design mechanisms test
them in the real world and share our
findings and do that over and over on a
large scale every single one of us and
we have to make sure that we are
promoting positive outcomes all along
the way right this this could go really
well or it could go really badly
probably not in between but maybe in
between let's be real it'll be a mixed
bag so it's up to you to you know make
this a reality this is a nice photos
they have the crew and we can all be you
know superheroes but with great power
comes great responsibility we have to be
able to like do this in a sensible way
we need crypto economics so we know what
the actual outcomes of our incentive
mechanisms are going to be we also need
you know good ethics so we know that
there are crypto economic mechanisms are
actually going to achieve good outcomes
but we can also be super villains right
we can also program some evil Green
Goblin people to take over the universe
and on our souls more than they're
already owned right like this is this is
very real and very possible and you know
super exciting but god I got to consider
it
so I'm Karl tech and that was an
introduction to crypto economics
programmable incentives thank you so
much
[Music]