Welcome fellow Bitcoiner.
E21: Understanding Stacks Mining & Protocol Design with Xan Ditkoff - Founder of Daemon Technologies
E21: Understanding Stacks Mining & Protocol Design with Xan…
Xan Ditkoff is the founder of Daemon Technologies. A company building utilities for the Stacks Ecosystem and spreading awareness of Stacks …
Choose your favorite podcast player
Nov. 29, 2021

E21: Understanding Stacks Mining & Protocol Design with Xan Ditkoff - Founder of Daemon Technologies

Xan Ditkoff is the founder of Daemon Technologies. A company building utilities for the Stacks Ecosystem and spreading awareness of Stacks in the Asia,

The player is loading ...
Built on Bitcoin
Xan Ditkoff is the founder of Daemon Technologies. A company building utilities for the Stacks Ecosystem and spreading awareness of Stacks in the Asia,

In this episode we cover:
-How Stacks mining works
-The Blockchain design space
-What are Smart Contract for Bitcoin
and much more.
Transcript

Xan (Daemon Technologies)
Jake: [00:00:00] it's funny to see everyone's different styles. Like something we'll want questions beforehand so they can kind of prep, but you're just like. Let's

Xan: just do it. I I'm good with any, uh, any of the format everyone's kind of different. And then, I mean, I like, I like doing things off the cuff a little bit anyway.

It's uh, between you and me, and I guess now this recording to everyone, I think. But most of the Blockstack stuff I either hosted or emceed or spoke on behalf of there's some planning there, especially when there's a presentation. But I think like when I emceed the conference in San Francisco in 2019, yeah.

That was like 98% just off the cuff. So,

Jake: okay. So, so for content, so for context then, cause some of the notes I took from this video were from your clarity universe presentation.

Xan: Oh, okay.

Jake: Your slides are solid, but are you just going off the cuff once, you know, this slide is present, like, okay, I'm going to talk about this for the next five minutes.

Xan: So yes and no, that I think is actually a great example of, I think how I [00:01:00] really like to present, which is not, you know, I've put that presentation together and it's a topic I've spoken about and. Uh, both in presentation form, and one that I speak to with people that are much, much smarter than I am kind of on a weekly basis.

Like after we hop off this, I have my weekly catch up call with Jude for about an hour where if we don't have anything specific to catch up on, we kind of just go deep on some of the technical stuff. Um, So I think it's that that presentation, I think is once you get to the point that you know, a topic pretty well, and you've also put the presentation together, you know, you're not going to read the whole point of slides to me is to kind of support the points you're making, not for you to read off of.

I wouldn't say that's off the cuff necessarily in terms of like, there's definitely material, there's a plan presentation, there's an order of things and there's points on making up things I'm getting through, but I don't what I hate doing. [00:02:00] Um, and I think for, for a really good authentic presentation, especially once you know your stuff, the way to do it, Really, uh, not to have a script you've memorized, but to have kind of general points and a landscape, you know, you're going to kind of walk through over the course of this thing and, you know, the specific steps and whether you run or you walk during certain parts, just kind of depends on the day and how you're feeling and you know, what the audience is getting what they're not.

So yeah, just kind of. Yeah,

Jake: I think it's cool too, because the more that you see people who are like that, and you watch subsequent, uh, like presentations they're now analogies get a little tighter. If you can almost see they're like that, it's like they're evolving in real time.

Xan: No, it's, it's, it's a hundred percent an iterative process of I'm laughing.

Cause he said it now I'm a big analogies guy, uh, much, much to the annoyance of my friends. Um, but yeah, it's a it's you gotta, you gotta make sure the analogy is really tight and works. Perfect.

Jake: [00:03:00] Yeah. I spend so much time thinking about that. Cause I think if you get the right analogy, you can re it's almost like like Story lands so much deeper than just like a bunch of random facts and analogy is like condensed imagery. And so it's an exact same thing

Xan: . I think it's a good way of putting it. It can, it can be a shortcut, uh, a shortcut to some understandings and aha moments for you. Yeah.

Jake: Yeah. I have this whole analogy about, uh, how the Bitcoin network works in a newspaper, but that's for a different time, but I think it lands for people, but, uh, yeah.

So you, I'm curious about you you've been. In crypto or you've been in stacks for awhile, but you're kind of a behind the scenes, dude. You just kind of like, you don't post a whole lot anymore. You're not like consumer facing per se. So I feel like a lot of people don't, they know of Xan but don't really know what you do.

So for context, what's some of the background of what/who Xan is?. What do you do? How did you here?

Xan: Yeah,

let me, let me go into the background. And then I [00:04:00] think hopefully we'll be, well, at least some of our products that we're working on right now, we'll be, we'll be a little more kind of end user facing and in the near term, um, if not kind of our base brand, but, um, yeah, so my, my history and crypto is a little.

Uh, different than a lot of the people I know in this space. Um, although I guess most of, most of the people from the original Blockstack core team are kind of similar in that. You know, my experience in crypto has really just been singular within the Stacks ecosystem for the most part. Especially the formative experience.

So I was in Silicon valley working in traditional startups, doing kind of a combo of, uh, business development and strategy. At some companies like Talkdesk back in 2015, kind of early 2016 and, was already kind of looking at where I wanted to go after that it Silicon valley. Not very inspiring to me at the time.

Um, I didn't really see anyone trying to solve problems that I thought were, were that [00:05:00] meaningful, but found crypto pretty quickly. And, um, Ended up joining Blockstack, the original Blockstack PBC core team in kind of mid 2017 is one of the first non-technical people to bring the first version of the network to market at that time.

