Metropolitan Pavilion - Room 3 (4th floor) Session 1 | ETHNewYork Workshops
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join us for Day 1 of ETHNewYork! These workshops are part of ETHNewYork 2022, a three-day in person hackathon that will feature hackers, mentors, enthusiasts, sponsors and speakers who are all gathering in New York June 24-26, 2022 to talk about the future of money, finance, the web, ownership, the way software works and the way power is distributed. We're excited about a new frontier. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
welcome to our workshop so i'm tf from texas network and also uh here's our team member chris so uh in this workshop we'll be introducing how to build what texas network does and what what scenarios should you use tension network and how to build a privacy preserving and computational powerful website services okay so i know you have heard a lot of a lot of projects that are focusing on solving the scalability of the blockchain well texas network is addressed not addressing the network performance in terms of tps uh texas network is focusing to provide a stronger a more powerful version of smart contracts and we are focusing on the performance of individual smart contracts which in terms are those aspects so here's a comparison between the web 3 applications and web two applications in some aspects and i know this is not a very fair comparison because the main breakthrough of that string is a trustlessness performance it suffers a big disadvantage for example the time and space resources you can use in an individual smart contract is very limited because of the limit the limitation of gas fee file size and also the functionality are very simple and basically focus on crypto and and the very basic business logics while lacking of some rich functionalities due to the that that is mainly due to the consistency requirements and also because of the uh because of the consensual mechanism we have to wait for the block confirmation and also it's very difficult to protect your privacy on the blockchain so we we have we have we have paid a very heavy price to achieve the trust and the texan network is aiming to solve the performance and privacy issue for the individual our solution is to build a layered architecture for the the apps and by moving the your business logic from on-chain to option we don't have to be restricted by the consensus mechanism of the smart contents well while we are using the trusted execution environment technology which is a privacy computing technology we can also we can guarantee the applications trustlessness in terms of confidentiality and also integrity uh so being concluded uh we put some obtain and so we will have a higher privacy and we can build interactive applications well by using the transfer by using the tv technology we can guarantee the integrity and confidentiality of your application even without the blockchain so here's a uh here's the idea of a layered architecture of the future uh envision that of the future applications today you already see a lot of middleware infrastructures acting a very important role in our d-apps for example the oracles or the ipfs well uh in the region web 3 we all we are we're still lacking one very important cornerstone which is computation today they are most built on the layer ones not on layer one block chains well uh to support more meaningful uh to square more uh more more meaningful applications uh for example like games uh interactive games you know uh we do need an infosighter that can keep uh that can do some high performance computation while keeping the users data privacy and uh texas network is uh is aiming to becoming this role so you can as you can see we put the computation from in in the middleware texture network well only where you need to generate a finalized state we don't need to generate a function transaction or in other words the real relationship of python network to a blockchain is like a backhand to a database you only need to write a finalized state on chain while the computation can be completely obtained and protected by the privacy computing technologies and let me introduce you the t-service which is the application running on the middleware text network key services for translate services and it's a bit different from the on-chain smart contract first is interactive based on a request response based on protocol and we also wrap it into a restful api just like a calling on web 2 service that is trustworthy yeah and also due to the nature of texas network we are not a block we are not a level one blockchain we are stateless and uh but we are uh we provide very convenient way of interacting with railroad blockchains third uh because we are opening and using the privacy technology of privacy computing technology we guarantee your data privacy universe in your applications and the privacy data during transmission during computing are private unless you the developer choose to review it so it's opt out privacy so on the on the development wise you can simply sync the t service like a type you can sync text network like a typo oracle but instead of feeding the internet data we see you the result for your entire business logic and which will guarantee the data privacy and the computing performance in terms of in terms of the computing and the storage resources so we migrated on python interpreter environment inside the classified social environment currently where you are we're using intel fcs and if you can develop the translated applications using one of the most popular language which is python service oriented development framework and also supporting a lot of third-party libraries so for example uh let me begin with our hello world example on pixar network which is called the millionaire problem it's one of the most fundamental computing privacy computing program proposed by professor young tj and the problem is assuming there are two millionaires they want to know which of them is wealthier without revealing their actual words so yeah ideal case you want to adjust and both parties can trust it and both particular guarantee is honestly executing the business logic and while keeping their data privacy blockchain is designed for trust however it's very difficult to implement on today's architecture due to privacy issues well in our case on texas network because by default we can guarantee the data privacy you can implement such a hello world application you're a very simple architecture just like imagine imagining we're developing a centralized application the two users don't trust each other but they do trust you and they give your they send their privacy data to you to the application and the application will serve as a jet to tell them the results it's very straightforward uh well uh but uh well on texas network we actually those applications inside the secure enclave security enclave so you can guarantee things first you can always guarantee the texture node is honestly executing your code with and secondly you can guarantee the integrity you can always guarantee the node video back the correct result without tempering certainly it can guarantee the data privacy during execution and the way of the way users interact with hydra network is based on interactive protocol and all the entrance of the t-service are marked by a url adventure uil just like ips ipfs1 and using multihash it indicates the hash of the of your key service code just like you have because the competitor com is compatible with ipms you can directly serve the code ips and both user will establish a secure connection with uh the enclave in the text node and just like you can imagine like https handshake and the node the computer provider serving as a middleman he cannot although as although he's a service provider it cannot read all the any private data submitted by user or during the communication and the code for solving the linear problem is very simple so in our case we have two entries first those users submit their submit their words like and the function is called submit value and you'll write a title number and secondly after both users have submitted their words those millionaires are uh send their words and they will call another function called the get result and we directly see the user the result is very direct business logic and all those codes are running inside the security enclave which means the node will not be able to read or temper the computation and you can see the feedback user result and both users will be able to decrypt the results on their client side and uh yeah and uh there are several when you are developing these surveys there are several key concepts uh first response requested response that in json format uh they're carrying both confidential and non-confidential data and there's a certain field called data which is encrypted uh which is contains encrypted data and uh only only the user and the secure enclave has the decryption key any any third parties including the service provider will not be able to equip them and the ipid means the hash of the code is only identifying the code so when two users are calling the same app id we can guarantee they are calling the same q service and also uil is consistent with a text header and the code of the hash and the function and the user identity is represented by a ucdsa keypad and later you can find them out find them our developer documentation and also text networks support a temporary storage mechanism causation we keep them by default uh seven days by default and you should not rely on it it will be available during your t-series lifecycle but you should not use it for permanent storage and uh for the python developer framework we call that pexa and which in short of python plus texas that is uh uh that is a python runtime environment we migrated inside intel sdx and is derived from python 2.7 uh and in addition to hyphen 2.7 we have added the crypto some crypto and blockchain library support so for example you can directly generate signatures generate wallets inside the python code well we also uh and due to the nature of t-service we also removed the file system network and process access so it's pure computation and also we are keeping expanding our framework adding vertically to add some third-party libraries to support more functionalities on texas networks and uh i'll briefly introduce how you interact interact with the latest layout blockchain from texas network please later show us the details so but the basic idea is very robust and simple so idea is generating signature so the problem we are solving is how can we trigger a transition layer one or in other words how can we verify whether a result is generated from text network will be always a fourth one and and uh the solution is uh we generate signatures inside the two services inside the security enclaves and later we could verify such signatures on solidity using you say the color function and then you can also add transactions for example assuming there are two players want to play a poker game program is a multiplayer poker game it's not it's not very easy to be built on layer one because it should be interactive and also you need a certain level of privacy well on texas network you could just uh building a very slight forward business logic well after the game is over the textile network could generate a signature and the winner could submit that signatures to solid smart contracts and the solid smart contract can verify that signature whether it's coming out of pakistan network and execute the transaction for example who will take the chip on the table and yeah and we provided a library called pexa ecdsa which which is compatible with solidity's uc recovery and the youth and because of our previous preserving feature the user could safely submit their private key into the two services and the key services will generate the signature problem so some ideas of building on texas network first came and yeah are always a hot topic and especially for the games you know today's uh games are suffering from some limitations when you're building unblockings for example you can you might easily build a test game on blockchain but if you want to build a card game which requires interaction and requires a certain level of privacy is much easier to be built on texas network and also analyties uh anti-related features for example uh some developers are building uh are building some gamification type anti-status that you know uh for example in the previous uh uh is global there were people building the prisoner dilemma game on texas network and combine that with rnts yeah and also however computation and e5 privacy and also identity for example how to authenticate the user without revealing his details it's like the t service will tell a yes or no but the user will not won't need to reveal their actual privacy data yeah and let's begin with a demo so we have two demos first demo is about how you set up an sdk and i feel some basic uh text network requests second demo is how you authorize layout transactions so okay so uh first we connect to our uh code and uh to send the text uh uh network to send the request on text network uh just uh you can set up the text sdk documentation and there are three very simple steps to send a request first you import our sdk in your price local type signal notice although it's present but it's uh running on your local locally on the sdk and the second step is uh is to generate uh your identity and we already support the function by uh by initiating a request object yeah and if your first time using this uh the sdk will automatically generate a key pair uh elliptic curve keypad representing the user's identity and go ahead we call the send function which uh which will carry the python code is it by the way um so uh due to the nature of texting network uh there is no deployment necessary for the key services and on protocol wise the user is required to carry your key service code inside the request to the node and the node will hash your code and find out the app id and engineering-wise our node will test will cache the code for the key services so uh uh so you don't actually need to submit it every time as a by you by default you can just submit the prime submit the service code as a parameter and we'll call the send method to send that request yeah so uh when sending the request for the first time uh the text network will do three things so it's first it's called remote attached station that means uh your your computer will establish a uh ssl type connection with uh with the enclave in the title node so uh after the handshake they will do like uh vp helmet to exchange and they'll they will negotiate an aes 128 key communicating directly between the user and the enclave no one else in the world have that key so yeah especially like like a ssl handshake and all your traffic is communicated by this encrypted.eds and as you can see uh there are some debugging data but the requests contain a status and a response and also more important most importantly there is a data field and which contains the secret data in your request is which is encrypted by aes and uh yeah and also there's a response well response will also be carried and you can present you can equip them and process them in your python code and next uh chris will demonstrate how to generate a signature and verify it on solidity go ahead uh so this contract that we just executed what it is is basically just um it's this right here it calls this um dcdsa signing key dot youth sign and it generates a signature and it's signing this message up here this is abc eft and then here's the my private key and so the signature is returned and then it's added to the response and so if you look up here the um decrypted data this is the response from the taxa server that's been decrypted and so right here is our signature and so what we're going to do is verify that this is a valid ethereum signature by um we have this uh solidity contract that has been deployed to the test net and it's simply just um we have this is valid signature uh well down here it's uh where is it is valid signature yes so it takes two arguments uh the message the original message which is just abcdft and then um and then a signature which i'm gonna paste in here and then we can call it and uh the return value is true that's because the value this signature is uh valid yeah so the key is first inside the type t service you use the ucdsa library to change to generate signature and uh it it is safe for the user to submit a priority inside the t service because it is entirely running in the security enclave and by and after generator signature inside the t-series you output the t-series inside the response and uh well and uh if you want to verify the signature you you call the easy recovery in solidity and competitive and the format is entirely compatible so the user recover will tell will tell you whether the message is legit generated from the psy service so that uh that's the way you intel uh you authorize a transaction on later one okay and uh here are some useful links uh so for the developer documentation go to dance.txt.
net and also you can always go to our booth and first floor uh we are we're happy to answer all your questions in your development and also uh we'll be uh our entry days will be on discord to answer your questions so yeah please mark the link and happy hacking thank you guys it's called or we refer to it as a natively verified bridge these bridges are like light clients ibc they're great because they're verified by the change underlying validator set so you're not adding any additional trust assumptions outside of the ones introduced by switching domains inherently um the other great thing is you can kind of pass any type of data between these two domains using this system unfortunately these bridges are really difficult to create because they're heavily dependent on the underlying consensus mechanisms and like the underlying chain dynamics so i'd have to like i can't just take ibc and now use it for my easter avalanche bridge because that's just not how east or avalanche works so they have to be kind of developed in a bespoke way the next kind of bridge is called an externally verified bridge what's great about these bridges is they're portable between all domains so that pretty much will work the same regardless of what chains they're connecting you can pass general data between them um unfortunately the concession that you're making when you're using this type of system is that you have introduced a third validator set that isn't necessarily the same as your origin chain validator set or your destination chain validator set and that can be problematic because you are now like being the security in all of these systems is only as strong as your weakest link and so when you've added an additional validator set that's really what's holding the security of all the payments um shout out harmony uh the next one is uh locally verified bridges these are bridges like like atomic swaps um where basically you take some transactions where you want to go from chain a to chain b and instead of including everybody in the chain and including it as part of the state you kind of match up to somebody else who's willing to go the opposite way and you swap funds this is great because like you're not really adding any trust assumptions basically your counterparty will always verify that you did something correctly they usually happen through some type of commit and unlock mechanism um the downside is you can't really works the same between all domains like you really only need a hash function in the signature for the most part uh the downside is you can't really pass complex data around because that doesn't translate easily to a two-party system yeah so lane covered uh externally verified and locally verified and so you can see that externally verified it's quite extensible and portable i mean you can sort of pass any type of data and move it to any type of chain but it's insecure for reasons that you're trusting another external party with your funds or data and then she also touched on locally verified which is i guess very secure and minimally trustless but not very extensible and so we'll see that optimistically verified bridges are somewhere in the middle ground between these two things and can achieve both of these just kind of at a high level the way that an optimistic bridge works specifically i guess we'll talk about nomad is that someone uh from the user perspective will send a message and we'll have an offline actor pretty much attest to that and say okay this user sent this message let me sign a piece of data which attests to this message and so we'll post that on the other chain and the other chain before accepting it will start a front with a fraud window and basically say okay within this amount of time we'll let someone dispute it and said that they're fraud proof which will basically tell the protocol hey if this access station was invalid don't listen to it and disconnect from the messaging channel the reason why this is more secure though is that with something like a multisig which is an externally verified example you have basically a k of n honest actor assumption if you have a three of 10 multisig you need at least eight honest actors as soon as you have seven there's now three malicious actors which is enough to compromise your wealthy sig in an optimistic uh verified bridge then you really only need one honest actor to maintain liveness as long as there's one honest watcher which is inspecting these active stations from the updater you can assume that your funds and data are safe so does anybody have any questions right now about the different types of bridges before we move on yes yeah sorry maybe i wasn't too close um what part did i miss yeah that's a good point so i mean like at the moment uh nomad for example a washer is a permissioned role where it's like a whitelisted role and if they submit an attestation of fraud that is uh enough for the protocol to disconnect eventually this will be something that's permissionless it's just kind of like takes a lot of engineering work to get there um but the trade-off the way we think about this specific trade-off is that at the very worst you can if you're a malicious watcher you can grief the channel but you can't actually steal funds and so we think that this is a more desirable desirable trade-off than permitting some kind of scenario where you can actually steal user funds are there any other questions uh sorry could you speak up just a little bit i know having the same problem here sure um yeah so i it's a lot like um sort of the way an optimistic roll-up is uh modeled like you basically instead of with an externally verified bridge uh let's say you have a multi-sig if you know if the threshold number of signers sign off on something that's kind of your what sort are proof that this event really did happen on the other team we kind of flip that model and we'll have basically one signer attest to something and we'll let we'll post it on the other chain and let a committee of watchers essentially uh inspect this attestation and say it's either valid or invalid um it's basically you're giving the you you give the watchers the power to veto something as opposed to giving someone the power to actually say that it's correct uh right now they are whitelisted parties so a lot of l1 teams want to run their own watchers a lot of like defy apps for example want to run them as well so we want them to be such that the incentives are already aligned um but eventually this will be a permissionless role so at the moment it's a whitelisted thing now go ahead yeah so the dispute window for nomad right now is 30 minutes uh a lot of people ask why uh why not seven days i think for optimism or arbitrarium the reason why it's this long is that the process of actually improving fraud is much longer there's a lot of transactions you have to submit on ethereum um and from what i kind of understand at this point there's also some social coordination aspect for us because it's uh a whitelisted role and like you're just submitting an attestation that fraud happens you don't need nearly as much time um and so really the way we parameterize the fraud window is just it's based on the economic cost that it would take to censor the chain essentially if you're a watcher and you need to submit a fraud proof how much would it cost if you're trying to censor that fraud transaction cool we'll leave more time for questions at the end but i'm going to keep it moving for now so hang on to them okay so another important concept that exists in the cross-chain world that doesn't exist in the single chain world the regular dap world is asynchronous solidity and basically what i mean by this is these states of the two chains that you're connecting do not know about each other so if you think of the example of an amm well why does that work as well as it does on ethereum it's because you have when you have a transaction you have like solo read-write access to the state of the blockchain um which means that like constant product formula can remain constant because the liquidity is always traded equally if you're building like a cross-chain amm these things that same assumption does not hold so you can't say that like oh i have full access to trade usb c automatic for usdc on optimism and it happens as soon as i submit my uscc on matic because the optimism chain has no idea that you wanted to start this transaction in the first place so these are the types of things that you have to be aware of when you're developing crosstalking applications that you may not have had to think about when you're developing regular adapts uh asynchronous patterns are very common in like regular web development so this is like a direction that i think is useful to go in um but it is something that is different than the most of the tooling that is available most of the ideas are and development patterns that are commonly used uh so now we're gonna dive in a little bit to building a zap and kind of what that looks like um so first what what is a zap like what does the anatomy look like in the architecture you have uh basically a contact on the sending chain and the receiving chain and then you'll submit your transaction to the source contract on the sending chain which will then call your bridge in this case it's connects that happens to be the one i'm most familiar with um and you call x call which then will initiate a cross chain transaction this is where the asynchronicity comes in as a transaction is propagated across to the destination chain by a network of relayers and then validated either by the nomad timeout or what have or somebody else is willing to take on that risk for the timeout um then it is the action is propagated to the target contract so there's also another concept in this dev in this classroom development platform with connects about authenticated and unauthenticated data and what that means depends heavily on the optimistic timeouts because we are built on top of nomad um there is latency built in as part of the security mechanism again optimistic systems in general use time as a way to gain security like if nobody submits a transaction or disputes that something has happened within a certain window then you know that that data has been authenticated because the assumption is there are enough actors in the system who are incentivized to have correct data that if it is incorrect somebody will say something um so in connects where we have this concept of authenticated data and what that really means is like permission calls so when you're executing a crosstown transaction you'll want to make sure there are some calls where the data that you're using is completely fundable like a token transfer you don't really need that data to be authenticated however in contacts that check like message.sender you need to make sure that that data has gone through the fraud proof window so that you know or can assume that then it is authenticated by the time you're acting on it for example if i am doing cross-chain governance i really need to make sure that i know that the data that is coming from some chain to the target chain has gone through that fraud proof window otherwise it is scoopable by the relayers it doesn't matter if it's scoopable for transactions that are completely like fungible again token transfers but for something that is more sensitive you have to make sure you have that extra security yeah then unpermissioned calls are calls where you can go from the source to our relayers obtaining the target all pretty much immediately in the times as immediate as blockchain gets in the time span of two on chain transactions whereas again permission you have to wait before you propagate the data for it to go through that fraud proof window yes right so the actual authentication depends a lot on how the target contract is implemented we'll walk through an example of this in the simplest way is the message.sender so we will pass through the original message.sender from the origin source chain but any relay if you don't wait for this data to go through the fraud proof window could insert any message.sender that they want because nobody's challenging on it it hasn't been submitted as correct by the underlying system so that's why you have to make sure that you're waiting yeah i think like a good example here is uh think about a token bridge so there's like two token bridge contracts and ultimately when you decide to send uh some assets to another chain that's you calling the tokenbridge contract which calls like our underlying message layer and so the the message.
sender ends up being a token bridge router on the sending chain and so that that gets wrapped up in the message and so basically the token bridge router on the other chain will only accept a message if it's from the other token bridge router correct yep yes that's def you're gonna need to yell no the the chains will not know about each other's state like they'll only know what data you've passed through cool okay so yeah so now we're going to walk through some example codes um the example i'm just going to lay it out here it's very simple it's pretty much just like set value on destination chain contract from source chain contract using connect so here we have some example uh solidity code for how you would integrate that the source dot soul is basically what you would that's your entry point for this user flow where you call this with your intended updated value on the origin chain this will then create the parameters to xcall which is the function that will initiate the cross-chain transaction it's designed to mimic the lower level solidity call pattern but class name x um and then you call x call once you do that the relayers in our system will automatically pick up that this transaction has been submitted and simulated on the destination scheme if it fails then they know okay well this is more likely a permissioned call um or special explicitly specified that it wants to use the authenticated data flow and now i'll just wait for that to be fully propagated once it's fully propagated meaning that the message has made it through to the destination chain via the nomad system and has gone through the fraud proof window then you can go ahead and call the updated value on the target contact on the target contract so uh if you i'm not saying your name but if you look closely at this modifier this only executive modifier um you can see that the origin sender which is the message.center on the origin chain is asserted to some specific address and the same with the domain so like i only want if again like if you're doing cross-chain governance i only want the ave dao on mainnet to be able to influence parameters for the ave contracts on polygon then i could assert that using something like this only executor modifier that exists on this update value contact does anybody have any questions before you guys yeah uh well you can pass arbitrary data between change but you can't like if you didn't pass it the chain won't know about it so you can read anything that you've passed through but you're the one who has to initiate that right yeah i mean there's no like the things that's the whole thing with initially is they are not composable they don't know about each other and so you are the one who has to pass that data through [Music] what do you mean can the parameters be changed yeah well i mean it's your target baby you can do what you want yes sorry so the question was can the parameters be changed on the target contract so if like i want to change the admin um yes you can that's completely up to the implementer of the target contract these origin sender and origin uh domain properties are just things that we expose when we when you make x calls so when you create that x call contract on the source chain uh that information about which chain it's on and who called that function is passed through to the destination domain so that changes based on who calls it where it's called from whether or not that matches with who the admin is on the target contract is up to the implementer cool um so i there's an example repo here i'm going to kind of exit this presentation and look at some of the other cool things that you can do with k'nex so one of the other things that we're really excited about with our new protocol is the ability to do js style solidity callbacks so what does that mean this actually may be more relevant to your use case uh but basically sorry quite good enough okay okay so the con the source contract implements this interface called i call back the i callback interface um is right here and what this means is this is any contract on the source chain that can process return data from some call executed on the destination pane so when we execute arbitrary call data we just use the dot call on your destination domain and then you get back whether or not that was a success and what the return data from that contact call was if you have defined a callback when you initiate this call and x call then the protocol will automatically take the success result and the return data and propagate it back to the origin domain so this could look like in this example okay i want to update some value but i'm not going to specify a value instead the target contact is going to randomly choose a value so i call change value that will update the contact value from you know 3 to 11 or something and then i've specified a callback that will emit an event with that new value and so once that's changed the information is sent back to the origin domain where then i can say oh great the random value is 11. um and so that's kind of what i mean by solidity style callbacks and you can see is there a question nope okay and you can see that here in the source they implement the callback interface and this is the callback function where it decodes the new value that was set from the data and emits this event um are there any other questions yeah yeah exactly uh the front one is let's just say that you wanted to build your own app you could i mean like the fraud winner that we have for our core contracts are 30 minutes but you could technically deploy your own like set of core contracts change the latency and yeah it's definitely configurable depending on what level of security you want yeah yeah so we we have our own watcher implementation this is what we provide to partners and other apps that want to run it um that's just running a docker image foreign right so your first call would still have succeeded but the sorry repeat the question yeah so um the question was if i have a revert on the target contract will that what happens to the original transaction like what happens to the flow where did it fail where does it break down um if you have a revert on the target contract there's a fallback function so any funds would just get immediately sent to your recovery address it's pre-specified but if you have also specified this callback interface the fact that it failed will still get propagated back to the specified callback contract are there any other questions cool um yeah so i'll just give you some updates on timelines then we are working on we're finishing up our audits for this protocol it should be live yes yeah we'll fix it in the middle of a workshop getting called out by my cts unreal [Laughter] uh any other questions cool awesome well i hope you guys learned a little bit about what goes into building a classroom applications and the things that you should be thinking about if anybody at this workshop has been contacted by duck he's over here in the back and you guys should probably reach out to him and find him somewhere where it's more okay to talk awesome well thanks guys what went through native software distribution in just a few minutes basically web 3 native ways to publish your apps and games using ipfs polygon and other amazing protocols so definitely don't want to miss this come on over if you want to publish software with your ethereum key come learn how room three hit a few other people too that we're gonna mingle in here all right thanks again everyone for coming cool all right cool all right i guess we could just jump in with them all right sounds good well welcome everyone super nice to see you all here i'm alec co-founder of alice this is zach our cto and uh yeah we're here to to learn about web3 native software distribution and let's get right into it so what is web3 native software distribution well basically a lot of elements that you already know like publishing fetching and secure updates from existing web 2 systems like github or other auto update systems you've used before but also now we can imagine new cool use cases like dowels coordinating software together so if you imagine adele publishing a new version of an ethereum client like gif uh that's what you could do with web donated software distribution and then if you're monetizing apps or games for for every type of assets we have software license nfts in our system that you can use as a form of drm to token gate your application in again a web 3 native way and native crypto payments so why do we need web3 software distribution so well right here we're still publishing everything on web 2 platforms so we have some really amazing protocols here um even ethereum's guest is built and published on microsoft azure blob store polygon bore uses github releases which is also ultimately microsoft servers we rely heavily on docker hub for managing infrastructure especially things like graph nodes but it also goes down all the way to the end user from the emerging weather gaming stuff mobile wallets that you download from centralized app stores you name it pretty much everything is still being published over web too so we're putting massive amounts of energy into decentralization just to recentralize it at the distribution level so we got to change that and the issues with this include lots of the things you're already familiar with but risk of compromise censorship risk availability risk and then if you're using payment infrastructure all this stuff right now is centralized to apple google meta all of these companies that you have to ask permission for and they take 30 to 50 plus percent of your your take rate so uh these centralized payment infrastructures we got to get away from them and then they take a high take rate anyway so it's not very uh regenerative and what can we do now that we're in web3 so first it looks kind of familiar we have to start with porting over all the common features from things like github and steam and versal those other types of platforms and that includes the ability to version publish fetch and then securely update your artifacts and having like auto update systems as well as the ability to manage team level and project level access control so that you can actually have an organization account and then separate projects underneath that have separate access control but uh vals has a set of tools that coordinate all these web 3 protocols together to make publishing in web 3 easy and then once reported over no reliance on a single entity for distribution not even ballast all we're doing is pulling together all these protocols together so there's no centralized thing valis ballast io is just a gateway you can monetize your software directly now with nfts so again no need to ask apple or google or anyone for permission or even to have a bank account for that matter you could just create a wallet publish your software set a price and you're good to go and then of course dallas can coordinate software releases uh so you know these giant softwares that we all rely on you know we can actually decentralize the publishing process for that a little more and then we also have the ability to create super awesome auto update systems powered by these smart contracts in ipfs and the protocol fees can actually provide public goods funding so revenue generated by software license nfts can actually be pointed at things like radical trips or get coin grants and so there's this connection between the monetized software and the donation-based drip mechanisms that we have now and so how does it work uh well there's lots of different options we make it pretty easy but architecture essentially is such as you publish all the software on ipfs everything gets archived on a file coin for long term storage and then we use polygon and other evm chains to checkpoint and hand all the access control and versioning and then from there the valus client and sdks everything like that is aware of all the latest releases so you could say hey i want the latest version of of ethereum slash 1.0.0 something like that and then how do we use it uh well we have a web front end cli a git of action for if you're already doing github releases or if you're already doing your own system there it's just copy and paste the workflow at the end to add it to your publishing step and then we have typescript and go sdks for all the developers that want to kind of dive deeper into the nitty gritty there and then so this is what the web app uh publishing page looks like it's pretty simple it's just account project the version and then you can drag and drop your assets from there so if you're a game developer this might be the move for you to drag and drop your unity build uh or you know drag and drop your static web app over into here and call it a day or a binary whatever you want our cli allows you to easily create and publish uh releases as well and so here we have ballast publish the organization account acme co and then the project is called go binary and then the version publishing here is 1.
0.0 and then i'm just publishing the disk folder that i built so if you're publishing and building stuff you can just point it there and you can also configure multi-platform releases so if you're building for both mac windows and linux the cli lets you actually configure which binaries go to which platform and the val system will know how to account for that and then like i said we have a github action so if you're already doing releases this is a super simple example where basically it's just tracking the repository the ipfs and then anytime a release is made it just takes that release and publishes it under uh under balance so it's a super easy way to get started there if you already have an existing workflow and then you can transition more into the web through native workflows and then again sdk super easy all you need is a wallet and then you can plug in ipfs nodes your own rpc stuff or you can use the default valve.io infrastructure and then you could find it at valles.io the docs are pretty detailed they go over the whole system as well as the different nuances and then our discord is valid io slash discord we're always super excited to help and we have teammates from around the world so uh chances are someone's gonna be awake but uh yeah and then our github is dallas.io or vallis-io you can find all the cool things there and then i guess our twitter's underscore i o you to check that out we're posting lots of updates there and then as far as the prize pool for anyone that's publishing on the platform um you automatically get qualified to the prize pool and then we're selecting five um other apps that are doing a little more novel use cases or some other cool things that we're going to pick out of that group as well so pretty simple all you have to do is publish and qualify the pool and then uh yeah so super excited i'm going to pass it over to zach he's going to go over the system and how it works and uh we'll go from there but thanks again and best of luck at this hackathon really amazing stuff and uh yeah we're here to help yo yo yo what's poppin cool so i'm just gonna take you guys through a quick demo here so you can check out the front end web app on app.
valis.io sorry just bear with me here a bit of a slow internet uh going on here okay cool so you've connected your wallet you're all good to go you'll see your dashboard like this it's kind of just like a versal github ask dashboard and you'll see we have our projects here we have some activity of all the transactions that have taken place we can audit all of those different transaction houses see those on our block explorer shout out to polygon uh our app.balance.io is currently on polygon um but we also support any evm based chain so check out the contract check it all out so the first thing that we are going to want to do is to create an account so if we go to the account creation page we have a couple options here so the first thing that we can do is that we can upload uh an account image so i usually use this one this is my crypto coven and then we can set our username so just like kind of any other distribution system you know or package management system like npm docker all of these different things uh you need a namespace um so in the case of ballast uh this is an immutable name space um and that's again just to kind of prevent any kind of like changing or supply chain attacks type of stuff there um so here i'm just gonna go with let's just go with um metaverse co i'll keep that a lowercase um and so then the display name is not immutable this you can change it to anything that you want and it's kind of just like a display name on twitter or anything else so i could say the metaverse cool and then we can put in a website there we can say like hello dot world or something like that um and then you know just a quick description so we make metaverse uh stuff cool so that's it for the basic info there um then each uh account on vales um can also function as a team so again it's just like a github organization or like a virtual team or anything kind of like that so um normally this is where you would take your list of addresses and you would paste them in here i'm just going to take my local metamask address and create that oh interesting there okay some weird stuff going on here this might be an internet thing sorry there we go okay so you'll see that here it is prompting me so um we're a big fan of open source we're a big fan of public goods so everything on ballast is free by default um it's all meta transactions so all i have to do here is just give it a quick signature with some basic info and i can create my account and so while that's pending i can check that out you know on the block explorer make sure everything's a-okay there and you'll see everything's good so now i got redirected to create my first project so i'm just going to select metaverse co as my account and now i can create you know any kind of project that i want and again you can kind of think of this higher level name space just as like you know you have your local github account and then you can publish you know your github pages or anything like that under your default github namespace and you can have any number of kind of like federated name spaces under that root namespace so for me i'm just going to say let's just call it metaverse and then again we can just do another display name so the metaverse [Music] something like that um website this is again if you're submitting to the youth global hackathon you might want to put your website in there or your github or something like that sorry i'm not the best speller here so i'm just gonna put hello.world in there too so now um so we have a full discovery page um a lot like a steam-esque marketplace because a big thing is not just um open source software but you know uh developers have to eat too so you know there's a lot of paid software on ballast and paid uh native crypto drm games um in this case let's say that uh we'll do like a installable game and then we can set that with some tags here we can say game application and so once we do that uh now we have a couple uh description fields that we can add that will show up on our ballast profile and throughout the marketplace when people search for our game so i'm just going to say a super cool metaverse game and then i just have some example mark down here that i'm going to paste in there and so we have our metaverse game join thousands of players online for the next revolution of web3 gaming experience distant lands and discover untold treasures in the metaverse free to play no pay to win um okay and so then also with um so we have the idea of account level access control but then there is also the idea of project level access control so um we might have some team admins that are managing our organization we want them to be able to add other people through this kind of like role-based access control system um but then we might just have like verifiers or publishers on the development side where you're a developer you have your development key um and you want to be able to verify build so um this is where i would then paste my development key and i'm just going to copy that from metamask again cool so now uh all the fun stuff um when you're on a marketplace and you're on a game you know games need trailers games need um a lot of good stuff a lot of screenshots you know active content oh so for this i'm just gonna pick my main promo image there it's of you know lost lands forgotten kingdom then i'm gonna add a couple screenshots for my game so here are my game characters here's my cool metaverse girl in the metaverse with her metaverse glasses and then that's it all i need to do is create my project and again if you're doing like a live stream or presentation of your own or anything like that um you can paste in a youtube link here um thanks um you can add all kinds of other uh content and videos and um it'll all go right to ipfs okay so there we go now we are back on the dashboard here and i am just going to oh select my new account metaverse co um and so you'll see my new project metaverse pops up a super cool metaverse game um and if i click that i am greeted by this beautiful ballast profile and um now this is where i will be able to manage my versions and activities any other members or maybe like people that are in my dow that are distributing software that want to um collaboratively sign off on releases and distribute their software together with me um but then yeah all of my nice little screenshots all of my nice little uh markdown right in there all ready to go um and so then uh we're also tracking you know all of these downloads through like ipfs gateways so there's a lot of really cool metrics that you can see to track like how many users are actually pulling my files from these decentralized networks and playing my game or running my app cool so let's publish so i'm just going to do uh version 0.
0.1 um usually i just use simver for any you know semantic versioning and then we can do a basic description so i'm just going to say initial release [Music] then i'm going to take my hello world go binary that is my metaverse game and then it's just as easy as publish release sign one more signature right there and just like that we have published our first release so here is our release from the ipfs gateway um anybody can now take our valus client do a ballast install on this game natively um and then stay tuned because our dim client with our built-in wallet support sapphire will also be dropping uh very soon so um again just to take another look at this this is the basic settings page it's pretty much the same as the account creation page um but there's a few additional settings that we have here now um so a huge part of ballast again is that not just the distribution but also the monetization of software um so as part of that um we're web3 native so we need to have web3 native drm for our software um so each project on valles has a built-in project id that i can activate and embed within um pretty much any sdk so whether it's like tune safe gaming or morales or any of those i can take those and check a digital signature against somebody's token balance to then token do uh my application and there's different levels of security that you can implement there with that kind of drm but this at least gives developers uh the primitives that they need to monetize their software in a web 3 native way and this is really powerful because when someone goes to distribute software on someone somewhere like steam you know you might already have paired with a game publisher they're taking 10 15 then you go to put your software on steam itself they're taking 30 percent apple is taking 30 google is taking 25 dumb road is taking 15 it's just taking like 20 percent um with ballast it's two and a half percent and then we take all of those funds they go to our uh community treasury and then we cycle that money back into open source projects um so what we can do here um again we're on polygon so everything's in matic we can set a default price um we can set a limit and we can set a royalty percent so that if anybody transfers one of these game licenses um to somebody else there is a royalty on that as well um so then you're also able to customize your royalty address and all of these aspects to monetize your piece of token dated software um natively on the team cool um yeah yeah awesome yeah we're about to wrap this up with just one more example so if you are a go developer or you're building some kind of cli and you prefer to do like a cli publish then we have also check out this example projects repo for sure we have a bunch of different ways that you can publish different types of software here so we have a go project multi-platform go a rust solidity project um as well so there's definitely different examples there but just to um just to show you what the cli is capable of uh we're actually in this example repo right now with the cli published multi-platform project and the command can work both ways so if we have one binary for instance uh this one is a single go binary here that when we build it it's just one hello world to do that it's literally just valus publish and then the version and then the folder uh i actually need to make that folder but then there we go so then if i run the make publish that i'll actually view this this build it'll select the account i want to sign and send this from and you can see the meta transactions oh i need to bump it one more version so you can see there it it knows when an existing release has been used and i guess i did this a couple more times then i realized let me just go to five but uh yeah basically um it'll upload the binary publish the release and it'll do all the meta transaction stuff so you can actually see all the like open gas station network stuff that's happening in the background all the magic that we make your lives easier with but basically yeah right there it's uh confirming that transaction and then it just published that go binary it shows you the link to go and fetch it and then boom there's my binary right there uh and then with sdks you can also do the same thing and fetch it at this at this name space um and then similar for the multi-platform do you want to save them okay um the multi-platform is the same thing only now we can additionally describe uh other releases so you saw i just uploaded the disk folder and just called it a day but with this i can actually specify in the valles.yaml the account i'm publishing to the project the version and let's bump this up to like eight just in case the files the same way and then we have an install field here where you can actually describe the name of the binary and then the platforms that you're targeting with this and then we use the standard the go standard combinations here so you can basically say hey if i'm building for mac on a regular amd64 this is the binary i'm publishing if i'm building on linux or windows this is these are the binaries and then i just have my build script here tell go to build multiple versions of this um so essentially i have in this folder a bunch of different versions that work on different platforms and in this ballast animal i'm describing those versions and which platforms and then since the valve gamma is already set up i could just run a valve publish it'll parse everything and no i didn't hit save on that and then it will publish each of the binaries as well as some additional metadata that lets the rest of the system know about the different platforms so um i'll jump to this in a second as soon as it confirms um and oh that's interesting okay so let's uh so let's go to the acmeco site here and then go to this multi-platform project on the website and then the launch will take you directly into the folder but then if you actually go to the higher level metadata here you'll see this is kind of a json we use to describe that install stuff so basically all this metadata is just to tell the front end how to actually interact with the project um and so yeah it supports pretty much any type of software and there's all kinds of different ways to publish depending on uh your preferences and your stack um and like i said uh anyone that publishes gets qualified to our prize pool and then we're picking five finalists out of that group as well uh but anyone who publishes is gonna qualify no matter what so that's gonna be pretty easy and then yeah um we're always here definitely come find us if you need any help come join our discord uh we're super stoked to to have you there and uh yeah for sure well amazing stuff everyone uh i guess we'll just take a couple questions if you have any and then uh yeah sweet yes so we actually um this project here um so with the token gating uh it's actually pretty interesting because this is a weekend hackathon we're very curious to see uh what comes out of that but this acme co has an example for a token gated unity game that uh basically if i launch it hopefully the internet will play nicely with us but um we have this example here and in the docs we have um how to actually set this up so in a separate video and a separate walkthrough as well and then for unity apps we also have an example script here so if you go to this page on the docs token getting your software you'll see the general flow and then some links to examples uh and then this one is the unity example we put together for the signatures uh and then basically the way it works is uh you just go oh this is the wrong one actually but uh i think it's this one um so yeah this is just the unity game and then you connect the wallet and it'll do the balance check from there um and then uh yeah this is gonna be so interesting but i have it firing off in the console right here that uh one in success means that the balance is there um so yeah it's definitely possible to tokyo get a unity game or any type of app and yeah look for that sweet cool thanks everyone all right best of luck everyone enjoy the hackathon and have a great weekend we'll see you soon cheers um oh no thanks okay let's just open this absolutely hey okay i can see what's going on right now wait yeah i'm all fat now which is not good either um hi everyone um so before we get started uh sorry about that delay earlier i'm not sure why my computer wasn't uh playing nice with everything but we're ready to get started and hopefully we don't run over time so what i'm going to be doing during this a little uh workshop is a high level high level overview of the big dell performance funds uh which is like a sort of subset of uh dow tooling that we came up with in order to sort of improve the proposal process to reduce counterparty risk for gals so yeah let's talk down to like how familiar are people in here with knows who's heard of adele interact with one so adele is a decentralized autonomous organization there's like many levels of it it could be a bunch of people in a group chat who just decided that they want to share like control of a multi-ship to like multi-thousand user um organizations that have token state voting um where they make decisions over like treasuries that are worth hundreds or even billions of dollars um before we get started over here if you guys want to pull out your laptops and just open up this repo uh we're gonna be doing a little code walkthrough of what we've got over there um later on um but yeah uh before we get started if there's anyone not familiar with dallas anyone have any additional questions on what exactly a dow is yeah basically it's like a co-op but we've bought it on to just like fully transparent like who's voted for what and so on and so forth and why things have or have not passed going to leave this up for like 30 more seconds and that should be good um so okay if you guys are already familiar with thousands you're probably familiar with what the voting process sort of looks like for the majority of dallas these days so typically you'll have like an initial proposal thing on a forum like discourse right um and then they'll use some sort of combination of the gnosis safe um like see snap plug-in um and snapchat knowing sort of push proposals in in order to move funds on chain um interact with contracts on chain with the uh dow multi-sync um are any of you unfamiliar with any of these platforms so um like our existing process is sort of like people can go and propose something on our discourse forum right at the proposal being like oh hey i want x bit in return for um these deliverables right um if it receives enough interest on it we then take it to a vote on our snapshot form uh if that makes sense and if it passes the vote on our snap platform what ends up happening is we then um allow um execution by our diagnosis uh and to uh transfer funds over um so basically what's the problem with this process um so we basically uh at the dell we wanna fund projects and associated entities to grow sort of a big ecosystem but you sort of finish counterparty risk when doing so right so let's say that um someone puts a proposal in and they're like you know i'm gonna build a house i want ten thousand bit or something like that this should be like a charity or something like that um there once you release the funds to them there is no way to sort of guarantee um these funds um they can uh they can rock pull you fairly easily right you can just simply be like oh screw you i'm not gonna build this i'm just gonna take the funds and run and we've seen pieces of this before three malicious proposals on other dows yeah the solution that we sort of came up to this was uh performance bonds so basically we're trying to implement a performance bond process wherein um folks are required to stick some sort of collateral into our proposal process um so and this sort of helps solve this problem by providing an economic guarantee for the dial itself um we're locking this collateral into an intermediate contract that can be slashed so certain goals are not met so we're going to come up with a cute example here uh we have blimp dell um let's say there's only like seven blips in the world so yeah this is a kind of a high-risk venture let's see that this dow comes to us and they're like you know we want to buy one of those seven blimps um and we went 100k bit to buy one of these blimps um what the performance wanted place what we'd effectively do the big dell member community members can request that the blimp dial community members post about 100 youth in collateral before releasing the funds if the proposal passes um and then there's two possible outcomes for this either lumpdow would buy a blimp and the hundred youth importer was returned or blimpdale uh fails to buy the blimp and a hundred youth is about recouped by the dow itself um and sort of yeah because their initial condition for success was you know wanting to buy a blimp uh there are only two scoots for this either you successfully have bought a blimp or you have not successfully bought a blimp obviously this can be like multiple chairs to this yeah oh so collateral can be staked so the contracts that i'm going to be walking through later they're effectively like middleman contracts you're able to post collateral into um that are that can be um slashed uh by um like guarantors or individuals from adele um if certain criteria are not met but we're going to be walking through the contract for that shortly yeah um yeah so like why did we choose performance in this particular context basically it's because it increases community engagement proposals it's forcing like the other entities community to participate within it because obviously who else is going to be posting collateral for this right uh it sort of formalizes um on versus offseason interactions um it imposes basically consequences like i mentioned before on a red pole like behavior um and it's a good vehicle for now call investments basically um so let's say that um one dow wants to invest in another now who's building some sort of tooling um the other dow can fund the performance bond completely from their own treasury uh to sort of formalize the agreement um together right so i'm going to be doing a really quick code walkthrough as well of the contracts themselves um if you're able to pull that up yeah so this is the um like one way to touch anything it's like most of our dow tooling and traveling tooling um code and so on and so forth um so i'm going to be walking you guys through uh a pretty simple like single collateral multi-reward bond right so this is a bond where you can sneak in some sort of crc 20 collateral and then receive some arbitrary set of erc20 tokens or something as rewards or redeem from that a particular bond itself um so everything is fairly permissioned by sort of like other members um right now job um you can see that we have like obviously a dead monster function over here where people are able to stick sort of a claim within their style within this reward mod itself there is a sort of particular lock-up period that they have to deposit their funds to this uh bond uh during or else um they won't be able to like like meet their rewards yeah um which is all sort of set um during the initialization um so we're we passed in like sort of um metadata like describing the bond that's on chain we're passing in settings to sort of govern like the parameters of the gal uh i feel like on the initialization oh is it hard to read i'm really sorry better yeah um and we're basically able to like edit this right um that's just like the basic deposit contract um we also have a like a timelock multiple loved one so this is um well no pictures please thank you it's not great sorry um we also uh have a like a reward contract that people will be able to have their lives deposited into and uh redeemed afterwards if um the bond actually does succeed in this particular context um that maps and is tied to a particular bond deposit contracts right um so basically it's pretty simple so we have like a mapping of the claimant itself the person who deposited the guarantor who deposited funds into the original bond contract to their reward pool debt ratio which is an integer representing like the amount or like the ratio of the tokens that they had within the initial pool um and you have a like individual reward pools so um the tokens that they will be eligible to like sort of withdraw from and a redemption timestamp particularly which is like the point at which we know that like if it if the bot has not been flashed they should be able to redeem sort of all the collateral um so yeah basically um sort of once uh funds are available so when the wood empty timestamp sort of is set and it has passed um you're sort of able to iterate over and collect any of the arbitrary erc20 token rewards or uh like initial um things that we've deposited uh within these uh and the time lock has to get expired um and so on and so forth uh it's like a pretty simple like single pool style solution for these things um it's pretty similar and to um i would even call it like staking reward management uh it's just allowing for like a one-to-many sort of redemption pool that we have over here um yeah so um you can see how we sort of calculate the reward stats um over here as well uh after like they're remembering the corresponding lock-up period um so you can have your claimant um like the dead tokens that they were issued um upon themselves within our bond um the total supply of it is just basically a very simple um like their own like a portion of the rewards pool depending on um depending on um how much they deposited originally and uh yeah it's pretty standard um over here um yeah something that we do find uh i do find a bit more interesting within this is like the permissioning system that we have in place um so if you step out a little bit uh we also have pretty cool like roll access control like on a dow level for who is able to sort of control um each of these pulls and so on and so forth because we're basically deploying these rules on a sort of like a per dial basis um so i'm actually going to go into a comp one of the contracts where we store all of these roles um which is in the roles contractor right here um so we have like the dell admin and the dow creators who are able to be deploying these bonds and manage the admin functions such as um sending timestamps and so on and so forth um within them um we have down people which is like typical dow users who are not able to like interact maybe like shake and play guarantors we have the super user which obviously has sort of all permissions within it and then we have a system admin who is sort of able to set pause and unpause um contracts and sort of increases emergency i can sort of show you guys how that ties into our um bond contracts over here if we take a look at uh the not the bond creator contract it is in the yeah sort of like bond factory and bond mediator contracts um [Music] so effectively um we're not uh these all inherit from the um we have low access control um documentary um and what ends up happening is that you're unable to create bonds for particular dials unless you are um if unless you have a role for a particular desk if you have a cool encoding system where you might have like a unique gal id uh linked to um like a particular address and rules for those particular addresses you're new to that particular dell um and because um you have multiple you might have multiple entities or multiple others and sort of counterparties um to like our on-screen um to uh like onto like investments and so on and so forth um we want to make sure that only those counterparties that have access to creating these um bonds and like saving sort of contracts right um so we basically have independent factories uh for each of these individual things um and only um the admin folks from each of these deals are able to deploy both like the rewards and fund the rewards and like create individual bonds uh sort of for each of them yeah i guess that's sort of a high level overview of um what the bond sort of does and what it is and i'm curious if people sort of have questions uh about a little bit like a few more questions about um what exactly these pieces are like the implementation details themselves okay um yeah so we also have like interfaces for like what what a typical single collateral bond would look like where you're just depositing like some opportunity or c20 as collateral um again the functions are fairly uh standard when it comes to things like this you're able to deposit a certain amount of collateral we're doing a certain amount of collateral um an interesting parameter of um ethereum is that there's no um like floating point math right so um when you are like reducing the collateral like based on the ratio of positive there'll always be like trace amounts of dust tokens left up in it so we also have like a sweet vc20 thing to remove all the remaining tokens into it uh and back into the original dash country so that we're not leaving best tokens on contracts all over the chain um yeah um i guess you can also talk about sort of the slashing uh mechanism over here so um like remember what i mentioned um in the blimp down example if they don't meet their particular um like goal like being able to buy a blimp versus not being able to buy a blimp um you have like an implementation of a slash function where you're able to enact a penalty for the individuals who escape their funds within that bond caudal contract um which is which just allows uh for a super user or a dow um admin um to basically call out the amount of their flashing from it um and having to put in like a string for the reason i'm gonna do it on chain if that makes sense and this would just shoot the amount of tokens or like the collateral from that particular bond back into the um dow who's put up put up the portals um treasury uh if that makes sense um yeah i i guess do people have uh any other questions about um like how this improves the proposal uh proposal um flow or um i guess sort of other tooling uh within our ecosystem yeah uh high risk of regulation for this system the bond sort of payment system um so i like to sort of think of them as like a formalization of a contact chain so uh basically this is just sort of a method of uh posting up some sort of like collateral um this often happens like often right where you might be testing some sort of middleman otherwise it's just that this is sort of happening in a much more um like transparent and regulated sort of way uh i think maybe in the states uh the dow bond token or like the debt tokens that you receive as a part of the bond because it can be redeemed for things that might cause some issues uh but i think that in more dow friendly jurisdictions um that it shouldn't be too much of an issue um but like we all know that um the stage is not particularly friendly uh for tokens or anything uh regarding um like dao's or what might potentially be securities um yep yeah so this is usually what like the majority of the proposal processes sort of look like um like like i mentioned before um many of them use discourse which is a sort of like a forum plugin if you're like familiar with like beauty forums this course is just sort of like an alternate newer version of that uh people are able to sort of post up like ideas or things that they want funding for proposals they have to have like formal write-ups um oftentimes people aren't looking at it too closely uh i know some folks uh probably familiar with the unifla proposal i just sort of proposed they paid schools like a bunch of money very able to find um returns um yeah so um yeah so usually the initial things that i put on on the snapshot have to reach consensus or like interest on like the discourse forum uh first yeah so it's not uh so it's a website um and if you're interested in promoting something in the big dell of this course you can just go to our website and we have a link to our discourse like in the top bar yeah um yeah but i think that this might not be like the best solution for the problem at hand like because you're effectively shorting whatever token that you put into the bond and which wouldn't turn like a little token um but uh it starts it's a step towards sort of improving what is sort of a very uninvolved uh proposal process right um an issue that we've seen facing us um the majority of the time is that proposals are sort of pushed through by insiders i don't know if you guys are familiar with like the soul and drama that's going on right now where initially the vote was like 94 percent you know we don't want to um do uh take this liquidation and do it otc right um and then you know some folks step in with a lot of insider tokens and one guy voted and it suddenly got pushed oh hey we're actually going to be liquidating at otc um we think that putting up things like this sort of incentivizes the community to come together and vote more and it puts house hasn't put more safe in the game and it allows them to be on a more equal footing as folks they're sort of able to um like post like encounter um like sort of all by themselves um we're sort of also looking for more tooling um along those lines that sort of makes the proposal process more engaging and more accessible to community members sort of overall we actually do have a prize available sort of today i'm going to pull it up in our medium oh my god where we're looking for like more ideas for how we can improve our proposal process um from uh what we have today so we're offering about like ten thousand dollars in prizes uh we have sort of two tracks with this we have down treasury deployment um so basically we found that large scale treasuries have to be managed like really conservatively to avoid like principal loss through like systemic failure for example you put like all your money into the sunfield time and that yields attacks right um or like oracle misfires or like other mechanical exploits right and we're basically looking for solutions like business can be tooling visualization dashboards operating structures and so on and so forth that would help allow dallas to help deploy their trustees outside for yields um for example like something like that you could build it could be like a hypnosis safe module that allows for like white listing and passive deployment of traffic assets like blue chip yield plans or like collateralized or margin loans that you could people could take out from the dow treasury for some form of interest um track two which sort of fits more into line um with the little um specifications that we have today is the trying to improve the dow proposal process um so like i mentioned before again the majority of proposals are created like in the in private right and the initial person that's been proposed on the forum itself has already been like reviewed by core stakeholders and insiders and generally like we already know it's gonna be pushed through the moment it's been posted on the forum um yeah it's it's not great um this process can take like many many months and it's usually unpaid and so people aren't really incentivized to do this unless they already have like a large stake of medal itself leading to sort of like insider explosion on these death proposals um do you want to be able to find a way to like leverage a wider range of community contributions uh for ideas and development without them having to go through this process and that's just not something that's happening with like the current dow status quo and we're just looking for solutions to how to incentivize the construction of dow proposals in like a public way right um whether it be through like community presentation and like funds whether it be through um community presentation and like open ideation on um what exactly proposal contents are um and without numbers being able to signal that they're opposed to certain parts of it um in a very explicit and formalized way um yeah so it's just definitely beneficial um this could be definitely beneficial to the education process and terms like daily branding in terms of like protocol functionality upgrades political parameter changes like sort of any other aspects that many dows um have their users that of vote on ontario on a day-to-day basis um yeah and so if you're interested or you have any ideas for what you can sort of build for either of these tracks i'm happy to like meet you at the uh booth and chat a little bit more um and yeah thank you i guess for coming to the talk today it's 5 30 exactly um yeah okay so i'm julian travisa with school of finance um just a quick introduction to swivel we were founded ourselves as a hackathon project at youth denver 2020 um it's a pretty simple idea at the time but you know things kind of just get the ball rolling so hopefully you guys can do similarly as far as the workshop today really really the goals are hopefully a little bit less technical although it's going to be a bit overview of the technical details but the goals are really to kind of explain how developers can trade rates and make applications around these things at the moment this sector is at really largely unexplored beyond the first layer of creating fixed rates so there's there is a big opportunity for people creating hackathon projects that said the two real big goals we have for it are to kind of identify uh the various fixture protocols out there and where their yield actually comes from as well as you know a few strategies and kind of how to work around them um i said and here to swivel right and where our yield specifically comes from um we take future deposits in money markets like compound ave urine etc and we split them into two components one is the redemption value for your deposit and the other is the actual interest you earn until some future date so the most common use case there is the fixed rate lender will have this cash flow and want to just trade it away immediately for something upfront right and in doing so the lender effectively gets themselves a fixed rate um while the other person is purchasing some future cash flow and this user purchasing the cash flow is effectively speculating that the interest rates will increase over time and there's this is traditionally the largest market in the world with interest rate swaps um and d5 it's still pretty small um so yeah i mean the best example again just walking you through it um you have one lender that has a thousand dollars and you have one other user that is willing to pay effectively a market rate of five percent for one year so that would be fifty dollars um you take this deposit you put it into compound and each user gets part of those cash flows thousand dollars in redemption value and a thousand dollars earning interest until one year from today the next step from there is really just calculating okay how much does this user that owns the tokens earn over the entire period right so under the assumption then that the rates moved up from five percent to eight percent um they paid fifty dollars initially they earned eighty dollars so this user is actually profiting that sixty percent profit um i mean honestly in today's context this is a pretty old slide it's very different right if rates are one percent and they go up to two percent you're getting 100 profit um so the trading opportunity is better now than it has ever been um but the ecosystem is still not really as mature as it can be we use an order book which is very important but there's about five other protocols around that try to address the market but completely fail to address what these yield tokens these end tokens really are which is a derivative in the same way an options price is based on some spot asset this yield token that earns future yield the value is going to be based on how much interest it earns it's that simple so when you look at an amm or otherwise and try to price these assets it's actually nearly impossible uh the lps just get arbitraged it really ends up horribly for all parties involved and pretty much everyone right now is just handwriting this fact away saying hey we'll give a token incentives uh that kind of works right token incentives work but you know we've seen similar things with options protocols where hedgic had molly wintermute come out and say hey our lps are losing 30 a year but they don't care um and now a lot of you probably don't know it exists so um yeah um that said that there is a wider ecosystem of fixed rates right and my goal isn't just to show our project but to kind of introduce what developers can do with this ecosystem right there's about six different fixed rate protocols they all generate rates or yields in minorly different ways or provide markets for the tokens in mildly different ways obviously i'm biased to assume that if it's a derivative you need an order book to properly trade it that said you know when you look at the yield tokenization method and this is one that is sheared across a number of protocols we were the first to come out with it really um but at this point there's there's there's about five others that all use the same model where you take some deposit in a money market you know um compound and you split it into these two components um at the moment there's no standardization whatsoever across all these protocols and it leads to a very very very difficult user experience in general um this is something we're working on um and then moreover as well as a liquidity provider or user it is actually very very difficult um to even just properly interact with these protocols you don't know who's really providing you the best rate you don't really understand the underlying interactions um but regardless you know highlighting the point of the talk where does the yield actually come from in this model um it comes from one party that is potentially speculating that the rates could go up or it comes simply from time premium and that um if the rates maintain a consistent rate um you know let's say you're willing to take a slightly lower fixed rate in the current variable one uh you're effectively being paid or that you're paying the other user to to release your time premium get a medium capital media cap immediate capital today um and this is obviously worth something the market is pretty naive at this point so it hasn't really been powerfully pricing these things but more opportunity for traders um the difficulty with these models so the good ones is it's very good for building blocks you can rely on a lot of other stacks and integrate all across the ecosystem it's also really great because regardless of the rates there is a supply and demand on each side um you know the great example is if the rates are high eight percent there's a big incentive for you to lock it in and and kind of get rid of your capital um and alternatively i already gave the example if the rates are very low like they are right now uh it's it's very very attractive for users to come and long them uh i think really the best example that you know we've been trying to push recently has been the the stakedopenium trade um in that a lot of users are trying to short stake deperium but you can also just own stakedodium and level yourself up on the interest rate which again this is only valuable because of this sort of supply and demand the other really most common and in my opinion viable model is just over collateralized lending um but through the use of a similar instrument with with principal tokens right if you have uh let's say 150 an eth and uh this is provable the same way any sort of money market does prove it at the moment with whatever oracle etc and liquidation you can instead of minting variable yield mint principal tokens these are redeemable at a future date for one dollar and from your point of view if you sell them today you're borrowing at a fixed rate right if you're able to sell your principal token for 95 cents it means that you've borrowed at a fixed rate of roughly five percent a year because you just have to come up with that last five percent five cents um so it's actually also a relatively flexible model um but there are issues with it as well right the supply and demand isn't quite there as much um but the big thing is is that there is an abundance of borrowers in the ecosystem so these markets tend to be a little bit more liquid um and you know they can scale they can scale a little bit easier um so you have this really accessible user base that you kind of just can immediately identify and that's great um and the last and this is one that has been largely growing more recently under collateralized lending uh i'm a little bit more dubious on this end but we've seen some incredible growth out of companies like maple um where they they allow a centralized entity to essentially sponsor a pool and they're doing the due diligence on the borrowers that are lent out to that pool porter on the other hand similarly they allow dows to raise debt there's a lot of risk here that make it a lot harder to create trading strategies around but if you're the sort of person that is willing to take on some minor amounts of risk there are large amounts there's a lot of profit just to gain currently there just is um so the question starts to become right how do you start to create strategies that can actually be applied to this sort of sector um and what sort of building blocks can people build next right if flips rates exist what else can be done um obviously the most common trading strategy is longing and shorting the rates right if you want to long the rate it's literally as simple as purchasing the token purchasing the end token and holding it um and trading it away once prices go up uh however there's usually some other strategies folded into to a bond um and the most common one is largely uh people that are trying to i don't know if it's on the street yet to borrow at a fixed rate so here's here's a quick example of exactly that right um in this example we're using swivel and we're going to be borrowing directly from compound um so in our scheme we use we're off-chain with on-chain order book progressive we have an opt-in order book with on-train settlement um which means that all of these things are effectively coming from our api all of the the order the amounts and the signatures um and then you immediately just input it into your functions um we have sdks in pretty much every language for this if you guys are hacking and want to do anything off-chain um and as well there's other ways to integrate on train too um so what's happening here is effectively there are these arrays that are input this order itself contains this a bit more of a complicated object that's imported um but it effectively includes all the information on swivel about the order effectively what is the underlying protocol right usdc or something what is the maturity in unix uh so let's just say december twenty thirty first and then per order what is the amount um as well that you wish to fill um this is all done with eip 712 so this is all pretty familiar for people at this point but you also have to submit all the signatures um in the eip212 format and then include the c token that you're trying to input we add in here is honestly in my opinion pretty straightforward after that um after you actually input all of the orders is identifying how much you've actually spent right how much did you lend out and and see token exposure um and then after that you can borrow pretty exactly the exact same amount um so so in this scenario you have someone that comes in they lend out total lent to swivel through all these orders and then immediately in the same transaction borrow this actually highlights the big issue with a lot of these amms because let's say you come in and you're a large borrower that is able to move the rates up right so this is completely separate from whatever system um that the rate trading itself is happening on and you can immediately move the rate up and profit from whatever differential on its derivative right this is the same sort of thing you could do if there was an amm trading an option and you were able to move the market and it's essentially something that is unique to rate markets and that unlike spot markets there's no cost to manipulating oracles right if you want to change the price of uni swap you you need to spend billions of dollars in capital to maintain it for a block or two this is easy to measure but if you want to abuse and manipulate the actual rate on compound what does it cost you it just costs you moving your capital for one second and paying a marginal amount of interest right so it's actually very very important that we're using this order book because it allows people to avoid this attack um but from the user's perspective this is pretty simple you're borrowing at a fixed rate you have bought total length and c token exposure and as well had that amount of debt pretty precisely another um and there's a few these are available now so if you want to like get into early med these are things you can do um and there are not actual many participants doing it because there's not a lot of profit here i'm gonna be completely honest but these opportunities grow i've manually been able to do these arbitrage before and and best example here is we've had these tokens you split them up into principal tokens and interest and yield tokens um and inherently because they've been split up into two components well you can combine them back into the same one as well which means at a base and core level one principal token and one yield token is always equivalent to the value of one underlying token so you can inherently assume the price of both um however a lot of our these other protocols are quite inefficient and very inefficient they have pools for each of these individually and anytime there's individual pools for two assets that should be trading at the same price you can arbitrage the two so here's a quick code example of doing exactly that and going on to sense and arbitraging the two um you come in and this takes a lot of parameters hopefully you've hard coded some of this or made a more advanced contract but just for brevity's sake it's pretty pretty uh parameterized um you input exactly the maturity the underlying and the sort of asset you'd effectively like to lend and the amounts you'd like to lend go in identify your starting amount so you can effectively calculate your profit and loss at the end of the transaction buy a certain amount of sense pts buy a certain amount of sense yt's hopefully the same amount because you've calculated that off chain and then immediately combine them right like this seems like such a naive strategy that you would think people are actively doing these things but these protocols are in a nascent state and this means that yes people can go out there and and create contracts that will profit off of this arbitrage um your biggest worry at that point is generalized front runners coming and taking your money um but yeah in this case i i returned the profit you make more realistically you probably want to require that profit exists so you do the transaction otherwise you'd revert but i i don't know i didn't decide to do that in my demo um so the next one right this is this is an actual trading strategy rather than immediate arbitrage or an attack which with previous two kind of work um in that there should be across all of those different strategies of trading meals over a long term basis i'm giving you a lot of ways to be honest there should be a trend towards mean reversion right fixed rate protocols regardless of the source of their yield over time should center around the same rate because the people supplying the supply side of the formula always should be optimizing on under an accord um so with that in mind there are a lot of opportunities just for creating strategies around uh either immediately arbitraging tokens that are across different protocols with slightly different risks but that mature at the same time or alternatively being willing to take some amount of time uh risk there as well so uh again it's very very important i think that there are a bunch of protocols that have different sources of their yield and these are these are real sources these are not illegitimate sources these resources that are sustainable um because this can create a healthy ecosystem that people can build on top of um so the example of that could walk through right so pt arbitrage i'm back to swivel's code base again so there's the same order objects etc um but then in here as well this is the pool for yield protocol and it's it's a principal token an fy token similarly we started with front and we get the initial balance we calculate the amount that we actually went out on swivel and then we see exactly whether we can sell that amount on yield so this entire thing assumes that you already own the yield token but with that said the assumption here is that the rates have oscillated a certain amount and you are reversing your position you're betting on a return to mean and you just easily do this on train with an activation um more ideally you'd probably you could set this strategy on chain say if the variance is greater than x percent the calculation can actually be executed um at the end of the form or at the end of it you essentially just close the order and likewise you should really be checking to make sure that your r profit is positive rather than just returning it but there it is um and the effect here is and i had an entire another deck for this thing but is that you are creating a deeper and wider fixed rate system um if there are participants that are willing to do this arbitrage and we're actually building an entire protocol around this core concept in addition to swivel um that that takes all of these principal tokens and accepts whatever minor amount of time risk um you're able to increase the volume of every single individual protocol profit yourself and ensure that the ecosystem itself is healthy right these are the things that are that are actually necessary for the growth of any defy ecosystem and it's what's driven is what drove spot volume is integrations right these are the important things um this is honestly a relatively similar strategy and that instead of cross protocol um betting on mean reversion between principal tokens this is a cross a within protocol that that there's just gonna be reversion between major stable coins um and we have seen this on on even a short-term basis between dye and usdc with only recently uscc kind of reverting from that um but the idea the idea here is you're just trying to go from one asset and to the other um there's a swivel order you come in and and you try to fill it as quickly as possible and immediately immediately afterwards come and trade on uni swap and trade back into swivel right the result is here you are profiting should there be any more long-term disjoints and rates between stable coins and this is a relatively basic strategy right there's plenty of ideas you can even build on top of this similar stuff i think one great heck of an idea if people are really really looking for one is the ability to just arbitrarily trade from one token into another get it sealed and then trade back at the end of the period um just a wrapped product is pretty simple and things like that again are what the ecosystem the ecosystem legitimately means um and i mean i mentioned this kind of a moment ago there are issues with the growth and and if you can find people that are willing to kind of work around these things which we're trying to do um you can fuel and profit massively traditionally you have things like imm dates around these fixed rate protocols um or not protocols but whatever whatever asset right you have single dates four times a year that all of the contracts for every financial everything mature this makes it so people can actually create structured products on top of them and kind of do the whole building block thing this exists traditionally however our compatriots have been kind of uh reluctant to adopt us through standard with us um this is something that we're spearheading now and it seems like we're getting more adoption of but it is extremely important for people to grow and these strategies really to be applicable for there to be shared maturity dates another really big thing is i mean i showed you some of the code integrations and they look like kind of a pain in the ass because a lot of them are um and one of the things we're specifically working on as well is a standard to reduce the stress of a developer trying to integrate with fixed rates um this is something that i'm spearheading with the yield team and that anybody that wants to integrate with any fixed yield um and honestly i i'd count this in with our bounty as well even though it's kind of a separate thing um anyone that wants to integrate with a fix field should just be able to buy this token off an open market and redeem it later on for for the value um this makes it so you don't need to do anything other than know how to integrate with uni swap and then use the interface afterwards so again if anyone wants to to learn more about these things in particular please compile booths because i think there is a lot that can be done and there's a lot of opportunities um and yeah i think i'm a bit early but it's fine um if anyone really is looking for hackathon ideas i do think we have a link on that i think we posted it in the f global discord um but we pretty much have we have uh sdks in just about every language um we can help everyone out with their integrations and and do some like legwork as well um you know just come hang out and yeah i suppose that's that's mostly mine um we've got bounties for 2500 1500 and 1k i believe um and they're really wide reaching right so anything from minor integrations to dashboards um pretty much anything oh yeah that's about it um thanks everyone for being here uh my name is eric tang and i'm the co-founder and cto of life here today i want to talk a little bit about building disruptive web3 streaming applications with life here studio which is a set of developer tools that we recently launched but before we get into that if you're unfamiliar lifepier is building the video streaming layer of web3 um and in order to talk about you know building disruptive streaming applications um i want to cover a couple of topics one is what what are some of the core tenets of web 3 applications right what makes it unique and how does it compete with traditional website applications especially around these consumer apps um i want to give a quick introduction into video streaming technology and then i'll give you a couple of examples of new new technical architecture that you can start to follow and start to think about your hats of course talk about the exciting part which is the hackathon prices cool let's dive in core tenants of web3 applications so let's take a look at you know some of the this like historic view right like what uh where did we come from and why um what is web3 actually putting forward um back in the 70s and the 80s when the web was first invented we were really in this kind of read-only world right we people created protocols and we were able to kind of send messaging messages around to each other and when that evolved to this web 2 world we started to have this read and write ability right we were able to interact with applications and and actually write information into the back end that enabled us to build much more much richer user experiences and they gave to gave rise to these really interesting applications that are on the web in web 3 we started to introduce this new component which is ownership right so now you can read write and own and with that new element we can start to think about building new types of applications that are way more interesting than what we have today in terms of consumer apps right so so one of the things that are really interesting that's happening is in live three people users are becoming owners right and and there's a lot of there's a lot already being written about the owner economy lots of applications that are building in this space already around the owner economy anywhere from digital assets to d5 to tools right let me um one really interesting example here i want to highlight um we use youtube today to watch video right um artists launch their music videos on youtube and people can watch it there's a interesting experiment and a company called glass on glass you can still watch music videos just like youtube but the additional thing is now you can also purchase music video nf2s so in order and and if you if you're a fan you run out glass and you purchased a music video nft which is a limited edition you start to create a direct relationship with with the creators and as the creators become more and more popular the fans start to be able to take um take ownership and be benefit from uh from the success of these creators because these nfts are limited editions and owning these limited editions early in the career of an artist can become a little bit of thing later down the line when the artist becomes more more famous um another interesting toolkit tool that we have now is incentive design and permissionless participation right so what does that really mean um well in the web 2 world we have this you know technical architecture where um we have the front end and the back end and the database all living in a centralized ecosystem right so the user data lives in that in that siloed environment and and these these environments are proprietary intellectual properties that are developed by companies and that are owned that are owned by the company and ran by the companies in the web 3 world we have blockchain architecture right so the blockchain essentially is replacing the back-end database and becoming the user the user database right we have smart contracts that are also open source and composable and that we can use to program future assets and on top of that we have clients and users so this creates a full this fully decentralized model of building application where there isn't intellectual property but the ownership and the ownership and the interaction from the user data happen in open way and this introduced some interesting tools that we have so now we have a way to create incentives right so these incentive design mechanisms you know are really popular in d5 but it doesn't only live in d5 right um for example it solved this really interesting uh pro conundrum in the web 2 world where when you're building a new consumer application you do it you get to this cold start problem right you build an application and no one knows about it and you have to bootstrap this new uh this user base from scratch um and and if you look at the network effect curve right the more user you have the more the more valuable the application becomes but in order for that application to become valuable you need to have these users so this bootstrap space is really hard to get get by and it's really really cost costly for companies to build these user bases well in web3 we have this new tool there are tokens right so in the early phase when there's not a lot of users we now have a way to create financial incentives for people to participate in the applications that help us smooth out that demand curve and over time you have the financial utility and the application utility cross that helps you get to network effects a lot faster um and you know in a much more uh smoother curve and um you know much less much less costly for for the application developers and this is already um starting to take shape in the past few years uh even in the infrastructure space so here we see a lot of interesting computation infrastructure has been bootstrapped using these token mechanisms where you know each year a lot of value is being distributed to the participants in these protocols and these protocols and infrastructures are being bootstrapped and becoming this global and really efficient infrastructure but it doesn't stop there right it's not just about tokens uh creators can also um take uh take part in this and currently a lot of creators are taking part in this through nfts right and you can kind of look at nfts as a way to capture demand and in this demand curve where you have the long tail of um you have the long tail fans where you can't monetize as much um the way you monetize their attention is by ads right so you know youtube and things like that but for you more um for your more loyal fans you can start to sell nft collections and over time these nft collections can help the creator capture more of the economics on this demand curve another really interesting example is dows right so dao at the very beginning uh were you know groups of people that are coming together putting together a treasury and they start to figure out rules of how to operate and use use the resources in the treasury but over time it's it's also evolved into this interesting way to to collaborate and actually do projects and and develop things and create products right so now we have our governance we have dell tokens that go through these governance mechanisms they have their own inflation schedule and token supply there's a market for these bell tokens that can be traded on the d5 marketplaces so essentially what you can do now is you can create a project create a dao launch your own token and use that token liquidity to bootstrap the participation in your dell and build products on top of that so it solves your product building problem it solves your user like initial user bootstrap problem and and and it creates this new new way of distributing ownership of these applications in the early days to the users and and being live here we see a lot of these um these applications starting to come online these are you know interesting consumer uh mass adoption applications not just you know blockchain news applications right and we're seeing a lot of interesting examples in the verticals of decentralized social networking uh in web3 creative economy uh and also starting to see that in decentralized gaming where games are being created but also there's very non-trivial like video streaming components in these games so how does that all relate to you know video streaming and life here like you know we're talking about building a disruptive streaming app right um in order to do that let's let's go through a quick um quick overview of video technology and see how how it works in the web 2 world and how it is working in the web3 world um video accounts for about 80 of the internet's traffic so without a doubt it's the most important tool that you can use when you're building a mass consumer application and the reason is that video is the most effective tool for storytelling and for communication right it's the most direct um and the most dynamic and the most impactful so if we look at video streaming application um there's there's really three parts right there is your video ingest or video upload your video playback uh and your video processing a traditional video application you know architecture technical artists look something like this right you have your um you kind of have your on the left side you have your server side logic uh for your application that's connected to your database but you have a front end where there's a player that's loading from the from the server logic and the player allows people to and the finance allows people to upload a video into a media server which is which is kind of the lynchpin of this whole thing the media server allows you to upload the video um using a transporting engine to transport the video so that it can be streamed uh it can be the video will get stored into an object storage it gets put into a cdn for caching and it gets put into um into the video player right so um for the video ingest component you know we have we have these uh little three uh three little squares right then and you know as a product for live streaming people usually use tools like obs studio right which is very popular among quick streamers um these are live broadcasting tools um the the advent of instagram or or tick tock or other other mobile applications are giving rise to mobile um kind of mobile native broadcasting and video creation and as well as kind of like in browser web in browser broadcasting as well my computer running out of juice all right back at it um so in terms um for for life here we we have a set of tools for you to uh for developers to build uh video ingest or upload experiences uh with a mobile sdk that allows anyone to build a mobile application that broadcasts a live stream uh into life here and we also have an in-browser sdk that allows anyone to build a in-browser broadcasting experience so you know your users don't have to download like obs or something like that moving over to delivery and playback right usually um for mass scale uh video applications videos need to be uploaded into a cdn right and that's usually from from a media server but sometimes video can also be delivered directly from a media server right depending on kind of your use case um but there's al there's always a video player uh that's in the front end um and you know there are lots of open source solutions lots of closer solutions um that's the video player the playback is usually in the most popular playback mechanism is called hls it's a file format it's a it's a apple standard and because apple's apple they control the market and they just say how video streaming works um and adaptive fairway streaming is a really important concept here as well and what that means is when you're watching videos um even though every everyone thinks that they're watching the same video but they're actually watching different versions of the video that's being transcoded right so imagine if i if i record a video in 4k i upload it into a video streaming platform and someone is watching it on their mobile phone they're not watching my 4k video that's being uploaded right they're watching a much smaller version like a 360p or 482 version that's being transported down and this is a really important concept because in order for video to be delivered at mass to to all the the viewers around the world um it needs to be it needs to be delivered no matter what networking condition no matter what device they're using right and that means video needs to be transported into many different formats to accommodate for that uh so here's a pretty good example imagine um i am um you know i'm walking on the street near my near my home where there's pretty good um cell reception um and i'm watching a 720p i get home i i'm on my wi-fi it automatically switches to 1080p right maybe then i go i go for a run and i run through an alley where there's no good wi-fi reception it can go it can go direct um directly down to the 360p and this this type of switching can happen in a seamless way so that users don't even notice that's being switched right sometimes you know when you're watching netflix it starts out really grainy and it becomes like a high resolution after a couple seconds um that's that's you know adaptive bitrate streaming at work right to help optimize your viewing experience um video delivery playback we talk about video players right there's a there's a bunch of options out there um we're happy to provide some recommendation for you as you were thinking about building your apps um video processing right it's another really important component that happens in the back end that you know people don't usually think about until you start to really build an application um yeah um and and video processing um is is really transcoding right we talked about it a little earlier and transcoding is actually a really computationally intensive um step right because what you're doing is you're decompressing the video uh you're recompressing it down to the different versions and then repackaging it re-encoding it and then you're storing it um and um and usually you know it happens something like this right like you just transcode it all in many different versions especially especially for live streams it can be even more costly because live streams every second is new video right so every um so there needs to be a lot of concurrent uh transcoding that happens to to support a consumer at scale um live streaming applications and that's where you know livestream comes in right life here is a decentralized video processing infrastructure network i'm not going to get into too much of how life here works um just on the high level the way the way it works is there's a global registry and a set of smart contracts that controls um who gets to participate in the network and how and who gets rewarded anybody anybody can participate uh through through this protocol and the participants are basically gpu providers that you know have a ton of gpus right now there's about 100 artists participating those on the network uh a lot of these nodes are kind of big professional data centers around the world um there's up to about 70 000 gpus in the network processing video any given time and and this is completely decentralized which means any of these nodes can go away at any point and the network software is written in a robust way that it will automatically retry so that the end user is viewing experience is never impacted there's a there's this kind of onscreen and octane portion of the protocol so that um all the video streaming components in this protocol are completely off chain uh but they're cryptographically signed so that um only the setup and the settlement happen on the on the blockchain and you know we recently moved over to arbitram which provided a lot of really nice benefits in terms of gas price and scalability um and the economic mechanism were something like this right where token holders can stake tokens towards um the node operators on the network uh when they when they state their tokens they get a portion of the rewards uh of of those operators and over time they they get to align their incentive and you get to create this flywheel where the increased volume of video going to the network creates more revenue for the for the participants on the network which creates more value for token holders that drives uh that drives the demand of the of the token uh which which over time creates more value uh creates more um volume for for the network right so and that takes you into this uh this flywheel um so talking a little bit about building with with live peer studio um it's live your studio is the is a tool kit for web3 uh video developers right so there are three components to it there's you can live stream you can do video on-demand streaming and you can mint nfts um so here are a couple of examples right um in order to add video streaming to your hack you can just use a simple set of apis um the api allows you to upload your video uh into live here and it will ingest your video it will transcode it it will store the video for you it will cache the video and will give you a playback url and all you have to do is is embed that playback url into the video player of your choice put in your application and then you're done and your video now becomes streamable additionally if you want to mint a video nft using that video that you just uploaded um you all you do is configure your upload to also export to ipfs uh and now when you get back is the playback url plus the cib or the ipfs hash for that video then you can use that that hash and use the video minting ap video minting sdk that live here has um and and mint the nft on a evm compatible blockchain another example you can add live streaming into your app into a hack what does that mean it means all you have to do is you create a live stream uh in the live peer api and then when you create the live stream it gives you a ingest url that you are that you can use to ingest your video into and there's a there's an authentication key that allows you to do that after that the video gets ingested transcode is stored sent to the media server and you can play back that video and all of that is done automatically now uh another interesting thing that you can do is at tokengate so what does that mean uh it means you can you can say i'm live-streaming now as a creator but only only the people who own my nft are allowed to watch my livestream right so the way that works is you configure the um you configure for your live stream to be token gated and when you ingest the video it it becomes playable but every time anyone wants to watch the video there is a web hook call that gets that gets kicked off through the media server and you can implement a webhook handler for using any logic that you want right you can check for um usually people check for um ownership of an asset in a wallet right and of course the kind of the wallet address can come with the web hook call so you can go on the blockchain look at the state the data on the blockchain and make a decision on whether a user is allowed to watch a video or not and that's how you token get a video um getting back to um getting back to you know ideas and prizes right um there's 200 uh there's 20 000 of total prizes um for for life here this time um what we're looking for are experimentations in social applications right here are some examples um there's a recently uh there's an interesting protocol that got launched called lynch protocol and it's kind of a a social graph smart contract framework that allows anyone to build um social applications on top and people have been experimenting um with lens plus life here building kind of video video centric social applications that are pretty interesting but beyond that there's already a lot of existing examples that you can take a look at this one is an application called discover that's been live for a while there's an application application called boom um that's kind of a decentralized netflix um there's there's lens tube um iris is another project that's building a lifebear integration uh with lens so lots of interesting kind of um opportunities here especially if you think about incentive design and how um and how you can create incentives for creators to come and um and be early adopters in these um in these social applications and talking about creators um we're also we also would love to see experimentations in the creator application space and the creator economy right and i think there's already some really interesting creator applications in web three um and the top shot is probably the the biggest one right where um and if you think about the mba or if you think about the basketball players as creators they're able to sell nfps through the top shop platform uh mira is another good example right where writers are creators and writers are able to use a number of different um kind of value creation value capture mechanisms offered by mirror um and it's kind of a web-free version of media right um another category that that we're seeing a lot of interesting um experimentation around is decentralized game gaming plus streaming right so obviously decentralized gaming is not just about video streaming but what we're seeing is when you add video streaming onto onto the gaming component um gaming becomes a lot more viral right and we've seen this in the web 2 world where games are now kind of almost created for twitch streams uh to to look what to look really good and to look really fun right uh and we're starting to see even in game broadcasting components with you know sdks like gen bid right where um you know game developers are embedding video streaming capabilities in the game because it's such a um such an effective mechanism for driving driving more gamers to come and play their games right so we'd love to see that um of course there's a lot of interesting it kind of crosses over with with metaverse right a lot of interesting meta verses are are being built in web 3 right now um you can see some weddings that happen in the metaverse especially during uh because of kobet um so yeah so the first place is ten thousand second second place seven thousand and third places three thousand um yeah uh come and find us at the booth um we'd love to help you with your hack we have our developing development team here product team here if you have any questions at all if you want to talk to us about your pack ideas yeah come and find us then we have a couple of minutes for q a if anybody have any questions i'm happy to have to answer them yeah yeah really really good question so the question is about token gating right like where is the token where where is the gating happening right um it's really great question um the the problem that it solves is that it's gaining the actual video streams instead of getting the just the front-end web page right because if you only get the front-end web page what happens is people gain access to the web page go and copy the video url and share it and it's over right um so so the way this works is it actually issues a jw in the video streaming component in the in the video streaming workflow uh so that um only and and it creates a session id per user a per viewer um so that um you're you're essentially giving you know about 60 seconds of viewing rights uh every time it's um every time it's being granted and then you can regress yeah yeah so the question is about what about the back end how did that happen um currently um the application implements the backend right so you basically register a webhook callback url and then the web hook just have this calls that url with the uh with the parameters from the front end right of course there's if you want to build a staff that you don't want to build a back end how do you do that uh you you can you can do a couple of things there's actually um there's two protocols that i know of um that are working on this one is called unlock protocol another is called mid protocol both of these things allow you to um kind of build a build adapt using the gap architecture um if you're interested in building a building some tooling around those staffs with live here um i think that would also be a fantastic hack and i'd love to give you a price for it yeah yeah the question is is there a way to upload audio files and the answer is yes you can you can upload audio files you can also stream um doing doing a live stream uh do a live stream of an audio only stream and that would also automatically work yeah yeah can you upload just an audio file you can yeah it's the i think it's the same way that you would upload a video file and then um let's see if you can just upload the audio file yeah yeah good question so for token data streams um do the do the you know transcoders on the network have access to those to those streams the answer is yes um it would have to go through the gpus in order to get get it transcoded right you could um you could uh configure the um you could configure the stream so that it doesn't get transcoded and you could you know if the output stream would just be the source stream that comes in if that's what you want to okay i think the question is about royalties right so if you want to if you want to create um if you don't so for example if you want to create a video uh create an nft um and be able to distribute royalty to the original creator um how that would work is that right cool um it just works like um creating an ft that has worlds here already built in right um so so life here actually just gives you the ability to mint that nft um how like whatever nft that you want to mint um you can just do that you know the sdk basically allows you to specify the um specify the contract address uh and from there the sdk packages up the metadata in a nice format and puts it into ipfs so that you can just use that as your nfp metadata and everything which is um it can be done and you can of course customize the metadata however you want for the nft um yeah so the question is uh can can i say um can i like rotate between different transcoders so that no one gets no one gets the whole thing technically yes uh but you have to build it yourself yeah and then the way you would do that is to run a light pure node right and then you can just um build that kind of scheduling mechanism into the node and of course the whole stack of life here is open source if you're interested in doing that i can show you i can show you where where it is in the code that's called all right well thank you for being here um yeah our team will be here all weekend i personally will be here all weekend so come and say hi
Automatic transcript — names and jargon may be misspelled.