Thursday, November 15, 2018

Converting the Lightning Network into an electricity market protocol

(For sake of expediency, the following will be rather dense and presumes some background in both electricity markets and the Lightning Network. If I find time, I might post a more accessible description.)

Although technically blockchain-agnostic, the “Lightning Network” is a layer-two protocol originally conceived for the purpose of scaling bitcoin transaction throughput. It works by moving the majority of bitcoin transactions off-chain, while using the underlying blockchain primarily as a settlement and dispute resolution mechanism for the off-chain transactions. In the lightning network, pairs of individuals are connected by “payment channels”, and payments may then be routed from payer to payee even when they do not directly share a payment channel, by making use of the network of payment channels. The lightning network thus includes a routing protocol for discovering these routes, and intermediaries who choose to make their channels available to this protocol may extract a transaction fee along the way. The mechanism by which transaction fees are extracted is that the funds which leave a channel may be less than the funds which enter the channel. Importantly, the lightning network can exist across multiple blockchains, and can even facilitate off-chain swaps of one cryptocurrency for another, as for example has been demonstrated by swapping bitcoin for litecoin over the lightning network.

The topology of payment channels is usefully analogous to the physical topology of electricity grids, and the lightning network is therefore a perfect starting point for creating an automated and highly scalable protocol for the electricity markets. Payment channels can represent transmission lines. Transaction initiator can represent electricity consumer. Transaction recipient can represent electricity generator. Token sent by initiator can either represent, or constitute, payment. Token returned in the “currency swap” by recipient could represent either a promise to deliver an amount of electricity (in which case it may be subject to securities law), or else could represent a receipt for electricity delivered (perhaps thereby not being subject to securities law?) Intermediate payment channel endpoints could represent transmission line owners. Fees extracted in form of token A could represent rents for use of transmission lines. Fees extracted in form of token B could represent transmission energy losses. Payment channel capacity can represent transmission line capacity. Rate of token generation by generators could present rate of electricity generation. Underlying protocol could be modified to permit negative payment channel prices (as I have previously urged on the mailing list) so that transmission line owners can thereby incentivize counterflows, in scenarios where counterflow would lower net flow so as to increase sellable unidirectional capacities in an economically efficient manner. As described here, function would be analogous to spot market of an ISO in the US, although extensions could permit parallel operation of RTO-like futures markets for purpose of capacity planning. In the context of US electricity markets, this protocol could soften or eliminate today’s wholesale vs. retail market dichotomy, in alignment with the “deregulation” started in 1996 by FERC order 888, but extending all the way down to end consumer. This can incentivize rooftop solar in proportion to local market need, and could address for example the “duck curve” and negative wholesale prices experienced in CAISO markets during the summer by incentivizing electric vehicle owners to charge their cars accordingly. A competitive industry of computer-based electricity purchase appliances could arise which offer end users and producers a range of pricing models that vary in their simplicity versus fidelity, thus allowing the free market to identify an optimum mix of static versus dynamic pricing policies. In less developed markets, this protocol could facilitate the organic emergence of power grids among previously isolated producers and users of electricity, incentivizing for example the creation of transmission lines, generation, and storage in proportion to actual local need.

Automating the detection and patching of vulnerabilities

Nice. https://spectrum.ieee.org/computing/software/mayhem-the-machine-that-finds-software-vulnerabilities-then-patches-them