-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coin creation (fanout) #5
Comments
The downside of going with on-the-fly creation of fee-bumping UTXOs is that it introduces even more incertainty. Is the fee-bumping transaction going to confirm in the next block? Assuming it is, is the value of the created fee-bumping UTXO going to be enough for the new estimation? The downside of going with an UTXO pool layed out in advance is that 1. we need to actually lay it out 2. it's going to deprecate. We need to lay it out in a way that we'll never have an utxo that is part of two vaults' reserves. Therefore the value is somewhat small, and if we don't want to go for a bulk "bump once with all the reserve and forget" we need to split it into multiple UTXOs, therefore creating more fees to pay and accelerating their deprecation. The optimal value of each UTXO should also be a moving (likely increasing) and bound target. The tradeoffs both in term of security and complexity is clearly better with using a pool of UTXOs, albeit it's likely more expensive in most cases. [1] or analayzed, or historic, or??? Cf reserve |
The WT will process its UTxO pool, the fee-bump coin pool, from re-fill txs initiated by their stakeholder. The WT will use the fee-reserve estimation and criteria for a well structured UTxO pool to split and collect UTxOs appropriately. It will aim to optimise the cost of this processing by transacting during low fee periods. Criteria for the fee-bump coin pool
Coins that are used when fee-bumping cannot be split with change outputs, and must be consumed entirely (since the main input's signature is signed with the A1CP|ALL flag). Thus, one fee-bump coin will cover the majority of costs, with smaller denominations covering the difference due to changing market conditions.
An inevitable consequence of operating in an uncertain environment is that the accuracy of fee-reserve estimations will decrease from the time of coin creation until the time when the fee-reserve is needed during a fee-bumping process. Note that our fee-reserve estimation includes a buffer for fee-market volatility, and the likelihood of that buffer turning out to be in-sufficient is by design small. The intention is for each fee-reserve per vault to be sufficient to enable a conservative 1-block target fee offering during times where the network is highly congested. The ability to re-callibrate fee-bump coin pool distribution with current estimations will mitigate the risk of decreasingly accurate fee estimations. This re-calibration can occur at daily or weekly intervals through automatic transactions by the WT. Trade-off: the more re-calibrating that is done, the greater the chance of accurate fee-bumping but the higher the cost of operating. |
We just had a call about this. It seems out of our discussion that a middle ground would be best. Using one "large" (which value is
[1] Lower bounded, of course, by the value needed to spend them (something like 60 virtual bytes i guess as it'd be a P2WPKH) + the incremental relay fee (which at the moment is 1 * virtual bytes of the new Cancel tx). Note how we don't care about the absolute fee rule as we are always increasing the size of the transaction anyways. |
1. Feebump coins creation procedureSo we could go with something along these lines: The total amount affected to each vault is
This creates a pool per vault allowing to fee-bump once to get the Cancel above the current market feerate in most cases (cross-linking with #3 , even more probable with an opportunistic cheaper target in the first place), and then to re-bump by thresholds of at least 10sat/vbyte each time. [1] Arbitrarily chosen but we may want to lower it if adding 10 inputs to the Cancel could get it above the 100k WU limit. 2. Deducing the value to send to the watchtower wallet out of thisSoon ™️. Unfortunately it seems we'll need communication between the watchtower and the stakeholder's wallet. |
nit: I think allocated is better than affected
I think it should be
I'll try to paraphrase you to check I understand: "if the value of rebump coins would be less than the dust amount, reduce the number of rebump coins such that they Vb is larger and not less than the dust amount". What does |
Yes, brainfart, thanks :)
Yes, sorry if it wasn't clear it was more of a "thoughts path" than a summary on this one :)
|
Note that fee_reserve = [Vm(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0)] but, as market conditions change, what is considered a 'sufficient fee-reserve' also changes. If fee_reserve = [Vm(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb(t=0),Vb=(t=10),Vb=(t=24)] If we operate with the hypothesis that the fee-market will gradually increase over time, then a coin-selection algo #6 can clean up smaller feebump coins by selecting them for use first. Our other mechanism for clean-up is use our Feebump Tx for both coin creation and some necessary coin cleanup, which we expect to occur approximately with each wallet re-fill. How do we determine when it is necessary/ effective to clean up a bunch of small feebump coins? If operations are running smoothly, no cancels are broadcast and the fee-market has increased, then at some point the fee_reserve allocated to a vault will fall below the required amount |
Also, we definitely need some breathing room on top of the reserve. Otherwise a small market movement with no vault spent beforehand will put all our vaults below the reserve... As mentioned last time during the call, i think we could have an additional rebump UTXO for each vault. As to when cleanup too small feebump coins, we could have a basic interval (every 1000 blocks, clean up) eventually augmented with heuristics from #9 . |
I think that the fee-reserve per-vault We can also have stakeholders pay excess with re-fills, if they expect to be delegating more vaults soon after. But that's a separate matter to our definition of the fee-reserve per-vault and our strategy for a good buffer size. |
Yes, i know, but it's not practical. Say they setup their reserve for a 250sat/vbyte MAX95Q, then the next day the MAX95Q is 251sat/vbyte they get an alert "hey your watchtower fee-bumping reserve is low, wtf". Actually it's more of a concern if the reserve is based on an average (and i think it should not), so yes. A tolerance would work too at the expense of our assumptions :/
Yes, i think having a buffer is sensible and is basically what i meant (should the MAX95Q go up, you take from the buffer before annoying the user). |
So @JSwambo experimentations of this algorithm on historical feerate data demonstrated that in some cases |
If
should be Let the number of Vb coins per Vm coin be I think
The issue I see with that is WTs might require more capital than the fee_reserve_per_vault to create coin distribution of 1:N Vm to Vb coins. We need to keep in mind that the Stakeholder should be able to compute an appropriate re-fill amount without communicating with their WT. Here's some results for that simulation: |
Right.
As discussed many times already, this cannot happen in the early times as we'd have a hardcoded max. However this can happen that Vm gets close to R on new feerate spikes but we should obviously have a better update of R, with a breathing room large enough that we can at least create one Vb coin.
This was already proposed in my post you are quoting. #5 (comment)
Looks reasonable to me, but we need to update R too. So i think the gist is that we need to have larger increases of R when it's updated (as in it can only increase by at least |
The text was updated successfully, but these errors were encountered: