Technology company Fedi is launching a Bitcoin hackathon that will pay out 2.1 BTC to the winner in celebration of Bitcoin’s 14th birthday.
Fedi, which is focused on building a Fedimint-based community custody platform, wants to encourage developers to build out a Fedimint module that will help bring real world benefits to users.
The bounty is open ended, meaning that developers can code the functionality they want; but they are, of course, incentivized to work on what would drive the most impact. Fedi shared some ideas of what those could be, including modules that would enable a communal savings pool to accumulate bitcoin for a large project, storing value in a local currency like dollars, receiving payments privately via static QR codes or links (similar to CLN’s BOLT 12 offers), or operating a communal vote based spending pool.
Fedimint is an open source custody platform that allows users to not only store their bitcoin, but also extend the functionality of their bitcoin with privacy, smart contracts, and more. It is based on the concept of second-party custody, which involves trusting family members or friends with the custody of one’s bitcoin in a way that improves the trust and security models inherent in the classic centralized third-party custody solutions. And it leverages Federated Chaumian Ecash, which means users also gain privacy. In a nutshell, Fedimint wallets have the potential to bring strong privacy to Bitcoin users with better security than third-party custody setups and more ease of use than fully-fledged self-custody solutions.
“At Fedi, we believe that Fedimint will become the ideal open platform for the delivery of consensus-based applications on the internet,” said Obi Nwosu, Fedi CEO, in a statement sent to Bitcoin Magazine. “Bitcoin was created to be a peer-to-peer sound money with full privacy, and that’s what we want to offer to everyone globally. We’re excited to see what the broader Fedimint community can achieve and what ideas there are to extend Fedimints to solve real world problems using bitcoin.”
Fedi is launching the hackathon in collaboration with Epoch, an upcoming capital provider for Bitcoin projects with the goal to support layer 2 and 3 protocols that enable the global adoption of bitcoin.
Winners will be announced within five days of the submission deadline –– January 31, 2023. First place will get 210 million satoshis (2.1 BTC) and a commitment to support their module in the Fedi product; two runners up will receive 21 million satoshis each, and three honorable mentions will get 2.1 million satoshis each.
Find more details about the contest and how to participate on Fedi’s official web page here. Project submissions can be done through this form.
This is a transcribed excerpt of the “Bitcoin Magazine Podcast,” hosted by P and Q. In this episode, they are joined by Obi Nwosu to talk about the difference between Fedimint and Fedi and how Chaumian Mints can be used to onboard millions of people onto bitcoin.
Q: How did the idea of Fedi — what inspired you and the team to say, “Hey, this is the problem. How are we gonna solve it? And then this is how we’re gonna solve it.”
Obi Nwosu: There’s Fedimint and then there’s Fedi. So Fedimint is this open-source protocol, a bit like the way Bitcoin is a protocol for the store or value. Lightning is a protocol for the transfer of that bitcoin around at a low cost at high speed, and also increased privacy as a side effect. Well, Fedimint is a protocol for storing that value, custodying that value with incredible privacy in a way where you are using your community to have each other’s back effectively. They work really well together. Effectively, they’re both Layer 2. When your money’s at rest, you store it in Fedimint, and when your money’s on the move, you use Lightning. But the money is bitcoin underneath both of those.
That’s the Fedimint protocol.
That actually had its roots — well actually, if you go way back 39 years we have Chaumian ecash and then 13 years or so ago with the invention of Bitcoin and then four or five years ago with Blockstream’s popularization of federation technology used for Liquid. When those things were combined, a number of incredible cypherpunks and cryptographers found we can combine these things together and take Chaumian ecash — invented by David Lee Chaum in 1983, which was considered catnip for cryptographers, some of the best form of privacy technology out there — combine it with the best form of money, bitcoin, which for the first time multiple people could hold, and federations allowed you to sort of federate this Chaumian Mint with bitcoin as the backing money as opposed to U.S. dollars which was David Chaum’s original attempt.
Work started three or four years ago and there were a number of projects running in parallel, but my now co-founder Eric Sirion was working on one called Fedimint. About two or so years ago, Blockstream saw it, got really excited about it, started sponsoring him, and about a year ago, I saw it when I was — and I didn’t mention this, I ran the U.K.’s longest-running bitcoin exchange. At one point I had 70% market share of the U.K., did the whole New York Stock Exchange gavel. And we were the first regulated exchange in Gibraltar, all that sort of stuff. But that’s the past now. But while selling that company, I was looking for a way of getting people off exchanges because I was getting increasingly concerned that there would be liquidity begets liquidity, and there’s gonna be increasing centralization around exchanges.
I could see this sort of Orwellian future where there’s half a dozen exchanges, each with a billion users with full visibility, just as bad as having CBDCs (central bank digital currencies) by countries because this is where we’re gonna end up if we just carry on the way we’re going. So we needed an alternative to custody on exchange.
Now, the obvious alternative is first-party custody, i.e., do-it-yourself custody, but if you just look at the numbers and if you look at the attitude of the people that we realize that with the best will in the world, you’re gonna get 5% of people, maybe 10% [doing] self custody, but that still leaves 90-95% trapped in these exchanges.
So I was looking for a solution to get people off exchanges. I was at Hackers Congress last year. I bumped into Eric. We had a conversation. I suggested some of my ideas. He politely told me why they wouldn’t work and then I asked him what he was working on. He told me about Fedimint and he saw it as this incredible privacy technology, which it is, but with my exchange-operator hat on, I realized that this was actually a solution to getting people off exchanges — if architected correctly. That’s where I started getting involved, I started cheerleading it and I talked about it at Bitcoin Miami. That led to Alex Gladstein asking me to go to Oslo Freedom Forum to talk about it more.
I then met some of the bravest men and women I’ve ever had the opportunity to meet, who are human rights defenders and activists from around the world. You may have met, like if you get to Ghana, hope you were there, you’ll see Farida Nabourema from Togo, for example, Fadi Elsalameen from Palestine, Roya Mahboob from Afghanistan, who created the first Afghanistan all women’s robotics team when women weren’t allowed to study and so on and so forth, and the list goes on. They were all realizing that the problems and the challenges they were having around the world, whether it was Latin America, Africa, or post-Soviet regions of the world, although they seemed very different, and the authoritarian regimes that they were battling against, seemed very diverse, they all had a common thread: Those groups used weaponized money and through high/hyper levels of inflation and many other mechanisms. They realized that if they wanted to push back against these forces, they needed to be able to control their own money. So they weren’t Bitcoiners, but they came to Bitcoin because they needed to solve problems, but they were running into scaling issues.
They wanted to roll these out to millions of people at rapid scale in multiple of these regions. And what I realized there was that only Fedimint could do that. This was in May. It went from, Fedimint is an incredible, open-source protocol that we were supporting and letting organically grow, but I came back on June 1, talked to — and now the co-founders have grown to myself, Eric and Justin Moon, another incredible soul. I explained what I’d seen and observed and who I talked to, and we all agreed that we need to accelerate this. And so Fedi was born. Fedi’s objective is to take Fedimint as the base protocol and to accelerate the adoption of bitcoin to billions of users over the coming years because we cannot wait. We have a technology that allows for the rapid rollout of bitcoin with incredible levels of privacy, high levels of safety and direct integration with Lightning. So why are we waiting? There’s no reason why. And that’s where Fedi’s journey started.
This is an opinion editorial by Dan Gould and Nick Farrow. Gould is a developer who worked on TumbleBit, PayJoin and Chaincase App and has been sponsored by Human Rights Foundation and Geyser Grants. Farrow is an Australian Bitcoin engineer best known for his open source payment processor SatSale.
“Hey, I just got an invite to this hackathon in Malaysia,” said Evan Lin, interrupting my flow over my laptop in the Taipei Hackerspace. “That sounds magic,” I snapped back. “Can I come?”
I’d been smacking my head on the desk for weeks. Lin had been tearing apart my idea of what bitcoin privacy was. “It’s a private event, not your typical hackathon. I can ask.”
One flight, two weeks, and six minutes of voice message logistics later, we were walking down durian-lined streets of Kuala Lumpur, Malaysia, with Lloyd Fournier, ruminating over a shared passion to make bitcoin privacy stick. Now we were a team. We set out to upgrade Fedimint using half-polished cryptography, some scribbled-down notes, and then demo it at the first-ever Malaysian BitDevs meetup five days later.
Fournier had joined Nick Farrow to develop FROST, a new threshold cryptography that takes advantage of Taproot, in the months prior. Being a fountain of Bitcoin human resources, Fournier had also been working closely with Lin who is a Bitcoin Dev Kit (BDK) contributor. He and I had spent the last few weeks upgrading PayJoin privacy under fluorescent lights during the wee hours in Taipei, Taiwan, so we’d established trust to jump in the deep end on a project together. Fournier’s invitation was a step to the edge. To demonstrate the cutting edge cryptography to the world, we had to put FROST in an app. Fedimint had everyone’s eyeballs for its new threshold custody model. It was fit for the quest.
Self-custody is a novel, scary concept for most people. So many people store bitcoin in third-party custody on exchanges, leaving them exposed to censorship and indecent surveillance. Federated mints offer a third way: A federation of known guardians keep community funds safe. So how does it work?
Anyone can send bitcoin to a Fedimint in exchange for E-cash tokens. The guardians share custody of the community’s bitcoin in a multisignature wallet. The E-cash tokens are just some data: blind signatures redeemable for some amount of bitcoin later. They’re superpowered banknotes. Submit a Lightning invoice and your E-cash tokens to “peg out.” You could get E-cash in a text and have the federation reissue signatures so nobody else can take it. The signatures are blinded, so it can be redeemed in total anonymity. Anyone can send E-cash to a Fedimint to get bitcoin.
In order to share custody between guardians, Fedimint uses legacy Bitcoin Script-based multisignature addresses. A threshold number of guardians sign in order to transfer funds. These funds are easy to spot on the blockchain since Script multisig writes the number of signers and the total number of guardians to the blockchain for anyone to see. Even though E-cash is anonymous, surveillance companies could identify peg-ins, peg-outs and cluster community funds. By harnessing Bitcoin’s latest upgrade, Taproot, our team solved this privacy issue by switching Script multisig to FROST.
Enter FROST
FROST (Flexible Round Optimized Schnorr Threshold) is a powerful new kind of multisig that aggregates the key shares of federation members into a joint FROST key. To spend under this key, a threshold number of members must each produce a signature share. The shares are then combined to form a single signature that is valid under the joint FROST key. Members coordinate off chain. FROST transactions are indistinguishable from regular single-party Taproot spends, and so stop the creepy surveillance. On top of that, FROST allows for flexible federations, allowing new guardians to join without coordinating every member of the federation to generate new keys again.
Our first step was to understand how the federation reached a consensus each signing round. Fedimint’s consensus algorithm can tolerate bad behavior for up to a third of the federation and still reach consensus. It took a day on the white board to decode the consensus algorithm and another to configure the initial FROST key generation.
Coming to Fedimint consensus (picture supplied by authors)
We cheated key generation by doing it all in a single trusted device’s memory. In best practice, a two-round ceremony keeps an individual’s secret shares of the joint FROST key which only ever exists on that individual’s device. The overall secret is never reconstructed.
Coming To Consensus (Signatures)
We tested a peg-in transaction before we modified Fedimint wallet code and got perplexed. Because of a limitation of blind signatures, Fedimint E-cash tokens (akin to CoinJoin outputs), are limited to preset denominations so that each E-cash token transfer has an anonymity set. Waiting and waiting and waiting, Lin laughed that we must have messed something up.
Turns out, standard note denominations we set required the mint to generate around 300,000 signatures to issue enough E-cash to cover the peg-in amount. There are proposals to fix this by using anonymous credentials instead. We reset the mint to use much higher default denominations since we were just testing. Hackathons are for hacks, after all.
In a stroke of good luck, Bitcoiner Malaysia had just formed and was primed for their first event. Between the four of us hackers, a host of the largest Chinese bitcoin podcast and the scholar on track to earn the first Bitcoin Ph.D. in Malaysia, we planned to show our proof-of-work at BitDevs at the end of the week.
Our hardest task remained ahead of us: federated signatures. To produce a FROST share, signers must agree to common randomness, called nonces. In the case of Fedimint, the signers use consensus to agree on a unique nonce for each federation member joining a signing session. Then signing participants aggregate shares into a complete signature.
While we drafted our live demo for the meetup, we managed to get some nonce sharing semi-working and fixed some fee bugs too. Despite our hard work, dinner rolled around before our code worked. We crossed the threshold into the deepest hackathon territory huddled around the TV for triple-paired programming in Farrow’s hotel room.
An Unreal Experience
With our tapwaters ready and Unreal Tournament soundboard cranked up, Fournier sat at the keyboard, while we hurled bug fixes, variable names and commands from the back seat. 1:30 a.m. rolled around and our eyelids were heavy. A few taps later, just like magic, the peg-out worked. Each signer would receive signature shares from the others and redeem anon’s E-cash in exchange for bitcoin. “Flawless Victory” rang out of the soundboard. We cheered in disbelief.
Except it did not work. The next day we ran the code and saw problems straight away. We only got lucky the night before. It worked only once out of three or four attempts. We combed over hackathon-quality code for hours. Well after lunch, we still worried we’d have to cram in another late night. To our avail, we found the problem: a classic indexing error. At 5:00 p.m. FROSTimint was ready to present.
Once we circled up for BitDevs, locals took a self-described “support group” format for introductions. Fournier brought us back to reality with the technical. The inaugural meetup deliberated the future and foibles of custodians with delight. How would we choose guardians? Can they hold fractional reserves? Most importantly, how can my laksa noodle soup shop transcend fiat by using Fedimint?
This is a guest post by Dan Gould and Nick Farrow. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc. or Bitcoin Magazine.