Designing a BTC-backed decentralized stablecoin

EthCC[8] · 1 Jul 2025 · 30:33

Scott Piriou presents a workshop on a Bitcoin-backed decentralized stablecoin. The presentation examines interest-rate managers and building a bot for this role.

Speakers

Topics

From EthCC[8], hosted by Ethereum France.

Transcript

All righty. Oh, hey. Hello everyone. How are you doing? Good. Yeah. All right. Cool. So, for those that came for the workshop, it's not a workshop. I'm going to be giving out a talk and we're going to be designing a Bitcoin back stable coin. All right. We have some late commers. Hi. All right. Cool. So, why do we need this? Well, first of all, there are not a lot of applications in crypto that have found like real product market fit, right? But there are a couple of ones. The first one, stable coins. We've all used USDC. We've all used USDT. We've all used stable

coins. There's a tons of different stable coin protocols. It has found real product market fit, right? There's another product that has found real product market fit and it's called Bitcoin. obviously, right? When you talk to your grandma about uh crypto, they're like, "Oh, Bitcoin, right? Everyone knows about Bitcoin. When you combine those two, you get something cool." Because if you imagine that you can build a stable coin backed by Bitcoin, then you're actually tapping into like this gigantic market of Bitcoin that's dormant, right?

Because right now, what you can do with Bitcoin is simple. You can hold it, you can transfer it, you can't actually program anything on it. But if we manage to be able to do that, then we be able to do the stable coin and that would make it really useful, right? All right. Why do we need it to be decentralized? Why can't we just have a centralized version? Well, centralized versions already exist. You have all pretty much used USDC, USDT. We want it to be tr we want it to be trustless. Why is trustless important?

Well, you don't want to have to trust anyone. Trustless means literally no trust, right? When you use USDC, you're trusting Circle not to steal your money. You're you're trusting it not to uh stop you from using the protocol. You're trusting them not to get stolen their money, right? And by building a trustless protocol, we don't need to trust anyone. That's why Bitcoin exists in the first place, right? It's like this trust issue that we have. Another good feature of being decentralized is uncensorable or censorship resistance.

We don't want anyone to be able to say, "Hey, you actually can't use your funds." This already happens frequently for USDT and USDC. Most of the time for good reasons. It's for hackers, etc. But we could imagine, I don't know, if we're using USDT, they could say, "Oh, everyone that attended ETHC can is like an illegal criminal and they won't be able to use USDT anymore." That's not a good thing. And by building a decentralized stable coin protocol, this we ensure that this won't ever happen. And also what's good is like what better collateral than Bitcoin for decentralized stable coin. We all know that decentralized stable coin already

exists on Ethereum. Usually is backed by Ether or stuff like that, but Bitcoin is like the ultimate collateral for a decentralized stable coin when you think about it. And actually, when you think about it, the US dollar used to be backed by gold, right? There was this thing called the gold standard where you could go to the Federal Reserve and you could say, "Hey, I have a dollar. Give me back $1 worth of gold. You could do that." And before that, it was silver, blah, blah, blah. It doesn't matter. This stopped in 1971, Richard Mr. Nixon. And now we have this thing called Bitcoin. It's actually called digital gold.

So what better the collateral digital gold for digital cash, right? It makes sense. Just makes sense. So now you're like, "Hey Scott, that's good to hear, but you started saying that you can't do anything on Bitcoin, right? You can only hold and transfer." So now the question becomes, can you do that on Bitcoin? And the answer is no. Right now you can't do that. I mean, not in trustless manner. Right now what exists is multi-IG. So I'm going to explain how a multi-IG works.

You have your Bitcoin on Bitcoin and you want it to be transferred on Ethereum, right? Because on Ethereum you can pro program stuff but on Bitcoin you can't. You have your Bitcoin in Bitcoin you send it to someone on Bitcoin. This someone hey usually a centralized entity. He takes your Bitcoin on Bitcoin and he creates he mints a new token on Ethereum and he send it to your way. Sends it your way. That's like how wrap Bitcoin works. If you want to get back your Bitcoin on the Bitcoin network, what you do is you take your wrap BTC on Ethereum, you send it to the guy and the guy sends back the Bitcoin on Bitcoin.

Great. This works. However, this is trusted. You're actually trusting the guy to give you back your Bitcoin. This is current tech. This is centralized. This already exists, right? All right. thing is it's not ideal. In the ideal scenario, we'd have like this full trustless setup and we'll see how we get there. What's coming though in a couple of in the following months is called BitVM. Bitvm allows for something quite neat. Instead of trusting a single centralized entity, a single multi-IG, the trust set the trust assumption here is one out of n. So if you have 10 operators, you only need one operator to be honest and you

