Skip to content

Instantly share code, notes, and snippets.

@homakov
homakov / m.md
Last active Mar 20, 2021
XLN channel lifecycle
View m.md

Alice puts assets in channel

Alice downloads XLN wallet. After logging in with passphrase/mnemonic, it shows a list of hubs (downloaded from public hubs contract array), along with various metrics and data: name, total collateral locked around the hub, gasused (the most reliable one) etc.

Alice chooses Hub and sets up a channel offchain and adds asset_id=0,1 (weth/dai). Both parties sign off on a dispute proof

dispute_nonce=1
entries=[
[0,0], //asset_id, offdelta
@homakov
homakov / config.ru
Last active Sep 24, 2016
config.ru
View config.ru
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
#prevents DNS rebinding attacks
class DNSBinding
VALID_HOSTS = %w{localhost:9292 myshop.dev:3000 myshopprod.com}
def initialize(app)
@app = app
end