So I spent the first couple of years really just trying to, it's funny things have actually kind of come full circle and in the last kind of year or so as the 2.0 network's been released where. We're we're kind of focused on the same stuff in a lot of ways, just with a much more diverse set of resources and kind of a more decentralized set of resources.

But, you know, back then when it was just kind of, uh, 10, 10 plus of us on the team. Uh, we were just trying to get developers to build stuff on top of the first version of the network. First version of the networks is super simple. It enabled BNS domain names. So things like .BTC and, kind of simple transactions.

Bitcoin was the kind of native asset on it. You could create applications where [00:06:00] users could log in with a BNS name that they own. And could also have a cloud data storage via Gaia, the storage layer. So that was a, an interesting time, you know, for two years, we, we did a lot of experiments. App mining was a big one that we ran for a while.

It was basically a, an effort to create kind of a fair developer a rewards program for apps that could maybe even be decentralized one day. We learned a lot from that. I think we gave away, I need to remember the amount of big at this point. It's definitely over a million dollars worth of Bitcoin that was given away during the, during that time period.

But yeah, that was fun. I mean, I think we ended up being one of the first layer, one networks out there that had. We got, we ended up having over 400 independent applications and projects built on top of us, uh, from those years, uh, you know, some very rudimentary, very hackathons, but some really solid applications in [00:07:00] some cases that are still going today.

Sigle is a perfect example. They, they came about as part of an early app mining round, same with Pravica. You know, it used to be DMail. It's really cool to see a bunch of the projects from back in those days are still iterating and kind of finding different paths to success.

So did that for kind of the first few years in 2019, when we got qualified for the Reg A plus token offering, I started flying out to Asia a lot to start opening up our developer communities here. That was really cool. It hadn't really traveled in Asia before. So when and spent about a month and a half, traveling around China did the same in Korea, Japan, and then started coming to Hong Kong a little bit, kind of fell in love with the city.

Ended up moving here beginning of COVID, that's kind of another story and rabbit hole to go down, but I didn't exactly know I was moving at the time. It just, things kind of worked out, definitely a version of a. Uh, laying the track while the train is kind of rolling. Um, [00:08:00] but created my own startup here to work on top of the Stacks ecosystem called Daemon Technologies.

So we've a pretty wide mandate in terms of our focus it's to generally push, Stacks technology for the adoption of Stacks technology in Asia. The way we do that is kind of three different ways. So one is via actually being a participant on the network with other folks. So we're a pretty big miner.

We do some stacking, and we also support a number of protocols that have come online, so we provide some liquidity for Arkadiko. , we also are part of. Take part in their governance. We're going to be doing the same for the Alex team when they launch, uh, we've been involved in some of the NFT projects.

So that's just kind of generally participating in the network. Out of that, we started creating a number of data products, originally Just for ourselves as miners. That snowballed into kind of this little thing called the mining monitor. Excuse me. Then I think most people have seen [00:09:00] at stxmining.club.

What that is actually turning into and we'll be announcing a bunch of shortly is a full on chain data platform for Stacks called "On Stacks". So onstacks.com, the first release, we'll just kind of give a small glimpse of the full vision, but it'll have our own version of an Explorer, as well as the mining monitor kind of folded in.

And then pretty soon after we're going to also start having modules within that four protocols on top of stacks, like Arkadiko. So you can actually go and see all of the data and analytics around Arkadiko and what's happening there. But the actual goal for that platform is really to offer two things to the ecosystem.

One, as I was kind of describing as more of the user end user facing front end, that's less of kind of a product we're thinking about monetizing. That's really just for the usefulness of the ecosystem. You know, I think it's, it's valuable to have transparency like that. I'm sure, you know, it's great.

You can [00:10:00] pull data from a node, but, you know, if that's unstructured, if that's, you know, not necessarily the easiest to parse, it's not going to be useful to a lot of people, especially as we hopefully get more and more adoption. So. This will help with that, but the actual more of the product is actually on the backend side.

So. Creating these front end products or kind of modules is a way for us to kind of have a forcing function, to create a really robust node set up on the backend with a number of APIs, feeding into an infrastructure. We can actually then start servicing dApps and protocols launching on Stacks for their on chain, data needs and API needs.

So for instance, right now that API is serving the Arkadiko app. So they don't have to worry about that. Additionally, As we kind of go further, we're going to probably start publicly exposing that API as a product that people can use for whatever their data needs are on chain. We're [00:11:00] talking to the Alex team right now as well, about kind of what their needs will be once that's launched on main net kind of end in December and the ultimate goal with this, I think, you know, a year plus out is to have kind of a Dune analytics type product.

That's all around Stacks data. Where, you know, someone can come in and actually create much more customizable queries on this stuff. And I'm happy. We're kind of getting to a more complex setup now cause it's, I think it's positioning us well for when subnets and app chains launch a bit wider, over the next, you know, 3, 6, 9 months.

To support those as well. so that's kind of what we're doing on the product side. And then we also do some funding in this space. We're an LP of the Stacks Accelerator. So we helped put that together last year. Um, and we kind of provided advisory and some stuff for a number of those teams. So yeah, I'll, I'll stop vomiting words at you, but that's about it.

Short of a story that I can, I can write.