can trust the portal, right? So this moves from having to trust like half of the signers on the multi-IG to only one operator. Problem with BitVM is it's not I mean it's almost ready but not live yet. It's one out of N. So it's still not trustless. It's called trust minimized. You're like minimizing the amount of trust that you need. And then it's still a little bit slow. There's fraud proofs. It's kind of like the optimistic rollups. It's like fraud proofs and delay and it's kind of expensive.

Something else that's going to be coming not in a couple of months but maybe next year is called collider VM. It's right now under research. I think it's the guys from Starware who are researching about it and other people. It's basically an upgraded version of the bit VM. It's more capital efficient. It's faster, but unfortunately it's still under research. And now the ultimate solution that we'd all dreamed to have because this would allow trustless Bitcoin is covenants. It's opcat. It's you could actually build a ZK rollup on Bitcoin.

Right now, you can't do it because unfortunately, as you can see here, there's a soft fork required. You actually need to modify the Bitcoin protocol. And we all know, I mean, God knows that it's not an easy task, right? You you can't just hard fork or soft fork the Bitcoin protocol like that. It takes years, takes committee, it takes discussions on Twitter and people arguing about it and blah blah blah blah blah. All right. It's a feature, not a bug, though, right? It's like that's why people like Bitcoin. It's because you can't change it. But if we're being honest, I mean, my point of view is this is bound to happen, right? The Bitcoin protocol is

bound to have some changes at one point or another. The question is like how small does the change need to be in order to give us this like programmable money and trustless bridges. All right, I hope I convinced you that Bitcoin finance and Bitcoin programmability is going to come at one point. Question is one year, two year, three years, four years. In the meantime, we can use BitVM and CLVM. I hope I've convinced you about it. Now, let's get to actually designing the stable coin. So, I see a lot of people here who might be really familiar with Bitcoin with the stable coin systems.

You won't learn anything new here. The goal is really to design it from like a newbie perspective. I'm going to walk you through how it's designed and hopefully you'll really understand how it works. All right. So, how it works? Well, we said it was Bitcoin backed. So, the way it works is really simple. You have a protocol. You send back you send to it like you deposit 200,000 for example, 200,000 worth of Bitcoin. And the protocol will mint will give you 1,000 worth of I call it BitUSD. You can call it however you want. That's the stable coin.

So, there's a good application of that. It's like imagine you have a million dollar worth of Bitcoin. You're like a Bitcoin millionaire and you want to buy your house. Thing is your house is like 500K. So you could of course just sell your Bitcoin right now. Like sell half of it, buy your house and that's it, right? But then if you're expecting the Bitcoin price to go up, you don't really want to sell it right now, right? You want to hold it. Well, with this protocol, it's kind of neat because you actually deposit a million dollar worth of Bitcoin. You mint $500,000 worth of BitUSD. You spend these bit USD in order to get your house. And then five years down the road when your Bitcoin has like

doubled or tripled in price, you in order you can get it back. In order to get it back, you just have to reimburse your debt, right? So, you you send back a hundred thousand worth of Bitre and you get your Bitcoin worth your Bitcoin back. There's a small caveat here. You don't actually need to reimburse. I mean, you need to reimburse your debt, but your debt also comes with an interest. I'll be going more into the interest for now. Let's just say the basic interest is 5% for everyone. All right. Cool. So, now let's see how it works. If the dip if the Bitcoin price goes up, then we're Gucci, right? Bitcoin price is $300,000.

the deposit, the amount deposited is bigger than what you borrowed and then what was minted. So, we're all good. The real issue comes when the Bitcoin price goes down. You can see in this situation, the Bitcoin price is 90,000, you borrowed 100,000K, you're screwed because now you're underolaterized. Now, it's not backed anymore. So, people are going to like run and and exit and it's going to fail and go down to zero. We don't want that. So, in order to prevent that, we never let the deposit go smaller than the amount that you minted.

When the the deposit gets really close to what you minted, anyone can come in and liquidate. I'm sure everyone has heard about liquidations, but some new newbies might be like, "Oh, I heard this word, but I don't really know what it means." It's quite simple, actually. Anyone can come in. It's called just in time liquidation. Anyone can come in and since your deposit is too small to the bit that you mint it, they can come in, reimburse your debt and get back your deposit. And they're incentivized to do that because as you can see here, the deposit is still bigger than the BitUSD, right? So they send a $100,000 worth, they get back $110,000 worth,

