Skip to content
LearnBitcoin

ResearchBitcoin Dev Archive lightning-dev list

Lightning Mints

7 messages, Jun 28 to 30, 2021. Started by Casey Rodarmor.

ZmnSCPxj (3), Casey Rodarmor (2), elsirion, Yuval Kogman

Permalink First message in the Wayback Machine

Casey Rodarmor permalink original

Dear Lightning Devs,

Chaumian mints, or blind mints, are a potentially interesting way to make hosted lightning wallets more private and secure, and I recently wrote a blog post on the topic that I wanted to share with the list:

https://rodarmor.com/blog/lightning-mints/

It is also reproduced below for convenience.

Self-hosted Lightning wallets present distinct usability challenges not present in on-chain wallets, such as channel and liquidity management, which may make hosted wallets a popular option. Given that, I think the problem of making these wallets more private and secure deserves attention, and blind mints may provide nice solutions to these problems.

Another site of interest is fedimint.org, which has some additional information on blind mints in the context of Bitcoin and Lightning.

Best regards, Casey Rodarmor

---

Federated blind mints have attractive privacy, scaling, and security properties that are highly complementary to those of Bitcoin and the Lightning Network.

I originally became interested in blind mints while thinking about Lightning Network wallet usability issues. When Lightning works, it is fantastic, but keeping a node running and managing a wallet present a number of challenges, such as channel unavailability due to force closes, the unpredictability of the on-chain fee environment, the complexity of channel backup, and the involved and often subtle need to manage liquidity.

All of these problems *are* tractable for a skilled node operator, but may not be soluble in the context of self-hosted wallets operated by non-technical users, hereafter *normies*. If this is the case, then normies may have no choice but to use hosted Lightning wallets, compromising their privacy and exposing them to custodial risk.

Chaumian mints, also known as Chaumian banks, or blind mints, offer a compelling solution to these problems, particularly when operation is federated. Chaumian mints, through the use of blind signatures[0], have extremely appealing privacy properties. The mint operators do not know the number of users, their identities, account balances, or transaction histories. Additionally, mint transactions are cheap and can be performed at unlimited scale.

Mint implementations, typified by eCash[1], have hitherto been centralized, and thus, like all centralized, custodial services, expose users to custodial risk in the form of operator absquatulation and mismanagement. To fix this, mint operation can be federated, with all operations performed by a quorum of nodes controlled by different parties.

Despite these interesting properties, Chaumian mints have largely been forgotten. This post[2] gives an excellent overview of the phenomenon. I believe that Chaumian mints are currently severely underrated in general, and in particular deserve consideration as a potential avenue for improving custodial Lightning Network wallets.

Compared to a naïve hosted Lightning Network wallet, a service operated as a federated Chaumian mint offers excellent privacy, usability, security, and scaling.

**Privacy:** Privacy leaks from a Lightning mint come in two forms, *internal* and *external*, when an mint operator or an outside actor, respectively, observes sensitive information.

Blind signatures protect against internal privacy leaks, making them a strict improvement in that respect over custodial Lightning wallets.

When compared to a single-user Lightning network wallet, Lightning mints also protect against external privacy leaks. If the activity of a single-user Lightning Network wallet can be observed, which is possible but non-trivial, all such activity is preemptively that of the owner of the wallet. However, similar to a standard custodial Lightning Network wallet, any observable Lightning Network activity of a Lightning mint is the aggregate activity of its users, who thus form an anonymity set. If the number of users, and thus the anonymity set size, is large, external privacy leaks are also prevented.

**Usability:** Compared to a self-managed Lightning Network wallet, and similar to a standard custodial Lightning Network wallet, Lightning mint wallets offer superior usability. A user need not be concerned with the details of node operation or channel management, and can deposit to and withdraw from their account with standard Lightning Network invoices.

**Security:** The security of a Lightning mint is weaker than that of a self-hosted wallet. A quorum of federation members can abscond with funds. However, compared to a standard custodial Lightning Network wallet, security is greatly improved. Additionally, federations members might be located in different jurisdictions, making the mint robust to regulatory interference. Furthermore, members might be entities with online reputations, such as anonymous Bitcoin Twitter users with an established history of productive shitposting, providing further assurances against mismanagement and fraud.

**Scaling:** Mint operations are extremely lightweight, similar to Lightning Network transactions, so scaling properties are similar to the Lightning Network itself. Additionally, users need not manage their own channels, so a well-capitalized federation can open channels efficiently, lowering the per-transaction channel management overhead.