Jake: That was pretty, uh, concise for, for all the, all the [00:12:00] word vomit. It just happened. But, uh, I want to double click on the API real quick. Cause I'm not super technical, but I understand things like you can pull price data. So like in Arkadiko it's going to give you the DIKO price, which I show where it's good in that with like the current market.

And it has like the stacks price and those are kind of basic functions. As you get more advanced, what do those kinds of like API calls look like for a program?

Xan: Yeah. So what it looks like for us in terms of the way we end up calling that to serve some of the data we will display and kind of the On Stacks platform, there's data that you can maybe pull individually on-chain.

The interesting parts of it are either the aggregation of it over some amount of time or, you know, you want to compare it to something else. And ultimately display like a ratio or something like that. So that's just, I mean, it's nothing super complex, but it's creating kind of [00:13:00] a, a setup where you have a node structure that's feeding into some sort of database that you can then organize, run kind of computations on it and then serve that data through an API, to anyone who needs it. So examples of things that like we will show forArkadiko is you know, other than the DIKO price, STX price and the USDA peg price, things like that. There's other simple metrics that we'll obviously show like TVL (Total Value Locked) for the pools, TVL for the overall system, but you can also start looking at things like the spread, for instance, for lending on Arkadiko. Like, what are the economics of lending? How collateralized is the entire system? For lenders, how does that compare to the rate of borrowers?

What's kind of the overall liquidation risk here. You know, when it comes to something like Alex, they have a collateral rebalancing pool. So what are the rates of that collateral [00:14:00] rebalancing pool look like? And then when you get into governance too, you can start You can start exposing some of that also.

So just, you know, what is the kind of current supply of DIKO? What is the concentration of holdings look like? You know, what does that activity look like? They're generally, so that's kind of how we use it on the backend and how others use it. Um, the first and foremost way, it's actually super simple.

And is the original reason why we even started working on this to begin with. So when the network started hitting some latency in August, thereabouts, this year, we kind of looked at them. We realized there was two things, you know, one was certainly on chain kind of block space, um, and latency there. But another thing that was affecting.

The network, uh, both applications and people trying to send transactions and just monitor what was going on is everyone was using, um, heroes, Explorer, and more importantly, the API behind that Explorer. Um, and that's a [00:15:00] problem just because that's really, really wasn't purpose built for that. Um, the node set up behind the API.

There is pretty simple. I think it's a single stacks node running. Um, you know, that's a really nice product. You know, is pretty useful for just understanding quickly, you know, where's my transaction, what's going on, but it's not really purpose-built to service, uh, you know, a high number of requests, you know, people using it for a combination of, uh, helping run their backend and feeding data into their applications.

Plus users actually using it to go and monitor what, where their transactions are. Anything similar. Um, and so where this idea started was, you know, we, we can actually create a robust infrastructure around this that's purpose-built for that use case. And even if it takes us a little while to get there, having two of these out there will help kind of share that load.

So. The backend of ours, we're in the process of right now, it's still, we started by forking [00:16:00] Hiro's node set up and explorer, and we actually put together some documentation. I can send you if you want to put it in the show notes. I've, I've tweeted it out before, but some documentation for anyone who wants to spin up their own Explorer.

And node set up basically how we did it and then just deployed it on a server. It's pretty straightforward. And it'll give you your own version of, of the Hiro Explorer that you can, you know, if you have the technical chops, you can then go customize and kind of add things to. So we started with that.

Now we're working on making the nodes set up really redundant and in addition to kind of building out the API set up there and the goal there is yeah, really to be able to service. Kind of as an enterprise infrastructure provider, the ecosystem as it grows, you know, I think we're decently early in that use case and we're big believers in the Stacks network, obviously.

So we're, you know, thinking of the timing for this is, is kind of catching the wave of adoption of building, you know, over the next year as it comes.

Jake: Okay. [00:17:00] Yeah, that makes sense. Cause like you got the big upgrades coming down the pipeline with 2.05 and 2.1 and already people are like, it's impending for four hours.

Is that supposed to be happening? It's like, well, for right now it's supposed to be happening. That's just what it is. But it's the growing pains of a of expanding.

Xan: No, for sure. And even with, you know, the subnets and appchains out, I I've seen this in the space for long enough to know that until a working implementation of something is actually live, you know, especially in today's market, it's going to be kind of a we'll wait and see, you know, the space has come a long way since I kind of first started in 2017, I think in a good way in that back then, you know, I think, you know, Uh, you probably could just satisfy people's frustrations with some answer about subnets and app chains, but you know, the, the crypto world we live in today is one where you can now, you know, actually go and have utility with the assets you hold in some way.[00:18:00]

And with that, you know, you kinda need something live. So, uh, app chains, I think we'll, we'll see those in the next couple of months, Jude & I have been talking to a couple of teams about if they may want to weigh implementations with app chains in the coming bit. And then subnets is something I think we may end up working on a few things there.

Once they're released, you know, we're on the side. I, I am talking to a number of folks in different ecosystems about interoperability type stuff. Um, you know, a number of the bridge providers, things like that, uh, subnets, give us some interesting possibilities there to, you know, instead of necessarily engaging with a bridge, we can, you could run the Solana and the entire Solana and network in a sub-net for instance.

Um, and then that gets much more easy in terms of how you bridge to that ecosystem and then, you know, uh, have a bi-directional path for assets. So.

Jake: Interesting. Yeah. Okay. Um, I want to try and cover as much as I can on mining because that's your expertise. But before we go too [00:19:00] deep, I want, I want to get your take on some terms, because I've only been in crypto and Stacksw for like five months, but I've already seen.

