►
From YouTube: How To Design DeFi Governance and Voting
Description
Dean Tribble, CEO of Agoric, will introduce you to DeFi governance and how it works on Agoric.
Get started with Agoric: https://agoric.com/documentation/getting-started/
ABOUT
Build Fast, Earn Fast - Agoric enables developers to rapidly deploy dapps and DeFi markets on-chain using composable JavaScript smart contracts. Safely get your project from vision to global market.
LINKS
https://agoric.com
https://agoric.com/twitter
https://agoric.com/discord
https://agoric.com/telegram
https://agoric.com/newsletter
Click the 'SUBSCRIBE' button to follow our Youtube channel!
A
So
first
questions:
please
take
your
questions
to
youtube,
live
I'll,
be
able
to
see
those
quickly
or
go
to
discord.
If
you
haven't
signed
up
for
discord,
absolutely,
please
go
there
and
post
your
questions
there.
I
know
there's
a
long,
two
long
tale
of
people
watching
this
in
the
future.
We
will
be
happy
to
talk
to
you
about
this
anytime.
You
you
have
you
bring
questions
to
us,
so
I
look
forward
to
to
seeing
your
comments
and
questions.
A
Okay,
so
first
our
agenda.
Let's
vote
everyone
who
wants
to
hear
about
governance.
Please
raise
your
hand.
I
guess
that
doesn't
really
work
in
this.
In
this
context,
I
will
pretend
you
all
voted.
A
The
nice
thing
is
I'm
going
to
do
my
agenda,
whether
you
voted
or
not
so
we'll
introduce
some
concepts
on
governance
and
about
a
gork
look,
some
code
samples
and
then
come
back
and
and
wrap
up
on
how
all
those
pull
together
and
then
hopefully,
you'll
go
off
and
build
pieces
that
build
applications
and
hackathon
that
use
this
stuff.
A
Okay,
now,
aren't
you
glad
you
voted
because
you
got
the
agenda.
You
were
looking
for
right.
So
what
is
governance,
the
act
or
process
of
governing
a
little
recursive,
but
or
overseeing
the
control
or
direction
of
something?
Thank
you
miriam
webster.
What
does
it
mean
in
the
in
in
our
context,
or
why
do
we
do
governance?
A
Well,
as
it
said
first,
is
to
oversee
and
control
the
direction
of
execution
of
some
smart
contract
or
defy
on
the
on
the
system.
A
But
there
are
other
reasons
as
well:
learn
the
sentiment
of
the
participants,
one
of
the
things
that
the
cosmos
ecosystem,
for
example
has
is.
It
has
very
rich
governance
that
measures
that
sentiment
before
the
validators
go
off
and
do
what
the
validators
are
going
to
do,
but
guided
by
that
sentiment,
that
means
they
can,
you
know,
go
they
can
look
at
things
and
go
yeah
wow.
You
know
the
the
cup
that
you
know.
Yes,
there's
51,
but
we
should
do
better
than
merely
51.
A
We
should
have
80
of
the
people
really
excited
about
the
change
we're
about
to
make.
Let's
keep
thinking
right
learning
that
sentiment
is
hugely
valuable.
Generally,
that's
a
social
thing,
not
something
that
shows
up
on
smart
contracts
or
signal
virtues
to
the
customer.
Right
I
mean
you
were
happy
that
I
asked
for
a
vote
at
the
beginning
right,
I
mean
work
there
that
that
turns
out
to
actually
be
important
because
it's
a
part
of
engagement
and
it
relates
to
that
learning
the
sentiment
or
giving
people
some
hand
in
control.
A
Is
that
is
a
virtue
and
and
having
the
the
explicit
invisible
governance
signals
that
to
the
world
and
helps
them
understand
where
you
fit
in
their
overall
scheme
events
and
then,
finally,
all
of
that
leads
to
increasing
the
engagement
with
the
community.
Those
are
all
valuable.
A
The
important
thing
is
governance,
long
predates
blockchain
and
it's
it's
valuable
to
not
sort
of
always
reinvent
the
wheel
there,
but
actually
tap
into
some
of
the
long
history.
Well
1656.
That
was
a
few
years
ago,
1689
still
older
than
me
right,
and
you
know
some
of
them
not
so
friendly
but
important
to
governance.
You
know
so
there's
a
lot
of
these
things.
A
You
know
whether
it's,
whether
it
is
you
know,
how
do
you
do
a
democracy
or
what
were
the
corporate
governance
failures
in
the
enron
scandal
or
what
in
the
prints,
are
people
likely
to
do
that?
You
really
don't
want
to
have
you
know?
All
of
these
things
hayek
hayek
was
a
big
inspiration
to
our
large-scale
economic
model
and
how
we
compose
large-scale
systems
out
of
small
contracts.
A
And
finally,
recently
you
know,
as
recently
as
a
couple
of
weeks
ago,
when
I
was
first
talking
about
governance,
there
was
a
long
tweet
storm
by
ella
verbin
about
how
you
know
straight
voting
on
lots
of
little
parameters,
isn't
actually
an
effective
structure
for
governance
for
smart
contracts
and
you'd,
really
like
something
that
was
a
little
more.
A
That
was
a
little
more
executive
that
that
some
set
of
executives
could
make
decisions
for
a
system
and
the
people
that
that
had
tokens
would
be
helping
to
determine
what
that
executive
function
was
and
who
was
going
to
execute
it
and
what
their
accountability
was.
Those
are
all
really
valuable
ideas.
A
We
know
there
are
some
not
so
good
ideas
that
we
would
like
to
protect
against
or
prevent,
but
but
we
need
to
understand-
and
we
and
and
as
we
build
these
systems,
there's
clearly
a
richness
hundreds
of
years
of
people
thinking
hard
about
this,
because
it
mattered
and
as
we're
building
systems
that
matter
that
control
billions
of
dollars.
All
of
those
issues
come
up.
A
Okay,
so
let
me
say
just
a
little
bit
about
agwork
for
the
tale
of
users
that
haven't
seen
the
other
the
other
talks
in
this
conference.
It
is,
but
we
are
focused
right
now
on
d5,
but
it
is
a
general
purpose
platform,
but
our
focus
really
is
accelerating
d5
development,
and
we
do
that
by
enabling
this
composition
and
plugability.
So
it's
a
layer,
one
public
blockchain,
will
come
out
in
2021.
A
We
have
predictable
gas
economics
which
I'm
not
going
to
go
into
here,
a
familiar
programming
model,
so
you
can
build
smart
contracts
in
javascript,
and
many
of
you
here
in
the
hackathon
are
indeed
building
smart
contracts
in
javascript
in
a
secure
version
of
javascript,
where
the
model
of
separating
things
into
objects
gives
a
bunch
of
advantages,
particularly
around
compositionality
and
around
risk
partitioning.
So
what
do
I
mean
by
that
15
years
ago?
A
You
know
whizier
graphics,
all
those
things
than
experts
could
15
years
ago,
and
that's
because
they're
able
to
build
using
components
that
those
same
experts
produce
to
capture
their
knowledge
into
some
object.
That's
reusable
and
that's
not
copy.
The
code
deeply
understand
it
muck
with
it
a
little
bit
and
hope
you
didn't
break
it
and
glom
it
all
together,
which
is
the
code
copying
remixing.
You
currently
see
in
the
ethereum
space,
that's
grab
a
component.
A
Now
it's
also
important
that
that
not
be
done
by
this
source
code
remixing.
You
know
very
exciting
that
that
that
uni
came
out
with
a
token
where
they
were
able
to
take
the
you
know.
I
mean
this
whole
rapid
development
is
they
were
able
to
go
from
a
years
of
development
for
even
months
down
to
weeks
of
development
where
they
took
the
compound
governance.
A
Token
combined
it
with
unisop
to
produce
a
governance
token
for
uni
for
unit,
swap
that
had
a
lot
of
value
for
people
that
worked
great,
but
that
was
that
worked
great
because
it
was
a
special
circumstance
right.
The
governance
contract
happened
to
be
exactly
what
they
needed
it.
They
had
expert
knowledge
from
behind
the
scenes
of
exactly
how
it
worked
and
how
exactly
how
it
needed
to
be
glued
very
carefully
together,
and
so
they
could
safely
make
what
few
changes
they
needed
to
to
fit
it
all
in,
and
that
was
that
was
a
great
success.
A
The
problem
is,
it's
not
always
a
great
success
when
you
work
that
way,
they
had
a
lot
of
advantages.
Other
folks,
dforceslendf.me
did
the
same
thing.
They
took
the
compound
source
code.
They
took
their
application,
they
put
it
together,
they
deployed
something
and
the
impedance
mismatch
there.
As
a
result,
they
lost
25
million
dollars
in
minutes
with
with
no
recourse
right.
These
are
you
know.
The
the
the
50
50
is
not
a
great
number
for
success
versus
versus
losing
a
lot
of
money
right.
A
That's
not
the
way
to
be
able
to
rapidly
compose
and
produce
new
abstractions
new
applications,
leveraging
the
value
that
other
people
created
much
better
would
be
able
to
take
a
governance,
module
parameterize
it
with
a
few
things
and
plug
it
together
directly,
so
that
this
separate
governance
contract
would
in
fact
have
the
same
behavior
with
validated
same
security
audits
would
would
be
predictable
and
people
would
understand
it,
and
it
would
solve
your
problems,
we're
going
to
talk
about
some
about
how
to
do
that
and
then.
A
Finally,
the
igork
platform
is
built
for
d5,
where
it
has
the
default
elements
all
the
way
through.
So
several
of
the
reusable
components
that
I'll
talk
about
in
a
few
minutes
are
integral
to
the
system.
You
know
from
the
bottom
to
the
top
and
we'll
talk
a
little
bit
about
that,
including
simple
composition
of
both
financial
components
and
governance,
components.
A
Okay.
So
what
are
the
layers
of
the
stack?
We'll
start
it
I'll
start
at
the
bottom.
That
is,
as
I
said,
the
consensus
layer
where
the
reward
elements
are
not
just
the
cosmos
ones,
but
they're,
actually
mixed
in
with
a
smart
contract
and
able
to
use
the
same
smart
contracting
richness
of
the
rest
of
the
system,
above
that
is
the
gorick
swing
set.
A
The
gorick
vm
environment
that
allows
us
to,
on
the
same
platform,
execute
in
safe
compartments,
smart
contracts,
written
in
javascript
all
securely
communicating
with
each
other
and
also
securely
communicating
with
machines
that
are
part
of
this
agora
distributed
ecosystem
machines,
offline
that
are
either
running
your
wallet
or
running
an
application
service
in
the
cloud,
and
they
get
to
communicate
with
the
same
javascript,
asynchronous
messaging
communication
architecture
that
literally
millions
of
programmers
are
are
are
familiar
with
in
one
form
or
another
in
the
javascript
ecosystem.
A
Now
that's
the
language
level,
above
that
everything
is
just
written
in
familiar
programming
language
right
in
this
in
in
this,
in
this
javascript
environment,
so
ertp,
the
electronic
rights
transfer
protocol
is
an
is
a
set
of
apis
for
talking
about
digital
assets.
A
set
of
apis
for
talking
about
accounts,
purses
payments
transfers.
All
those
sorts
of
things
all
show
some
of
those
nfts
fungible
tokens
whatever
it
is,
and
you
know
on
top
of
which
we
you
know,
people
can
build
the
rest
of
the
dapps.
A
You
know
that,
like
a
few
days
ago,
kate
showed
the
implementation
of
a
faucet
abstraction
that
you
can
get
fungible
tokens
and
an
nft
nft
sales,
abstraction
that
showed
the
use
of
of
nfts
almost
as
easily,
and
so
those
are
all
parts
of
sort
of
the
basic
toolkit
on
which
then
are
built
richer
ones,
so
atomic
swap
simple
exchange,
which
is
an
order
book
auctions,
automated
market
makers,
all
those
are,
are,
are
able
to
work
across
any
of
the
set
of
digital
assets
that
were
created,
fungible
and
non-fungible
they're
able
to
use
those
inside.
A
So
I
can
have
an
automated
market
maker
in
terms
of
my
newly
defined
liquidity,
token
or
governance
token,
or
whatever
turn
around
and
be
able
to
sell
it
and
so
forth.
On
the
right
column,
there
are
additional
ones
that
are,
you
know
that,
are
you
know,
I
won't
say,
they're
advanced
ones,
but
they're
they're
they're,
not
as
as
familiar
so
a
covered
call
abstraction
lets.
A
You
provide
to
someone
the
right
to
buy
my
underlying
asset,
whether
it's
a
non-fungible
token,
a
baseball
card
access
to
an
auction,
or
just
you
know,
remoted
atoms
from
from
the
cosmo
sub.
I
can
give
you
the
right
to
buy
that
for
a
particular
price,
and
then
we
use
that
inside
the
otc
desk
so
that
right
to
buy
it
is
now
represented.
As
a
quote
in
the
over-the-counter
trading
desk
application,
dap
call
spreads.
A
There
was
a
presentations
on
earlier
this
week
on
how
to
use
call
spreads
to
achieve
many
of
the
kinds
of
derivative
abstractions,
like
you
know,
puts
calls
well,
spreads
binaries
prediction
markets
and
so
forth,
using
this
same
underlying
d5
parameterized
in
just
a
few
ways.
A
So,
and
you
know
finally,
of
course
in
this
in
this
contract,
we
in
this
environment,
we
have
oracle
legos
in
terms
of
being
able
to
pull
in
chain
link,
oracle's
historical
nodes
under
an
oracle
contract
bomb,
several
oracle
nodes,
together
with
an
aggregator
and
present
that
all
as
a
price
feed
in
the
price
authority
or
access
it
directly
through
through
the
oracle
contract
to
drive
lower
level
and
and
richer
functionality,
the
underlying
chain
linguals,
okay.
So,
finally,
let
me
start
talking
about
composition
so
to
build
a
loan.
A
So
this
was
the
loan
case,
which
is
one
of
the
smart
contracts
that
we
built
one
of
the
daps
we
built
that
uses
the
oracle
abstractions
underneath
that
so
that
so
that
there's
a
set
of
collateral,
I
take
out
a
a
stable
coin
loan
against
that,
and
if
the
price
of
that
collateral
falls
enough,
it'll
automatically
be
liquidated
against
a
a
automated
market
maker,
and
so
the
determination
of
whether
it
needs
liquidation
happens
against
a
current
price
fee.
A
So
it's
constructed
where
you're
taking
a
loan,
and
we
agree
that
you
know
you're
you're
posting
some
off
chain
asset
like
eth,
and
if
the
price
of
each
according
to
this
particular
chain
link
oracle
falls
below
a
certain
price.
Our
loans
will
be
liquidated,
and
so
they
will
be
liquidated
against
a
particular
amm,
which
is
the
one
that,
for
example,
is
part
of
the
standard
environment,
execution
infrastructure,
and
so
finally,
every
loan
will
be
instantiated.
A
You
know
each
time
I
take
a
loan.
I
get
a
new
loan
contract
that
knows
which
am
to
liquidate
on
and
which,
which
price
feed
to
use
and
each
one
of
those
is
a
separate
contract,
so
they're
not
vulnerable
to
each
other.
They
don't
they
don't
share
any
assets
in
common.
They
just
you
know
I
just
instantiate
these
lightweight
contracts
once
for
each
loan
and
they
can
each
independently
liquidate
and
then
evaporate
once
they're
done
or
if
I
pay
them
off
and
and
that's
on
a
price-based
notification
tied
into
our
order.
A
Okay,
so
that's
an
example
of
plugging
some
of
these
components
where
I,
where
I
got
to
work,
got
to
write
the
loan
contract
using
the
existing
amm
and
using
the
the
the
existing
price
feeds
that
that
pulled
in
the
current
chain,
link,
aggregation
and
as
people
add
more,
you
know,
pooled
pay
for
prices
or
any
of
these
other
aggregations.
A
It
could
be.
One
could
deploy
loans
that
use
that,
and
so
the
nice
thing
is,
the
loan
doesn't
care.
The
loan
doesn't
care
about,
which
particular
price
feed
it's
using
the
loan
provider
constructed
that
sold
you
a
loan
where
you
agreed,
which
price
feed
you
were
going
to
use.
That's
the
loan
you
got
and
and
and
there
was
agreement
on
the
underlying
components
that
would
be
plugged
in
for
your
loan.
A
Okay.
So
I'm
now
going
to
go
into
some
code,
we'll
look
at
the
structure
of
the
contract.
Every
contract
starts
with
is
just
a
javascript
module
that
implements
a
start
function.
A
A
There
is
an
offer
handler,
so
in
an
auction,
I've
got
the
seller
and
I've
got
bidders
so
there'd,
be
an
offer
handler
for
the
seller,
there'd
be
an
offer
handler
for
bidders
and
then
for
that,
for
each
of
those
participants,
I'm
going
to
make
an
invitation
to
come,
take
a
seat
at
the
table.
That's
why
we
call
this
argument
to
the
offer
handler
a
seat.
Is
you
get
invited
to
take
a
seat
at
the
table
for
this
contract,
and
that
seat
is
how
the
handler
will
figure
out?
What
did
you
pay?
A
You
know,
what
are
you
currently
offering?
What
do
you
want
for
it
and
engage
in
the
behavior
in
response
to
your
request
to
participate
in
this
particular
contract?
A
There
is,
then,
a
creator
facet,
which
is
the
object
that
will
be
handed
back
to
the
creator
of
this
contract,
so
they
can
start
it
off,
so
they
can
create
the
initial
invitations
and
hand
them
out,
so
they
can
go
and
you
know,
create
a
seller
seat
and
and
sell
it
on
on
on
some
other
market
or
whatever
it
is,
and
then
finally
that
gets
returned
creator.
Fascist
is
one
of
the
main
things,
but
you'll
see
a
few
others
like
the
public
facet.
A
That
would
then
be
available
to
any
participant
in
the
market
and
a
few
other
options,
but
that's
the
core
structure
of
it.
So
now,
let's
look
at
some
content
like
this.
Let
me
bring
up
my
oh.
I
guess
it
would
help
if
it
was
on
the
right
window
here
there
we
go
and
let
me
zoom
this
in
a
little
bit
okay.
So
this
is
a
voting
contract.
A
A
So
let
me
bring
up
the
outline
here
and
note
that
this
is
just
standard,
the
the
standard
vs
code,
where
each
of
these
operations,
you
know,
has
type
information
I
get
command.
Completion
whoops
could
help
us
find
type
correctly
right,
make
invitation
you
know
which
has
all
the
arguments
etc.
Okay,
so
you
can
see
here's.
A
A
Okay.
So
what
does
this
election
do?
Well,
it
starts
with
its
setup
where
it
has
a
you
know:
let's
open
the
is
the
election
open,
it
has
a
map
from
from
voter
seats
to
their
responses,
and
finally,
there
is
the
handler,
as
I
mentioned,
so
what
does
the
hammer
have?
Well,
it
gives
the
user
a
object
when,
when
the
user
accepts
the
invite
to
sit
at
the
table
for
this
vote,
that
invokes
this
handler
and
they
are
returned
this
object,
which
will
be
an
object
that
lets
them
vote.
A
So
I
I
sat
at
the
table.
I
get
back
an
object
now.
It's
got
a
vote
button
where
I
can
pass
in
yes
or
no
okay
and
that's
that's
what
it
takes
to
do
voting,
but
the
authority,
the
weight
of
my
vote
is
tied
to
the
assets
that
I
provided
in
my
offer
here.
So
so
this
this
vote
handler
gets
invoked
when
the
user
makes
an
offer
their
offer
is.
I
will
lock
up.
You
know
30
000
tokens
here.
A
If
you
give
me
back
a
vote
handler
and
as
soon
as
I
exit
and
get
my
30
000
tokens
back,
my
vote
stops
counting,
so
I
better
leave
it
there
for
the
duration
of
the
vote,
the
creator
facet,
the
person
who
created
this
vote
has
an
operation
which
is
to
close
an
election
where
they
can
then
tally
the
set
of
yes
notes,
yes,
votes
and
no
votes
and
returned
overall.
What
did
this
vote?
Did
this
vote
finish
right?
You
know
what
what's
the
value
value
at
the
end
of
the
vote.
A
Now,
I'm
not
showing
here
the
the
elaboration
of
this,
where
it
then
also
has
the
function
that
will
be
invoked
and
maybe
it
does
function
that
will
be
invoked
when
the
vote
completes
I'll.
Show
you
that
in
a
moment,
but
that's
the
basic
structure
of
this
and
you
know,
there's
usually
there's
there's
test
cases
and
various
things
that
glue
it
all
together
and
you
can
run
automated
tests
on
this
stuff
and
that's
how
we
build
components
and
how
we
have
reusable
components.
A
Now,
let
me
show
a
little
bit
about
how
we
would
use
this
in
the
system.
So
that's
just
our
quick
flash
of
real
code
and
that's
you
know
the
simplest
voting
contract.
We
can
have
let's
talk
about
where
we
go,
where
we
go
from
here,
so
that
baked
in
a
couple
of
key
choices
there
and
I
believe,
by
the
way
my
talk
will
run
a
little
long.
So
I
apologize,
but
I
think
it's
worth
hitting
all
of
these
points
rather
than
rushing
here
so
that
you
know
so.
A
First
is:
is
you
know
what
is
the
voting
authority
in
this
particular
case?
You
know,
on
what
basis
do
you
vote
here?
It
escrowed
tokens
it
escrowed
collateral,
and
that
would
be
whatever
that
vote
was
constructed
to
require
it's
not
just
that.
I
stuck
random
tokens
in
that
vote
had
a
particular
underlying
asset
that
it
was
looking
for.
That
is
the
thing
that
you
would.
You
would
escrow
in
the
in
the
offer,
and
so
I
present
those
tokens
and
that's
escrowed
with
the
vote,
but
there
are
others
it
could
be.
A
A
Yep
he's
got
40
000
tokens
stored
right,
so
so
I
so
what
we'll
get
be
presented
is
not
the
tokens
directly,
but
rather
an
affidavit
david
from
the
the
the
trusted
source,
which
is
itself
an
nft
in
this
system
that
that,
or
maybe
it's
a
fungible
token
in
the
system
that
can
be
used
by
by
a
particular
voting
instrument,
and
so
it's
easy
to
build
that
in
the
same
libraries
that
these
original
systems
were
built
in.
A
You
know,
so
that's
where
we
get
state
token
vouching,
but
the
same
mechanism
could
be
used
for
the
lockup
of
tokens
inside
of
your
smart
contract.
That
allow
you
know
that
is
the
liquidity
token
for
your
amm
or
whatever.
It
is,
then
there's
what's
the
decision
right
in
this
particular
case?
Well,
you
know,
how
is
the
decision
made
for
a
particular
voting?
The
obvious
one
is
the
voting.
Is
you
know,
dean
decides.
I
click
on
yes
or
no,
and
that's
the
only
thing
that
happens.
Obviously,
in
our
case
we
had
other
choices.
A
It
was
a
simple
majority
where
it
was
going
to
return.
You
know
yes,
one
and
and
here's
its
percentage,
but
it
could
be
that
it
converts
to
using
an
oracle
for
a
given
governance
decision.
There
may
or
may
not
be
a
vote.
It
might
be
that
we
move
from
voting
to
yeah
we're
not
going
to
vote
on
the
the
the
the
interest
rate
required
by
the
bank.
A
We're
gonna
go
and
you
know,
get
an
oracle
from
chain
link
for
what's
libor
today
and
it'll
be
libor,
plus
one
percent
or
minus
one
percent,
whatever
it
is
right,
and
so
so,
switching
from
voting
to
some
other
automated
smart
contract,
that's
still
governance
and
the
nice
thing
is
your
underlying
smart
contract
doesn't
care
you're
going
to
plug
in
something
that
says,
here's
the
governance?
Today
we
decided
we
decided
by
running
the
smart
contract
that
plugged
it
in
and
finally,
when
is
it
done
right?
A
In
this
case
there
was
the
closed
election
operation
that
the
operator
of
the
governance
token
got
to
do
you
know
in
in
other
people's
cases,
it
might
be
some
particular
day
in
november,
which
particular
day
has
yet
to
be
determined,
but
some
particular
day
in
november.
It
might
be
yo.
So
that
would
be
a
time
based
one.
You
know
there.
It
might
be
periodic
we're
gonna
have
the
same
vote
every
month
on
on.
What's
the
change
to
the
governance
token
or
whatever
it
is,
and
so
these
are
all
options
for
governance.
A
Okay.
So
what
is
that?
What
might
that
concrete?
Concretely
look
like
that
loan
example
that
I
mentioned
right:
it's
a
smart
contract.
It's
got
some
term,
which
is
the
margin
required.
So
let's
say
you've
got
to
have
120
of
collateral
to
cover
your
loan.
Otherwise
it's
automatically
going
to
liquidate.
So
that
means
somewhere.
There
is
a
you
know
where
120
is
the
starting
number
so
somewhere
in
that
loan
contract
is
a
if
the
collateral
to
loan
ratio
is
less
than
the
margin
required
is
less
than
120
percent.
Then
we're
going
to
liquidate
the
loan.
A
Now
we're
not
going
to
talk
about
that
in
our
loan
contract,
the
liquidation,
it
just
goes
and
sells
it
on
a
market
that
it
was
told
to
sell
it
on,
and
the
loan
contract
itself
doesn't
have
to
know
what
that
was.
It
got
constructed
with
it
and
parameterized
with
it,
so
your
loan
versus
my
loan
might
liquidate
in
different
places
right
and
so
and
so
and
then
it
sets
up
the
margin
requirement.
Well,
how
are
we
going
to
change
that?
The
nice
thing
is
this
is
javascript.
A
We've
got
all
sorts
of
way
to
change
it
and
there's
millions
of
programmers
that
will
understand
how
to
put
that
together
right.
So
a
simple
update
function,
a
simple
object
that
gets
exported
from
the
loan
contract
and
provided
into
governance
is
now
something
that
the
governance
contract
once
it
decides,
could
go
ahead
and
call
this
to
say:
here's
the
new,
the
new
margin.
A
So
let's
say
I
want
to
update
it
to
125
from
120
because
we're
in
a
volatile
time
of
the
market
or
110,
because
everything's
sailing
smooth-
and
you
know,
102,
because
we
realize
that
both
of
these
are
our
stable
coins
and
we're
getting
a
loan
one
stable
coin
from
another
stable
coin.
All
of
those
are
entirely
plausible.
The
loan
contract
doesn't
care.
It
just
needs
to
be
told
what
the
what
the
margin
is,
but
you
know
that's
pretty
raw.
I
could
change
it
to
80.
That
seems
like
a
bad
idea.
A
So
what
if
I
you
know
so
the
nice
thing
is
the
loan
contract
could
build
in
particular
requirements
where
it's
it's
doing.
An
assert
here
that
yeah,
you
can't
have
80,
you
could
have
101
right,
but
you
can't
have
80,
so
you
can't
go,
go
below
a
certain
certain
amount
and
now,
no
matter
what
governance
decides,
it'll
turn
around
and
try
and
apply
it
and
the
contract
is
providing
its
users
assurance
of
the
limits
of
that
number
independent
of
governance.
Right,
that's
really
nice
or
independent
of
the
simple
parameter
governance.
A
Obviously
there
might
be
an
upgrade
the
contract,
what
have
you?
But
that
means
this
mechanism.
Has
these
nice
limits
built
in
and
so
now
that's
the
mechanism
by
which
the
contract
is
enabling
arbitrary
governance
process
to
set
a
new
margin
requirement.
A
Excuse
me,
so
the
question
is:
do
we
raise
the
mmr
125
percent?
The
vote
is
start
an
instance
of
that
majority
vote
installation
right
in
a
gorick.
You
know
that
when
you've
got
a
smart
contract,
it
is
installed
once
and
that's
making
the
source
code
be
something
that
hasn't.
You
know,
has
a
specific
object
on
chain
that
you
can
start
to
add.
You
know
security,
for
you
know,
security,
assertions
for
and
various
things
to
provide
people
assurance
that
if
you're
running
this
source
code
you're
getting
the
behavior,
you
expect.
A
A
This
governance
process
just
awaits
for
that
vote,
and
that
might
be
two
days
that
might
be
a
month
whatever
it
is
that
just
sits
there
and
waits
for
the
vote,
and
once
the
vote
happens,
if
the
decision
was
yes,
it
did
invokes
that
mmr
set
function,
that
we
got
through
the
terms
which
I
didn't
show
here.
But
you
know
we
talked
about
it
in
the
previous
slide
here
that
mmr
set
function
and
calls
it
125,
which
will
pass
the
assertion,
and
so
the
the
number
will
get
updated
right.
A
So
that's
how
it
gets
wired
together
for
this
particular
installation
of
voting,
and
the
nice
thing
is
my
my
overall
governance
of
this
long-term
loan
contract
has
access
to
the
update
margin
function,
but
it
might
be
running
a
vote
every
week
to
decide
what
the
margin
is
for
a
particular
asset,
or
it
might
be
any
number
of
different
mechanisms.
The
nice
thing
is
this:
loan
contract
doesn't
know
it
exported
this
object
to
governance.
It
was
instantiated
saying
this
is
the
thing
that
this
is
the
process.
A
That's
going
to
govern
you
and
that
governance
thing
is
going
to
instantiate
as
many
votes
as
it
wants.
The
loan
contract
doesn't
need
to
know
about
that.
It
just
gets
updated
as
appropriate
as
things
happen
and
that's
where
plugable
mechanisms
start
to
come
in
where
any
one
of
these
might
be.
You
know
right
now
we're
voting
based
on
majority.
The
governance
process
then
decides
it
wants
to
use
a
different
process.
Super
majority,
an
electorate
whatever
it
is
so
that
lets
us
do
a
fundamental
thing
of
separating
the
concerns.
A
By
separating
the
concerns
that
doesn't
mean
sweep
a
concern
under
the
rug
that
doesn't
mean
ignoring
you
know
the
volatility
and
cost
of
execution
or
any
of
that
stuff,
it
means
separating
them
out.
So
here
the
decision
mechanism
was
the
vote
and
that
we
could
use
different
decision
mechanisms
right.
The
change
to
make
is
represented
by
the
updater,
and
the
nice
thing
is
the
same.
A
Voting
mechanism
could
be
used
with
different
updates
to
update
different
parameters
and
the
triggers
are
managed,
the
decision
of
when
to
vote,
how
to
vote
what
the
parameters
are
are
are
embodied
in
a
in
a
contract
itself.
Right
in
this
particular
thing
right.
These
are
separate
smart
contracts,
independently
instantiated,
where
you
can
have,
you
can
evolve
new
ones.
You
can
change
over
time.
A
So
a
lot
of
that
then
brings
you
to
that
whole
meta
governance
thing
where
the
policy
and
process
for
a
decision
could
change
over
time,
where
we
go
from
directly
voting
on
parameters
to
instantiate,
changing
the
governance,
so
we're
voting
on
a
dow
that
will
drive
it
and
that
dow
is
funded
by
some
other
token
or
moving
from
the
dictator
decides,
or
a
set
of
small
multi-sig
keys
to
side
to
transitioning,
to
a
dow
or
to
a
committee
and
extending
that
multisig.
A
So
that's
that
changing
of
that
decision
mechanism
and
change
the
triggers
right
we
can.
We
can
go
from
voting
every
week
on
a
periodic
basis
to
voting
when
the
market
changes
just
enough
and
that
can
all
be
automated
in
the
governance
contract
where
it
sets
up,
and
originally
it's
got
a
periodic
clock.
And
now
it's
watching
you
know
the
the
the
the
the
price
oracle
for
for
the
time
for
the
price
to
change
on
some
underlying
external
oracle.
Coming
in
from
you
know,
chain
links,
gold
price
or
whatever.
A
It
is
so
that
lets
us
again
put
these
different
concerns,
including
the
meta
concerns
about
the
process
into
different
contracts
and
reuse
them.
So
if
I
build
a
contract
for
my
particular
my
particular
application,
you
can
pick
that
up
and
use
it
for
yours,
not
by
copying
the
code,
but
by
simply
parameterizing
it
to
use
your
governance
token
rather
than
mine,
and
so-
and
this
is
almost
my
last
slide.
So
what
that
really
means
is
you
know
it's
not
that
one
size
fits
all
it's
a
one.
A
All
the
contracts
for
governance
will
be
the
exactly
these
kinds
of
plugins
that
you
will
be
able
to
use
for
your
smart
contracts,
all
the
ones
that
you
build
now
for
the
apps
that
you're
building
for
the
hackathon.
Please
make
sure
that
they're
structured
is
reusable,
because
then
you
can
use
them,
adapt
them
replace
them
in
your
own
contract
and
other
people
can
build
on
what
you've
got.
A
Having
said
that,
governance
is
very
early
right.
We've
got
innovations
all
the
time.
Some
of
them
are
a
big
deal,
but
we've
got
a
lot
more
to
come
as
we
evolve,
governance
and
and
adapted
to
particular
to
particular
purposes
as
people
come
out
with
new
defy
apps
and
new
new
dapps
that
that
have
different
governance
requirements.
It's
a
very
exciting
time
in
governance
and
what's
important,
is
that
you'll
be
able
to
do
that
in
a
way
that
can
evolve
quickly,
one
if
it's
built
inside
your
contract,
if
the
loan
knew
exactly?
A
How
is
it
going
to
be
governed,
then,
tomorrow
that
loan
is
obsolete
and
we
have
to
go,
go
do
a
whole
new
one,
whereas
if
it's
pluggable,
I
can
reuse
the
same
validated
reviewed
battle
tested
loan
contract
with
a
different
governance
agreement
that
with
limited
control
over
the
parameters
of
that
loan,
and
therefore
governance
must
be
extensible
right,
we're
just
at
the
beginning.
We've
got
a
lot
more
to
build
and
a
lot
more
to
want
to
be
able
to
reuse
with
each
other.
A
So
as
much
as
we
are
building
governance
tokens,
we
know
it's
got
to
evolve
and
we
know
much
of
the
evolution
is
with
developers
like
yourself
is,
with
the
the
millions
of
developers
out
there
that
will
gradually
attract
onto
these
blockchain
systems,
because
now,
in
our
system,
they
can
build
with
the
language
they're
familiar
with
and
in
a
model
they're
familiar
with,
and
so
I'm
going
to
be
as
much
a
customer
of
the
governance
innovation
that
everyone
is
enabled
to
do
as
well
as
obviously
the
defy
innovation,
as
I
am
a
provider
and
I'm
very
excited
that
that
we'll
be
working
together
on
these
kinds
of
things.
A
So
thank
you
very
much
and
please,
you
know
help
us
make
d5
even
more
exciting
and
yeah
a
lot
less
dangerous.
B
So
with
that,
it
looks
like
most
questions
likely
are
gonna
come
in
over
discord,
so
happy
to
engage
async
dean,
I'm
gonna
take
you
down
and
we
will
roll
straight
into
the
next
presentation.