**Interoperability and market dynamics:** Additionally, my hope is that such systems will be developed with a standardized protocol for communication between wallet interfaces and mint backends. This would allow users to use different backends the same local wallet interface, encouraging competition in the market.

For more discussion of Chaumian mints and their applicability to Bitcoin, see fedimint.org[3]. Elsirion, the author, is also at work on MiniMint, a federated Chaumian mint with Bitcoin and eventually Lightning Network support.

To close with a bit of speculation, I believe that Chaumian mints were never of particular interest of importance because they were limited to interoperating with the fiat currencies of the time. With the ascendance of Bitcoin, mints now have access to a powerful, decentralized, and uncensorable currency , made economical and fast by the Lightning Network.

I believe this layering of Chaumian mints on top of Bitcoin and the Lightning Network will, in the fullness of time, be demonstrated to be enormously powerful, and make Chaumian mints themselves worthy of renewed study and consideration.

[0] https://en.wikipedia.org/wiki/Blind_signature
[1] https://en.wikipedia.org/wiki/Ecash
[2] https://opaque.link/post/digitalmoneydbc/
[3] https://fedimint.org
ZmnSCPxj in reply to Casey Rodarmor permalink original

Good morning Casey,

I believe a major failing of Chaumian mints is that they are, at their core, inherently custodial. The mint issues blinded minted coins in exchaange for people handing over other resources to their custody. While the mint itself cannot identify who owns how much, it can outright deny all its clients access to their funds and then run off with the money to places unknown.

However, do note that both Wasabi and WabiSabi are extensions of Chaumian mints. These avoid the custodiality issue of Chaumian mints by operating the mint as a temporary entity, whose output is then counterchecked by the users of the Wasabi/WabiSabi scheme.

I think a lot of problems are very easy if we go with custodiality; it is the variant rule of non-custodiality that makes this field interesting in the first place.

Fidelity bonds are hard since the bond has to be at least the value of the funds being managed (otherwise the mint can still sacrifice the bond to run off with the funds being managed; it would still earn more than what it lost). That means, at best, locking up to twice the managed amount (i.e. locking it in a channel, *and* locking a similar amount in a separate fidelity bond).

In any case, you might also be interested in the "nodelets" I described some years ago. This link has a presentation where I introduce nodelets towards the end, sorry but most of the beginning is about LN pathfinding (which is currently a non-problem since nobody makes published channels anymore). This allows multiple users to implement a single node without a central custodian, and may allow for similar flexibility of liquidity if there are enough users, but every action requires all users to have keys online.

Quoted text (12 lines)
> I originally became interested in blind mints while thinking about Lightning
> Network wallet usability issues. When Lightning works, it is fantastic, but
> keeping a node running and managing a wallet present a number of challenges,
> such as channel unavailability due to force closes, the unpredictability of the
> on-chain fee environment, the complexity of channel backup, and the involved
> and often subtle need to manage liquidity.
>
> All of these problems *are* tractable for a skilled node operator, but may not
> be soluble in the context of self-hosted wallets operated by non-technical
> users, hereafter *normies*. If this is the case, then normies may have no
> choice but to use hosted Lightning wallets, compromising their privacy and
> exposing them to custodial risk.

One of my projects is CLBOSS, which manages a C-Lightning node for you.

* https://github.com/ZmnSCPxj/clboss
* https://lists.ozlabs.org/pipermail/c-lightning/2020-October/000197.html

The target is that at some point, the algorithms and heuristics developed for CLBOSS will be widespread and it would be trivial for a "normie" to run a well-managed forwarding node, they just have to keep it powered on 100% of the time, which should be easy, people keep their refrigerators powered on 100% of the time, after all.

I am actually kind of puzzled that nobody else seems to be building node managers, everyone just focuses on peer selection, but ignores stuff like channel feerates, closing heuristics, liquidity monitoring, etc.....

Regards, ZmnSCPxj

ZmnSCPxj in reply to ZmnSCPxj permalink original

Good morning again CAsey,

