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 Netwo...