they take a cut, and the rest is given out to the protocol, right? But now there's one issue with this. What happens if like we have a big protocol with lots of CDPs and then all of a sudden the Bitcoin price plunges? We're going to have lots and lots of liquidations happening at the same time, right? So everyone is going to be buying BitUSD in order to reimburse the debt. But if everyone is buying BitUSD at the same time, what's going to happen to the to the price of BitUSD? It's going to go up right?

But the whole point of a stable coin is to be stable. We don't want the price to be to go up. We want it to be stable, right? So in order to prevent that, we use this thing called stability pool. Stability pool is really simple. It's a staking pool. Basically, anyone who has BitUSD can stake their BitUSD in the stability pool. And now when liquidations happen, instead of people buying from the market, they'll be using this the BitUSD in the stability pool. This won't affect the price of the BitUSD and they'll be using these USD to reimburse the debt.

Here in our example, we have Alice and Bob. Alice has about 150K and Bob 50k, right? What happens? The liquidator comes in. He takes the BTUSD from the stability pool. He reimburses the debt of the CDP and now the deposit of the CDP goes back to the stability pool and the liquidary takes a cut. Now the funny thing is Alice initially started with 150k dollar worth of bitd but now she only has 75,000 but she also now has Bitcoin. She was like she kind of bought Bitcoin basically, right? She like DCA into Bitcoin if you want. Plus on top of that

she also got a part of the of the excessive deposit. She al also gets like this neat uh fee, right? So now she started with 150k. Now she had she has 150 plus 6k. Same goes for Bob. So you can see that you're already incentivized to deposit in the stability pool because you're actually going to get some fees from liquidations. But on top of that, we need to make sure that there's a lot of BitUSD in the stability pool. So on top of that, we really need to incentivize uh the stability pool. And how do we do that? Well, remember earlier on I said that when you reimburse the debt,

there's an interest rate. It was set to 5%. Well, where does the interest go? Well, it goes through a protocol. So the protocol is actually making money. So the protocol is actually taking this fee that is generating from the interest and these interest go to the stability pool. So the stability pool is incentivized both by interest from the protocol and by liquidation fees. By doing this we ensure that a lot of people go in the stability pool and deposit. And there's also another thing it's called amplification.

So what's amplification? Well, you need to realize that not all you all bit USD will be staked in the stability pool, right? Some might be used in liquidity pools. Some might be used in lending markets. Some might be used hopefully for payments. Some might be just sitting in wallets doing nothing, right? And so since not everything is in the stability pool, if you only have like say 20% of all Bit USD existing that's staked in the stability pool and the average interest rate of the protocol is 5%. Then the yield you're getting from depositing in the stability stability pool is actually 25%. Right? So by having 5% interest average, you're

actually getting 25% which is huge. So that's a neat feature of the stability pool. All right, but now what happens if the price because the goal of the stable coin is to be stable, right? We don't want to go up. We don't want to get to go down. So now you might be wondering, but Scott, what happens if the price goes down? If say the price is uh 90 cents, right? Well, in order to prevent that, we introduce redemptions. So redemptions is exactly what I mentioned earlier when I said that back in the days you could go to the Federal Reserve, give $1 US and get back $1 worth of gold. Here it's the same thing.

You can always take one bit USD, send it to the protocol, and the protocol will send back $1 worth of Bitcoin. It's exactly the same thing. It's called redemption. That's a neat thing. So how does it work? Because we need to ask ourselves here, where does the Bitcoin that is sent back coming from? Who is sending the Bitcoin? Because we have lots of CDPs, right? We have people who borrowed or who minted stable coins versus their Bitcoin, but they want to keep their Bitcoin.

Everyone here wants to keep their Bitcoin. That's the whole reason of the protocol. So, who's going to be giving the Bitcoin to the redeemer? And now we circle back to the interest rate. Remember I said it was 5%. Well, I lied. It's not going to be 5%. Actually, you when you create your CDP, when you create your position, you decide what the rate will be. You can decide my rate is going to be 1% or 0.5% or 10%, right? But now the question is who's going to pick 10%. Everyone's going to pick 0.5%. No one's wants to pay it. Well, here's the catch.

In order to decide who's going to get redeemed, who's going to get who's going to pay the the collateral or pay the Bitcoin, basically, we order all existing CDPs by interest rate, right? And we pick the one with the lowest interest rate, and this is the one who's going to get redeemed. We remove one bit USD from its debt. All right, we send $1 worth of Bitcoin to the redeemer. And that's how redemption works. So just to get that clear, say we have Alice who has a debt of 10 bit USD and $50 worth of Bitcoin as a collateral. She she's

