The emphasis on batching interactions is a pragmatic masterclass in balancing blockchain constraints with actual user experience. It successfully strips away the hype to focus on the technical reality of building functional, gamified dApps.
深度探索
先修知识
- 暂无数据。
后续步骤
- 暂无数据。
深度探索
Fireside Dev Hang: Midnight Leaderboard, Ascend & Community Updates | April 29th, 2026本站添加:
Hi everyone, we're live. I go by Jay and I'm a Devril engineer at the Midnight Foundation. Today I'll cover a few gamified experiences that you can engage with and some that you can even learn how to build. I'll introduce the Midnight Leaderboard, uh review the code that is powering it. We'll have a guest come on to talk about the DAP that they've been building and then we'll hop into community updates right after. So with that said, I'd love to get into this concept and introduce Midnight Leaderboard. So when new developers join our community, they look through our installation, they go through our docs, one of the first things that they encounter is our counter example. It's super simple. It just has one data type that's within our ledger. You increment that data type and then the ledger is updated. It's super simple and we thought maybe we could come up with something that does encompass the counter but is more interesting, more engaging and teaches you how to build a DAP from end to end all the way from coding your contract to deploying getting it on your local environment prepro connecting a wallet to it and actually publishing this online so that people can visit a URL that's live and a DAP that people can engage with on the midnight network. So uh we decided to create that more engaging app by extending the counter example. So what we did is uh came up with a few different ideas and what we arrived at is a simple game where you press a button to click that generates your score and then you add that score to a leaderboard and the counter increases by documenting the total amount of participants within the leaderboard and by tracking your score on there. So the leaderboard and the verification step because you can verify your score on the leaderboard. It opens the door for a lot of new opportunities for token gating experiences through leaderboards. So think about things like I participated in a video game. I got a high score.
Maybe that gives me the right to take some of the revenue that's being generated from the game. Or maybe it's a leaderboard for a customer loyalty program. and if I'm on top of the leaderboard, maybe I get some sort of benefit like talking to the CEO or something like that. And in the case of SocialFi applications, you can incentivize people to go out to publish uh content on your communities and engage with people online, build their own reputations, get some scores, and go onto a leaderboard as well. So, we thought the leaderboard and the counter and mixing the two was the perfect example to get you started with midnight with building to learn all the core concepts and to have something that's fun and engaging with. So, I decided to start working on that repo on that project and I'd like to share that with you today and go over some of the code.
So, I'll start sharing my screen so that you can see my editor.
Give me one second.
Oh, wrong window.
Let's see.
Looks like I have a little too many windows open up. So, give me one second to pull this up.
That's odd. For some reason, my monitor isn't coming up. Okay, I think for now I will Oh, there it goes. Okay, cool. I think for some reason I had multiple uh editors open and it wasn't uh displaying, but it looks like it's there now. Okay, cool.
So, this is our leaderboard contract.
And the first thing I want to cover whenever I'm going over this code is what are we actually trying to accomplish? What are we doing? What are requirements? What are we designing for?
So the first thing I wanted to do is I need a way for people to generate a score, right? If we have a leaderboard, there needs to be scores. There needs to be a reason for them to be ranked. So that's why we came up with the clicker, the simple button that they press and then they publish that score update.
Now, if you're new to blockchain programming and you're trying to develop something onchain, you are probably inclined to say, I want everything to be onchain. every single interaction, every click, everything that the user does within the DAP, I want that published.
Now, I've ran into this experience with tons of teams from building video games to wager applications. And what a lot of people come to realize is that if you process every single update on chain, so let's say every time the user clicks a button that gets updated on chain, you have to wait a second or two in between each one. So imagine a clicker game where you have 10 seconds to press a button as much as you can, but every time you press the button, it takes about a second or two for the ledger to update. In that case, it would be a game that's not really fun or playable. Uh because the most you can score is maybe four or five points if you're really quick with it. Uh and then you have to wait for that to settle. So what I tell people while they're designing their applications is to think through the process and think how you can batch informations and when do you actually need to communicate that to the ledger.
So in our case, we don't necessarily care every time the press person presses a button. We care about what their final score is. We want to take the, you know, sum of all their presses and then publish that final score on chain and we're comparing people's final scores.
So when you're designing your applications, think when are you actually making the update to the ledger? Are you doing it with every interaction? Are you batching interactions? These are things to consider while you're working on your DAP. So I know I have to take in a score. Another thing in a leaderboard is how do I display my name? So, I was thinking about old arcade video games.
You know, you put in three characters, you update your name. And I thought that was cool. That would be awesome to be able to publish that on a ledger and for people to be able to see it. But then I may also want the option to publish my name anonymously or with a kind of fake generated name. So, that was taken into consideration with my design as well.
And then the last piece is seeing that you have a score. Getting on there is awesome. That's really fun. But what takes this another level is being able to verify that this particular score is in fact my score because then that's what opens the gating features right if I can verify that I am let's say number one maybe I qualify for a badge or a special NFTt or some sort of other prize from midnight so I wanted to build a that has these different experiences in it right it takes a score has a gamified experience for you to generate that score takes it in allows you to determine well to convey if you are the person who owns that or not and then say uh what your name is on there whether it's anonymous or custom or whatever that may be.
So this is basically what we've arrived at for our application. Um and that's kind of what I use to determine what to actually build into the application.
So now that we have an understanding of what are the requirements, what we need to work, let's actually go through the code itself. So I see you can see my screen here. Let me switch over to the actual leaderboard and you can see this here. So, it's a super simple contract, but we'll go over it for anyone who's not familiar with compact, who hasn't programmed before. We'll go line by line. So, the first thing you want to do is import your programming language, right? So, as of Ledger V8 and above, you want to use a language that is 20 above. If you're using it below, it won't compile. You'll run into errors and you'll be informed that you need to update uh your programming language. So check which compiler you have running uh so that you can check. You can always open up a terminal. I like to do compact list to see everything I have available.
I have a ton from all the different releases that we've had. And then you can just compact update to whatever version you need. I'm on the most recent version. This supports the most recent version. So we're all good there. Now we want to import our uh compact standard library. You're going to want to include this for all of your uh contracts. Now the first thing we are doing is identifying what this score entry looks like. So I mentioned earlier I want to take in a score. I want to take in a display name. But then I realized after in order for me to verify who owns this name, I need a owner hash. So I included that here within the score. So every time a user submits a score, they're submitting their score, the way they want to display their name, and the fact that they are the owner of that particular score. Now what goes on the ledger and what's shared with the greater community are the actual scores itself. So the way I'm documenting that is through a map. I am documenting kind of the ids here and then tying it to their score entries here. So people submit a score, it gets an ID and that's how we reference it on the leaderboard.
This next ID here is used to document the total amount of entries that are in the leaderboard. it's used to display on the UI and it also allows us to uh supply the next piece of information because our scores are tied kind of incrementally like we have one two three four as ids so we just want to increase that counter to say all right this is the next ID the user is providing their information that's attached to make the updates and if you ever want to see how many total participants are you could also read this data point now from the user um the only piece of information that they would enter that's personal to them is their custom name.
So they would enter this in locally, provide it to the contract and then it would uh update the states. So we have super simple circuits uh that we can go over to see how it updates the ledger.
So first one is this submit score. So we take in a score of view in 64 and then we're just checking at first to see is this a custom name or not? Because if it's a custom name then we need to make some additional changes. If it's not, you know, we can just kind of hash it and post it.
So, what we're doing here is once the user passes in their score, their custom name, whether they have one or not, we're taking their address, we're hashing it. Super simple hash. This should be actually updated so that it's a bit more complicated and not so straightforward, but we're hashing it to identify what the owner hash is. Now, the counter is always going to start at zero when you initialize this. So, we're going to increment this to one to say, okay, the first entry is going to have an ID of one, right? We have our entry ID here and then we're going to tie the person score to that first entry. Then we're going to go on to the next entry.
Tie the second person score to that entry. So we're incrementing our ID to turn it into one and we're assigning it to entry here to entry ID here. Now whenever we're going through the rest of this program, we're checking, okay, is the custom name true, right? So, did they actually provide a custom name or are they just choosing to submit anonymously or with their public address?
All right. So, if it is true and they did provide a custom name address, we're pulling it from the witness. As I mentioned earlier here, this is our witness or get custom name and we're pulling it in here.
So, we acquire their custom name because we want to provide it to this is the display name. And whenever we update a map within compact, we're going to use the map name along with insert. So as I mentioned here, let's see, we have our scores, which is our mapping of our ids and then our score entry. And then remember our score entry has this breakdown for score, display name, and owner hash.
So once we have that custom name, we are providing the entry ID here.
Then we're providing the score entry. So we're taking the score that's passed along in the circuit. We're taking the display name that they've provided and then we're taking the owner hash that we've generated and then we're submitting that as the entry.
And then if they're choosing to display it anonymously uh or display their public address, this is actually for their public address. What we'll do is we'll also take the ID. Same sort of process because it's following the same system. But for their score entry, we're taking in the score, publishing that, and instead of creating this custom name, we're just going to use their public address, hash that, and use that as their display name. This isn't the best way to do it, but this is a kind of 101 tutorial, so we figure we'll cover the basics. We'll get into more advanced concepts as people learn more about this. And then, of course, the owner hash is the same. We're taking the owner's uh wallet information, hashing it, and identifying them as the owner hash. So that's how we submit uh information to the ledger so that people can post onto the leaderboard and get their scores. Now this is the verify ownership piece. So I have a entry ID. I am going to pull in that ID. I want to see okay out of these scores that are listed is this ID in that um scores map.
So if it's not within there, right, we want to say entry not found. Inform the user, let them know.
Now for the entry, the way you want to look up maps and deal with maps is you want to first do scores lookup and then you want to look up what the actual ID is. And the way this kind of works is that when you're looking at scores and you're referencing this ID and let's say there's either another mapping here or something that's nested that's more complex, you want to look it up first to get access to the second piece here.
All right, so we're looking it up and the reason why is because we want to verify the owner, right? So we want to get their uh score entry back and then we want to compare it. So we want to see all right is this the owner?
If not then let them know they are not the owner. And then this get entry as I mentioned for the next ID earlier uh it just reads whatever the total value is.
So it increments as more people are publishing to the leaderboard and that gives us our total that we can view later. So this is essentially the contract. The witness functions are super simple since it's just a custom name that we're getting. Uh so you can take a look at it here to set the custom names and pass it along to the witness.
But that's essentially our contract, right? The rest is just um our API to manage uh the wallet information to manage between a CLI UI. And then we have our um UI interface. So let me actually I'm already running this. Let me open this up. And this is kind of what this looks like. Let me just toggle in between my windows so I can see if you can see this. Yep. Okay, great. So, you have a simple leaderboard like this with a click challenge. Um, I am going to deploy a new contract here so you can see it from scratch, but it won't actually work here since I'm in an editor. I need my wallet. Let me switch over to my browser.
Okay.
And I'll start sharing this here.
So, let me stop sharing and then I'll reshare my browser tab.
And I believe this is the window. Yep.
Okay, cool. So, I'm sharing my local host and you can see the leaderboard here.
All right, let me refresh.
Okay, you should see that there. Now, I want to deploy a new contract. So I go over to that switch deploy a contract.
You should be able to see here my wallet is now uh opening so that I can actually sign into it process and update the ledger. I'm using lace but you can also use 1 a.m. uh if you choose to use that.
Um it'll take a second or two in order for it to load. I'm sure my PC is a bit slower now uh just because everything that's running on it currently, but the time is right. You'll see this popup. I want to authorize my wallet. I am connected to the DAP now. Now, I realize when I share that window, it closes immediately after. So, let me reshare my leaderboard.
Okay, cool. So, now let me deploy a new contract.
So the great thing about this is that you can deploy your own contract.
Let's see. Let me actually stop sharing my screen because I think you can see my password. No, you can't. Okay, cool.
I was afraid I was going to share my password for my wallet even though that's not too much of risk, but looks like it wasn't displaying. So right now you're looking at the leaderboard and you're seeing it process. I'm generating a new contract. So it's going to wipe the leaderboard clean, give me a new contract that you can share with your friends. You can copy, paste it, send it over and have them engage with it as well.
All right, so we have a brand new leaderboard. And the way this works is we'll start this game. We have a clicker, right? We have 10 seconds to click as fast as we can. Um, just a pro tip, I noticed that it takes me longer to click with my mouse than it does with my touchpad. So, if you have like a Mac or something like that, um you may score higher if you try that way. So, let's see if I can uh submit my name to this leaderboard.
It's prompting my wallet. You can't see this, but I'm signing a transaction.
And you'll notice on the interface, it starts generating the proof and submitting, and then it'll add it onto the leaderboard. Couple of things to note while you're building these kind of applications is to make sure your Docker container is running, your proof server is running, and that your wallet is actually pointing to the proper proof server. Now, while this uh loads and we wait for the score to be posted, I'm just going to look briefly at the comments.
G Midnight G Midnight, another great work is going on. Nice. Nice to see you all here. Thanks for attending. Let's go team ascent. Oh, someone has a sneak peek. I guess you read through uh kind of what we anticipate coming up, so stay tuned. Hi there. Can I find the repo for this DAP? Uh there's a couple of tweaks I'd like to make, but we do have a live repo. Um I will be sharing it in the next day or two. Uh just need to make some updates.
Cool. Cool. Uh many of us are having issues with deployment to pre-pro. If you're having issues, I would say hop into the dev chat. This is actually live on pre-pro right now. So this is running on pre-pro. um it's going to be easier if you're building a live DAP uh that has the wallet connector set up, things like that, because your wallet is already syncing within your browser. So, what I've seen is a lot of people are running into issues where they're trying to sync their network locally and then it may take a bit. Uh but if you already have everything pre-synced, it's a little bit easier and quicker to start testing. So, if you have a user interface, I would highly suggest instead of like testing with a CLI, use the DAP connector. Try it that way. uh your data will load much quicker for you to interact with it. But let me know, tag me in the dev chat if you're still running into issues and we'll see how we can help. There's always tons of people there to help. So, I'm sure someone can help you out. Now, uh if you see my score, right, I posted and you can see my name Jay at the top. I scored 72. So, anyone else could uh copy this contract, enter it, post their own score, and compete with me to get on the leaderboard.
Uh I accidentally clicked next so you won't see the anonymous but actually let's go through that and one thing to note in the code and one thing I actually want to update is that when you go through these two flows of either public or anonymous I've kind of using a workaround the public will use just your public address and then anonymous also uses your public address but then it maps it to uh different like keywords uh so that it can generate fake names basically. So when I press anonymous, you'll see that it populates it with kind of a pseudo name. Um, let me test it here.
And I realize this is good for kind of a quick example on how to do these kind of things. Uh, but I think there should be a better explanation, a separation between the public and anonymous features. So that's something I want to update, but it is functioning. It is working. Uh, let me see. Lace wasn't prompted this time.
I'm actually curious if lace pops up in this window. Uh, no. I have it open on the side now. There's a cool side panel for Lace. Uh but you can't see it in this window for some reason.
And I know it's just from testing that sometimes you'll have to unlock your wallet. It'll ask you several times like, "Hey, unlock it. Unlock it." Um so just be sure to check on that if you're running into issues while you're trying to uh work with Lace. Let's see. My wallet is unlocked. Okay, I see it prompting. So that exact issue that I mentioned is why I couldn't post my previous score.
All right, I am processing. I am signing. Yep, we see it generating. So, um, after this, you'll see my name Jay.
I have a score of 60 right now. So, you should see a number two score with a uh kind of fake name, anonymous name that's generated based off of my wallet's public key and you'll see that pop up in a bit.
Okay. So, let me see. Is there any other questions? Well, thanks much help like just to ask if there are any separate deploy script for this DAP. Um, if you are running things locally, you could always run a midnight local dev and that'll spring up a local environment that you can run. Um, so you can check that repo out that's live done right now. You can check that out. Um, otherwise I can share that Bboard I think is probably the best example. If you're looking for a good example end to end that is also on pre-prod. You can run it, you can post to the network, you can update the messages on there. So, if you want a good end to end example, I would say take a look at the Bboard uh UI.
Let me see. I couldn't do this, so that's why I'm uh paying respect. Uh let me see. Okay, thank you. Thank you. Uh it takes a while. Um but but you'll all get there and I've been pretty impressed by more of the projects I've seen recently. So, you see, you'll definitely get there. Let me see. I am having issues. Um yeah, 1 a.m. is working fine.
I can sign transactions, but no way. Um, yeah. So, I mean, if 1 AM is working for you as a wallet, go with it. They're one of our ecosystem partners, so they're not kind of like strangers in our Discord building things. We know who they are. We brought them on stream plenty of times. You can trust the 1 a.m. team. Um, so definitely check it out if you like them. So, how is it working for Jay? Um, good question. Good question. I am using the same network as you all. So, maybe check your scripts, compare to, like I said, the Bboard example and see if that works. All right. So, you can see u my second name posted. Phantom, uh, Panther. It's just kind of generic like names, uh, that springs up, but you can see it works.
So, uh, that's the new example that I wanted to go over with you all. I want to mention that we will, uh, be posting a tutorial on it on how to recreate this and information on how you can do this yourself.
So, that was the uh, code overview, the DAP overview. But what I want to do is challenge you all to visit the leaderboard yourself. Uh so if we can spring up the QR code for the leaderboard, I highly suggest checking it out. So that's a live leaderboard. Uh it has a deployed contract on uh midnight. You can see there's about like 10 or 11 scores. Most of them are just me, but let me change my screen to actually go over to that leaderboard.
So this is the live leaderboard that's on pre-prod that all of you can interact with. And if you're interacting with it now and you're trying to, you know, get your score, we can see this actually being updated. So, I encourage you all check out the app, get your score on there, and let's see how people compete.
So, uh, I showed you how to deploy a new contract from here. You can also join if you press that switch button. You can paste in an existing contract address and then join the contract there. Let's cancel that. The other last thing I wanted to show you is verification. So, I mean, everyone knows me by J. So you can tell this is my score, but let's actually verify that it is my score.
All right. So you can't see it, but it's prompting my wallet to also sign in again to sign this transaction.
And now in the background, it's actually comparing uh my uh wallet information to the owner hash and then checking that that's my score.
So this will be able to verify it says yours. And in theory, if you let's say gate a feature within this website, this application, then they won't be able to access it until they verify and then you can give them access to it. Now, there's another one here like iron ego. I think I did this with another wallet and see this entry does not belong to your wallet. So, that's a simple example to say, all right, this is my score. I can prove it to you. And even if you refresh this web page, this verified like yours isn't going to stay here. It's not going to persist. So, it can be a situation like, hey, maybe I want to prove my high score to a friend, but I don't want the rest of the world to know that I have this high score because maybe it's a game where people are really aggressive, maybe they're mean about, you know, competing with each other and I don't want to reveal my identity, but I want to show my best friend like, hey, this is my score and I can prove it to you, right? So, this is a way for you to prove data based on your entries, based on your wallet information without you exposing who you are. So in this case, I am exposing who I am, but it could be a pseudo name like one of these here where you can prove that you own that score or it can be just a serial number where people just have no context or even have a way to, you know, talk about it really. Um, so this is the example. You can go through the uh live website midnight-leerboard.cell.app and test it out. Let me know if you have any feedback. Get your scores up there and see what's happening. Let's see. Um, just checking back on the comments again. Um there's syncing issues. Any idea? Um so there are definitely syncing issues as of right now with pre-proc. I would say if you have any timeouts for your uh program or application to sync, I would definitely loosen kind of the the limits on that. You want to make sure you increase the timeouts so that you don't get that error every time. uh I've completely removed it from Bboard.
So it may take a while and you may see that you you'll get a message something like normal dis normal closure or something like that uh from the network.
That's fine. That means it's still processing up until you see an error. If you see an error, then that's clear. But if you don't see an error, it's still processing. It could take a few minutes u and then it'll sync eventually. Then you'll be able to interact with it. But I anticipate most of the people running into sync issues is because they're interacting with something that has a timeout and they're not realizing it. um that I would say that's kind of most of the case or they they kind of just grow impatient like hey what's going on and I can see their screen and I'm like it's still sick. So just give it a couple of minutes. Uh we are definitely working on making updates so that's no longer an issue but stay tuned for more there.
Okay cool. So that was the uh DAP example the thing I wanted to share with you. I thought it was cool. I thought it was fun. It was engaging. You could you know add to our score. You could spring up your own leaderboard. Share it with your friends. Maybe do your own kind of community thing. but it's there for you to test out, for you to play around with. I'll put together some tutorials, incorporate it into our docs. So stay tuned over the next week or two. So now this is one simplified gamified experience to learn how to develop something on Midnight and interact with the network, interact with the wallets, get something onchain, and get that all working. Now, I want to shift to some uh experiences that are a bit more complex, that are still gamified, that are kind of trending. You see them in the news, you see them coming around. And I want to introduce uh Sam and bring him onto the stage so that he can uh talk about the project that he's been working on, his gamified experience and introduce it to you all. So Sam, thank you for joining. Can you introduce yourself to the community and let us know what you're working on?
>> Um hi everyone. I'm Sam and uh I'm from uh send and uh I've been building on Midnight uh since uh the first 50 devs on DevNet and it's been really fun uh building on Midnight all these years and uh yeah we are basically building um a DeFi app that is aiming to ascend all of um the DeFi ecosystem at the moment and we see a lot of hacks that are um completely uh solvable will uh with a technology like ZK um implemented on a protocol level in these uh all these uh D5 apps and uh on top of that there's very low adoption of DI itself um because of security reasons privacy reasons and uh few other stuff that can uh be completely solved with um with uh ZK uh and midnight kind of solution. So that's um our mission with uh Ascend.
>> Nice. And I had a really brief preview of Ascend and it looks like you're hitting the mark. So I'd love for us to go over the platform, share with everyone what they can do, what the intention is, and what the idea behind it is.
>> Yep. Let me share my screen quickly.
Yep. As you can see here, I'm connected uh I've connected my Ethereum and Solana accounts um to my uh um uh DAP uh profile. And when you see here um with the goal of ascend um is to meet u users where they are in the ecosystems that where they are and uh 70% plus of our users are from uh ecosystems like hypo liquid EVM BNB and um um Solana. So um we have uh the system in itself is uh built in a way that it all these ecosystems uh um can be easily plugged into uh ascend. Um so as you can see here this is the profile and we do have uh multiple markets um asset based markets and um we even got into tradi a little bit with um by listing equity like Tesla um Nvidia and there are also um uh commodities like oil, gold and silver.
Um so this is our offering and on top of that we also have uh prediction perpetuals um uh when you can as so you can see here uh you can trade u pups on the winner of um FIFA World Cup.
So this is our platform and um yeah um uh the uh order book to like user intents everything is handled um using compact circuits and uh I would like to show our explorer as well. Uh right now I think we approximately contribute more than 70% of the test net volume are users. We have 300 plus users at the moment and um yeah they just love uh using our platform and especially when uh using midnight um we were able to provide um really good um uh speed and uh secure um trades for our users.
Um this takes a while um because of um yeah there are a lot of transactions but yeah uh it's explorer.ascend.market.
Uh you could uh go through um all the transactions how they are settled how user balances and um the trades are settled.
Oh. Um, have more more than 400 users.
Um, yeah, I'm still stuck with a 300 uh stat. Yeah.
>> Nice. It looks like your user count is going up. Can you hear me?
>> Yep, I can.
>> Okay. Awesome. Awesome. One thing I'm curious about for people who are unfamiliar, I'm sure a lot of people have heard of prediction markets. Can you touch on what are perpetual markets?
Uh so prediction markets uh yeah as you saw like it's pretty um uh popular these days and when you look at uh platforms like uh so uh poly market has more um visitors than uh Robin Hood um so as like when you look at uh so right now Khi and Poly Markets they are spot prediction markets um where but um um we are enabling perpetual markets on top of the existing prediction markets and um the price volatility is being traded here. Um so if um and so you need most of your capital to enter into these markets like you cannot place um $1,000 bet um on on your $100 uh margin on Poly Market and Kali um and trade um the moves. Most of your gains happens when the market settles. Uh but in a perpetual layer on top of those uh would let you uh take leverage positions on your uh conviction uh to an outcome.
>> Super interesting. I'm curious to get started. Um, I think we have a link that we can share for the rest of the community to check out the incent markets if you want to start poking around, see what it looks like.
I think it's pretty awesome. I've been in contact with a few different prediction markets. I'm excited to see these go, you know, out into the wild.
And it's good to see that you already have 400 people testing this out. So, let's get some more people in there.
Let's push that number to 500.
>> Yes. Let's go.
Now, one thing I wanted to talk to you about is I mentioned, you know, last night I tried to spring up my own prediction market, go through it to see like what are the challenges that people may run into um some of the things that they may consider while building something similar and springing up my own example for people to build on. So, I do have an example repo that I still need to work on for an example, you know, prediction market. But as I was going through the process, I ran into some things uh that I like your feedback on. So, the first thing is uh data feeds, right? A lot of these things like betting over the price of Bitcoin, betting over the price of Ethereum, um you have to grab that data from somewhere, right? There there needs to be a way to constantly check what is the price. So for me, I started by using thirdparty APIs uh just because I found a platform that had a ton of APIs and I was like, hey, I could just start pulling in data here. You know, it's fairly seamless, but it's not fully onchain, right? It's relying on the provider. There's some issues there. So I guess for your data feeds, how did you approach that? Where are you getting your data from and how are you managing that on the platform?
>> Got it. So um yeah, we uh recently won the Charlie 3 um Oracle's hackathon by uh on Asen. So um yeah um that announcement just came in today. So um yeah so similar to Charlie 3 we have integrated Charlie 3 with network and um also um all these other decentralized oracles and um we essentially have um uh so right when uh these oracles update uh their data feeds uh we create um uh zk commitments um and push it into our uh compact code uh compact contracts and um yeah uh in eventually uh we are trying to create um these data bridges and also incentivize people um to verify this uh as well and u yeah as far as uh the um the prediction markets data we are getting that uh from poly market and uh kalshi uh assets uh perpetuals there's u no underlying assets being traded and these are derivatives of um uh the prices and holdings on Poly Market, Koshi and all these other popular prediction markets.
>> Yeah, I find that fascinating because I did some research like a week or two ago on how prediction markets work and kind of the legality around them and I I came to find, you know, how Kowi's doing it with derivatives and stuff. So, if you're interested in a prediction markets and looking into this, there is a lot of legal implications. So take a look at what Koshi and Poly Market has done to get an understanding of how this is done because you can't do a straightforward prediction market.
There's some rules around on how to manage this. Uh so look into those details a bit more. Now another thing um that I was working through with determining the markets. I've seen you know between your market I've seen like a market for uh sports right like what is the results of like an NBA game or something like that. How do you determine what is a good prediction market? Because when I'm starting right and I'm starting from scratch, I realize it could be anything. But then we have to narrow down the scope in my mind in order so that like the you know sol the end resolution is based on some sort of data that's coming in rather than me just saying okay this guy won or this the yes or no answer I just manually input that right. Um so how do you determine what's a good prediction market to spring up and what are the limitations around there? Can you speak to that?
>> I think um the event resolution is uh one of the like biggest problems like there is a lot of subjectivity in these uh prediction markets. Um but I think uh the approach that we took is um we uh do not handle spots and the resolution ourselves on these um we um go so when you look at uh markets in poly market and kalshi people are betting like millions and even billions all the time.
So um there are um and there these resolvers in poly market and kshi um have solved a lot of uh resolution problems already. So when you're trying to kick in so a new prediction market you do not want to run into these resolution um things as a new uh new prediction market. Uh and it requires a lot of um um it requires a lot of um uh resources uh by itself. So um what we have uh yeah so um resolving things the right way and um the user experience yeah when we decide a prediction market the volume uh is also uh and the most popular like being able to hold the most uh um the markets that people are most interested in trading. That's uh very important and that's um that's why if you look at we do have a bot that picks up um the prediction markets that are trending as it's trending um not after uh so we have these spots deployed on poly market and khi which u uh continuously markets I mean uh monitors um which market is going to go there in terms of popularity and we uh try to list them as it moves uh in popularity and volume And uh the resolution um since we are derivatives um of existing poly um uh popular prediction markets um we um uh uh go by whatever uh is being resolved by the major players where there's billions and millions in stake and uh uh yeah that's um what we have.
>> Yeah. So you mentioned something that I really love is this idea that like there are people that are trying to solve similar problems and some of them have millions in funding and if they've solved the problem just work with them on this on your solution, right? They they've already done the hard work. They figured out the legality. They figured out how to do these resolution pieces.
So I love that you mentioned, you know, use Poly Market stuff. It's great to build on top of it. Uh so that's one thing to to that's good to keep in mind.
Now, another thing uh that I realized while I was building my own prediction market is I ran into a brick wall. And the reason why I ran into one is because there's limitations on our network with things like timing and with like the way you manage your accounts and stuff, right, and funds. So, one thing I'm curious about is how did you work around kind of limitations with like time in compact for your markets?
>> Yeah. Um so, we do have an order book.
Um when we look at the order book uh we basically um uh have these proofs uh that proves the sequences of orders and also um the orders are matched on uh time price priority uh in our perpetual.
So um every order references the previous order state uh of the order book and then every update um that that's a sequence maintained on uh of the order book of each of these markets.
So that's how we um handle our price time uh matching of orders. Um yeah, >> interesting. So each one of the orders are chained together essentially and then you also have a documented time stamp that's offchain it sounds like.
>> Yes. Yeah.
>> Okay, cool. That's an interesting solution. I have to think about it more to like you know poke through it and stuff. Uh but the next question I have is over managing funds. Um are you because when I'm building something like this my initial thought is okay we need some sort of like escro account to hold on to it but you basically need some sort of like third party that you can trust with the funds or some way of managing it this so that like I don't promise hey I am going to commit I don't know $10 to this prediction market and then when the time comes to actually you know settle I'm like h maybe I don't have the money. Um so how are you addressing kind of managing the funds given our current limitations?
>> Yep. So right now we have a semic-custodial uh solution I would say.
Uh and this custody doesn't um only happens when you bridge uh tokens from other um uh yeah other ecosystems. So you bridge um your stable coins into as you lock them into uh the native contracts on uh each of these chains which are unlockable only when um your funds are not being used here. on uh once you sign your intent to use those funds that are there in your contract uh in um Ethereum or Solana it's basically locked and then every order that you make is being update your entire account uh state is being updated um and uh you would be able to withdraw any funds any at any moment um uh as long as uh that you didn't in uh sign uh ZK commitments that um for to be used on a particular market and um and during settlements these funds uh also follow um ZK verification ZK execution uh to um distribute these funds uh amongst winners and losers and we update their uh account states uh managed on uh midnight contracts.
>> Okay. So for the time being it before we have like composable contracts and everything onchain looks like semicustoio is kind of the workaround for the for the time being.
>> Yep.
>> Okay, cool. I also like that you touched on kind of bridging a bit because it's kind of uh hints to the rest of the community of where this is all going, what's possible. Um and you already have a lot of the other currencies hooked up.
So I'd love to see over the next few months as we roll out updates to actually see kind of that crosschain application come to life.
>> Yeah, that was uh really interesting.
And our um order book uh spot order book uh is also going live. So when you look at uh the existing big players like um Hyperlid, they have their own um order book spot and um um yeah and uh that's a major use case for uh private uh shielded order books. um um when you do not and um and it's going it's going to go live as well and uh how we implemented it is uh you know how in WhatsApp the read recept um if you turn it off for you it's going to be turned off for every yeah whoever you're texting to. Um so it's a similar kind of implementation with our um order book where that if you are going to be like you could choose which orders you want to be publicly shown in the order book which ones you do not want to be shown in the order book and those would be um pulled away and then um but again you cannot um so there are there are two modes in the order book itself um maintained uh completely independent and uh if you choose to um place an order on the shielded order book um you you know it's getting executed in the uh according to price time priority um but you don't exactly have the visibility of where um the orders are being uh placed so yeah I think uh this unlocks a lot of uh new use cases uh like um OTC deals stuff like that bringing the OTC deals completely onchain Yeah, it unlocks a ton. Uh we've been thinking about this a lot internally and you know we may kick up something around this uh around matching in general. Uh that's just such a core thing you know from like even dating apps to the order books to you know it answers so many different markets.
So yeah we'll share more on that to come but uh I think it's awesome. It's great to see you building, you know, the prediction markets, uh, the perpetuals markets on top of prediction markets, and it's great to see you working on Midnight. I see Jay and Ascend should merge. Oh, that's tough. I don't know. I feel like I have a lot to catch up.
You're so far along. Uh, I will probably read your repos, you know, learn some stuff, maybe write some uh, blogs based on it. Uh, we definitely have a lot of people are interested. And more recently, we actually had a team talk to us about potentially having like AI models also bet alongside people and you can use an AI strategist to bet across several different markets, which could be an interesting kind of add-on or I could connect you with that team as well if you're interested in talking to them more.
>> Awesome.
>> Great. Um, so I want to thank you Sam for coming and joining us on the stream.
Uh any last things you would like to share with the community, things you want them to know they should be aware of or any other tips with building something like a prediction market?
>> Yeah. Um I think uh Midnight is unlocking um like a lot of new use cases inside DeFi um and in turn bringing uh helping us bring the institutions um to be comfortable using D5 more. Um, so that's uh what I've uh been like experiencing and uh the people I uh see who weren't open to DeFi before are um like more open to it because of all the things that Midnight is enabling inside uh DeFi itself. And um yeah, I think uh that's uh going to be a lot of uh new adoption uh for the entire DeFi ecosystem um because uh uh by everything that Midnight is offering and super excited to be uh part of that um adoption.
>> Amazing. Amazing. Now before you go, I I see some questions. Looks like they're pointed to you. So while I have you on, I see someone asking what about the decks? You have a deck you're working on? What is that?
>> Yeah, that's the spot deck that's uh coming. The test net is going to be live um in few days and um yeah, that's um an interesting one. Super >> nice. It sounds like some people are interested in that. They want more and they're saying he's hiding all the secrets basically keeping it close to his chest. Okay.
All right. So, when you have more info on that, you have a repo you want to share, definitely share it with us. we could potentially have you either back on here or just share it with the rest of the community and see how we can get it into the hands of other people. Uh we do also have a deck that Open Zeppelin has put together. If you look at our awesome DAPS repo, it's under Lunar Swap. So you can start checking that out too to get an idea of how some of this works. All right, so thanks Sam. Thanks for joining us. Uh check out Ascend Markets. Provide Sam some feedback. He's in our servers. He's always looking around, sending me messages and stuff.
So uh he's accessible. let him know uh what you think about the experience and get started with Perpetual Markets.
>> Thanks, Sam.
>> Thank you.
>> Great. It was cool to have uh Sam on board. He's always working on cool things. We've had him a few months ago on here, so it's great to see some more updates. Now, today we covered the midnight leaderboard, some examples that are coming your way, um including like the prediction market. I'll get that up and running, provide that to you. and we received a uh sorry and we we saw the demo that uh Ascend gave. So now let's go through some community updates. Let's start with the content bounties.
So I'm going to open up the content bounty so you can get a look at this if you're not familiar and I'll start sharing my screen on the content bounties.
This is something we've been working on for uh the past week or two really pushing. I see some people starting to contribute. Um, so let me see.
Sorry, my windows are a bit hard to access sometimes on here. Okay, I see this here. Cool. Okay, so I'll start sharing this and we'll post up a QR code so that you can see this as well. Let me zoom in. Looks tiny on my screen.
Okay, cool. So, if you go to our contributor hub, uh, we posted a ton of different bounties. I think we're up to like 50 bounties at this point, but there are pieces of content that you can create. Things from tutorials to videos to like code examples. You can take a look at all the different ideas we have here. Open up one of these bounties. You can see there's tons of different comments already here since we've made the announcements. If you'd like to take a look at this, you can see all the details. This is an example of one of them. You can see the type of content, the summary, what are the deliverables, everything we're looking for in these bounties, some relevant links that you might find insightful or useful while uh building it, and then the submission process that you can follow for each one of the bounties. So, you can see here people are already starting to comment, starting to post. And the way this works is uh we'll be reviewing each one of these uh bounties.
I actually realized I wasn't sharing the second uh monitor. Let me see. Does it click? There it goes. Okay, cool. So, yeah, you can see the type of content, the summary, uh the target audience, all the additional details you would need to understand how to complete this uh content bounty. And then you can see people are already commenting, they're providing their work. Now, the way this works is uh we have one more week for everyone to start contributing to these bounties. See something you like, add some content in there, tag us, let us know. And the way this works is everyone has one more week to submit their content and then the following week we'll start reviews. So we'll review each piece of content uh give a simple like pass or fail for the content to see if it meets the requirements that you deliver on the actual bouncy and then we'll determine who wins. So before it was a first come first serve and we reviewed each one as they came in. But now we're having everyone just tackle the problem and then we're going to go through it. We won't have this back and forth review like we did last time.
We're just giving you a simple pass or fail and then we're moving on to the next person up until we have a content a submission that satisfies the content bounty. So that's our content bounty program. Uh I highly encourage you to take a look. Idris has done a ton of work on this. He's really awesome with this kind of stuff. So take a look at the tutorials, give us some feedback, let us know what you think, start working on them. You can see there's tons of comments here already. So hop in there and start on your content.
So that's our content bounty. Uh the next thing I want to mention is our Zilly sprints. So last week uh we actually kicked off our Zeli sprints with our partner uh Minames. So let me start sharing this for anyone else who's not familiar.
Uh let me see.
Oh, pressed the wrong button to share, but I'll reshare.
Okay, you should be able to see Zeli here.
Okay, great. So, if you go over to our Zeli board and anyone who's not familiar with Zeli, it's a gamified uh learning platform. So, we give people a bunch of different quests from things like hop into our Discord server, engage with some of our posts, and in this case, find out about some of our uh partners.
So, Midnames is a decentralized identity provider and name service provider who is one of our ecosystem partners. So, we've created this uh module where you can learn all about their products and services. Uh get your ownite domain name, sign up, update your profile, uh download their SKDK, and start interacting with your online profile through the SDK. So, if you go through all these quests, you'll gain some points uh that contribute to the Midnight's Partner Sprint. So, if you go over to our leaderboard here, you can see that the sprint is live. We have six days left, 23 hours, 4 minutes, and 5 seconds counting down. So, you have a little under a week to continue to contribute to complete those quests, and then you'll end up on this leaderboard.
At the end of these two weeks, uh we will close this leaderboard. This closes automatically. We'll see who the top three participants are, and they'll win a knight domain on mainet with five characters or more. So, it's a good opportunity for you to learn about the protocol, for you to start testing it, for you to get engaged, and you could potentially win. So, check it out and let us know what you think. We'll be kicking off a lot more of these sprints.
Uh the way this will go going forward is we'll have two weeks of a partner sprint, one week cool down, and then another two weeks uh to kick off the next sprint. So, next week we'll be doing kind of the reviews. We'll reach out to the people who won and provide updates there. Uh but the following week is when we'll announce our next sprint with our partners. And if you're a partner, reach out. We'll be actively reaching out to all of you. But if you have an update that you'd like to get some eyes on immediately, reach out to us, let us know, and we'll make some uh time for you within our schedule.
So check out the uh Zelnames module, check out the leaderboard, and start participating for you to get on there.
So you can spring up your own leaderboard today or you can participate on our existing ones on Zel.
Next, I'd like to get into the build club. So, anyone familiar with me and Tom knows that we've been actively working on the build club for a few months now, and we had our first cohort kickoff, and it was amazing. We had teams, you know, pitch in front of Charles Hoskinson. Uh they pitched in front of investors. They're sharing their ideas that they worked on for a really long time. So, the way this works is a eight-week program. We basically take you from concept to deployment and this is a breakdown of what the eight weeks look like. So we basically help you with refining your idea, proving that is a product that other people want. We help you with marketing, business development, and with some technical support all the way up until demo day. On demo day, we put you in front of investors so that you can pitch the idea that you've been working on, share your demo, and potentially get your first check. So, we are actively opening applications now. You can apply on the website. Go to midnight.network/buildcl club. Applications are open and we are interviewing teams every day. Uh, every day I'm talking to, you know, two to three teams, going over their DAPs, making sure it aligns with the program and that they're the right fit for the program and then inviting them to come back and participate. Ours will kick off on the 18th um of May. That is when the next cohort kicks off. So, actively apply. We're interviewing. We'll be sending out um kind of acceptance letters soon. Now's your chance to apply. So, get started with it if you haven't already.
Now, lastly, uh one thing I want to share uh as we wrap up is uh over the past two weeks, we've been working on a hackathon with some of our ecosystem partners called the Hilo Hack. It's a hackathon that's been happening kind of in private. They all been working on their code. They submitted their code yesterday um and now we've reviewed them. We have some results on that hackathon which we'll share in the Discord in a little bit. But the reason why I bring this up to the wider community is because on Friday we will be doing a live stream with the participants of the Hilo hack and you'll be able to see their demos, see them pitch in front of our product manager and in front of our business development team, get some feedback and that will be the final uh judgment of the Hilo hack.
So stay tuned for uh an invite for that Friday meeting and we'll be airing it the same way we do our dev hangouts.
We'll be airing it on YouTube on Twitter live. So you can tune in, check out the projects, provide some feedback and let us know what you think. So that is our program for today. I want to briefly check to see if there's any more questions. I see spy you applied. Uh more melancholy. Hopeful music would fit the feel. Okay, looks like we need some music in the background or something. We see some music requests. So, put them in the server. Let us know. Maybe we'll add some background music. I see some posts about the boards.
Any bounties on music? Oh, okay. I guess it was a chain of comments of people talking to each other. Any bounties on music? Would love uh to give original music scores on midnight. Oh, that is fascinating. I love that idea. Uh let me speak to the team. I I think that's really cool. could be interesting potentially for some like background music at either our events or some of our content that we put together. I think it's cool, but let me talk to the team and we'll get back to you on that.
Interesting idea. We haven't seen that proposed before. Let's see. In Vegas for Bitcoin conference. Well, have fun in Vegas. That that's always going to be fun. Sharing is caring. I want to hear some updates on the decks first. Sharing is caring. Okay, that was more so more so towards Sam. So Sam, once you have updates on your decks, let us know. In Vegas for XRPL conference. Okay. So it looks like a lot of you are in Vegas getting ready to hang out uh go to conferences and party after. That looks like all the questions that I have um pertaining to, you know, the code to the demos that we've given. So I want to thank you all for joining me today.
Again, it's always an awesome time to talk to our ecosystem partners, get updates from our community, and to share what we've been working on with you all.
As always, let us know if you have any feedback. Hop into the dev chat if you need support with your projects. You can always reach out to me. I am pretty available across all platforms. I want to thank you all for joining. I hope you have a great day. Get on the leaderboard and let us know about what you think about everything we have going. Have a great day everyone. I'll see you later.
相关推荐
Free TON in 2026? How I Tested This Reddit TON Tool
SirenHead-z9y
2K views•2026-05-28
Are our DeFi tools becoming too easy to exploit?
saidotfun
228 views•2026-05-30
Solana Unchained ($UCHN) Explained: Solana’s Next Big Utility Project?
CryptoVlogOfficial
339 views•2026-05-30
🚨 Access Network App FREE Withdrawal to MetaMask?! Only 25M Supply 🔥
Airdrop26Alpha
459 views•2026-05-28
GDOR tokenization amid oil shock hedge
sam.dmitri
720 views•2026-05-28
⚠️ALGO Has a Very Bright Future! ✅ One #Crypto Everyone Should Own!
MetaShackle
184 views•2026-05-30
BingX EventX: Trade Sports, Crypto & Global Events With One Click
AidenCryptox
311 views•2026-05-31
XRP IS GOING TO VANISH! A SUPPLY SHOCK IS INEVITABLE! (THIS IS THE PROOF!)
NCash
2K views•2026-05-31











