Slugline: A Bitcoin Transaction Carpool, paid with Runes (or, a runes paymaster for L1 Bitcoin) Pay your L1 transaction fees with Runes 🧵
This weekend I was at @PlebFi, an awesome Bitcoin dev conference. The theme was Metaprotocols. While I didn't enter the hackathon (I was a judge) I decided to hack something up anyway. My project is called slugline, and even though it's pretty rough, it works and is neat :)
Here's how it works: Alice wants to make a Bitcoin transaction but doesn't want to pay a fee in BTC (some reasons that might be below). So she makes a tx that pays zero fee. BUT she attaches an input that contains some runes, and makes the first output a zero-value p2a anchor.
She sends that transaction to Bob (or in the real world, to a network of bobs, kind of like a mempool, over something like nostr). Bob decides he's willing to pay for Alice's transaction in exchange for the runes. So he makes a transaction that pays himself and CPFP's the p2a.
When Bob spends the p2a to himself, this has two effects: - it pulls alice's transaction along into the mempool and into a block via CPFP - Bob's address claims the runes Here is what the two transactions look like
Alice has paid Bob in runes to pay her transaction fee. In effect Alice has paid her tx fee in runes, with Bob acting as sort of a runes paymaster!
Now, why might Alice do such a thing? I can think of a few reasons: - maybe an ecosystem forms consensus on a common "gas token" to use (like UNCOMMON•GOODS) and prices it based on how expensive it is to mint, and decides to mint when fees are high and pay with it when fees are high - maybe someone has only runes in their wallet and can't afford transaction fees otherwise. Maybe there's a runes-only wallet that makes this attractive - maybe a miner issues their own rune as a blockspace voucher. they could sell this future blockspace at a discount today, pulling revenue forward, to buyers who want to lock in a price now. this looks like a tokenized futures contract
What works now and what doesnt? the codebase is pretty hacked together. Bob currently runs a webserver and alice has to post her PSBT to it. This would be better if Bob was subscribed to some broadcast network and there could be many bobs (nostr?) I think it would also be good to include some pricing logic for a common rune. For example if you wanted to use UNCOMMON•GOODS as the fee-paying rune, you could look at the last 2016 blocks, take the mid-point fee rate, and say 1 uncommon•goods is worth some number of vbytes at that rate. then people can mint when its cheap and spend when its not. Also its command line only and requires some copy-pasting between commands. but it works
Why "slugline"? > Slugging,[1] also known as casual carpooling and flexible carpooling,[2]is the practice of forming ad hoc, informal carpools for purposes of commuting, essentially a variation of hitchhiking. A driver picks up these non-paying passengers (known as "slugs" or "sluggers") at key locations, as having these additional passengers means that the driver can qualify to use an HOV lane or not be subject to road pricing.
here's the repo: there's a bunch of slop in there, lots to do, but for how hacky it is, it works. Pretty amazing that we can do in-band fee payments with exogenous assets using current consensus rules and relay policy.
if you do something cool with it, let me know! /thread
Show original
21.46K
232
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.