Quoted text (13 lines)
>
> I believe a major failing of Chaumian mints is that they are, at their core, inherently custodial.
> The mint issues blinded minted coins in exchaange for people handing over other resources to their custody.
> While the mint itself cannot identify who owns how much, it can outright deny all its clients access to their funds and then run off with the money to places unknown.
>
> However, do note that both Wasabi and WabiSabi are extensions of Chaumian mints.
> These avoid the custodiality issue of Chaumian mints by operating the mint as a temporary entity, whose output is then counterchecked by the users of the Wasabi/WabiSabi scheme.
>
> ...
>
> In any case, you might also be interested in the "nodelets" I described some years ago.
> This link has a presentation where I introduce nodelets towards the end, sorry but most of the beginning is about LN pathfinding (which is currently a non-problem since nobody makes published channels anymore).
> This allows multiple users to implement a single node without a central custodian, and may allow for similar flexibility of liquidity if there are enough users, but every action requires all users to have keys online.

Thinking more, it helps to consider how Wasabi and WabiSabi are constructed.

In Wasabi, there exists a coordinator, which is a server that works as a temporary Chaumian mint. Clients of the coordinator register some UTXOs of some common value to the mint (indicating any change outputs if the UTXO total value exceeds the fixed common value). Then the coordinator issues blind signatures, which serve as tokens in a Chaumian mint. Then users re-connect via a different pseudonym, unblind signatures and reclaim the funds, indicating a target output address. The coordinator then creates a single transaction that consumes the registered input UTXOs and the indicated outputs.

As a *final* step, the clients then check that the produced transaction is correct. This final step prevents the coordinator from absconding with the funds.

WabiSabi "simply" replaces blinded signatures with blinded credentials. Blinded signatures are fairly low-bandwidth ---- either you have a blinded signature, or you do not. Credentials, however, also include a blinded homomorphic value. On issuing, the issuer can ensure that a particular value is encoded, then when the credential is blinded by the receiver, and the issuer can ensure that multiple credentials can be presented which sum up to a newly issued credential, with the value being correctly added. Thus, I think for a modern Chaumian mint, you should really consider the credentials scheme used by WabiSabi.

elsirion in reply to ZmnSCPxj permalink original

Hi ZmnSCPxj,

let me chime in here, I've been working on federated mint for quite some time now but only recently began talking about it more publicly.

Quoted text (3 lines)
> WabiSabi "simply" replaces blinded signatures with blinded credentials.
> Blinded signatures are fairly low-bandwidth ---- either you have a blinded signature, or you do not.
> Credentials, however, also include a blinded homomorphic value.

This is a very intriguing idea Casey actually mentioned to me (at least I think it's about the same problem):

In traditional mints we use tokens of the same denomination. For efficiency reasons amount tiers are introduced, reducing the anonymity set per tier. If we had blind signatures not only on random tokens but they also committed to a separately blinded amount with a range proof that would allow one big anonymity set over all tokens instead. Such tokens could then be combined similarly to Liquid transaction inputs.

I think the concept is very interesting, but for now I see a few obstacles:

* WabiSabi uses KVACs which afaik do not allow client side validation. While I can't say if it will be a big problem it makes detecting certain failure scenarios harder imo.
* The KVAC scheme referred to in WabiSabi [1] is not a threshold scheme afaik, undermining the central premise of federated mints. If I got that wrong this would be awesome!
* Building such an enhanced threshold blind signature scheme is more complex and probably needs further research. A naive implementation would be more interactive which in a federated context means waiting for consensus rounds for each round trip which is unappealing.

So while I'm very sympathetic to the idea and want to pursue it in the future, threshold blind signatures seem like the more efficient way to get to a working implementation with still adequate performance and privacy in time.

Quoted text (2 lines)
> Now, let us consider the "nodelets" idea as well.
> The "nodelets" system allows for a coordinator (which can be a separate entity, or, for the reduction of needed entities, any nodelet of the node).

I didn't know of nodelets so far and went back to your 2019 post about it. It seems that blind multisig or threshold credentials (the idea seems to be m-of-m, so doesn't nee a general threshold scheme I guess) would improve the privacy of the system. I think the nodelets idea is very interesting for technical people that would otherwise be priced out of running a LN node in a high-fee future. But the complexity of the protocol and online requirements seem to make it suboptimal for non-technical, disinterested users. While automating a lot of the complexity away is possible (big fan of clboss) it's also a lot of work and probably will take a while if ever to get to a point where the experience is plug-and-play as most non-technical users have come to expect.

In that sense both systems just have different target audiences. I think of federated mints mostly as a replacement for Banks and other custodial services that are used for their superior UX. It is fundamentally a compromise. E.g. Bitcoin Beach currently uses Galoy [2], a centralized hosted LN wallet without much privacy. I don't see a future where everyone there is technical enough to run their own node or nodelet client reliably enough. But if we can allow community driven federations with privacy built-in we can mitigate most of the risks inherent to custodial wallets imo.