like super greedy. She's like, "Oh, I have this interest rate. It's like 0.5%. It's great. Cool." Now the price starts begging a little bit and people start redeeming. All right. She has the lowest interest rate of everyone, right? So, she's going to get redeemed now. She had 10 bit USD. She gets redeemed. She only has 9 bit USD left and she has a deposit, a collateral value. Instead, it was $50. Now, it's now $49. So, she the the CDP actually lost some Bitcoin, right? It lost some debt, but it lost also some collateral.

So, no one wants this to happen, right? Like most people when they open a CDP, they want to get their Bitcoin back one day or another. They don't don't want to get less Bitcoin than what they deposited, right? So people are incentivized not to go at 0.5% and be super greedy. They're incentivized maybe going like 1% 2% in order not to be the first one to get redeemed. And now you might be thinking, so you set your own interest rate. Now, you might be thinking, but wait, it kind of sucks because imagine I open my CDP now at 2%. And five years down the road, I see that big redemptions are coming and everyone is at 3% and I'm going to get redeemed. Well, the thing is you can actually adjust at any time your

interest rate. So, say you start at 1%. You can say, "Oh, actually now I'm going to move. I'm going to set myself 5%." Okay? But when you do that, you pay a seven days fee. All right? So, this is done to deter anyone from like playing with the interest rate and like being always at 0.5 watching the blockchain and like when a redemption comes, oh, I'm now at 2%. Okay, thank you. Uh, you can adjust at any time. But now the real question is, do we really want to go through the trouble of looking at the redemptions every day, looking at your interest rate every day, being kind of stressed and like, oh, am I going to get redeemed, etc. The good

thing is this interest rate management where you can go up and down and and set your own interest rate. You can actually delegate it to someone else. You don't need to do that yourself, right? the interest rate manager that you delegate to, he can only modify your interest rate. He can't modify your collateral ratio. He can't add more Bitcoin or steal your funds. He can't do anything. The only thing that he is allowed to do is manage your interest rate in order for you not to get redeemed, right? And so by doing that, you're kind of like developing this ecosystem of interest rate managers where you could have different contracts, different managers doing different things. You could imagine, for example, some managers might tell you,

"All right, I'll give you a fixed 5% rate." All right, with me, it'll be fixed. If it goes up, I'll take the loss. If it goes down, I'll take the profit. Right? I'm going to manage your interest rate, and I promise you it'll be 5% fixed. But you could also have, I don't know, someone offering you some range, for example, between four and six%. And you could also have people who was going to tell you, "All right, I'm going to optimize the heck out of this. It will always be the lowest interest rate and I'll I'll do my best in order for you not to get redeemed and maybe other possibilities, right? We could have lots and lots of different contracts here.

So, just to recap, what happens if the price of the stable coin goes less than goes down?" Well, people will buy BitUSD to redeem uh people will use BitUSD to will redeem you Bit USD. Sorry. By doing this, people will move their interest back up because they're afraid of getting redeemed. All right. By having the interest average interest rate go up, this means that the protocol is making more fees. And by making more fees, the yield of the stability pool is going to go up. And with the amplification, it's going to be super up. And by doing this, we'll create more demand for a bit USD. More more demand

for Bit USD means price goes up. So we have like this double synergy of like by redeeming we ensure the PEG doesn't depenting people to buy more USD because the yield of the stable coin of the stability pool will be just too good. All right. So I'm going to do like this is the last slide. I'm just going to do a quick recap of what we've seen today. This is what a protocol looks like. Right? So we have the protocol in the center with lots of different CDPs. Every CDP is overcolaterized. Everyone has deposited Bitcoin and minted BitUSD.

The protocol is making protocol fees. These fees comes from the interest that is paid by the people who open CDPs. The protocol fees fees are mostly direct to this directed to the stability pool in order to incentiv incentivize people to deposit in the stability pool. Anyone can deposit BitUSD to the stability pool. The stability pool is used when liquidations happen. Liquidations happen when people get their when the collateral ratio of CDP is going down. So this means that the deposited amount of collateral is too close to the amount of stable coin minted and redemptions can happen when the price goes down. I

