Tokens on
Lightning Network
Alekos Filini (@afilini) - Developer at BHB Network
AKA
Really Fast Exit Scams
Disclaimer
- We don't like ICOs
- We think that most of the tokens out there are useless
- We don't want to encourage scams
- But still..
- We think that this is a really cool research project
- And also a solid platform in case you really want to issue a token
RGB Recap
- We start from a colored coin protocol
- Move colored coins by adding meta-data in OP_RETURNS
- All readable and verifiable by everyone
Bitcoin TX
RGB Recap
- We can move the meta-data off-chain, and replace them with an hash
- Verified only by the receiver and future owners
- A little bit more plausible deniability/privacy
- Allows to encode tons of data
- Drawback: we have to move the data somehow..
- Not a big deal if we are on Lightning
RGB Recap
- One more thing...
- Use pay-to-contract instead of OP_RETURNS
- Even more plausible deniability
- Save a few bytes and satoshis in fees
Why is this LN-compatible?
- RGB transactions are dumb
- Tie assets to a UTXO and let the Bitcoin layer decide
- RGB doesn't care who will spend it
- Also compatible with eltoo
- Even with pay-to-contract!
- The update transaction commits to a fixed proof
- Thus the script_pubkey doesn't change
Moving on top of LN
- Try to be retrocompatible
- Choose some feature bits
- New messages to encode extra stuff
- Define an RGB-equivalent BOLT #3
- Make sure vanilla nodes pass our gossip messages around
Solving the Liquidity Problem
- We cannot expect full colored routes around the network
- But we can atomic swap!
- The routing protocol will look for the cheapest path
- It might involve some atomic swaps
- We also gossip two exchange rates (asset/SAT - SAT/asset)
Dashed nodes = normal nodes
RED -> BTC -> BTC -> RED
Dashed nodes = normal nodes
Current Limitations
- No CryptoKitties ðŸ˜ðŸ˜ðŸ˜
- Non-fungible tokens cannot be moved out of an open channel*
- Possible "blacklist" from vanilla nodes
- You can receive tokens only if you have a channel "colored" with that asset*
*There could be a way to do some kind of "splicing" without going on-chain, but I'm still working on that
Thanks!
Questions?
https://github.com/rgb-org
https://slides.com/afilini/rgb-lightning-nyc
RGB on Lightning Network - NYC
By Alekos Filini
RGB on Lightning Network - NYC
- 596