New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Superfluid 🛠 Building with Super Tokens A New Standard for Programmable Money

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Superfluid for a workshop titled "Building with Super Tokens A New Standard for Programmable Money". Our first in-person appearance in 2023 is going to be an extra special one: We look forward to our inaugural Pragma and the first ever Hacker Café, plus a weekend packed with opportunities in one of the world's most fascinating cities is awaiting you! Spots are getting rarer by the day, as our prizes pool is now sitting at $375,000 in total. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Applause] [Music] we're gonna talk about super fluid we're super excited to be sponsoring the events but I'll give you a little agenda here here's what we're going to talk about so first again like I said what is super fluid two we're going to focus this presentation on super token so I want to talk through what super tokens are and uh new forms of value transfer that super soaking is enable but then I want to walk through how is super fluid like the protocol Works under the hood like how are super tokens able to uh be moved in these unique ways uh then we'll get into like the brass tacks uh what prize do we have for you guys at this event uh what do we think you guys should work on all the alpha there we'll be in part four and then the final thing we'll go through is just how to actually build on super fluid tangibly I'm gonna feel that time to go through any kind of like in-depth coding today but I'll show you exactly where to go and uh where to find things in our docs to just get started so what is super fluid well I think the best way to think about what we do is is that we are pioneering a new token standard that will revolutionize money as we know it right so that sounds ambitious uh but I I hope to convince you that uh this is as powerful as I say it is but again in this presentation so to get more practical right a few things that this token standard is going to allow you to do it already does allow you to do one is stream money right so if you've heard of superflu this is probably what you think of super fluid as we've talked about ourselves as like the money streaming protocol for a long time but we haven't really talked about the main thing that we are uh innovating on and it's the token itself right so it's like you stream money uh they enable scalable one-to-many distributions and they also enable programmable reactive applications and I'll get into what those are a bit later so if you if we zoom out a little bit uh one thing we like to say internally at superfood a lot is that the internet is to information what blockchain is to value right and one way that this is manifesting itself is that we are moving away from a world of discrete one-off value transfers so uh everything from I swipe my debit card and a set number of uh dollars or Yen leave my account or I give you uh like a cash note like a physical piece of cash right or a piece of gold right that's it all all discrete value transfers right we're moving away from that to a world where value may be transported in entirely novel ways and the first way that value has kind of been able to be transferred in in D5 and crypto has been through like tokens and even like discrete transfers of native assets right like if I transfer Heath I specify the exact amount of Youth right now that I want to transfer and that's it with super fluid we we open this up right we expand this to many more different kinds of value transfer so what are these different kinds of value transfer right so I'll walk through what these are and then I'll get into like what what are the super tokens how is all this working and and so on so the first thing you get is money streaming right so this allows me to take any kind of recurring payment right and instead of sending it to you like once a month on the first of the month I can take that that amount I can split it up amongst the number of seconds in the month or whatever period you want these are actually technically open-ended so you can get it even have to Define the period if you don't want to but effectively what happens is it's like opening up a faucet where money is literally streamed second by second from what account to another so again I just kind of explain what these are but what I think is interesting about this is that second point there in the middle is that this enables a direct real-time link between value transfer and service provision so if you work for my company and you clock in or let's say you're doing customer support or something like that and you clock it well every second you work every second you're on call you're providing value to me right but how does payment usually work you usually have to work a bunch of hours and then wait for two weeks and then get paid at the end of two weeks or the end of the month or the end of the week and that's not that's like not an equal like we're at an unequal playing field there right because I basically get to just sit on this cash flow and you know the time value of money is a very real thing so if I if you if you're doing work is making me money I could basically earn yield on that money until I have to eventually pay you in two weeks that's not fair there should be a direct link between the value you provide me and the payment I provide you over time right that's the idea and it's all Unchained so it's all visible and there's there's no intermediaries either the second one here is acid distribution so this is when we don't usually talk about that much it's super fluid because it's tough to talk about this and money streaming in the same breath but we want to really start talking about this more because it's provided a lot of value to our community and to various projects so these are just scalable one to many transfers right so account a here can decide to create an index add a bunch of addresses to that index and distribute funds that are you know in a single transaction distributed to the entire index partially you can almost think about this as like a how like a dividend payment where you as the publisher get to give people shares in this pool and by calling distribute you just have to you have to make a single function call right send one transaction to distribute funds to n number of addresses right I could have 200 people I didn't send funds to instead of having to do a loop which is you know as we all know as devs loops and solidity kind of suck and they are really expensive and not a good idea uh with the Ida it's the distributions yeah I'll get into what the Ida is later that's what enables this but with instant distributions and super glue 80. this is far more scalable and then very soon we're going to combine the money streaming and the the instant distributions into this into one thing right so this would be a third option where you could have a large pool large index and as the creator of that index you can send a single stream which is split up amongst everybody in pool proposed proportionally so it's like a one-to-many stream which would be Innovative as well right I can add n subscribers to an index and phones can be streamed to n number of subscribers in that Index right so those are new forms of value transfer right all pretty cool uh this is stuff you can all do today except for photo distributions that's coming soon but how is all of this even possible right like how is this possible it's possible because we're building a new token standard that that's really why it's possible and it's a token standard that is directly connected to superfluid the protocol right which has been in existence for a long time been battle tested multiple audits lots of high value applications building on top of it um it's just time pressure we can start talking about this token set right again it's powered by superfluid portable so before we talk about like what this is what what the super token is we got to talk about the year C20 right because this is the foundation of the suit of the super token as well right so what is the erc20 let you do right well the erc20 is built around discrete transactions right it's it's works a lot like a debit card transfer that I mentioned earlier right um it supports you know a mapping of static balances that you can read with balance of and balances are changed by calling transfer right there's like that's just like a big Ledger you know and uh it's cool good Innovation good standardization for the space uh it's pretty much every you know every asset uh is an arc 20 that's not like a native asset in the space and you know it's been good but our take on this is that this could be more right we can we can allow balances to change in totally novel ways so what is the super toker well it extends the erc20 and the ERC triple seven I'm not going to go 2D ERC triple seven today but there are some other features that are on that that are helpful uh to people using super tokens it's backwards compatible with erc2080 or c77 so if I have die or comp or uni or usdc I can wrap that and easily unwrap that as a super token and I'll walk through like how that works later it supports a mapping of static balances just like the oc20 does right uh balances are changed by calling transfer you can just do a discrete transfer so if you want to all that stuff that you normally get on the erc20 you can do but there's more right and the cool thing is that token balances can be changed in these novel ways and I'll walk through how that's possible in a bit but the ways in which token balances can be changed are defined by things called super fluid agreements right so this is like the logic for how balances can be changed using super fluid right the Agreements are plugged directly into the superfood protocol and just to find new ways that balances can we have two right now from one for money streaming one for instance distributions and then a third one in progress around the flow distributions right these Agreements are the thing that Define the logic there um and I'll explain more about this in a second so agreements right these are you can think of these as like peer-to-peer Financial relationships right that are encoded in just like solidity acidity spark contract right you have all of these are different again you can think of these as like logic contracts that Define how balances can move and the super token as the the contracts that hold state that actually store the token balances themselves right so there's a function that I'll explain it in just a bit called the real-time balance function that takes into consideration all all of these peer-to-peer Financial relationships you're engaged in and allow you to see any given point in time what is my balance right so again right now we've got the CFA constant blow agreement that's from money streaming the Ida instant distribution agreement is for the instant distributions and FDA is the combination of those two right again all these are open-ended they're Perpetual everything's on chain you can use the data and again like I said it's built like the the the logic here of you being able to change balances in these ways are all built into your token balance itself and this is all kind of part of the super fluid protocol and the protocol itself is kind of what pulls all these things together there's this other thing called The superfluid Host it's kind of like a uh like a larger Estate Management contract for the entire system that also enables some some programmable applications to be built that I'll discuss in in just a bit but the agreements themselves in the super tokens uh these are meant to be building blocks for other people right so if you want to play your own Super token you can do that right we have tooling and examples that lets you deploy your own Super token in the future will also likely have community members that build their own agreement contracts as well the Agreements are just a library of ways that balances can be changed in the future if we have people like yourself listening to this to become very knowledgeable about how superfood works that has an idea for how these balances can be changed in new ways Beyond just money streaming or distributions we like to talk to you they're not necessarily easy contracts to build right now but over time we want this to be a community efforts uh to really push the limit on like how money can work right so that's the idea so okay let me let me let me address the question here okay so I can I can hear you right you're probably sitting there saying okay this is cool I get it but sir how are the balances actually being updated like like how is how is this actually even working okay when I first heard about this I was like listen my entire Met's a model about how state has changed in a blockchain is that you send transaction and then something happens and then it's done right this kind of open-ended thing is like you know the first thing I asked was am I gonna have to literally like set a transaction every second to make this happen and if so like the gas is going to be ridiculous so how on Earth are you making this happen right and really the the magic here is all inside of this real-time balance function so I'm just going to use the example of of the money streaming for right now because it's probably the simplest one to explain but every agreement right be it the answer distribution agreement or the modern streaming custom flow agreement every agreement will have a different way of updating a balance right so There's real time this real-time balance function will take into consideration the things that are happening and each of you or peer-to-peer Financial relationships defined in those agreements right in the case of Ministry you have a net with what we call a net flow rate okay so think about it this way if I decide to create a stream to to one of you in the audience for 10 die per month okay and one another person in the audience decides to send me five dollar per month okay those are just individual transactions right you don't have to keep calling transfer transfer transfer you just create the stream one time what's happening in the real-time balance function is that we're always able to see at what time was the stream that I sent to you created and if I ever updated it like at what time would it be you know and what time was it updated and what's the new amount right how many tokens have I receiving per second right if we take into consideration the flow that's being sent to me pretend I per month and the flow right now I'm sending somebody else a flow for 10 per month so outflow of 10 per month and inflow of five document okay so think about that what is my netflow rate well we take the outflow of negative 10 and we add 5 which is you know the calculation there is negative five per month so as time passes we know that the rates at which my balance should be decreasing is -5 right at any given point in time if I decide that I want to transfer die or I want to create a new stream before that actual uh State change is made the protocol will check to see all right how many seconds have passed at the rates in which Sam has been used losing 5. okay based on how many seconds have passed all right and minus five dot per month we can calculate how many tokens he's lost over that period of time and whether or not he can do the state changing operation that he wants to do uh based on how many die he has so you know if I'm trying to send more die that I actually have the protocol won't let me again it's that that's a lot to take in it took me a few iterations to really get that when I was first learning about this stuff so feel free to just DM me or put stuff in the chat and I can try to answer it uh that way but yeah that's how the money's viewing is even possible in the first place um but yeah anyways so one last thing about the uh the super tokens themselves there are a couple types right so I mentioned the uh the backwards compatibility thing um this is important right uh so but but there are two ways to go about deploying a new super token right the first is that you just yeah maybe you are going to launch a token tomorrow and you want uh the token to be a super token awesome we call that a native super token where the supply all the supply is streamable right or all the supply can be used within super fluid agreements right so again this is something we'd recommend if you're interested in building on top of superflu and you wanted the play token just make it a native super token because out of the box it will have all this functionality however we know that like maker is not going to redeploy die and tell everybody to migrate to Super token die right so there are rappers right so if you go to our dashboard at app.super fluid.fighters you'll be able to just use like a simple UI to just wrap your existing guide or your existing usdc or uni or whatever you want to Super token version of that right and what's happening there is I just basically deposits my underlying die to the the rapper contract and I get out it's uh newly minted supertoken die um works just like weether rap Bitcoin same idea but uh yeah those rappers are important and again the thing the thing to uh to keep in mind that I want you to walk away with is that these these tokens themselves should feel like they have superpowers right and part of the reason for that is that we've engineered the developer experience to to make it so that you can just call these functions that do this cool stuff directly on the token itself in our SDK or using our solidity libraries so that like instead of calling just like and sorry for the blurriness here I blew this up too large but instead of just being able to call it die dot transfer you can call diax which is a super token version of this you can call diax.

