Skip to content

Instantly share code, notes, and snippets.

Avatar

bretton bretton

  • Cape Town, South Africa
View GitHub Profile
@bretton
bretton / inbound-liquidity-ln.md
Last active Aug 9, 2022
How to get Inbound Liquidity on the Lightning Network
View inbound-liquidity-ln.md

How to get Inbound Liquidity on the Lightning Network

There are several ways you can find inbound liquidity on LN.

1. Wait

If your node is up 24x7 and you have some outgoing channels, the network will connect to you if you simply wait.

However, it might take a couple of weeks to get a significant amount of incoming liquidity, and ideally you want your outgoing liquidity to match too.

@bretton
bretton / lightning-maps.md
Last active Aug 7, 2022
Visualisers of the Lightning Network (and some other explorers)
View lightning-maps.md

A (mostly) visual collection of the Lightning Network

Disclaimer

Network views tend to be the view of the network from a single node, or small selection of nodes. They are not complete views of the network. This is impossible to achieve. Even if many node views were combined, it would still be incomplete.

These network views, or network maps, have been termed 'visualisers' by the LN community.

Screenshots may reflect older visual styles, and are dated accordingly.

View crypto-tracks.md
@bretton
bretton / notakey-ubuntu-qemu-kvm.md
Last active Jul 13, 2022
Notakey Authentication Appliance on Ubuntu QEMU-KVM (unsupported by vendor)
View notakey-ubuntu-qemu-kvm.md

Introduction

Setup of an instance of the Notakey Authentication appliance running on Ubuntu with QEMU-KVM.

Update July 2022: this is out of date and needs an update for the newer version of the appliance

Sign up for license

Sign up for an evaluation license at https://www.notakey.com/

Download the legacy appliance

After you've signed up you will receive an email with download links for:

@bretton
bretton / hedged-ln-node.md
Last active Jun 21, 2022
Getting a 2:1 or greater risk-reward ratio on LN node and channels
View hedged-ln-node.md

Getting a 2:1 or greater risk-reward ratio on LN node and channels

WIP

Lets say a user wants to spin up a node with 0.1 btc, open a few channels, and generate routing fees.

How do they calculate a risk/reward ratio (RR) that makes economic sense?

What else can they do to improve the calculation, such as compartmentalising risk into discrete chunks which can be evaluated independently?

@bretton
bretton / forex-scrape.md
Last active Jun 16, 2022
Scraping Forex Data
View forex-scrape.md

Scraping Forex Data

I was looking for ways to scrape forex data after fixer.io switched to a subscription model with rate-limiting, making their API useless for lots of queries.

1. Use an alternative API

One alternative API which is still free is https://exchangeratesapi.io/

It's basically a drop-in replacement for fixer.io and can be used to get all forex rates in json format at

@bretton
bretton / getmagmaoffers.gql
Created Jun 15, 2022
Get Amboss Magma LN channel capacity offers API list
View getmagmaoffers.gql
query GetMagmaOffers {
getOffers {
list {
account
amboss_fee_rate
base_fee
base_fee_cap
fee_rate
fee_rate_cap
id
@bretton
bretton / lndhub-providers.md
Last active Jun 5, 2022
List of lndhub providers
View lndhub-providers.md
@bretton
bretton / ln-provider-za.md
Last active Apr 26, 2022
Scenario Planning for a Lightning Provider
View ln-provider-za.md

WIP 2018-02-08, comments updated 2022-04-24

Scenario Planning for a Lightning Provider

This gist is an outline of a likely scenario within South Africa, a developing country with a strong interest in Bitcoin & blockchain technologies.

Although it is expected within the LN community that users & merchants will run their own nodes, and fund their own channels, this approach seems to require a level of familiarity with the concepts and technology beyond the comprehension of the average joe, along with a level of access to bitcoin for channel funding purposes that is outside the financial reach of most in this country.

It's far more likely that mainstream adoption will come via parallels to existing widespread usage models, such as:

  • buying and loading prepaid airtime, via cash & EFT
@bretton
bretton / improved-lnd-bitcoind-mainnet.md
Last active Apr 10, 2022
Detailed guide to installing LND and Bitcoind on Ubuntu 16.04 LTS for Mainnet
View improved-lnd-bitcoind-mainnet.md

Intro

This guide is specific to getting LND 0.5-beta and Bitcoind running on Ubuntu 16.04 LTS for mainnet. It is aging rapidly and includes steps not necessary on newer versions of LND. As of April 2021 it is very out of date for bitcoind. As of December 2021 it is outdated for LND too.

Original installation guide:

This guide is broken into the following sections:

  • Install bitcoind and set to start automatically
  • Install development tools and dependancies