The fight over what a smart contract means is insane to me.

Xan: And the semantics are crazy in this well, it's because it's also new, you know, someone throws something at the wall and it was like, this means this. And then other people have their own versions and there's like, you know, definition creep. And then different people feel very, you know? Yeah.

Jake: they always quote this Nick Szabo paper from 94, I want a smart contract is, and he just calls it, uh, "A smart contract is a computerized transaction protocol that executes the terms of a contract."

And like he, he says in the paper, like a point of sale system is a smart contract. And so the, the Bitcoin fundamentalists, they take that word as gospel and they extrapolate it to everything and they say Bitcoin has smart contracts, but nobody in the modern era does that. And so.[00:20:00]

My first question is how do you feel about the term smart contracts in the modern parlance, but then second, uh, I hearing you talk, you've spoken about blockchains. They need to be decentralized and that they have this trade-off of write efficiency and keeping everything Byzantine fault tolerant, but then you get things like Solana to kind of flip it on its head with proof of history.

My feeling is that we're going to have this same debate in two years, where, what is a blockchain is going to change again? And we're going to fight over is this that, you know, so I'm curious what your thoughts are.

Xan: Yeah. I mean that, that fight maybe even starting to happen already. Um, no, so, I mean, I think with these things, I go back and forth a little bit because I think there's two different things to discuss.

I think, you know, these are terms that have technical bases and specific definitions, and I do think that matters. I think what gets [00:21:00] lost in a lot of the conversations about semantics and the space and why I. Yeah, I don't, as soon as I realized an argument is fundamentally a semantic one, I don't usually like engage that much is, you know, to your point of the Bitcoin maximalist, you know, claim with smart contracts.

Like the way I look at that is, is pretty simple. Yes. Bitcoin does have smart contracts. It's that's by definition. Um, that's been known forever, you know, Pay-to-Script-Hash (P2SH) kind of is one example, but. I think that it's a bit disingenuous. You either show you really don't know what that means for Bitcoin or that you're being a bit disingenuous with the claim you're trying to make when we're, you know, the discussion is clearly not about just, does Bitcoin have smart contracts? Yes or no? The question is, does Bitcoin have composability capable of doing X, Y, or Z? And you know, in this modern time we're talking [00:22:00] about, you know, DeFI Lego blocks, kind of having closer to Turing-complete composability and Bitcoin has nothing like that.

Bitcoin's smart contracts are very limited for the purpose of discussion in terms of the whole Web3 DeFi thing. It functionally doesn't have them. If that makes like by definition, it does have smart contracts where I go back and forth a bit is. People can get hung up on semantics to kind of be a little disingenuous or kind of make these claims.

I think I can get hung up on the semantics a little bit in terms of being technically correct. Um, and I think that can be a waste of time and in a lot of cases, So, you know, uh, I think, I think it does matter to, especially as you, you try to get a deeper understanding of these things. There's a lot of nuance.

Um, and I think this is one example of nuance, you know, smart contracts. And this is going to continue happening to your point because we're still very early in this space. So if that's [00:23:00] the case by definition, the majority of people using this technology are still to come. And so as those people come in and certainly those that have come in over the past year, um, You know, to them, a smart contract is not the type of thing that Bitcoin has or, you know, it's a very rudimentary version.

It really the, the view and the, the common definition, uh, if you will, that more and more people have is, uh, you know, smart contracts as these kinds of more fully expressible, closer to touring, complete type autonomous programs. You know, I think my. My view with this tech in general. And, and in some ways I think we're already seeing the battle you're talking about with more of the blockchain layer in that, you know, we're already seeing kind of.

A bunch of networks try and compete with Ethereum and they're doing so over TPS and kind of fees. This makes sense with where the space is for a few reasons, I mean, this is the [00:24:00] biggest pain point in this space for the most widely used use cases. And two, I can scream about decentralization from a mountaintop, uh, you know, as, as long as I want.

Until the space goes through some periods of time that puts a spotlight on why that's valuable and why not having decentralization or strong Byzantine fault tolerance on at least the lowest layer is valuable. You know, I wouldn't expect many people to care and it's why I think you're seeing a lot of people go for these trade-offs.

My view on it is, you know, these trade offs are not necessarily a bad thing. But they are at the lowest layer. My view and I, I had a tweet like this. I think it's the one kind of currently pinned on, on my profile, just @XanDitkoff, the way I think about these things and, and I think the snacks ecosystem is quite a bit different just in terms of thinking about system design, like this.

You know, everyone kind of has their layer one [00:25:00] and they want to fit as much stuff into that as expressible smart contracts, as high TPS. And then, you know, you get problems from that. And so you then kind of use layers above to solve those problems. You know, whether it's the L2's on Ethereum, things like that.

My view is actually, you're kind of compromising the lowest layer in this really does need to maximize for Byzantine fault tolerance and decentralized security for lack of a better way of putting it. And I kind of like taking a page from the book of people that have designed. The global distributed systems that are deployed and running at scale today, you know, distributed systems sciences, it's not a new field, there's decades of expertise and best practices here.

If you look at any globally deployed distributed system at scale today, the internet being a perfect example, it is not a monolithic network [00:26:00] where a single layer kind of takes care of everything. And then you have layers that try to solve some of the scaling issues or externalities from that. It's a patchwork of protocols that each work together and each focus on solving the specific job to be done that that protocol is created for. And so that that's really, you know, when people talk about a multi chain world, I hundred percent believe in a multi-channel world, but. It's quite a different conception of it, where, you know, I kind of look at stacks as, as an exact version of this type of layer cake.

