Skip to content

Instantly share code, notes, and snippets.

@fernandonm
fernandonm / bitcoin_derivatives.md
Last active May 29, 2019 08:03
Trust-minimized derivatives

Trust-minimized derivatives

Options contracts can be implemented as trust-minimized smart contracts using Bitcoin script. These contracts don't require oracles feeding the price into the blockchain or any other trusted third party. Recipients will only trust miners to mine (and not reverse) transactions paying a reasonable feerate, securing their payouts.

The underlier of these derivatives can be any digital asset available on a blockchain that can do HLTCs.

Call options

The buyer of an American-style call binary option pays a premium (eg: 0.1 BTC) for <seller secret> wich gives the right to buy Q units (quantity) of the underlying asset (100 LTC) at a specified strike price (0.016 BTC per LTC) at any time until the expiration date.

@fernandonm
fernandonm / softpeg.md
Last active November 25, 2021 17:35
Soft pegged sidechains

Soft pegged sidechains

Sidechains have been the Holy Grail to scale and try new features on Bitcoin for a long time. But the trade-offs of the different proposals relying on Bitcoin modifications (SPV two-way peg, drivechains, etc) prevented them from being adopted.

Only proposals not requiring of any change to Bitcoin, like federated sidechains (e.g. Liquid Network), have seen some adpotion. Although they imply significant trust requirements.

I have always found in sidechains the most honest way to explore other applications of Bitcoin technology. E.g. Namecoin, a network with greater privacy, a distributed oracle, or a network with different trade-offs for high velocity money (low fees), etc. So I have tried (in multiple ocasions) to figure out a trust minimized solution for the two way peg problem that did not require changes to Bitcoin.

[Statechains](https://medium.com/@RubenSomsen/statechain

@fernandonm
fernandonm / El dinero, medida de valor.pdf
Last active December 11, 2021 14:33
El dinero, medida de valor - Carl Menger, 1892
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fernandonm
fernandonm / powattack.md
Last active January 17, 2022 09:11
How much does it cost to destroy Bitcoin?

How much does it cost to destroy Bitcoin?

There has been a dreaded myth surrounding the so-called 51% PoW attacks against Bitcoin since inception. It is often believed that anyone able and willing to spend an amount equal to the “security budget” forever can destroy Bitcoin. That is, any evil government willing to spend about $60 million per day (matching miner’s revenue) would be able to destroy its $1.16 trillion current market capitalization. And worse, this figure may become lower and lower as halvings arrive if fee revenue is not able to take off consistently. Note that “forever” is just a credible threat, he will only need to spend that money for a period of time long enough until Bitcoin has been destroyed, which may be just a few weeks (at $420 million per week).

Here I will try to explain why the mentioned figure (currently 0.005% of bitcoin’s mcap per day) is not nearly enough to destroy Bitcoin, and show why it is unlikely that an attacker would carry such an ineffective attack for a long perio

@fernandonm
fernandonm / inherent_volatility.pdf
Last active June 27, 2023 17:58
Why is bitcoin inherently volatile?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fernandonm
fernandonm / powattack2.md
Last active November 3, 2021 17:56
How much does it cost to destroy Bitcoin? (Part 2)

How much does it cost to destroy Bitcoin? (Part 2)

In the previous post on this subject I tried to explain why the cost to destroy Bitcoin is greater than the security budget, but I did not get into how much greater it may be. A key factor is how much does it cost to use additional signals along with proof-of-work to coordinate between honest miners (not as an alternative consensus mechanism for the Bitcoin network!) and determine what is the most valuable chain tip. Proponents of the security budget argument depict anything other than proof-of-work as heresy, going as far as to warn about the expected destruction of Bitcoin if the use of such signals is ever needed.

The first thing honest miners will do in the event of a censorship attack is to compare their orphaned blocks —and block templates— with those that became part of the heaviest chain, trying to determine what was the cause of the orphaning.

@fernandonm
fernandonm / TheDrivechainBluff.md
Last active September 6, 2023 15:04
The Drivechain bluff

The Drivechain bluff

The search for the holy grail

The concept of sidechains was conceived as a way to extend the use of bitcoin to other chains providing trust-minimized functionality not available in Bitcoin. We already had a way to produce other trust-minimized functionalities—altcoins are almost as old as Bitcoin itself. But, for those believing that bitcoin should become the only currency in the world, creating any network with a different token was heresy.

The proponents of the original idea gave up on its feasibility soon after publishing the paper and moved on to create the Liquid federation (compromising on the trust-minimization aspect). But Paul Sztorc, who needed a sidechain for his Truthcoin project, claimed to have squared the circle. His Drivechain proposal supposedly creates a way to move bitcoin to sidechains and back without additional trust requirements. He envisioned Drivec