►
From YouTube: Project Lilypad: On Chain FVM Smart Contracts Invoking Off Chain Compute Over IPFS - Wes Floyd
Description
Compute networks like Bacalhau have enable users to execute trustless tasks over immutable data stored in IPFS. Now with Project Lilypad, developers can create full stack immutable applications by combining the the programmability and payments of FVM smart contracts with the off chain immutable infrastructure of IPFS and Bacalhau.
In this talk we'll cover the architecture of Project Lilypad and some fun new use cases it enables such as generative art (Project Waterlily), community building with generative NFTs, and enhanced Decentralized Finance (DeFi) primitives.
--
IPFS þing is a week-long gathering for the IPFS implementers community - April 2023, Brussels, Belgium.
A
Thank
you
all
for
joining
our
session,
as
Arena
mentioned,
we're
very
passionate
about
off-chain
compute
off-chain.
Compute
is
really
only
interesting
when
you
can
tie
the
trustlessness
guarantees
of
a
distributed
consensus
technology
like
fevm.
So
my
brief
session
is
going
to
talk
about
the
power
of
onchang
State,
bridging
it
to
invoke
off
chain
compute.
We
really
want
to
have
the
best
of
both
worlds.
We
want
to
have
our
cake
and
eat
it
too,
and
of
course,
please
go
to
our
GitHub
page
check
us
out
smash
the
like
button
and
all
that
good
stuff.
A
So
this
session
is
really
about
making
your
hearts
giving
you
what
you
get
making
your
dreams
come
true
effectively.
So
from
a
demo
perspective,
these
are
some
things
that
I
love,
I
love
the
movie
Back
to
the
Future.
Does
anybody
else
like
Back
to
the
Future
yeah
yeah?
Thank
you.
Thank
you.
I.
Also
like
19th
century
French,
modernist
painters,
I,
don't
know
if
you
guys
knew
that
about
me.
That's
that's
just
that's
the
thing
on
me.
A
A
You
can
think
of
it
as
sort
of
an
L2.
It
has
a
lot
of
ties
to
to
evm.
If
L1
is
the
sort
of
the
the
falcoin
chain
or
the
virtual
machine,
there
Pacquiao
would
exist
as
a
layer
on
top
of
it
and
there's
definitely
some
like
you
know,
debate
about
how
those
fit
together
but
effectively.
This
is,
is
how
I
want
you
to
have
sort
of
a
mental
model
of
compute
project.
Lily
Pad
is
the
first
component
to
invoke
bapio
from
any
smart
contract.
A
Hopefully
you
will
be
building
fvm
smart
contracts
soon,
if
you're
not
already
and
when
you're
building
those
smart
contracts,
you
might
think
wow
I
want
to
be
able
to
invoke.
You
know
some
communication
with
the
outside
world
or
I
want
to
do
some
complex,
math,
it's
too
heavy
to
fit
into
my
smart
contract.
In
fact,
this
is
actually
a
really
important
turning
point
for
web3
in
general.
There
there
are
a
few
off-chain
Solutions,
off-chain,
decentralized
compute
platforms
today,
but
being
able
to
invoke
them
from
a
trustless
chain
is
a
very
unique
thing.
A
So
this
is
one
of
the
first
projects
to
ever.
Let
you
do
this,
and
hopefully
this
will
inspire
you
to
come
up
with
your
own
interesting
project
ideas,
and
so
yes,
this
this
project
itself
The
Source
codes
available.
Please
check
it
out
at
lilypad
on
the
GitHub
URL
there,
and
just
to
give
you
a
brief
walkthrough
of
how
this
is
going
to
work
from
the
contract
that
you
write,
you're,
going
to
invoke
a
back
of
your
job
you're,
going
to
call
this
Lily
Pad
contract
through
an
interface
that's
easily
available.
A
Lilypad
contract
isn't
going
to
broadcast
an
event
to
the
fvm
chain.
It's
going
to
actually
do
I'll
forget
the
specific
function.
I
think
it's
dot,
send
it
anyways
it's
going
to
put
that
function
on
chain
so
that
it's
written
it's
it's
broadcasted
on
chain,
there's
a
demon
right
now,
which
is
the
bridge
between
lily
pad
and
and
the
compute
nodes,
which
is
going
to
be
listening.
For
that
event,
it's
going
to
say:
oh
okay,
someone
created
a
request
to
run
an
off-chain
compute
job.
Then
it's
going
to
actually
run
this
job
here.
A
Number
three
and
number
four
is
going
to
be
something
like
maybe
a
standard
CLI
in
vacation.
It's
it's
very
close
to
native
to
the
backyard
network.
Over
time.
You'll
probably
see
these
consolidate
a
bit
more
there's
opportunity
to
further
decentralize
and
such,
but
this
is
just
a
good
kind
of
like
initial
implementation,
for
for
reference
in
the
backyard
network
will
actually
run
the
job.
Most
importantly,
it
will
return
the
results
to
its
preferred
medium
of
storage,
which
is
ipfs
in
this
case.
A
So
the
data
is
going
to
live
on
ipfs,
it's
going
to
post
that
back
to
the
lilypad
contract
and
then
the
user,
the
user
results
will
be
returned
to
the
user
contract,
so
that
contract
has
then
requested
some
off-chain
compute.
It's
happened.
Now
the
results
come
back.
You
could
do
some
very
interesting
things
with
it.
We'll
show
you
guys
some
examples
here
in
a
minute,
and
then
you
celebrate
you
have
your
your
results,
ready
to
go
so
project
water
lily
in
order
to
showcase
the
power
of
this
end-to-end
capability.
A
A
So
if
you've
never
heard
of
stable
diffusion,
the
terminology
comes
from
when
you
take
die,
drop
it
into
water
and
then
the
dye
slowly
stabilizes,
effectively
kind
of
an
interesting
funky
looking
color
mesh.
This
is
very
similar
technique
that
they
use
for
stable,
diffusion
and
image
generation.
Where
you
start
with
a
lot
of
noise
and
over
time,
you
will
find
that
that
randomly
generated
noise
to
an
image
that
matches
a
text
prompt
that
you
get
it.
A
So
in
this
case,
this
is
a
person,
that's
half
Yoda,
half
Gandalf
over
a
series
of
iterations
through
the
machine
learning
model
it
actually
gets
to
something
that
looks
like
Yoda
and
Gandalf.
Now
that
computation
is
important,
because
this
is
an
example
of
a
computation.
That's
way
too
large
to
happen
on
a
smart
contract.
Fem
smart
contracts
are
very
powerful
because
they're
trustless
and
they're
verifiable,
but
they're
not
as
open-ended
they're,
not
as
you
can't
do
arbitrary
compute
like
this.
A
So
this
isn't
a
good
example
of
what
you
want
to
do,
and
here's
an
example
of
what
these
might
look
like,
or
you
say
for
adding
to
a
stable
effusion
a
thing
called
neural
style
transfer
where
you
say:
okay,
I
have
a
picture
here
of
a
nice
car
out
in
the
distance
and
then
I
want
to
apply
a
classical
painter
style
to
it.
A
So
if
you
will
open
up
your
browser
to
waterlily.ai
we're
going
to
pull
up
a
quick
demo
of
the
water
lily
capability
here-
and
this
is
publicly
available
right
now-
you
can
use
the
mainnet
version,
which
is
just
Waterlily
dot
AI.
You
can
also
go
to
water
lily
and
add
in
a
network
filecoin
hyperspace,
and
you
can
start
working
with
it.
You
can
type
in
some
text
here
in
this
case,
I
want
rainbow
unicorn
and
then
what
you'll
do
is
you'll
choose
an
artist
whose
work
you
want
to
or
style.
A
Rather,
you
want
to
apply
to
your
generated
image:
we've
pre-built
these
models
with
artists
in
the
past.
So
when
I
choose,
let's
say
Tanya
here
in
this
case
is
some
examples
of
the
different
types
of
artists
we've
taken
backlog
of,
let's
say:
40
images
from
those
artists
and
we've
trained
their
style.
So
what
we're
doing
here
in
this
case
when
I
say
generate.
B
A
This
is
invoking
the
contract
on
fem
first
that
contract.
Let
me
go
back
to
the
visual
here,
so
I
have
to
use
my
hands
too
much.
We're
calling
that
contract
on
the
fem
network
fvm
is
then
going
to
build
the
style
transfer
and
the
stable
diffusion
on
the
back
end.
It's
going
to
return
our
results
to
lilypad
contract
and
we're
going
to
see
our
output
here
in
user
experience.
Let's
say
rainbow
unicorn
with
lasers,
it's
going
to
be
a
very
powerful
rainbow
unicorn.
A
Okay,
it's
going
to
submit
the
job
to
the
fem
Network.
It's
going
to
prompt
me
to
pay
NT
fill
here:
okay,
it's
not
too
expensive
fraction
of
t-fill!
So
I'm
going
to
confirm
that
now
it's
going
to
create
the
transaction
on
fem
fem
is
going
to
go
through
its
process
and
it's
going
to
invoke
bacao
on
the
back
end,
but
like
any
good
demo,
this
is
going
to
be
a
bit
of
a
baking
show.
A
So
I
want
to
show
you
guys
some
results,
some
examples
of
what
it
looks
like
so
coming
back
to
our
slides
here.
This
is
an
example
of
saying:
let's
take
the
style
of
some
public
domain
artists,
in
this
case
some
18th
century
hand-drawn
art
and
generate
some
fun.
Images
like
this
is
what
Barack
Obama
would
look
like
if
that
artist
had
drawn
it
or
Mickey
Mouse
in
this
case,
and
so
for
me,
my
favorites
DeLorean,
4x4
and
off-road
this
is
this
is
my
dream.
A
This
is
what
I'm
gonna,
hopefully
be
able
to
buy
one
day
when
someone
decides
to
make
it,
but
until
then
this
is
this
is
the
the
next
best
thing.
So
hopefully,
this
gives
you
a
good
sense
of
invocating
these
arbitrary
large
compute
jobs
off
chain,
but
still
with
the
trustlessness
and
the
verifiability
of
fvm.
There's
a
lot
more
that
we're
going
to
start
building
with
this.
So
there's
a
lot
of
projects
in
the
greater
web
through
ecosystem
that
can
benefit
from
this
capability.
A
There
are
a
number
of
dowels
that
we
work
with
where
they
want
to
enhance
or
I
would
say,
augment
their
existing
membership
capability.
We
have
a
group
that
we
work
with
in
the
science
space
that
says
you
know
if
we
could
do
some
off-chain
bioinformatics
workloads
to
to
simulate
protein
folding
and
then
maybe
capture
that
as
like
an
nft
and
then
our
members
will
have
this
nft
of
this
unique
science
work
that
they
generated
off
chain.
That
would
be
a
fun
kind
of
validation
of
their
membership.
A
We
have
some
folks
that
work
in
the
defy
space
that
generate
very
high
quality
data
sets.
You
know
one
of
the
things
that
the
D5
space
is
always
chasing
is
better
yield,
better
returns.
Where
should
I
put
my
money
in
different
D5
projects
and
in
today's
world
most
of
these
smart
contracts,
even
the
best
order.
A
Routers
rely
on
computations
that
have
to
happen
on
chain
using
current
state
data,
but
the
big,
the
big
next
threshold
for
Defy
is
to
say:
if
I
can
take
into
account
all
the
history
of
the
ethereum
chain
and
I
can
make
them
more
complex.
Calculations
like
you
would
do
in
high
frequency
trading,
for
example,
you
can
make
more
sophisticated
decisions.
You
can
increase
your
yield,
et
cetera,
et
cetera,
et
cetera
and
then
lastly,
one
interesting
one
is
decentralized.
Social
media
has
anyone
heard
of
blue
sky
or
lens
protocol
in
the
audience.
A
Okay,
that's
about
at
least
half,
maybe
more.
So
this
is
a
tremendous
burgeoning
space
and
in
the
sense
of
of
social
media
you
may
want
to
be
able
to
not
have
to
rely
on
the
tech
companies
determination
of
what
content
you
should
see
being
fed
by
their
algorithm.
You
may
want
to
have
your
own
algorithm
and,
if
that's
the
case,
you're
going
to
need
a
more
complicated,
off-chain
compute
system
to
help
build
your
algorithm
of
feeding
the
type
of
content
that
you'd
like
to
have.
A
A
No,
no
you're
making
a
good
point
for
stable
diffusion.
These
sorts
of
AI
I
mean
even
if
it
was
chat,
gbt
or
llm,
and
things
like
that.
You
do
not
necessarily
have
to
have
fdm
in
general
sense
that
if
you
go
to
the
docs.backayao.org
page,
you'll
see
a
bunch
of
machine
learning,
inference
examples
yeah
like
OCR
and
fun
stuff
like
that,
so
you
can.
You
can
invoke
it
directly
as
well.
So.
B
I
guess
what
I'm
asking
is
like
what?
What
are
you
hearing
from
customers
where
there
are
specific
fvm,
related
off-chain
compute,
that
that
is
that
is
driving
this
okay?
Where
does
customer
demand
come
from
here?
Yeah.
B
A
A
real
player
question,
where
is
demand
coming
from
for
the
combination
of
fem
and
off
chain,
compute,
there's
a
few
in
addition
to
the
sort
of
the
D5
and
the
the
science
example
before
there's
a
couple.
A
Others
where
I
think
Matt
had
alluded
to
these
data
dowels
in
the
past
is
an
important
use
case,
and
so
these
data
Downs,
like
like
one
in
particular
that
I
that
I
try
to
follow
is
one
called
LaGrange
Dao,
with
a
person
named
Charles,
Cal,
Phil,
Swan
team
and
they're
building
a
data
Dao
very
similar
to
the
work
that
ocean
protocol
has
done.
A
Yet
so
fem
provides
that
and
then
it
also
provides
the
sort
of
the
public
Marketplace
built
in
for
those
data
sets
so
I
think
like
with
the
data
dials
and
some
of
the
other
things
that
are
being
built
on
fem
the
off
chain.
Compute
will
be
a
nice
complement
just
to
expand
fvm's
capabilities
generally
I.
Think
that's
probably
where
demand
is
going
to
come
from.
C
I
just
have
a
clarifying
question,
so
where
does
the
I
think
the
previous
talked
about?
Pacquiao
brings
compute
to
the
data.
Where
does
the
data
that
where's
the
model
that
encompasses
the
data
actually
live?
In
this
example,.
C
A
Very
good
question
yeah
and
so
to
Arena's
Point
previously,
like
you
know,
back,
it's
done
a
couple
things
one.
It's
implemented
compute,
along
with
data
that
lives
in
ipfs,
which
may
or
may
not
always
be
native
to
where
the
data
lives,
but
there's
larger
data
sets
that
live
in
filecoin.
Larger
data
sets
that
are
too
expensive
to
move,
and
so,
in
those
situations,
we'd
like
to
send
the
docker
container
workload
or
the
ml
training
workload
to
where
the
data
lives
at
the
filecoin
storage
provider.
How.
A
That's
exactly
the
right
question.
The
way
it's
going
to
work
is
that
initially
the
focus
will
be
on
unsealed
data
sets
effectively
because
there
are
some
depending
on
who
you
ask.
Maybe
50
of
the
data
in
filecoin
might
be
retained
as
an
unsealed
data
set,
so
we'd
like
to
give
them
better
utility,
better
Economic
Opportunity
to
earn
profit
from
those
data
sets
but
longer
term
I.
Think
there's
an
opportunity
for
more
of
like
a
medium
layer
like
a
hot
layer.
A
C
So
like
doing
like
yes,
this
section,
this
sector
is
like
actively
data
that
needs
to
be
actually
worked
on,
I'll
unseal
it
and
make
it
available
to
people
I'm
working
with,
and
then
I'll
put
it
back
into
cold
storage
at
some
point
yes
completely,
and
then
a
completely
unrelated
set
of
questions
so
I
we
were,
my
team
was
working
on
ethereum
back
in
November
and
we
were
working
with
chain
link
in
order
to
do
our
Oracle
queries
for
part
of
our
proof
process.
C
This
seems
like
this
is
like
a
comparable
solution
built
on
ipfs.
How
do
you
kind
of
see
this
like
this
project
as
it
relates
to
something
like
chain
link
and
bringing
that
functionality
to
fvm,
because
we
need
oracles.
A
Yeah,
no
thank
you
for
bringing
that
up
so
I
I'm,
a
huge
fan
of
the
work
that
chain
link
has
done
in
the
Oracle
space.
I
mean
they've
really
like
oracles
have
existed
alongside
chain
link,
but
they've
really
led
the
Forefront.
So
it's
extremely
important-
and
we
were
talking
about
this
on
our
team-
you
know
what
do
we
call
this?
Do
we
call
it
a
bridge?
Maybe
it's
kind
of
a
bridge,
maybe
kind
of
not
because
Bridge
involves
Financial.
A
You
know
you
know
lending
or
financial
bridging,
but
it's
kind
of
an
oracle
too,
because
it's
listening
on
chain
and
it's
providing
trusted.
You
know
results
on
chain.
So
so
so
maybe
we
need
smart
people
to
come
up
with
a
better
name
for
this
type
of
of
integration.
A
This
type
of
bridging
off
chain,
but
yes,
I-
think
using
bakaya
as
a
type
of
an
oracle
is
a
use
case
in
itself
and
I.
Think
all
these
sort
of
these,
these
middle
layers
between
on-chain,
trustlessness
and
off-chain
trustlessness,
and
increasing
the
trust
and
the
closeness
between
those.
You
alleviate
hacking
issues
and
things
like
that
are
extremely
important
chain.
Link's
doing
a
really
good
job
of
leading
with
their
new
decentralized
functions.
A
B
A
You
for
asking
yes
a
couple
options:
please
go
to
our
slack
channel
backyard,
slack
Channel.
We
also.
We
also
have
the
lily
pad
GitHub
repo,
the
back
of
your
GitHub
repo.
We
have
issues
they
can
raise
there
as
well
we'd
love
to
hear
feedback,
questions,
ideas
along
the
way.
It's
very
much
a
community
effort,
question.