Flare Workshop with Filip Koprivec
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Join us for a Flare workshop with Filip Koprivec from Flare Network, and learn how to use external data to build your first on-chain app on Flare. This workshop took place at ETHGlobal Bangkok, a 3-day hackathon held November 15 to 17 2024, that brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com
Transcript
for okay e okay so let's start so flare what is flare flare is blockchain for data so flare is a evm layer one blockchain totally independent um but apart from other blockchains we allow you to get access to decentralized data in a safe and secure Manner and also very cheap and very quickly so it's easy to use and it's safe to use so if you're on blockchain that's a data source you should consider and let's just quickly go through things you should be focusing on on this Heaton so flare is an evm chain what does that means that means that everything you already know about evm chains solidity hard head Foundry anything you want to use all the toolings are already available um and what we're challenging you to do so what we want you to do is to build on this CVM chain with external data we're offering 10,000k in rewards um to effectively do two different things um and they are the most important so one is to utilize the FDC the flare data connector which allows you to connect external data to blockchain so it allows you to bridge something that you can only see in external world use it on chain and be sure that this is secure and secured by the whole stake in the ecosystem so it's not a multi it's not a single party moving data from offchain to onchain but it's something that the chain is doing itself and the chain is making sure that it's secure and the second thing you can use is the fdso which is shorthand for flare time series Oracle which allows you to have Real Time pricing data directly on chain what does that means and we'll show this uh in the workshop it allows you to get the price of a specific asset in real time every block on chain and again as with the FDC as we told that's available on flare you know that this is secure by the whole network itself so you can always make sure that the data you're getting is correct and nobody can hamper it in the meantime uh so just a few words how that works because it's important to know exactly why you need this data and how you get it so the fdso is a decentralized price Oracle you have decentralized price information that is operated by the stake network of validators so we have this directly enshrined on chain and this allows us to have the flexibility the speed and also the security layers um and the prices are updated every block which means that you get a new price every second or two seconds depending on the Block time so we use a pretty fast blockchain so you want to get prices fast and also our blockchain makes sure that the gas fees are low and we're not adding any additional fees on top of it and then the FDC FDC allows you to get the terministic of chain data so anything you can see in external world can be bridged by FDC to chain and then since you're on evm chain the only limit the only limitation you can have is what you can think of um so a few specific examples so we support all evm chains currently we are deployed on we we support ethereum SEO ethereum and test Nets of ethereum in some Cosmos chains but you can come to our Boot and ask us and we'll quickly add a new chain just so that you can see and you can play around it so if a chain is evm compatible we can quickly add it specifically for this Heaton so you can try and see what else you can get from that chains and from EVN chains you get the most important thing which is events so you can attest to specific event happening on an evm chain and then you can use this on flare to do something else so you can attach to a Unis swap happening you can attach to a transfer happening you can attach to an NFD burning and then upon this NFD burning you do something else on flare and have the connectivity uh we also connect to some so-called non-smart chains BTC Dogecoin and xrp Ledger um and we also give you information about them so what this means well this means that you can get information about the Bitcoin transaction move it to flare and once this is on a smart contract Network you can do anything you want so this allows you to collect payments in Bitcoin this allows you to collect payments in xrpl and it also allows you to then do some work on top of it and combining this with FTS so you can always know how much you you have been paid in dollar value because you always know how much the underlying was worth at that specific point and um apart from this we also connect to custom web web two sources which is uh one of the additional challenges in this hackathon which is invent your own web to data source invent your own specific attestation type connect to a new API we haven't thought of bridge data to flare and then on flare do something amazing with it so use the data you've been Gathering use it get it on chain and then do something that is only possible on blockchain because of those thrust assumptions and then we also have some additional things so we also provide you a free and readily available random number directly on chain um as a byproduct of all other protocols well what you what can you do with the random number on chain well think gambling think um something else think pretty much any luck you would like to involve but you can also use it in some other things for example you can sample some stuff you can add a challenge for somebody to prove something else and this is again available on CH and secure and we've been connected by a layer zero to all the connective networks through layer zero so this means that any data that you have on chain or anything that you do on flare can easily be relayed by a layer zero and also by Stargate to any other network this means that your applications can now become data very rich while also incorporating other networks making your application truly multi-chain and knowing that the data that is coming to your application and the data that is guiding your application is secure and makes sense okay so um and just a quick quick uh quick talk through this so evm compatible Oracle Network what you get you get all the nice things without any limitations low transaction fees access to all the tooling um you get tc20 tokens nfts all these things for free you can use op Appling libraries we provide all these directly on CH so there's no change here the only thing you need to do is you need to change to a new RPC and you have a better Network faster Network cheaper Network and better data okay um and let's see the thing that we're kind of focusing on this heon so as I said before we offer three different protocols one is the fso for pricing data one is the random number and the third one is the FDC so we're going to take a look at how to use FDC and fdso in this Workshop um and one of the things we're going to check is a custom Json based web API so what this allows you it allows you to build your own post processor so pretty much it allows you to take arbitrary code put it on a verifier server let the verifier server run this arbitary code which is then run by the whole set of attestation providers on flare which is the same as the validator set so we bundle those two roles together and then you can attest to this computation on flare so what this allows you to you can create for example any Json API you can find in the wild what you do you Source you create a source that is able to read this API you create a postprocessing code that is able to postprocess this code to something you can then use and then this gets attested to in a decentralized manner to chain and once you're on chain you can directly use it for whatever you need to do and we're going to see how you can use this in a weather example when we're going to take an open Weather API we're going to check the data we're going to postprocess it to something nicer so that you can use it on chain and in solidity and then we're going to uh see a simple smart contract that just verifies that this data is correct and then uses this weather for whatever you need to do here the sky and your imagination is the limit okay so here's the workshop you can scan this um if you want to work with me otherwise this is all on the notion page and if you run into any troubles we're just on the other side of the this uh big space um just on the left side of the main stage you can find us there those boys and girls in this pinky uh pinky branded uniforms and you can ask us question okay so let's see how that works uh so the first thing we're going to check is a is an example on how to gather the fdso data how you can easily get prices on flare let's large this can you see this can you see this now okay so this is the fdso contract so the fdso contract allows you to gather data from chain so we made it as easy as possible by using our periphery contract libraries which allow you to connect directly to the necessary contract so and here's a uh simple smart contract I'm not going to write it I'm just going to guide you through it and the only thing you need to do is you need to get the fso in our case we're going to be using the test fso which abstracts even more things away but on the real Network the only change is that you have to make a call a bit differently but it's a it's a minor change and we're going to use the feed ID converter that is going to be useful in a later stage when I'll show you how you can get a bunch of these things in the same call and the main thing you have to do to get the price is pretty much call the fdso V2 get feed ID and provide the feed ID you want to use so we currently support 50 different feeds directly on chain that are refreshed every second and that's the and that's all you have to do so get feed ID for feed flare slusd okay and you can see this is encoded into bytes 21 this might seem a bit daunting but in reality this is just Hax encoded f LR slusd so you can easily decode this back and present it to a user in a nice way and um in another perspective so you can get a bit more generalized way when you allow user to provide you a feed ID but if you want to be really really nice to user the only thing you need to do is you can get a feed name from the user and you just convert it using our library for conversion and this conversion I can show you that this okay it's an interface but this conversion is just Hax en coding which is just ABI um ABI encoding two different two separate bites and this is just the conversion okay so that's how you get the prices and then in the same contract so this is also available on the notion page so you can check the contract there's a starter pack that contains all the necessary information um and then there are just a few uh nice auxiliary methods which you can use to check which feeds are available how you can query them and so on okay and um of course I have to do this but uh no demo is as good as a live demo and to deploy this since we're an evm chain the only thing you need to do you just need to create a new contract and deploy it and also in this hardhead reposit hardhead starter pack uh will automatically verify this for you on a on a flat Explorer and so you can easily check this and play around this okay so the contract has been deployed and let us just wait for the verification St status and let's open this okay that's the deployed contract and as I said before we're an evm chain so all the tooling you're familiar with is already available you don't have to change anything okay so you have a contract what you need to do you can read the price and let's let's see what the let's see which feeds are available by name and you have okay here's a bunch of feeds that are available and I'm just going to copy that one and check it here and I just read it so this is a simple example if this were your smart contract or a app you would just call an RPC with that so we get a price for Bitcoin and we also get some additional information so how many decimals is it in because you don't want to use floating numbers in solidity we already encode and decode this into nice uh uint representations and we also give you a time stamp when this was late late when this was um last updated so you can always know how good your prices are and how stale they might be okay so this is the fdso easy to use directly on chain methods that you can read yeah yeah the time stamp is just the block time stamp when this was latest updated so we wanted to make this as simple as possible so you can compare this to block stamp and your F okay so this is FTS so using the um random number would be the same you pretty much just take a different interface that's available in a long-term support interfaces and query the random number now the fun part that you can do is is this so-called arbitrary data types so what arbitrary data types allow you is to do the following so you can defi so we're going to do three things in a succession but we're going to do them quickly because this is a workshop if you want to know this into detail just come to the boot and we'll show you a bit a longer tutorial how to do this so um what Json API allows you is to set three things so you can say I want you to go to this URL I want you to postprocess this URL with this JQ and then I want you to encode this JQ postprocess Json into a solidity data type and what that allows you is you can say okay we're going to go to the weather API we're going to get some information about the weather in Bangkok we're going to postprocess this with JQ to a nicer representation that contains only the things we want to know and once we have this I'm going to provide you with an a definition for a solidity type so you can encode this into exactly the structure I'm going to use later in my contract and what this allows you this allows you to take an arbitrary API say how you want to postprocess it and then use it in your contract how however you want to use it okay uh so how does this look like um we have a specific server that you can run locally and you can say the following we're going to go through this uh in a few steps so just so that you know how all this looks okay so this now fails but the important thing is this so we first make a request to a weather API and we get back a Json like this so and what you're providing to the verifier server is this URL so please check this for me we're going to copy this to a JQ playground apply the JQ transformation and we get back this okay so this this is the so we start with an arbitrary API we set a JQ response and we end up with this so I've passed out just a specific Fields I want to use I don't need clouds I don't need visibility but I do need latitude and longitude temperature and I immediately multiplied this by a million so that I again lose the decimals I don't want to use the decimals I want to be in solidity ice types okay and if you can see it's a bit hot in Bangkok can you say why why is it so hot H yeah near the equator but it's still a bit too hot why because this thing is returning uh this thing is returning the temperature in Kelvin so and we don't want to do this in solidity so what you can do you can just change your postprocessing and change this to Celsius apply the postprocessing again and say okay so please return this in Celsius and the only thing you need to do you need to provide this to the verified server so you have the input you have the postprocessing and then you just need the encoding type okay and let's see how this really looks in this um in the code okay so what you do you you first ask an offchain server and you say the following okay request body I want you to get to this URL I want you to post process this by this specific JQ and then at the end encode this to this specific structure and this structure is the same as the one you then use in your solidity code you see the idea and what you have to do offchain is the following so we've mocked quite a few of the things for hackaton so we don't have to go through all the consensus algorithms um we just always make sure that your data is correct and then what you do on the on the offchain side you just deploy a contract that uses this um API instance and then add this full response so you add this full response from a server you add the you add whatever the verifier server gave you and you put it to a contract and where you in a when you are in a contract the only thing you need to do is the following you need to check that this is indeed correct so you need to check against the Merkle root of what the verifiers have come to that this data point that the verifier is providing you is indeed correct because otherwise anyone could give you the data on a smart contract so this is the security part and after that the only thing you need to do is decode the response why do you have to decode it why can't you use a a custom data type beforehand because you want to keep the message payload as general as possible so if you change the JQ and get some new data you will now have to decode it to a new structure and that's why at the end it's up to you so you can change your JQ in a very specific new data that can compare stuff that can compute stuff that can run a python script practically to do something and then it just up to you to properly decode this and once you have this decoded as a solidity struct it's up to you to do something so here I just push it to a to a set of to to a list of weathers but I could easily do if I don't know if let's say weather do temperature is greater than let's say 20° remove the last one um yeah okay so the easiest thing you could do here is you can do some prediction Market you can do some insurance on top of it it's pretty much you can get any data you want on chain and once it's on chain it's up to you to do whatever you want to do okay so that's it uh yeah um it's guys can continue to the booth yeah okay we can continue yeah please okay thank you e okay um hi everyone I am Sophia also excuse the noise I feel like it's like I feel like I'm at a concert this is really funny um but essentially I'll be talking about cellos particularly how to build on cello and why uh this is a great opportunity to build apps for every day problems for everyday users um and then a little intro about me I am currently the deell engineer lead at cell uh and if you have any questions feel free to find me at the cell Booth afterwards or add me on Twitter um before I go into everything wanted to do a little brief of what is C has anyone here heard of C before like a quick show of hands awesome okay I think that's most of you but just as a little recap um cell is an emerging e layer 2 and mobile first blockchain Network that is built for the real world and designed for fast lowcost payments worldwide um so what exactly do we mean when we say cell is built for the real world well is anyone familiar with this campaign the crypto is useless campaign um has anyone heard when you maybe you're telling your parents or friends like that you work in crypto and they respond well crypto is useless is that like a saying that you've heard um well for many many don't understand the real world applications that crypto technology can have and it's important that we continue to build for users that need crypto so to this argument crypto is useless we'd argue that crypto is not useless if you need it um How do I I don't know how to play video sorry one second I'm trying to get my video um to show okay wait sorry I'm not sure I'm not sure what happened okay let me just do Google yeah I think it's on the other screen right yeah that's fine okay sorry about that um the video wasn't working on this but essentially for for cello uh our apps are particularly designed centered around solving a real world problem so as we see we have mini pay and it's arguing that crypto is not useless um whether you've like lived with hyperinflation or you've run a small business um or whether you need certain microloans uh so these are some of the applications within the cell ecosystem and we're really targeted on our end users so cell is specifically designed uh to enable real world use cases on ethereum so we were a layer one evm compatible blockchain and we're actually in the process right now of transitioning to an ethereum layer 2 and we're optimized for mobile first so we have certain features such as uh mapping phone numbers to wallet addresses or paying for gas fees with local stable coins instead of needing a native currency so you can check out all the other cell specific features um that enable um app developers to build things that and real world use cases on top of ethereum so a few of the bounties that you can expect and apply for that I want to talk about more in depthly today during this Workshop is uh building an app built for mobile and so we are offering 6,000 uh cusd for this app and I'll go into a little bit about what you can expect from this bounty and then the second Bounty that we have is the best open Source tool built on our cell L2 test net so like I mentioned before cell recently uh just deployed um our L2 testet on Alpha hores so you can be one of the first Builders to actually begin deploying and using this tool so why mobile first well three out of four people in the world um own mobile phones and right now dap development is optimized for desktop so for only building applications uh that can where users can interact with the blockchain Via a computer we're really missing out on opportunities to be building for the global majority and building for users who can access the blockchain Via their mobile phones it's really important that us all as Builders as ethereum Builders us all who are passionate about bringing real world use cases of ethereum uh globally to billions of users around the world it's important that we ensure that we're providing value to Everyday users where they already are and one of the areas where users already are is on Mini pay uh so is anyone here familiar with the Opera browser if you can see that like little circle so it's one of the most popular browsers in Africa they actually offer a little bit of free data each month so it's one of the most popular browsers in the continent um and a little video about minay it's a stable coin wallet built on the cell blockchain that's natively integrated into the Opera browser so if you open up the browser on Opera you'll see a little uh mini pay button where you can interact with the blockchain use stable coins send dollars uh to phone numbers and you can like register an account with a very like web2 like experience um and it also comes with a built-in dap Discovery page so not only is it a stable coin wallet it's also a distribution channel to daps and Regional specific deps right now mini since launching has over 4 million uh active users and holders of this wallet so when you're building apps for minay uh you are really building for all of these users as well um a few of the features that make this stable coin wallet unique is that you can map phone numbers to wallet addresses so you can pay uh pay pay phone numbers pay people in your contact list and the end user doesn't really realize they're using crypto um it's also super fast and low cost so less than point a tenth of a cent um and 1 second block finality and we have a Dap Discovery page with regional specific apps so since you're signing up with your phone number if you open up the DAP Discovery page in Kenya maybe you have an Mesa offramp but that will look different from if you open up the DAP Discovery page in Brazil so this allows app Builders to build hypers specific apps for their countries and their regions um and it's also designed for non- Crypton native users so right now if you're trying to build an app for a non- Crypton native user how will they find out about your application that's very difficult with mini pay they already are active on this wallet and they can easily interact with your app uh straight from the oper mini browser so uh a little bit of why I encourage all of you all here and what the opportunities are for building on Mini pay is this is truly one of the best distribution channels I would argue in all of web 3 you can tap into Opera's large user base which has about a 100 million users uh there's integrated dap Discovery so users uh can interact with your app straight from the mini pay wallet they don't have to relog in uh like of a metamask wallet pay for gas fees um and you get opportunity to build and for everyday users um particularly users in Africa but with the mini pay Standalone this is really extending to a bunch of other regions as well so how to build on Mini pay how can you get started well we at C deell built out a cell composer which is essentially a quick start to easily create daps optimized for minay and I'll show you a little bit of how that works um essentially there's a CLI that you can use in your terminal to install the mini template there's some pre-written smart contracts that are already there and you can also access readymade front ends to interact with the contracts and it's also all built on a responsive web app that's optimized for minay wallet testing so a little bit of how this will work and all of this if you want to follow along is in docs. c.org you can get exact step by steps or you can check out the workshop videos where I have an exact template um more in depth but essentially this is what the uh the app will look like after you install the template it's like a hard hat and a react um react framework all there and then you'll have a link uh that you can use and actually paste that link right into the mini site so uh for anyone who has an Android unfortunately it's not active on iOS or apple quite yet you can download the test flight and iOS will be coming soon but right now you have to test out the app within minay if you're applying for the Bounty no and you don't have an Android it's not a strict requirement this is just if you want to check it out um so you can click on the mini pay and open up the mini pay wallet I'll show you a bit of what this will look like this is how the mini pay wallet looks like as you can see there's a big dap Discovery feed right here um and then you can open up the site tester where you can paste in load in uh website so this is why we want people to build responsive web apps and once you have that link you can paste it into uh the load it inside the site tester and test out different things with this app um so here I'm doing some examples of how you can begin testing out some of the key features that it comes with right away uh if you are building on Mini pay and you want a bit of inspiration for apps ideas and use cases we wrote out a few uh such as payments on and off ramps donations X to earn gift cards coupons Merchants microw work reward-based games these are just a few to get you started obviously these are not strict requirements but I did want to use this workshop and this session to offer a few useful tips for you all so if you are building for minay it's really important that begin with the first thing is focused on your end user identify the specific person that you're building for identify a real problem that they're facing and design around there so even think small you don't need to build for every single person think about maybe your spe where you're from a regional specific use case to you and that's the type of products that do really really well on minay the other thing is keep it simple remember that a lot of the users who are interacting with apps on minay have never interacted with crypto before and they might not even realize that minay is a stable coin crypto wallet they just see oh it's usdt it's it's stable coins or it's uh a currency back to the US dollar they don't really get that it's crypto and they might not get it's crypto so keep it super super simple and then the last thing is make it useful so a reminder to address a local practical challenge um because again those are the types of apps that people use the second Bounty that we have available is the best open-source tool built on Cell 2 which is our L2 testnet or Alpha Horus L2 is the technical name for al2 test net and we are giving out $44,000 in prizes so here's a little graph we are transitioning from an evm compatible layer one to a ethereum layer two on the op stack and part of the optimism super chain so we're doing this one for better alignment with ethereum ecosystem and more more inability so now instead of being a siloed one maybe on a siloed Island we can actually interact and have more inability with super chain l2s and other l2s in general um and there's opportunity for Native bridging so this really opens up the landscape uh and this is a new chapter for cell that has never really existed before and again you can all be the first to experiment on what this means we're looking for tools and infrastructure that enhance the functionality of the cell L2 ecosystem um some use cases and ideas again this is just to get you started is developer tooling cell composer improvements like I showed before uh wallet Integrations maybe you can integrate uh fee abstraction or social Connect into different types of wallets super chain interop ability uh if you are building on another Super chain and oracles try to figure out like maybe like forecaster frames how that how that can also be inable with cello and finally some social connect use cases and dive into what social connect is um so earlier when I was talking about minay you can map phone numbers to wallet addresses that is powered by a protocol on Cell called social connect and this Maps offchain personal identifiers like a phone number uh email maybe a Twitter username to an actual wallet address so think of like ens but actual identifiers we already have what's cool is because every single person who uses mini or Vora is actually creating uh a social connect identifier this means that social connect is actually one of the largest onchain identity protocols uh within the um crypto ecosystem and we already have over 3.5 million registered identifiers it also really improves payment uxx so instead of having to send transactions to a wallet address you can just send it to someone in your contact list and what this means now is you will have a social graph um of one of the best social graphs because you have your entire contact list as a social graph and this really improves like functionality for apps and what this can enable for maybe social apps as well some useful tips to keep in mind as you're trying to build on alpah hor is L2 is that this L2 is new and we really need your feedback to improve it this is an ongoing process cell is an ecosystem of uh of contributors and Builders and the way that improves is with Builder feedback so if you're trying to build on our Alpha horl 2 that just launched last month and there's anything missing make sure to check out our docs and you can find our GitHub discussion page add in your feedback add in your support get involved in the ecosystem maybe we'll make that into bounties and offer bounties for people who are supporting and improving our test net the second thing is social connect is still an early development from a builder standpoint so if you're new to building on on social connect uh we really really need your feedback for improvements for improving the developer experience and you can be one of the first Builders to explore building on social connects so this is another really great opportunity and you can really lead the way um for there so just to recap cell is on a mission to uh be is a mission first planet positive blockchain ecosystem leading a thriving digital economy we are trying to uh create a blockchain that's built with purpose and built for all all and if you want to get started building on Cell check out this QR code it has all of our cheat sheets I also have some physical hard cheet sheets with me that I can hand to all of you guys at the end and come by the cell Booth it's on the opposite side of the venue uh where we will have those cheat sheets you can check them out they'll have links to our faucet um our explorers tips for quick starts everything you saw on the slides more information about our bounties uh app ideas and everything where to get support everything is on the cheat these cheat sheets so go check them out um and that's all do we have time for quick question quick question if anyone have a question about uh connecting to the phone number and the um you know like I have a phone number that I've had for 20 years and then now is it's um become a bit of an identity uh so uh I'm thinking but it's not Global it's connected to the US so I I'm thinking are you seeing like connecting like a Google Voice or something that's uh a digital one that would be valid in every country than to connect to the new application you're putting together yeah if I'm understanding your question correctly it's if you have a phone number are we seeing people using like a separate SE phone number to use these or they're using their existing phone number their existing phone number okay so most people will be using like their main phone number like the one you've had for 20 years but it's not actually stored on the blockchain so social connect uses a protocol called Otis which actually um hi is like a identi hides the actual phone number and wallet address it just Maps it so the it's not actually you can't see your phone number from just the blockchain you'll have to call a lookup and registry function to pull in the information so most people are using their actual like phone numbers but it's not you're not posting your phone number like for everyone to see it's you need this function to like un like unwrap it and actually process it I see so not like WhatsApp yeah yeah exactly cool well if you have any more questions come find me at my booth uh at the cell booth and you can talk to uh anyone who's wearing a cryp yeah not not everyone is weing a crypto use this shirt because there's lots of us but come find anyone on the cello team thank you
Automatic transcript — names and jargon may be misspelled.