►
Description
🙏 Thank you for watching! Hit 👍 and subscribe 🚩 to support this work
🌱Join the Community🌱
on Discord https://discord.gg/uM4ZWDjNfK
or say hello on Telegram https://t.me/tecommons
Join the conversation https://forum.tecommons.org/
Follow us on Twitter: https://twitter.com/tecmns
Learn more http://tecommons.org/
A
B
A
A
B
Okay,
hey
welcome
everyone,
so
just
so
you
know
feel
free
to
check
out
the
labs
text
channel
in
discord
here
and
there's
a
pin.
You
can
see
pinned
messages
and
at
the
top
there
is
the
labs
agenda
and
it
is
open
for
editing.
So
anyone
can
jump
in
here
see
it
friday
hope
this
looks
like
we
haven't
used
it
in
a
while,
but
that's
okay
august
20th.
B
So
how
was
it
last
week.
B
A
Okay
yeah
so
last
week
was
just
me
and
nicholas,
and
we
just
stream
the
document
and
try
to
make
it
generalized.
Professor
inverter.
A
Yeah,
if
you
go
down,
there's
a
the
specs
to
this
yeah,
so
this
remains
like
similar
to
like
this
dock
was
made
for
streamer
agreement,
but
we
try
to
make
it
generalized
and
this
properties
remain
same
and
we
changed
a
bit
of
not
parameters,
but
maybe
some
a
minor
logic
or
wordings
in
this
whole
talk.
B
A
B
Okay,
so
you
and
nicholas
are:
probably
you
have
the
freshest
minds
on
this,
so
I'm
thinking
today
it
would
be
fun
to
open
up
a
development
environment
and
start
working
towards
a
parameterized
class
that
represents
the
proposal.
Inverter.
B
So
I
can
drive
and
maybe
bk
and
nicholas
you
want
to
kind
of
guide
me
a
little
bit
since
this
is
probably
the
most
fresh
for
you.
B
B
Oh,
I
think
we
forked
one
from
block
science.
A
B
Okay,
so
bk
would
we
be
able
to
see
then
the
difference
here
and
what's
been
updated,
it's
too
bad
that
this
latex
doesn't
render,
but.
B
Okay,
so
is
this
a
fair
place
to
start
anyways?
What
is
this
mark
markdown
file
linked?
Let's
see,
where
does
this
go.
B
I
wonder
if
this
is
synchronized
with
the
repository.
A
B
Okay,
so
let's
work
off
of
this
one
and
anyone
in
this
group
feel
free
to
open
this,
so
I'll
post
this
link-
or
you
could
get
it
from
here.
Let
me
put
these
in
the
agenda
here,
so
we
have
I'll
just
call
this
like
original
hackmd
and
then
this
is.
B
So
these
this
happened
last
week
and
we
have
working
repository
and
the
working
hack,
mv
file.
B
A
A
B
Doesn't
know
how
to
drop
all
changes
reset
something
like
that
all
right,
I
think
so.
Yes,.
B
Okay,
so
I've
got
this
code
here
locally
and,
let's
just
start
so,
did
I
make
a
virtual
environment
I'm
going
to
create
a
new
virtual
environment.
B
B
So
it
seems
like
there's
two
different
versions
of
models
so
far
and
then
the
spec
was
actually
written
later.
So
I
think
the
the
latest
that
we
have
on
the
proposal.
Inverter
is
this
spec,
so
we're
going
to
bring
this
spec
now
back
into
the
modeling
and
we're
going
to
make
it
a
parameterized
class
using
the
python
param
library,
which
gives
all
sorts
of
benefits.
B
When
you
have
a
python
parameterized
class,
it
basically
knows
how
to
render
itself,
so
it
makes
data
visualization
very
easy.
It
also
exposes
web
sockets
behind
all
of
its
parameters.
So
you
can
get
this
really
neat
like
live
interaction,
so
we're
going
to
go
import
param!
Oh
no!
Let's
see
param
param
as
pm.
B
B
We
have
allocated
funds,
unallocated
funds,
total
funds
committed
brokers,
okay,
so
let's
start
with
these
ones
that
don't
have
equations,
I'm
not
sure
what
the
proper
terminology
for
that
would
be.
I'm
thinking
like
first
order
second
order
or
there's
things
that
are
derived
and
there's
things
that
are
more
intrinsic
properties.
So
let's
call
this
total
funds.
B
I'm
gonna
skip
that
for
now
maybe
come
back
to
it.
Number
of
brokers
is
the
size
of
the
set
of
brokers.
Oh
so
I
think
we're
going
to
need
a
class
called
a
broker.
B
B
B
Epoch
length,
epoch,
length,
delta
t
now
we
might
want
to
use
constants
so
how
many
seconds
in
a
day,
there's
60
in
a
minute
60
minutes
in
an
hour
24
hours.
B
In
a
day,
so
that
would
be
seconds
in
a
day
that
might
be
what
we
want:
minimum
epochs
dow.
A
So
that's
the
length
each
broker
has
to
work
on
for
this
project.
A
A
A
B
So
is
that
is,
it
is
a
I
then
delta,
a
divided
by
number
of
brokers.
A
A
Weight
think
in
this
act
there
wasn't,
but
it
should
in
the
in
the
picture.
It
should
be
implemented
or
implementable.
A
Realized
realistically,
it
would
make
sense
to
have
weights,
but
for
now
we
can
simulate
with
this.
B
B
Let's
get
allocated
funds,
so
the
first
thing
I'm
thinking
about
is
brokers
dealing
with
brokers.
So
maybe
we
want
to
have
a
function
that
is
like,
add
a
broker
or
remove
a
broker.
B
Def
add:
broker
b;
okay,
let's
make
a
class
broker
class
and
broker.
We
can
make
this
parameterized
as
well.
A
A
B
Later
add
the
weights
for
each
of
the
brokers-
oh
okay,
yeah
and
each
broker
can
have
a
wallet
too.
So
when
we're
really
modeling,
this
it'll
be
interesting
to
see
the
average
wallets
of
the
brokers.
B
A
B
B
So
if
we
have
our
proposal,
inverter
dot,
committed
brokers,
it's
an
empty
set
and
we
can
go
p
dot.
Add
broker
now
we'll
need
a
broker,
so
we'll
say:
b1
equals
broker.
B
Object,
selector!
No,
I
don't
think
that's
exactly
what
we
want.
B
Cool,
so
we
have
our
proposal
inverter,
that
has
a
set
of
brokers,
so
we
can
start
probably
computing.
Some
of
these
things.
B
So
we
can
now
get
number
of
brokers.
Okay,
let's
get
that
death
number
of
brokers.
A
B
A
B
So
we
need
to
maintain
the
state
basically
for
each
broker.
Okay,
so
once
a
broker
is
committed,
then
after
one
epoch
they
have
access
to
ai
funds.
B
B
B
B
I
wonder
if
there's
like
brownie
or
what's
has
anyone
played
with
ethereum
in
python?
I
really
just
want
to
generate
a
random.
B
A
B
B
B
So
I'm
just
gonna
make
a
function,
generate
account.
B
B
It's
gonna
go
private
public
equals
generate
a
key
account
and
self
dot.
Private
equals
private
and
self
dot
public
equals
public,
and
then
we
can
have
a
broker
be
an
account
using
inheritance.
A
A
A
B
Oops
bro,
so
I
still
want
to
broker
yes.
B
So
now
we
have
a
broker
with
a
certain
amount
of
funds,
and
it
should
also
have
a
public
key.
B
B
Sweet,
so
I
think
what
we
want
is
okay,
so
we
can
set
a
particular
owner
for
the
proposal.
Inverter.
A
B
Okay,
an
actor
within
the
streamer
ecosystem
can
deploy
a
new
agreement
contract
by
specifying
which
stream
the
agreement
supports,
setting
the
parameters
of
the
smart
contract,
providing
initial
funds
and
providing
any
unenforced
commitment
to
continue
topping
up
the
contract
as
payer
under
as
long
as
a
set
of
slas
are
met
for
the
purpose
of
this
draft.
It
is
assumed
that
the
contract
is
initialized
with
some
quantity
of
funds.
F
such
that
h
is
greater
than
h,
min
and
that
beta
is
empty.
B
B
Why
are
we
trying
to
inherit
the
wallet
instead
of
having
it
as
a
field.
B
Nothing
really
comes
to
mind
other
than
just
like
intuitive
grasp,
like
I
think,
maybe
a
broker
having
a
wallet
as
a
property
might
be
easier
to
reason,
rather
than
a
broker
being
a
wallet.
But
that's
just
that's
just
like
reasoning.
You
know
in
terms
of
actually
implementation
and
walls
that
we
might
hit.
I
don't
foresee
any
right
out
right
off
the
bat,
although
there's
always
unforeseen
walls,
so
yeah.
I
think
both
would
work
just
fine
until
they
don't.
B
A
B
Yeah
off
the
bat
it's
usually
good
to
just
I
I
find
the
inheritance
is
a
little
bit
less
syntax,
it's
pretty
pretty
easy
and
minimal
code,
and
so
I
just
I'd,
prefer
it
yeah.
B
What
do
you
guys
think
we
should
do
next?
Should
we
go
through
like
the
initialization
and
assigning
an
owner
and
a
payer,
or
should
we
work
on
so
we
could
also
work
on
state
change.
B
Let's
see
what
it
says
here
for
broker.
Oh
here's
like
joining
brokers,
oh
joining
the
agreement.
So
basically
we
have
to
go
through
each
one
of
these.
That's
documented
and
create
a
method.
B
B
B
B
B
And
we
could
just
set
it
to
the
wallet,
but
maybe
we'll
use
the
address
the
waltz
public
address
and
if
so,
we
want
to
make
sure
that
the
wallet
is
called
owner.
B
We'll
call
this
owner
address
and
if
owner
dot
funds
is
greater
than
or
equal
to
initial
funds,
we'll
just
label
this
as
a
float,
then.
B
Self
dot
owner
dot
funds
minus
equals
initial
funds
and
self
dot.
Okay,
now
we
have
f
total
funds.
B
B
Total
funds-
and
I
think
zero-
should
actually
be
the
default
and
then
once
we
initialize
and
if
the
owner
has
sufficient
funds,
then
we
subtract
them
from
the
owner
and
we
give
ourselves
total
funds.
B
B
In
any
wallet,
but
we
should
be
able
to
say
something
like
funds
equals
200.,
oops,
okay,
might
not
use
this.
I'm
just
gonna
call
it
a
wallet.
A
B
May
need
to
pass
it
into
the
constructor
and
reassign
it.
I
know
it
I
it's
because
so
when
you
have
an
initialization
function
on
a
parameterized
class,
you
need
this
little
bit
of
syntax.
B
A
B
Yeah
because
we're
inheriting
from
parameterized
class,
so
if
we
define
our
own
init
function,
we
have
to
make
sure
we
call
our
parents
init
function
based
on
params.
So
now
this
pers.
This
is
unpacking
this
input
and
passing
it
forward
to
the
parameterized
classes.
Initialization
function,
because
that's
our
parent.
A
B
Okay,
so
we
have
an
owner,
we're
gonna,
say
owner
equals,
patrick
and
initial
funds
equals
500.
B
A
B
B
A
B
B
B
A
okay,
so
I
I
wanna,
I
would
love
to
make
this
out
a
function
for
a
which
is
gonna
return,
zero.
Initially,
let
me
see
if
this
works
I'll
call,
it
get
allocated
funds
and
it's.
B
Is
this
something
we'll
have
to
do
on
every
time?
Every
epoch
right
is
like
check
for
each
broker
and
increment
their
claimable
funds,
something
like
that.
B
B
And
we
could
just
kind
of
hard
code
this
off
the
bat,
because
we
know
that
r
is
going
to
equal
f.
So
we
could
just
do
a
hard
check
in
the
beginning,
but
I
think
it's
good
if
we
actually
make
the
generalized
functions
and
then
just
call
them
in
the
constructor
to
verify
the
property
with
the
horizon.
B
B
I'm
going
to
read
this
quickly
synthetic
state
change.
The
synthetic
state
changes
the
change
the
contract
state.
That
is
not
realized
until
later.
In
this
case,
the
automatic
allocation
of
funds
from
the
pool
r
to
the
pool
a
is
implicit
for
reference,
see
geyser
contracts.
Although
rewards
each
participant
is
entitled
to
are
deterministic,
they
are
not
actually
resolved
until
they
make
a
claim,
see,
broker
actions
per
epoch,
t
of
length,
delta
t,
let
beta
t
or
bt
be
the
set
of
brokers.
B
I
contained
in
b
for
the
entirety
of
the
epoch
and
if
nt
equals
the
size
of
bt,
which
is
greater
than
n-min.
So
there's
at
least
as
many
contractors
that
we
need,
then
the
updated
ai
equals
ai
plus
this
is
it
it's
even
distribution,
so
there
so
okay
cool.
So
we
have
allocations
per
epoch,
okay,
okay,
so
a!
I
is
because
we're
keeping
things
simple
and
it's
a
even
uniform
distribution,
then
we
can
make
this
function,
which
is
def,
get
broker,
claim.
A
B
Because
a
I
is
they,
we
should
add
it
here
there
we
have
a
definition
for
ai.
It's.
A
Yes,
I
think
we'll
have
to
to
track
each
yeah
each
because,
if
not,
if
we
just
divide
when
somebody
claims
before
somebody
else
and
their
passes
an
epoch
or
something
it
could
kind
of
affect
everybody.
B
B
Okay,
and
so
when
we,
when
we
add
a
broker
okay,
so
also
we
got
one
minute
here.
I
think
I'm
gonna
keep
working
on
this
if,
as
long
as
my
schedule
is
open,
so
if
anyone
wants
to
stick
around
feel
free-
oh
no,
I
have
to
go.
I
have
something
yeah
I'll
push
all
this
to
the
github
repository
and
everyone
can
check
it
out
and
yeah
looking
forward
to
making
some
sweet
progress
on
this
over
the
next
few
weeks.
I
think
I'll
I'll
work
on
this
a
little
bit.
B
Yeah
I'll
I'll
post
in
the
labs
channel
after
I
push
this
to
github
and
anyone
can
feel
free
to
sort
of
pick
it
up
and
we
can
even
sort
of
maybe
maybe
next
week
we
can
actually
split
up
like
split
up
different
components
of
the
work
and
all
work
on
it
in
parallel.
Let's
do
that
actually.