I really hope that I'm too pessimistic here, but if not I'd rather have a backup plan in the form of federated mints than letting banks eat our lunch. The idea is still early, but I hope some can agree with my reasoning. If so, come and help build this future with me [3]!

Regards, elsirion

[1] https://eprint.iacr.org/2019/1416
[2] https://github.com/GaloyMoney/galoy
[3] https://fedimint.org/
Yuval Kogman in reply to elsirion permalink original

Hi,

Quoted text (2 lines)
> * WabiSabi uses KVACs which afaik do not allow client side validation. While I can't say if it will be a big problem it makes detecting certain failure scenarios harder imo.
> * The KVAC scheme referred to in WabiSabi [1] is not a threshold scheme afaik, undermining the central premise of federated mints. If I got that wrong this would be awesome!

Correct on both counts. Furthermore, WabiSabi is deliberately designed for short lived credentials, since the entire nullifier set can be discarded once a CoinJoin round terminates (successfully or unsuccessfully). For longer lived tokens a generational/epoch based approach is likely to be more practical.

Alternative credential schemes can be applied in a similar way, with fairly minor differences in how attribute commitments are handled (e.g. in the balance proofs)

- The ACL scheme[1] is publicly verifiable, but still relies on a single issuer. see [2] for a wallet based on thereof, as well as the cited works for some variations which rely on more general zero knowledge proofs. - The Coconut scheme [3] provides threshold issuance. I have not studied this scheme in detail, but IIRC it only supports scalar attributes (as opposed the KVACs used in WabiSabi, which also support group elements. See also Danake [4] which relies on scalar attributes only and uses epoch schemes.

Another related project is zkChannels (formerly and confusingly known as BOLT) [5], the website hints at dropping the requirement for a new opcode but no details appear to be available on the website yet.

[1] https://cs.brown.edu/people/fbaldimt/papers/CCS13.pdf
[2] https://eprint.iacr.org/2020/382.pdf
[3] https://arxiv.org/pdf/1802.07344.pdf
[4] https://lightweight.money
[5] https://boltlabs.tech/research
ZmnSCPxj in reply to elsirion permalink original

Good morning elsirion,

Quoted text (17 lines)
> Hi ZmnSCPxj,
>
> let me chime in here, I've been working on federated mint for quite some time now but only recently began talking about it more publicly.
>
> > WabiSabi "simply" replaces blinded signatures with blinded credentials.
> > Blinded signatures are fairly low-bandwidth ---- either you have a blinded signature, or you do not.
> > Credentials, however, also include a blinded homomorphic value.
>
> This is a very intriguing idea Casey actually mentioned to me (at least I think it's about the same problem):
>
> In traditional mints we use tokens of the same denomination. For efficiency reasons amount tiers are introduced, reducing the anonymity set per tier. If we had blind signatures not only on random tokens but they also committed to a separately blinded amount with a range proof that would allow one big anonymity set over all tokens instead. Such tokens could then be combined similarly to Liquid transaction inputs.
>
> I think the concept is very interesting, but for now I see a few obstacles:
>
> -   WabiSabi uses KVACs which afaik do not allow client side validation. While I can't say if it will be a big problem it makes detecting certain failure scenarios harder imo.
> -   The KVAC scheme referred to in WabiSabi [1] is not a threshold scheme afaik, undermining the central premise of federated mints. If I got that wrong this would be awesome!
> -   Building such an enhanced threshold blind signature scheme is more complex and probably needs further research. A naive implementation would be more interactive which in a federated context means waiting for consensus rounds for each round trip which is unappealing.

Well, WabiSabi is effectively n-of-n signing, as the produced transaction has to be signed by all clients of the coordinator, so threshold federated signatures are not necessary. So yes, the use of credentials seems not possible to the federated mints project. (note: I am not a mathist and have no idea what the hell credentials are, I only know how to use them)

Quoted text (11 lines)
>
>     So while I'm very sympathetic to the idea and want to pursue it in the future, threshold blind signatures seem like the more efficient way to get to a working implementation with still adequate performance and privacy in time.
>
>
> > Now, let us consider the "nodelets" idea as well.
> > The "nodelets" system allows for a coordinator (which can be a separate entity, or, for the reduction of needed entities, any nodelet of the node).
>
> I didn't know of nodelets so far and went back to your 2019 post about it. It seems that blind multisig or threshold credentials (the idea seems to be m-of-m, so doesn't nee a general threshold scheme I guess) would improve the privacy of the system. I think the nodelets idea is very interesting for technical people that would otherwise be priced out of running a LN node in a high-fee future. But the complexity of the protocol and online requirements seem to make it suboptimal for non-technical, disinterested users. While automating a lot of the complexity away is possible (big fan of clboss) it's also a lot of work and probably will take a while if ever to get to a point where the experience is plug-and-play as most non-technical users have come to expect.
>
> In that sense both systems just have different target audiences. I think of federated mints mostly as a replacement for Banks and other custodial services that are used for their superior UX. It is fundamentally a compromise. E.g. Bitcoin Beach currently uses Galoy [2], a centralized hosted LN wallet without much privacy. I don't see a future where everyone there is technical enough to run their own node or nodelet client reliably enough. But if we can allow community driven federations with privacy built-in we can mitigate most of the risks inherent to custodial wallets imo.

>From my PoV, any "bank-replacement" that is inherently custodial will eventually become a bank, with all the problems that implies.

It is helpful to remember that banks have, historically, been federations: they are typically implemented as corporations, which are basically a bunch of people pooling their money and skill together to start a business. Thus, I argue that banks already *are* federations that take custody of your money and manage it for you.

To my mind, any system that is a federation that takes custody of user money *will* face the same social, political, and economic forces that the legacy banking system faced in the past. You puny humans simply do not evolve as fast as you think, you know --- your instincts still demand that your body stock up on fat and salt and sugar in a modern era where such things are available in too much abundance that it is killing you, so I imagine that a modern federated system (like Liquid or your federated mints) will face similar forces as past successful financial custodial federations (i.e. the banks of today).

Thus, it seems to me that with high probability, any custodial federated financial system will evolve to a similar state as banks today --- that is, cryptocurrency systems based on custodial federations will just "kick the can", and eventually be the same (with the same pros and cons) as modern banks.

This is not completely negative, since modern banks do provide vital services, but at the same time, one can argue that this is uninteresting in terms of exploration --- i.e. federated custodians have already been done before, they are the banks of today. That is why CLBOSS exists --- it manages your money for you, but you run it on your own hardware and are responsible for auditing it, so it does *not* take control of your funds.

Quoted text (2 lines)
>
> I really hope that I'm too pessimistic here, but if not I'd rather have a backup plan in the form of federated mints than letting banks eat our lunch. The idea is still early, but I hope some can agree with my reasoning. If so, come and help build this future with me [3]!

Well, I agree that kicking the can down the road is better as a backup plan than not having anything in case we really cannot find a reasonable way to make Bitcoin cheap and easy without losing noncustodiality.

Regards, ZmnSCPxj

Casey Rodarmor in reply to ZmnSCPxj permalink original

Good afternoon ZmnSCPxj,

Thank you for your thoughtful reply! I agree with many of your points. One thing I wanted to say regarding the forces that act on banks:

Quoted text (4 lines)
> It is helpful to remember that banks have, historically, been federations: they are typically implemented as corporations, which are basically a bunch of people pooling their money and skill together to start a business.
> Thus, I argue that banks already *are* federations that take custody of your money and manage it for you.
>
> To my mind, any system that is a federation that takes custody of user money *will* face the same social, political, and economic forces that the legacy banking system faced in the past.

I actually think that banks operating on top of bitcoin may be subject to different forces. A major factor in the misbehavior of legacy banks has been lack of competition due to artificial barriers to entry due to regulation. I think in the absence of regulation, with competitors being able to enter the market at little cost, and without needing a license, we would see much less bad behavior from banks. I don't think that, aside from regulation, there is anything inherent to the business of banking that makes banks behave badly. If federated chaumian banks that interface exclusively with the Bitcoin and Lightning networks are able to evade regulators, the market for such banking services will hopefully see healthy competition between participants. This would be enhanced by the fact that such banks would be able to serve a global audience, and not be closely tied to a country, national currency, legacy settlement network, or region.

Quoted text (1 line)
> In addition, ti seems to me that the node management problem can be solved in software, by something similar in purpose to CLBOSS.

I think projects like CLBOSS are great, but I share elsirion's pessimism that LN node UX not be a fully soluble problem, no matter how good management software gets. Users will be choosing between services like Wallet of Satoshi, which are completely seamless, and it might not be possible for management software to fully abstract over things like high fees, uptime requirements, and unexpected fund unavailability due to channel closure.

Best regards, Casey