Skip to content

Instantly share code, notes, and snippets.

@araspitzu
Last active December 27, 2023 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save araspitzu/415876f8bffd90a9d7d6b46a41b8914c to your computer and use it in GitHub Desktop.
Save araspitzu/415876f8bffd90a9d7d6b46a41b8914c to your computer and use it in GitHub Desktop.
SCID Address

General Information

SCIDADDRESS is a draft specification of a short, reusable and permanent address to be used with the Lightning Network nodes and wallets.

The new address format represents a directed short channel id and has the following syntax:

[sign][SCID]@[sign][SCID]

+693x1x0 (simple format)

+693x1x0@ (extended format with short route hint)

+693x1x0@-634x61x1 (extended format with full route hint)

How it works

TL;DR the sender translates the SCIDADDRESS into a node-id by looking up its channel-announcement then makes a keysend payment to the recipient optionally using trampoline routing if a hint is present.

From the payee side:

Obtain your SCIDADDRESS from a public channel of your node and make sure you can receive keysend payments. If you're going to use a private channel to receive (i.e you're behind an LSP) contact your LSP to know the route hint to attach to your SCIDADDRESS

From the payer side:

  1. Lookup the node-announcement for the SCIDADDRESS and get the recipient node-id relative to the direction of the address interpreting the + as node_1 and - as node_2 then perform a keysend payment.
  2. If the SCIDADDRESS contains a route hint then translate the route hint into a node-id using the previous step and send a trampoline payment to the recipient node going through the hint node.

FAQ

Is it safe?

Your SCIDADDRESS is secured by digital signatures like any bitcoin transaction, the process of converting your address into a node-id involves publicly available data that your wallet can verify independently.

Is it trustless?

Yes you don't need to trust any authority or third party to create or use your SCIDADDRESS. When you create your SCIDADDRESS you are creating a permanent record on the bitcoin blockchain and the sender of a payment can use that to verify the integrity of your SCIDADDRESS.

I'm concerned about privacy I don't want to give away in public my channel's outpoint.

The lightning channel representing your SCIDADDRESS does not have to be funded by your UTXO, for example you can use one of the existing paid services to buy liquidity and have a public channel not funded with your private UTXO.

Can I receive payments using my SCIDADDRESS if I have an unannounced node like a mobile wallet?

Yes you can use the extended format +693x1x0@-634x61x1 and the sender will use trampoline routing to ask the hint node to compute a route to the recipient. With some help from the LSPs it's also possible to have the SCIDADDRESS represent your node and the LSP node so that we can use the shorter format +693x1x0@, in this case the sender will use the other side of the channel announcement as trampoline.

Do I need to keep the channel of my SCIDADDRESS open? What if I close it?

Information about open public channels (channel_announcement) is already available to all nodes connected to the network, however if your channel is closed this information might be dropped. The workaround to this problem requires the sender to have access to historical channel announcements, this could be done by using a public directory of historical announcements (like a lightning network explorer) and/or wallet implementors can ship a snapshot of historical announcements with each release of their software. It's important to note that even if your wallet relies on an external source to obtain the channel_announcement such "source" doesn't need to be trusted because your wallet can (and should) check the integrity of the announcement against the data found on the blockchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment