A better encoding for lightning invoices



Summary:

In Bolt 11, bech32 was used to encode lightning invoices but it isn't well suited for invoices. The main disadvantage of Bolt 11 invoices is their size, making them too big and difficult to share when routing hints or rendezvous onions are added. Most lightning transactions are done over Twitter and this has impacted the development of new features for lightning since Twitter only allows up to 280 characters per tweet. After months of research and experimentation at Acinq Research, they have come up with an efficient invoice encoding optimized primarily for Twitter, which uses an AI-optimized mapping from 11-bit words to Twitter emojis. Early results show that emoji invoices are more than 2 times smaller than legacy invoices. Reckless users are already using this in production. A spec PR is available along with reference eclair code and they plan to release this feature in the next update of their Phoenix wallet. They believe the same encoding could be used to compress the bitcoin blockchain and would allow bitcoin blocks to fit in a single tweet, thereby storing the whole blockchain in Twitter feeds. Feedback is appreciated on how to improve this further.


Updated on: 2023-06-03T00:42:19.135174+00:00