createflow update flow delete flow uh you can do the same thing with the with the distributions right where I want to maybe create an index I want to update a subscription all this stuff and you can also do things with our SDK like batch operations together so imagine I want to create three streams at one time I can create a batch call using our SDK to literally open three streams at the same time or 100 streams at the same time if I want to but watch out for gas costs if you do a really large operation but this is great for user experience um and on the side of programmability um there are other things that you can do with superfood that are even Beyond just like the simple money streaming or distribution stuff you can do things like create super apps okay a super app is like a a smart contract that is aware of everything that's going on in the broader super fluid protocol that can do things like react to incoming money streaming and cash flows so if I have a super app what I could do is I could build something like a a smart contract that can run a hook every time it receives a new money stream right so for example there's one that we uh we call it tradable cash flow that can it's an nft contract that receives incoming streams and sends all of the incoming streams to the owner of the nft right so it's like these are these are these reactive smart college tracks that have hooks like you see here in the after agreement created function that lets you do literally anything you want on receipt of a stream right so you can do things like receive money and split the payments uh there are even people that have built like D5 like really Advanced C5 applications around this and exchanges around this uh and we'd encourage you to look into this if you're a solidity dip so like when you think about all these different money streams and like these different peer-to-peer Financial agreements and super applications you eventually get like this network that's built out right where you have all these connected cash flows all these connected addresses all these connected agreements of like value transferring all over the place and you get this network of programmable cash flows right so this is literally like the live super fluid Network on polygon and it becomes like this universe right where there's a there's a really interesting Network effect that takes place where you know if I'm receiving super tokens I can start sending super tokens to pay off my subscriptions or maybe I can pay my Reds or maybe I can dollar cost to averaging to my favorite asset right and you know those of you that are considering building on superfood at this event we'd love for you to do so because you know you'll just be contributing to this this network and you have this network to plug into to get users and to get liquidity and volumes and all that good stuff so um we really encourage you to build build on us and contribute to this and all right here is present day Sam here with one final message for you now that you've seen that Workshop which gives you a baseline on how to build on super fluid and a background understanding on what we are and how you might be able to use us for your project so first of all we want to just thank you for considering building on us at etokyo we have 5K in prizes for the event that you can all qualify to win if you either implement or SDK or some of our smart contracts into your project and you know I wanted to also let you know that we will be there in person several days before the event helping hackers get started helping people shape ideas you're welcome to go to docs.super fluid.finance that's our our documentation link to learn more about how to actually build on us with you know our actual SDK or our solidity libraries and you'll also see a list of use cases and potential ideas there as well so feel free to reference that and if you have any questions or any uh thoughts maybe you want to workshop with our team about what you might want to build in Tokyo you're welcome to reach out to us in our Discord you can find our Discord either at our main website at superfood.finance or you can just punch in the link discord.super fluid.

finance to be redirected automatically to the Discord and in there just go into the hackathons channel or the dev support Channel feel free to feel free to tag me or sunny from our team and just let us know what your ideas are right ask your questions let us know what your ideas are and we can help you make sure you have a great event in Tokyo so thanks again we're very excited to see you in person and best of luck

Automatic transcript — names and jargon may be misspelled.