mean they can happen anytime but it only makes sense to use them when the price goes down and this ensures a good peg. So this is like a quick diagram of how a stable coin could work. There are lots of different flavors of stablecoin here. The one that's detailed here is basically really really really inspired. It's basically liquidity version two. All right, it's the latest version of liquidity. I encourage you to dive deep into it. Um, but there are other versions of it and here the neat thing about the liquidity version is the interest rate management. Previous decentralized stable coins didn't have interest rate

like this. You could not delegate your interest in management. you could not set it yourself. Usually, it was either set by it was usually set by governance or by other factors. All right, I hope this was clear for everyone. I want to give a shout out to the liquidity team for their version two and and all their work for version one also their docs. Uh I want to shout out to everyone working on bitv on colliderm on opcat. I want to thank also David Soy who's a guy working at Alpin Labs. He did a great video explaining basically what I just explained. It's really good video if you want to have a look at it. And I want to thank you all for listening to me.

Thanks. [Applause] Yeah. Do you have questions? Anyone has questions? Oh yeah. Uh thank you for for that. That was very interesting. uh what happens if um I mean it looks like the stability obviously stability pool is a very critical uh element here and it gets fed by the uh interest rates etc. I mean how do you make sure that the stability pool is big enough um uh yeah for like if if it's a very dense time and there's a lot of margin calls and they happen

frequently what what how do you protect it against that? Yeah. So that's an interesting question. Of course, there's no way to be 100% sure that the stability pool can absorb all the liquidations. So we can't we can't go with the idea that this will be 100% covered at any given time. So first stop is stability pool. Hopefully it will cover. If it doesn't cover, then we go back to the like the version one of it, which is just in time liquidation. Anyone can come in this bad boy right here. Anyone can come in, buy Bit USD from the market and liquidate.

This is the last resort of liquidation basically. Hopefully, we don't get this because if it happens, the price might tend to go up and this is something we want to avoid. But this works. This is this is how maker work. This is how almost every decentralized stable coin works. Yeah. system. Exactly. Yeah. Exactly. Yeah. Thank you. Yeah. Thank you. This is a really cool presentation. I have uh two questions.

First question is like how centralized is this architecture? Like how reliant are you on like an oracle external oracle and uh how reliant are you on like some sort of external manager like actually like pinging your smart contract to like rebalance things for example? So in the ideal scenario where you get ZK rollups and blah blah blah and we're not using BitVM etc the Bitcoin bridge it is trustless right so here we don't trust anyone of course we need oracles for the for the protocol to work so oracles for now depending on where you are they're trusted or not really trusted I mean the trust assumptions are different different I mean vary from Oracle to Oracle but Oracle will be

needed and this is one this might be one point where trust assumptions here are areuh important that's what I mean the second question was uh the protocol the protocol isn't I mean if you were to write it right now given that the trustless bridge doesn't exist yet you'd probably want the protocol to be upgradable because you'd like to keep up with the latest technology. But if we were to have great bridges and trusted bridges, you could make I mean you could make this protocol unstoppable. And this is what Liquid TV2 does. Actually the protocol is deployed. No one owns the

protocol and no one controls it. Yeah. Another question. Have you thought about using like hash timewalk or like atomic swaps to like rebalance like to get native Bitcoin back on Bitcoin network? Have you thought about integrating that into this uh architecture? Uh so here this I guess uh here it's more about like how do you bridge Bitcoin from one chain to another. Uh to be honest I don't I don't know how atomic swap would work on Bitcoin and how do uh time lock hash uh how do you say hash time lock work so I'm not going to answer I don't have the answer.

Well, thank you for the presentation. Very interesting and I I like to see such good implementation and tweaking of the liquidity uh model base model. I was just a question about the delegates. Um I was wondering uh is it a permissionless role and how do they get incentivized to properly create uh is there a marketplace where I can find my delegate because sometimes I've been using this kind of model and I always put way too higher uh rates. So if someone can choose a proper rate and monitor this rate for me which will be way better. Yeah, the interest rate management is kind of a funny thing

because you can set yourself to like 0.5% and or 1% and you see that everyone at 0.5, you think you're you're good, right? But what happens is like of course it's like uh everyone's going to be be moving at the same time. When redemptions happen, everyone is going to go from 0.5 to two and you'll be left out at 1%. So for most people, it makes sense to have it managed by someone else. the de the delegator and the manager is actually incentivized because when you delegate it to him you pay a small fee quite simple um and you basically do a contract with him onchain right where you say okay you can modify this and this you can go between this range and this range for example so for a fixed rate the range will be like five to five or six to six for example but

you can offer a range and every time you modify every time you delegate to someone else you you pay a fee yeah Good. Thanks. Have a good day. Thank you.