A high max batch fee rate would reserve a lot of the account balance for
fees.
Note that if the actual fee rate goes higher than the max batch fee rate
set, then the orders won't be included in the batch, and the default
must be overridden.
As a preparation to avoid package import cycles when introducing more
generic terms, we move the FeeSchedule interface and its
LinearFeeSchedule implementation to the terms package.
The funding feerate field was previoulsy unused, so we rename it to
"max batch fee rate" in order to use it to communicate to the server the
maximum fee rate we are willing to pay to be included in a batch.
We also increase the default value to 500 sat/vbyte.
In tihs commit, we modify the order acceptance commands (llm submit ask
and llm submit bid) to take the final percentage rather than the fixed
rate. Historically we've seen that people find thinking in fixed point
arithmetic difficult. So instead of exposing this value, we now poll the
user for the amount their willing to pay or accept as yield for the
_entire duration_.
With this change, users only need to think about the lump sum coupon
payment rather than the internal fixed rate. This should also lend to
better price discovery as distinct orders may end up with the same
rate_fixed when converted at the end.
In addition to this change, we now show a break down of the order
parameters which includes the execution fee.
We use the same proto message types everywhere for these kinds
of fields:
- absolute amounts (sats): uint64
- fee rates (sat/kWU): uint64
- fee rates (ppm): uint32
- blocks (absolute and relative): uint32
Additionally we unify the comments and remove the [ json_name = "" ]
declarations in the trader proto as they aren't needed with the
jsonpb marshaller that we use.
Then we align the naming of the account key to be called trader key
everywhere instead of user's sub key.
Traders are now able to close their accounts, whether or not they have
already expired, to arbitrary outputs or to a wallet output by default.
If an account hasn't expired, then the auctioneer's signature of the
closing transaction is required to successfully close the account.