Take a close look at these two bitcoin transactions:
They both use the same signature to send sats out of the same bitcoin address, but in two different transactions.
That's normally not possible in bitcoin transactions. Signatures are supposed to be valid for one transaction only. Signature replayability is normally enabled by sighash_anyprevout, a soft fork which isn't live on bitcoin yet. E.g. last month Anthony Towns demonstrated it on signet, where sighash_anyprevout is already active:
But an important point is that sighash_anyprevout is a soft fork, meaning it's backward compatible, meaning you can technically already do it today, it's just not safe.
To do this on mainnet, Vman and I (mostly him) used a trick called pubkey derivation. A typical bitcoin address is the hash of a public key. To spend from it, you have to present the public key and compute a signature that proves you know the private key. But to accomplish this trick, Vman made a special bitcoin address that is the hash of a signature instead. To spend from this address, you have to provide the right signature and then compute a public key that makes the signature valid.
But this trick is not as good as sighash_anyprevout. Pubkey derivation is unsafe to rely on in mainnet transactions because replaying the signature in this manner turns the bitcoin address into an anyone-can-spend address. Sighash_anyprevout would let us replay signatures safely.
One of the cool things you can do with replayable signatures (the safe kind) is make a covenant. A signature normally commits to a transaction's outputs. If you can replay a signature, that ordinarily means you have to send money to the same outputs again. And such a restriction is a type of covenant, which enables many new features on bitcoin, e.g. see utxos.org for examples.
Unfortunately, the signature replayability that works on bitcoin today does not enable covenants. Outputs are not committed to when a signature lacks a fixed pubkey. Without that, it's just an anyone-can-spend address, and you can compute a pubkey that makes the sig valid no matter where the funds end up.
The point is: it's a cool trick! And it means covenants are already very close to a reality in bitcoin. We just need a tiny little softfork that makes signature replayability safe and then boom, bitcoin will have covenants and many new features that use them, like better vaults, better spacechains, and eltoo. Let's do it! Merge sighash_anyprevout over from signet to mainnet! Ask a dev to help you try it out today.