Setting up Lightning Network [3/3] – what to do with your lnd node?

Now that you have your node set up and you have established a few channels you can start routing payments. You can see my node here I have opened three channels for now, and with it I am able to route payments anywhere.

You can set up a account to receive tips in satoshis. It creates a custodial lighning wallet where people can send you tips. You can send me some satoshis at (as of today 1 satoshi equals 0.00003416 Euros, so don’t be shy, if you go wild and send 1,000 satoshis it will be 3 cents of a euro 😉 )

To send a tip to you need to use the payinvoice command, instead of the sendpayment command as you won’t have an invoice and you can send any amount you want.

lncli --lnddir /opt/lnd-data/ --no-macaroons  payinvoice --pay_req lnbc1pw8aa5app5t3zqgnsq2e80s47s33a4rqc4w3spvamwp5tch732zucgglcyefwqdph235hqurfdcs9ymm8v4kkzm3q9p6xjursd9hzumt99y582vfj8ycny2gcqzysxqyz5vqu05rc3mk3m5cteh8gsvh3pf696p4wfdeezq29kkxcdrwjmtj64njk5lj4nv4jul96jcsqvw94a57y4722lrzdygu87jfkw2leu9ceqqpqmmcgl --amt 100

On the testnet a very cool test to do is buy a Blockaccino at starbloqs, check out a video here

You can request others to send you money by sending them an invoice

lncli --lnddir /opt/lnd-data/ --no-macaroons addinvoice 100 --expiry 36000
        "r_hash": "f9ba7fd5b0be3d768c29aa951b4a215ea7e37133ebb41fd5a7d424e7981551de",
        "pay_req": "lnbc1u1pw8a7u6pp5lxa8l4dshc7hdrpf4223kj3pt6n7xufnaw6pl4d86sjw0xq4280qdqqcqzysxqypr9qfrglxdwv8jdc9xlsyatugwztdvsn89y4hmlm2mgds5wyl9k3c963uk66zhntp6940yxpfz5fa0au9mcg4c0sfc77eg589fmpnjhcs6gp49ghuh",
        "add_index": 1

Once you’ve created the invoice you can send the pay_req to the payer (in the above example lnbc1u1pw8a7u6pp5lxa8l4dshc7hdrpf4223kj3pt6n7xufnaw6pl4d86sjw0xq4280qdqqcqzysxqypr9qfrglxdwv8jdc9xlsyatugwztdvsn89y4hmlm2mgds5wyl9k3c963uk66zhntp6940yxpfz5fa0au9mcg4c0sfc77eg589fmpnjhcs6gp49ghuh)

Others can send you money with the sendpayment command by paying your invoice

lncli --lnddir /opt/lnd-data/ --no-macaroons sendpayment --pay_req=nbc1u1pw8a7u6pp5lxa8l4dshc7hdrpf4223kj3pt6n7xufnaw6pl4d86sjw0xq4280qdqqcqzysxqypr9qfrglxdwv8jdc9xlsyatugwztdvsn89y4hmlm2mgds5wyl9k3c963uk66zhntp6940yxpfz5fa0au9mcg4c0sfc77eg589fmpnjhcs6gp49ghuh

With your lightning network node you can send payments which are:

  • Borderless: The internet knows no boundaries, it has no borders, you can as seamlessly send payments within your country, your continent, your planet, or your solar system. In the future we may need to send money to mars!
  • Anonymous: Since payments are routed via a mesh of nodes which can’t see the whole end to end payment route, payments are anonymous. This is different to on-chain bitcoin payments, which are only pseudo-anonymous and can be tracked to you.
  • Instantaneous: Once you start playing with lnd you will see that it takes less than a second to route a payment. This is mindblowing if you think about it. Internet packets are being communicated throughout the planet, from one internet provider to another, from one router to another, from one lnd node to another, until they reach their destination.
  • Low cost: The nodes (yours as well) set the fees they want to charge to route payments. The route chosen is always the cheapest one so this incentivises nodes to reduce the fees. Sending payments over the lightning network costs cents of euro equivalent in satoshis.
  • World scale: Lightning is capable of millions to billions of transactions per second across the network. Visa, which is currently the benchmark can transfer less than 2,000 transactions per second.

One problem lightning network has is that you can only send or receive as much money as you have route bandwidth for, this means that if you want to be able to receive payments worth 500 Euro, you need to have channels open worth 500 Euro. This can be pretty expensive for high value payments. Due to this constraint the lightning network can work very well for low value payments, like buying a coffee, and not so well for high value payments like buying a house. In any case high value payments can be done directly using the bitcoin blockchain without using the lightning network layer and are usually not done in high volumes. (Maybe a third layer protocol could be used to spit large payments into groups of smaller ones similarly how tcp over ip is capable of splitting large packets of information into smaller ones and guarantee order and completeness, you could split a payment of 1000 satoshis into two payments of 500)

This is the future of how robots will pay each other.