What we do is we say, okay, Bitcoin is the most secure, best Byzantine fault tolerant network that's ever existed. And at least that we see existing for the foreseeable future. This is the exact type of thing you want at the lowest layer, just maximizing for that with, you know, no trade-offs in terms of scalability or speed.

But [00:27:00] now how do you kind of take that primitive? The kind of decentralized trust that that layer gives you and kind of a unique way. And how do you add composability to that? You know, we still want very expressive, smart contracts. You know, a lot of the use cases that we've seen in DeFi on top of Ethereum and other networks to date.

Like, this is the innovation that we've kind of been waiting for. And in some ways, in terms of unique things that are powered by this technology that you couldn't do before. My issue ultimately with DeFi is just that a lot of defies that Ethereum kind of underlies it. If you can create composability.

But have it ultimately settled down to Bitcoin in some way, and have Bitcoin kind of be this reserved currency of the overall system. That, that to me is ideal. So the Stacks network, you know, does the composability to the point of what we were kind of talking about before with subnets and app chains, though, again, we just want the Stacks [00:28:00] network to focus on composability.

Not to focus on, okay, how do I do composability at super high TPS? Or how do I do composability and, you know, enable huge data throughput. We just keep layering on top with protocols that can focus on that. This is kind of, you know, in, in the Genesis block of the stacks network, I think one of the messages written is turtles all the way down.

And it's referenced to this kind of Hindu myth that the, the world is a kind of turtle on the back of another turtle in the back of another, you know, that there's kind of an effort at never ending kind of sequence of universes for us. It's networks and blockchain protocols all the way down that are each functioning in a way that serves the use case they need to.

So it's why, you know, I mentioned earlier, for interchain interoperability, subnets, kind of allows that in a great way. And like, I expect Solana to continue succeeding, you know, for the foreseeable future in one of two ways, either [00:29:00] currently, where, you know, there isn't really a market premium on decentralization and we haven't gone through something that, that has kind of put a spotlight on that and they continue to solve the kind of scalability problem better, better than most.

But even if that changes and we do come into a world where there's a super high premium on decentralization, which I do think will happen at some point for a large sector of the space. I still see Solano being used quite widely as something like a sub network on Stacks or a network that it itself is used for very specific actions.

I, you know, I want to go. And I want to exchange a bunch of assets, you know, potentially cross chain, and I want it to happen very quickly and very cheaply. Well, I'm interested in a solution that can take these assets over to a Solana instance, get that done in the most efficient way as possible before I bring them back to where I actually want.

Make more use of them or custody them, or what have you, um, you know, app chains then, kind [00:30:00] of focus on a similar use case, but for transaction scalability and throughput, and you can create CRE you can keep creating layer ones on top of stacks that use proof of transfer. They use the same consensus mechanism.

So stacks, and I'm sure you want to get into this a little bit, but for mining stacks, you spend a Bitcoin it's conceptually the same as proof-of-work. You're spending a scarce resource of a known market value with Bitcoin, it's electricity, in order for the chance to mint a new digital asset. So you always spend the Bitcoin, whether you win it or not.

The stacking rewards, which just where you lock up stacks tokens and you receive Bitcoin, this comes directly from the miners. You can create layer ones on top of stacks that then use stacks as these scarce resource to mine. And then mint a new digital asset for that layer one network, you can one create your own unique experience on that layer.

One network. So, you know, to your point about much higher [00:31:00] TPS, much higher data throughput, different types of consensus mechanisms, it can be open membership, closed membership. It's, it's very flexible, but all of these can also still functionally have Bitcoin as the reserve asset, because if STX is the asset that you're using to secure and mine it.

Well, Stacks is one degree of separation from Bitcoin itself. So you just need to abstract that and then you can reward your network and Bitcoin too. So yeah, this, again, this I think is a little hard for, to wrap your head around today just because it is all. Mostly conceptual app chains are live on testnet today.

And I think Jude is a very simple Mainnet implementation up. But, as you actually see networks kind of forming, I think it'll, it'll become a little more concrete to understand, But yeah, I think, uh, yeah, there's a lot, a lot there, a lot to unpack, but that's really how I see systems in this space more is I'm much more interested in, you know, how can you combine a lot of these different [00:32:00] technologies to actually serve some end use case?

You know, we don't try and fit HTTP into the DNS layer or vice versa. We, you know, create a stack that allows both to work together and ultimately deliver the internet as we kind of know it. And I think we're starting to see the, the beginning of that in this space in a powerful way, I think the rise of NFTs with artists, and communities and cultures has kind of, it's one of the dynamics that's created that I think is really great.

Is it it's really kind of increased competition among networks in the space because increasingly these people coming in, one; they're, they're not, they, they're not part of the political or marketing wars that have occurred between these networks. Two, they don't care about that. Or, you know, the nuance of the underlying technology, you know, more and more of these people are just looking at this stuff as an enabling thing.

Uh, so many artists I've talked to you look at, uh, [00:33:00] NFTs has just like a dot JPEG. Like they don't the network it's on top of, the nuance of the consensus mechanism. It's just a file type to them that allows them to do certain things with it. You know, like they use a dot TIF for certain reasons. They use it, you know, no different than that.

And so ultimately what it comes down to is delivering a better experience and more value to these people regardless of what your network is called and what the consensus mechanism is. And I think we're very early in that playing out. But I think that is, you know, over the next 10 years, more and more how this happens.

So, and I think part of that time period, there will, at some point be things that happen that at least put a much larger spotlight on the value of decentralization than I think there is today. Don't know exactly, you know, what those are or the timing, but I do think that'll happen at some point.

Jake: I, I totally agree.

You kind of took the words out my mouth, why? I feel like, you know, like [00:34:00] Ethereum is optimizing what they have to optimize. Like people are using it like crazy and they got to get gas speeds down and they got to get, you know, through put up. And so they chose proof of stake. That inherently becomes centralized and over time.

And that is the thing that we're trying to guard against so that someone can not just laser point on like five nodes, they take out a quarter to network or whatever it is. I'm sure after you've listened to this, they're going to have some specifics on mining.

Let's start on mining. So maybe just give a brief overview of. How is Stacksconnected to Bitcoin through proof-of-transfer?

Xan: Yeah. So the consensus mechanism of Stacks is called proof-of-transfer. Proof-of-transfer conceptually. Is the same as proof of work, in terms of just kind of the general conceptual classes of consensus mechanisms you can have.

And with that, you know, Stacks as any proof-of-work network is fundamentally secured by the miners. That being said, proof-of-transfer [00:35:00] does have two different types of participation. So, minors are those that actually secure that. Just like in proof-of-work, miners spend a resource of known value in order to compete for leader election.

So to compete, to actually win the next block, append it to the network and receive the reward and Stacks tokens for doing so. In proof-of-work networks, that scarce resources, electricity. Um, as I think a lot of people are aware now with all of the environmental talks around Bitcoin. The kind of aha moment we had with transfer is that you only need to go through that conversion from real-world asset electricity to digital asset once.

So the way that snacks is actually connected to the Bitcoin network and how you actually mine Stacks is you spend Bitcoin. You spend some amount of Bitcoin per block. The amount of Bitcoin you spend, that's not [00:36:00] staked, it's not locked up. You don't get it back. If you don't win the block, you are spending that no matter what, it's a sunk cost, and the way to think about profitability or, or the probability of winning the next block is the amount that you spend is relative to every other miner trying to mine is combined with a protocol level VRF, which is a verifiable random function. Think of it like a random number generator, essentially. And so it creates a scenario where the more that I spend per block to try and mine, the higher, my probability of winning that next block is but there's always, you know, some level of probability.

The way that, that connects us to the Bitcoin network is that the act of mining and actually a Stacks mining transaction is a Bitcoin transaction on the Bitcoin network. What that means is that a hash of every Stacks block, uh, a hash of the header is actually included [00:37:00] in a Bitcoin block. So the Stacks chain is secured both by stacks miners, and Bitcoin miners, in a way there's, there's a longer discussion on some of the interesting security properties that creates in terms of, you know, usually to attack a proof-of-work network. It's really just a resource constraint question. With Stacks because of the way that the each block references a Bitcoin anchor block, it also adds an element of needing to a resource constraint for an attack, but where it's also over time.

And it also puts the preparation for attacks in public. That's kind of a longer deeper discussion to get into, but the Bitcoin that miners spend is then I think as some people know, Actually sent to stacks token holders who are locking their tokens up and signaling support for a chain tip.

This is called Stacking usually signaling and support for a chain tip is pretty.[00:38:00] It's, you know, not much work. It's pretty obvious there's one chain tip, but in the case of contentious forks of the Stacks network, stackers have a nice property where they help keep miners honest. But again, it's the miners that are actually securing the network.

And they do so by sending some amount of Bitcoins. So sending a Bitcoin transaction on the Bitcoin network, that includes a hash of the block header, so,

Jake: That might be a good segue. Cause I'm curious about, how do reorgs work and in the two sides you can try and do a reorg on the Stacks side or if Bitcoin reorgs itself, how does Stacks adjust to that? And I'm curious, are both of those, maybe take this the Stacks one first. So if we have one miner trying to reorg things, you have the hash buried. So the other miners are looking at different hash, and while you're trying to change on your double spend or whatever is that.

Xan: So, so that one, that one, [00:39:00] I can answer a little better. The, the Bitcoin reorg, you should have Jude on and go deep on this. Cause he he'll just, yeah. He'll, he'll drill down and give you the full landscape

on the stack side, what you would have to do in order to do some sort of reorg. Um, and create like a double spend attack is you would, first and foremost need to get to the point where you functionally had a hundred percent chance or close of winning the next block.

you can't reasonably guarantee the ability to win when the next block. You're not going to be able to kind of do your reorg. That's kind of the first prerequisite to get to, in order to do that, what you actually have to do is, let's say you're not mining yet.

Or even if you are mining and now you're going to start your attack. So you aggressively up your spend in order to get to the point of having, you know, functional assurance that you'll win the next block. You actually have to do that for [00:40:00] a number of blocks in order to build up that ability. The reason is that what the VRF and the probability of winning the next block, the way that that actually is calculated is there's a six block smoothing function.

So it looks at, uh, the, the actual equations, a little more complex, but it basically looks at the median of your spend over the last six blocks, uh, meaning it's going to take at least three to four blocks. Um, you know, if you haven't started mining at, it may take five or six for you to get to the point where you can guarantee the odds of you winning the next block are high enough that you can actually start trying to pull this attack off, doing that you are all of that is done in public.

It's public on the Bitcoin chain. Every other miner can see what you're doing. And as such, there's a lot of options to thwart that attack both in terms of on chain actions. So every other miner can start upping their spend as well. Even doing that a small amount [00:41:00] will kind of ruin the near term probability.

