Oddbean new post about | logout
 Hi @RocketNode, thanks for the FC bot! I noticed that it doesn't include the fees paid for HTLCs that either timed out or didn't resolve back to the sender.

In my case that added 48k sat to one FC, in addition to whatever I need to pay in order to sweep this output. Do you think it's worthwile to add these transactions to your calculations? I realize that they only appear after a delay (cltv_expiry for the two HTLC transactions and to_self_delay for the sweeps).

PS: I always resort to https://ellemouton.com/posts/htlc-deep-dive/ in order to understand what's going on. Really helpful :) 
 I only run the calc once, when the FC is mined. Sometimes it’ll include a htlc sweep if it makes it to my mempool before I calculate the fees for the FC (pretty rare). But the bot already posts A LOT and there’s still over 1k FCs in the mempool. 

The main problem is the expiry/delay isn’t known from the raw FC tx and not everyone runs a node that will stage 1 sweep immediately. And I believe most implementations won’t stage 2 sweep at a loss. So the backlog of unfinished FCs that needs to be tracked will grow. 

Maybe if the mempool ever clears up, I can do some sort of post mortem analysis since I do keep a record of all the FC txids. 
 Is the code for the bot open-source by any chance? 
 No. Mostly embarrassed by my lack of coding skills