[BUIDL Asia 2023] How to Store your Data with Filecoin, IPFS and FVM
Kryptoplanet Talks · 2 Jul 2023 · 23:16
Sarah Thiam, Developer Experience Lead at Protocol Labs, explains how to store data with IPFS, Filecoin and the Filecoin Virtual Machine. The talk separates peer-to-peer IPFS, the Filecoin storage blockchain and the FVM computation layer, shows how storage deals and proofs of space-time work, and describes what FVM enables, including data DAOs, access control, decentralized compute and DeFi. Resources for builders close the talk.
Speakers
Topics
From Kryptoplanet Talks; community: Kryptoplanet.
Transcript
hi thanks so much Matt hi good to meet all of you um I will be presenting in English so I hope that's okay for everyone um thank you so much for having me but all Asia super excited today to talk a little bit about Falcon ipfs and the very new uh newly launched two months ago fvm which is the Falcon Virtual Machine cool um a little bit about myself I am Sarah I am the developer experience lead for the falcoin virtual machine so we run a team of people that are focused on developer resources developer experience tutorials education to help everyone understand how to use the fvm and how to unlock even more solutions and
opportunities on the filecoin protocol if you are interested we have a Twitter account over here as well this is the fvm dev Twitter account and we have a Phil Builders Twitch account where every Thursday we run through live coding exercises to try out things that we are putting out there and to see if there is anything we need to improve so do join us it's a super fun session every single week all right so I'm going to talk a little bit about some context of what Falcon is doing um and where the fvm comes in today so we started with we have this filecoin master plan if you know our founder Juan Benet this is his falcoin master plan for the whole Falcon ecosystem step one
was to provide a decentralized a large decentralized storage Network so as of today we have 20 extra bytes of committed capacity on the Falcon Network which is one of the largest in web 3 today we have a huge supportive system of storage providers some of you might are here in Korea as well as many other parts of the world so that has been what we've been building for about six years or so coming to seven years so we have a lot of really good systems and Hardware to store your data step two is to then onboard important data onto this network so we are very focused on programs like the Falcon sting shop program where we can upload huge huge sets of data onto the Falcon
network and to keep it stored there for a really long time now step three is where we think about bringing computation to the data so if you are familiar with web 2 AWS servers if you think about the server architecture where you have a database and then you have an ability to build applications and write logic that would be the computation part and then it serves it through a gateway to your client we hope to be able to create something like that for web3 so that we can revolutionize the web 3 ecosystem and help bring the whole web 3 more mainstream than it is today so that's where we think FM is going to make a huge difference I will explain a little bit more about the different
technologies that I just thought about but that is the vision that we have for filecoin and that is why the fvm is going to enable a lot more solutions to be built so running through the average evolution of storage on the filecoin network starting from ipfs which I think everybody here is more familiar with all the way to our latest piece which is fvm over there on the layer one so to make some differentiation sometimes we get questions around what is the difference between filecoin ipfs fvm so let's run through a little bit of that difference before I show you an example of how you can use the Falcon Virtual Machine in your applications today
so first we have ipfs which is a peer-to-peer storage Network this is not a blockchain this is uh how you would see like you have different kinds of notes and you can keep sharing your data across these nodes and to keep copies of your data across the peer-to-peer Network there are some examples of this and I'll run through them in my next slide on top of that and separate from ipfs which is a peer-to-peer we have the blockchain Falcon protocol so filecoin itself is a layer 0 and that is our storage Network like what I just shared earlier on so this would be a blockchain where we store metadata about your storage deals that you have made without different storage providers that store your data off-chain I'll talk a little bit more of that
difference later on to help everyone get a clearer picture of what it is that we mean when we say they are different on top of the layer 0 you have a layer 1 which is the Falcon Virtual Machine so this is really new we launched back in March 14 2023 it's 314 so that is Pi Day it was a really good launch for us that is focused on computation over State I will explain later what I mean by computation overstate but it is a part of the filecoin network and then on top of that is the layer two where we hope to see more of the community and more of the ecosystem building applications based on what we have provided with the layer 0 and the layer one so you are able to access your storage you are able to write logic
around your storage and that will allow you to build applications that are either storage focused or could be could be more D5 it is up to you there are many many things that you can do with the fvm so that is how we have evolved our storage solutions over time and that is the vision that complements the vision for the file coin master plan that I shared earlier on so um let's get into the geeky part all right let's talk a little bit about the diagrams and I hope it gives everyone a little bit more um cool takeaways from today's talk and you'll know a little bit more about ipfs filecoin and Falcon Virtual Machine so running through some diagrams these are the differences this is ipfs like I said earlier on these are notes right so
there are a few ways that you can store your data on ipfs you can choose to run your own node so just the client's own node you run OneNote on your own so you store your data one time on one single node if one day your node setup fails your data might disappear or you will have to take the responsibility to run your node forever to make sure that your data is stored forever so that's up to you if you can do that that is a really cost efficient way to store your data um if you want to run it with a bunch of your friends uh no a bunch of your own notes so you want like let's say 10 replicas of your data to make sure that if one note drops you will still have your data replicator on other nodes but you are in charge of running all these
nodes so you can do it in that way as well or you can choose to run it with a community that is let's say your community is able to run notes on their own you can share the responsibility to store a piece of data multiple times right again this is dependent on your community continuing to run their notes for the long time that you need to store your data so if your community maybe stops running or people of your community stop participating you might not be able to store your data for the long term so these first three options are all free right so these are all cost efficient ways to store your data on the ipfs network if you want to have a paid service we have options like inferior and um with pinata and inferior that you can use
which are paid pinning Services what that means is that they will run their own node system and you pay them to continue to store your data for a long time these are also really useful even though we have the fvm today and the Falcon Network because you when you store and you pin your data to ipfs you pin let's say you store it on filecoin and you pin a copy on the ipfs ipfs allows for much faster retrievals of your data so it's still very much complementary technology but this is the difference between what you have on a peer-to-peer Network versus a blockchain so now we come to Falcon which is the blockchain protocol that I talked about earlier on this is our layer zero so um I'll talk about the process on top
first so if you think about it let's say you are the client and you have a piece of data you want to store you will make a deal with your storage provider the Emoji the sunglasses that will be your storage provider because they are cool and you will make a storage deal with them the deal is put into an escrow and it's put onto the filecoin network so your and then your file transfer happens off chain of a separate process you can choose either bit swap you can choose HTTP then you can get your files sent over from a client to a storage provider so what happens to the storage deal that you have made the Storage deal that you have made gets stored on the filecoin blockchain so if you think about the blockchain over here um sorry the best emoji that I could
find on the Chain but you all know what I mean you can store your storage deals um details and metadata we call it metadata so like how long you want to store your storage for how big is the file size all of those data you can store it onto the file coin on chain so because it is very expensive to store large amounts of data on chain so we're storing just the metadata this is a very important part when we talk about Falcon Virtual Machine later on so on the on the option side of it you will have your storage provider Network that has their own Hardware each of these storage providers choose how they want to store your data but every 24 hours they will have to prove that they are storing your data and they have to prove it back to the chain to show it's
called proof of space-time to ensure that your data is being stored and so that is how the filecoin layer 0 works and now we move on to the layer 1 which is fem so this whole portion over here we have covered in the previous slide right up to the blue color part that is the filecoin layer 0. now on top of that you have the Falcon Virtual Machine that will be a layer one so remember what I said earlier on about your storage deals metadata being stored on the filecoin protocol the Falcon Virtual Machine computes and writes logic around the metadata itself so it doesn't actually write a compute the data that is stored on the storage provider Network it computes the logic it computes the metadata of your storage
deals on the filecoin chain so this can be super efficient because it's lower cost it is more performant it is much faster rather than you choosing to unseal the data pull out data compute it and and one and decide how you want to move that data around why not just move the metadata instead so that is really the concept behind fvm and there are a lot of different things that you can do at a layer 2 solution so right now we are very focused on building a rich application ecosystem for developers to build Solutions so there are composable parts that you can build so we have like computation enabled decentralized computation that you can send a job from your from writing using fvm to write a job from using your data set to send it across to a decentralized computation
framework have it train an AI model whatever it is that you want to do for computation and send it back to your application via fvm so fvm is really like a coordinator in that case right there are also things that you can do around encryption and access control so you can choose to access control your data with fvm and only allow people who reach a certain criteria or pay a certain amount to access your data and then lastly it also enables a whole bunch of defy use cases where we have dexas emms coming on board right now we have a few cross chain liquidity Bridges like sealer integrated with fvm today so there's a lot of things that you can do in the D5 space with fvm that Taps on the liquidity and the collateral that is locked today in the filecoin protocol so
a huge opportunity there if you are interested in the device base um to give you a sense we have about one about two million fill locked up in smart contracts today since we launched two and a half months ago so we're seeing a really healthy usage and adoption on fvm and we have about 1.1 000 unique contracts fvm contracts deployed today to the Falcon protocol so I hope that gave you a better sense of how those three Technologies interact with each other a little bit of a diagram over here I won't go through too deep into it but for those of you who are developers talking about the architecture of fvm right now we are fully evm compatible so I just talked about having a filecoin virtual machine
as a layer one on top of the filecoin Falcon Network so every falcoin node can run an instance of the fem when you run an instance it works this way in this architecture why I zoomed into the evm compatible part because I know our ethereum community is large we have been doing multiple hackathons with them so far we are fully evm compatible so if you are a solidity developer you can use the tools that you are very comfortable with like metamask Foundry hard hat to write solidity contracts that can call methods through the filecoin protocol via a falcon.solidity library and then you can start to run your applications and build applications that looks like an Eva them uses all the tools you're familiar with and then deploys it to the
Falcon Network to access your storage this is sometimes I get the question why use fvm's evm compatible version rather than just use evm and right to storage the difference is that if you're using an fvm contract and you're writing to a separate storage platform you cannot customize that storage platform as much and it's also more expensive because it's not within a native environment and you are using a separate service with evm compatibility on fvm you can write it all within a native environment and so it leads to better performance lower cost and better security so there's a lot of good benefits of using fvm to the fvm evm compatible version
so on the roadmap as well we have a few things coming in we have a new storage deal aggregation standards coming in so that allows you to upload any size of data that you want that can be more efficiently stored into the Falcon Network we have storage deal replication repair and renewal which when unlocked use cases like Perpetual storage ensuring that you don't have to manually check whether your deal is going to expire it will automate automatically notify you that it's going to expire and help you to renew the deal based on the on the conditions that you set for your solution uh we're also looking at building native wasm actors so right now uh evm compatibility is a foreign run time for us so it is one foreign runtime and we're hoping to build more we are VM agnostic and we hope to build more
compatibility with other chains in the future such as Solana and so on so that we are unlocking storage for more communities out there and then lastly we have a lot more panel Integrations and toolings and VMS coming up in our roadmap as well so we're constantly working on that so a lot of building in that space we have about 50 applications that have deployed to minet so far using fvm in just two and a half months so we've had a huge Community adoption and we're super excited to see more of the growth of fbm for falcoin okay so I know I talked a lot about the context the infrastructure how these things work so one question to answer is what can fvm solve right I talked a lot about Sarah you talked a lot about the
technology what actually is it going to be used for so I run through a really simple example of a data dial so data dials are a very unique concept that we think can tap on the very unique value of Falcon as a storage platform to allow you to build a solution like a data dial data is super useful to all of us today what a data that was defined as is a community like a doll I'm sure we all know what a dial is and you're very focused on an important data set to you so it could be for example like a Wikipedia if you want to keep that that you want to keep contributions coming into the info to the data on Wikipedia as a whole data set maybe you want to access control and encrypt some of that data set to allow people to pay for
usage of that data set so that you can earn money for your dial there's just so many things you can do this diagram over here which is a cake it kind of shows what we're thinking about how we're thinking about building data dials there are two layers the first layer over here will be around Perpetual storage so making that you're making sure that your storage is well taken care of and then the layer on top of that is what you will usually see in a dial around like governance tokens endowment Management on your treasury which is which then interacts seamlessly with the storage layer which is the layer one over here and this is something that's super unique to fbm and that's what you can do with the filecoin network today so I'll run through a quick example uh I've seen examples are fun so this is an
example it's not real I hope that it becomes real one day but an example of a data dial is let's say you we call it biscuit data dial by the way this is the this mascot it's the Corgi mascot for falcoin we call it biscuit um so we're calling it biscuit data dial so let's say you have a community of Corgi dog owners that want to collect enough data to better understand their corgis and how they behave so um I I mean I have a dog I don't know if anybody here has a dog any dog owners in the audience cool cool cool yes great awesome okay so you should relate to this more right hopefully this gets built up for all of us um so what you do with that data set right
here's what you can do so with fvm there are we have seen hackathon projects that have started to build using fvm to ZK verify that the contributor to the data set is a real person so I want to make sure that your pet ID is real right so you can upload that you don't have to Showcase your pet ID it is completely private you can you can verify that that exists maybe you can cross check your data system submit the proof confirm that this contributor is real and then that allows them to then upload data to the data set and participate in the dial so now you're a member of the dial right you can use fvm to upload your corgis information um maybe let's say you upload it from Monday to Friday you take note of your kogi's behavior and then you upload that
to the data down right so you're submitting your information up there what happens then is that your data gets stored by the fvm being able to automatically start it so it will collect all these data batch into the right size and then upload it to the filecoin network and make a storage deal on behalf of the dial without you having to do anything so this all happens in the back end because previously before fvm this was a bit more manual and so it took more time but now it's automatic right so you're actually getting a very fast and easy way to upload your data and get it stored it will also submit proofs back to you to verify that your data is continuously being stored so that happens more on the back end but as as the Corgi owner what happens is that once you upload your data let's say
the condition for the dial is that you upload it five days in a row so you are confirming like a streak because if I can observe data five days in a row then I can see a pattern so you want to incentivize the right behavior in your dial you can set your Governor contract to have certain conditions on when you would reward that kind of behavior so let's say you upload it for five days in a row you will then get tokens minted from the dial to your pet owner to the Corgi owner which is you so now you are a quality owner and you have all these tokens from the dial you can now participate in voting so that allows you to vote what could you possibly vote on so there are two things that you can maybe do as an example um on the top you can vote to allow
um to send that data set to a decentralized computation framework to train an AI model to get better responses on what it means to when your Corgi behaves in a certain way so let's say we have 100 contributors on the dial all contributing to a data set we have a very good data set we send it to and do a computation framework that then generates and trains the AI model and then on the front end for your dial you can always key in today my Corgi is not eating its food what does that mean and then it will send the the query to their model generate a response and send it back to the dead front end and this is all done the coordination part of this is done with Falcon Virtual Machine so you could do that you can also vote
to provide access control on top of your data set so I talked about this a little bit earlier on you can make people pay to access all the great data that your dial is collecting so if let's say Google or I don't know a pet facility wants to access that data they can actually pay your dial and you can go towards your dial treasury to access the data that is being stored so let's say your dial treasury now has more money right there are also things that you can do with that money right this would be the endowment management part so your treasury could then fund the renewal and uh repair and replication of your data set to make sure that that Corgi data set all your hard work to contribute to that data set doesn't disappear overnight or it can remain for a very
very long time so you can continuously you know have a model that generates funds for your treasury the treasury pays for Renewal and then your data is stored for a really long time so your Dow can continue perpetually um and once your treasury has money it can also unlock all the D5 use cases that you're interested in so for example it could connect to a Marketplace of services where your dial members with more tokens are able to stop those tokens for um whatever currency that a real life Marketplace is accepting and then let's say my corgisig I want to exchange my tokens to access a vet service for example and that can connect to your dollar and that can allow your whole dial to be like a really good use case as a community so there's just a lot of things that you
can do I think the possibilities are endless I just wanted to give you a little example of what you can think about for a data dial other examples that we've seen in hackathons are things like collecting credit card data you know credit collecting credit card data making sure that it's kept private and then being able to sell that credit card data to credit card companies and so you're actually owning your data and you actually get the tokens back directly to all these users so endless use cases I just wanted to spark some inspiration we have a lot of good resources about how we're thinking about these things and you can check them out I'll give you a QR code you can check them out later on to see what you want to build after this so yeah the result is that you get healthier and happier corgis so that
that's really easy example for how you can think about data dial I hope that it was fun I really I hope this gets built if anyone's building this please let me know and um just to show you we are trying to develop a more Rich developer that ecosystem so we are integrating more and more tools that you can use these are some of the partners that we already have integrated with fvm aside from Sushi we're still working on that one that should be coming through soon but yeah a lot more partners are coming on board so we'll have I think every single month we'll have more integration partners coming on board that you can use with Fem and if you're interested to find out more this is a really good QR code which has it's a link tree it has all links to documentation use case ideas and how
we're thinking about it and how other teams are building on fvm today as well as how you can get involved with the community of builders that we have we have a super strong community of Builders who are highly technical so if you want to come in and join just you know learn more yourself do feel free to check out these resources and get in touch with the team and lastly just a huge thank you to all of you for listening to about learning something about fbm today I hope it was useful this is my whole team and there are more people as well I'm just one member of the team and we have great partners that we're working with as well so thank you all for listening [Music] foreign
Related talks
- Filecoin Storage for Building Resilient Applications
- Space Warp Summit 🛸 The FVM Imaginarium Part 2: Early Builders on FVM
- A brief history of nearly everything IPFS & Filecoin - Ally Haire
- The Moat Is Where Your Data Lives
- HackFS Summit 🚀 FVM: What, why, what next? - Sarah Thiam
- Filecoin’s Launched: Understanding Cryptocurrency’s Newest Network
- Bridging with Filecoin - New Frontiers in Web3 | ZX Zhang
- 🎤 The Future of Filecoin
- The State of Filecoin