So you're going to have to continue that resource spend over an even longer time. In addition to the fact that you can you can have exchanges, you can have nodes, basically delay the processing. So instead of just looking at, you know, the last N+2 blocks for confirmation, maybe they look at the last N+5,, or N+10, you can kind of establish an anchor block there where you know, the attack begun and you're going to kind of wait to resolve that history until the attack has kind of played through, and you know, to do this without it being publicly visible that would be, is difficult. You'd have to create a private Bitcoin fork. And so this is how bitcoin being connected to Bitcoin through proof of transfer, basically makes the security of the Stacks network, not just a resource constraint question, but a resource constraint question over time.[00:42:00]

Jake: Okay. And just to double click on, make sure I understand it when you're talking about. And plus two and plus five, all the nodes are looking at the network and taking in transactions. So, so they have their own personal history of the network in the sense. And then one of them, which is trying to say, execute a double spend, we'll say this is truth.

And maybe he wants to block, but now the other ones are not in, they don't have that double spend in it. So they're saying there's a difference here and they continue going up the ladder. But there's a different to that one. So if. What happens when the neck and that happens,

Xan: that's even after the attack would have occurred, you know, there'll be able to see that attack building up.

You can also create things in the software that kind of flag for this. I mean, this is a bit further, further down the road, but, um, you can almost think of it as like micro blocks. You see someone building up to the ability to attack. Let's say they do that at, you know, a certain block. So what you're going to say is.

Every [00:43:00] transaction, like the anchor, the last confirmed block that you're always going to look at while you continue to process transactions is going to be this anchor block. That was the last before you saw this person kind of ramping up their attack. The attack plays out. Ultimately what you're going to have is at some point that resource constraints gonna kick in, someone's gonna run out of resources for the attack.

And at that point, you know, the network will continue. There'll be one block after that, that will no longer kind of be the longest version of the history. Those will all have that kind of revisionist history of the double spend is wiped out. And the network kind of progresses as intended. So, you know, worst case, I think it slows the network down a lot.

But. That's not a huge deal, I think in that case.

Jake: Got it. Interesting.

Okay. Yeah. Gotcha. Because everyone talks about 51% attacks for proof of work. But with proof of transfer, it's that the amount of [00:44:00] probability you need is almost a much higher cause I've partook in some of the CityCoins mining. And if you have more than half the bids per block. You're still going to lose a lot over a hundred blocks. You have to have the law of large numbers play out over time to get down to that, that mean number. Cause you could spend, you could fat finger, you know, a thousand stacks for a hundred blocks and you might only win 25 and you're like, this thing is broken and it's like, nah, it hasn't played out over time.

Xan: Yeah, no mining really is a numbers game. I think, you know, it's interesting that the barriers to entry for Stacks mining, we wanted to make it simple in terms of like on the computation side, on the hardware required side and it, and I think it very much is, you know, I think the, the constraints that certainly exists today, and I think this, this will get better in the future.

That is kind of the network grows the, the activity of the network grows, but, um is really just the amount of Bitcoin. You need to start mining to ensure. That the law of large numbers, you [00:45:00] know, is eventually you, you have time to mine for long enough. So that, that kicks in, it's like flipping a coin.

You know, you can flip 50 heads in a row. It's unlikely, but it can happen. Um, that being said, if you keep flipping that thing 10,000 times, that's that that's going to equal out to 50, 50, or closer to 50, 50 mining and strategy kind of works the same way. You know, one of the things to think about is how much are other miners burning.

What does that give me in terms of relative probability? Knowing though that that's not going to be kind of, that's not kind of a promised percentage of block wins, you know, over time, I think, uh the way I think about this right now is, you know, the mining market is really driven. The profitability of the mining market is really driven by the use, the use case of stacks and the, and the value of the use case.

I really think there's a lot of different ways that use cases that I think Stacks [00:46:00] enables and, and ways you can describe it. To me the way I like summarizing it is, um, certainly kind of the secondary market price or one way to think about it is it represents the public perception of the value of the use case of smart contracts on top of Bitcoin.

Now right now, you know, stacks 2.0 has been alive for less than a year, like nine, 10 months. Um, I think, you know, make sense where the network is. We're actually starting to see some of the first use cases in the first real value on top of just stacking and that stuff has value to it as well, but we're starting to see kind of the first layer of value on top.

Right. Over time, you know, the secondary market, I think can, can react to a lot of things that are frankly bullshit. Um, but over time, I think, you know, that price in terms of the, the price of stacks relative to Bitcoin really does represent the value of that use case. And that's why. Our main focus in terms of how to [00:47:00] drive the mining market more and more, has very much been to, you know, one let's make mining as easy as possible, and two which there's definitely still more work we can do there.

You know, creating easier graphical interfaces for mining, having people where you can go and like easily spin up a cloud stacks, node, and cloud Bitcoin node, versus kind of needing to do that yourself. It's why I think a lot of our focus beyond those efforts has been to kind of push the use of the stacks network and use cases being created on top of it more and more.

Um, so yeah

Jake: , I think we can be cool too, about having like an off the shelf. Way to pool Bitcoin to mine with so that you can kind of like get together. And because we do that with, with the Syvita Guild for city coins and they're trying to abstract and automate some of it.

Xan: So that is coming at some point.

So the kind of backstory there, like we've done a lot of work on, on the idea of mining pools. We actually have a few different technical designs. We've [00:48:00] fully scoped out. I actually know of at least one team working on kind of one the issue currently I'm at least the issue for us, was the fact that prior to, I think this'll get a bit easier to do after stacks 2.1, the network upgrade, but with clarity's ability in terms of Bitcoins mining pool at this point would be very custodial.

We would basically have to take custody of funds on behalf of users. Now there's ways you can do that, that are kind of, you know, they make that trusted set up quite a bit nicer. Like our main design actually calls for users almost mining within the pool before we then use the funds to mine. You know, you can P you permission your funds on a 10 block, 10 block chunk basis, or 50 block chunk basis being like, you know, these are the funds I'm giving to the pool for it to use to mine for the next 50 blocks.

You can maybe even put parameters around that as well. \ And, you know, you can have the operator, let's say that's [00:49:00] someone like Daemon locking up on number of stacks, tokens that can be slashed or something like that. If, if we do anything nefarious. So there are ways to kind of help that situation.

The problem for us comes in with regulation. I mean, that's a common enterprise where people are putting funds and with the reasonable expectation of a profit, like that puts us right in the middle of the cross hairs of needing quite a bit of. Licenses in a number of jurisdictions where this is, it, it puts a really high burden on being able to kind of offer this.

And when we were looking into it, eh, we kind of realized at least prior to snacks, 2.1, we would probably only be able to offer this to institutional folks and accredited investors. And we'd possibly even need them to sign like subscription docs before joining the pool. So with that, I think. I worked with a number of folks on potentially taking the designs we've created and building them into an actual pool shock [00:50:00] to, uh, Syvita Guild about this.

There's another guy drew. Who's slowly working on this. So I think after the 2.1 release, you'll, you'll start to see part of this. Um, you know, we we'd love to get stacks mining closer to where the city coins mining is. It will never be that easy in terms of in browser, just because city coins mining, because it's a protocol on top of the Stacks chain.

It doesn't have certain constraints in terms of like, you can run that in browser. 'cause you don't need to be running a full stacks node or a full Bitcoin node to be able to mine that, um, you do need to be running those to be able to mine Stacks so we've thought about, you know, can we create, or can we create a fund to grant with the foundation to create a desktop mining application for stacks where, you know, I think the first version of this is you still have to spin up a Stacks node and Bitcoin node, and then you can just connect those to the desktop application.

I think longer-term maybe [00:51:00] through infrastructure providers like BlockDaemon or others, they can offer you ways to have like a few clicks, spin up a Stacks node, just copy and paste the information you need to connect that to your miner and get going. I think that's probably the, as far as I see it right now, kind of the nicest setup we can get to.

Um, but.

Jake: Okay, cool. Uh, yeah, that's exciting. Well, I know you have a hard stop, so we're going to use this as like a, this is the area where it's just getting good and people that come on. So after around two in the future, but, uh, yeah, if they want to, if they want to

find out more.

Yeah, maybe. Yeah. Maybe after, uh, maybe after the upgrade.

Cause I want to deep dive into some of what that even means to

Xan: ah, okay. Yes. Yes. Yes.

Jake: The 2.05. Yeah. In the meantime, where can people go to learn more about you or about Daemon technologies ?

Xan: For [00:52:00] me and a lot of people, um, I'll send Jake this too, so you can put it in show notes or anything like that. But, um, people hit me up on Twitter all the time.

I think my DMS are open., you know, hit me up. Any questions about mining?

Jake: Sorry to cut in. You take the photos you post is that.

Xan: Yeah. Yeah.

Jake: So those are fucking phenomenal.

Xan: Uh, thank you, man. Uh, yeah, I, I was super lucky. I got into photography in high school, my high school and a dark room. So yeah, I do. I mean, I do both film and digital.

I, I need to get around to doing some sort of NFT thing on Stacks with them. At some point I have some cool ideas with the film photography. NFTing them. And then the NFT like gives the rights to a one-on-one real world, like print of the film or schooling. Yeah, I've just been busy and that takes a bunch of setups, so that will come at some point.

But yeah, no, I, I appreciate it, man. Um, yeah, so my Twitter is just @XanDitkoff. It's just my. Uh, feel free to hit me up there, DM Me, tweet at [00:53:00] me, you know, whatever have you, and then you can also find it from that profile, but, um, to find out what we are up to at Daemon technologies, uh, you can go toDaemonTechnologies.co that's, D a E M O N like a Linux demon.

Um, and yeah, again, we should have some. Maybe it, maybe I'll give a little screenshare preview to this, the, when we talk next, but, uh, we'll be launching the first version of the On Stacks platform soon. And adding a bunch of protocols, like Arkadiko to that in the near term. So, yeah.

Jake: Awesome. Dude. I'm excited, bullish as ever. Thanks for taking the time, I appreciate it Xan.

Xan: Oh, listen,

Jake. Thank you. I mean, I've, I will, I will end this with saying, you know, I've worked in the Stacks ecosystem for a while now. And you know, maybe one of the things I wasn't necessarily expecting, but I'm pretty, pretty amazed at is, uh, I actually think I'd never been more excited to be working on this stuff than today.

So yeah.

Jake: Yeah. I mean, when I, when I got in, basically all you can do was [00:54:00] stack, like I think Pravica and Sigle were alive, but you just Stack that's what you did. You got your yields and now it's like a full ecosystem, so

Xan: we're still just getting started. So, yeah. Cool. Awesome. Thank you. Thank you for the time.