2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-19 15:25:33 +00:00

liquidity: increase default confirmation target

This commit is contained in:
carla 2021-03-05 09:02:36 +02:00
parent 4535018e58
commit c17631eee2
No known key found for this signature in database
GPG Key ID: 4CA7FE54A6213C91
3 changed files with 18 additions and 9 deletions

View File

@ -60,6 +60,11 @@ const (
// a channel is part of a temporarily failed swap.
defaultFailureBackoff = time.Hour * 24
// defaultConfTarget is the default sweep target we use for loop outs.
// We get our inbound liquidity quickly using preimage push, so we can
// use a long conf target without worrying about ux impact.
defaultConfTarget = 100
// FeeBase is the base that we use to express fees.
FeeBase = 1e6
@ -95,7 +100,7 @@ var (
ChannelRules: make(map[lnwire.ShortChannelID]*ThresholdRule),
PeerRules: make(map[route.Vertex]*ThresholdRule),
FailureBackOff: defaultFailureBackoff,
SweepConfTarget: loop.DefaultSweepConfTarget,
SweepConfTarget: defaultConfTarget,
FeeLimit: defaultFeePortion(),
}

View File

@ -66,7 +66,7 @@ var (
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
MaxSwapFee: testQuote.SwapFee,
MaxPrepayAmount: testQuote.PrepayAmount,
SweepConfTarget: loop.DefaultSweepConfTarget,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
}
@ -79,7 +79,7 @@ var (
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
MaxPrepayAmount: testQuote.PrepayAmount,
MaxSwapFee: testQuote.SwapFee,
SweepConfTarget: loop.DefaultSweepConfTarget,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
}
@ -612,7 +612,7 @@ func TestSweepFeeLimit(t *testing.T) {
// Set our test case's fee rate for our mock lnd.
lnd.SetFeeEstimate(
loop.DefaultSweepConfTarget, testCase.feeRate,
defaultConfTarget, testCase.feeRate,
)
lnd.Channels = []lndclient.ChannelInfo{
@ -732,7 +732,7 @@ func TestSuggestSwaps(t *testing.T) {
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
MaxSwapFee: testQuote.SwapFee,
MaxPrepayAmount: testQuote.PrepayAmount,
SweepConfTarget: loop.DefaultSweepConfTarget,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
},
},
@ -1227,7 +1227,7 @@ func TestSizeRestrictions(t *testing.T) {
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
MaxSwapFee: testQuote.SwapFee,
MaxPrepayAmount: testQuote.PrepayAmount,
SweepConfTarget: loop.DefaultSweepConfTarget,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
}
)
@ -1376,7 +1376,7 @@ func TestFeePercentage(t *testing.T) {
MaxMinerFee: scaleMinerFee(okQuote.MinerFee),
MaxSwapFee: okQuote.SwapFee,
MaxPrepayAmount: okQuote.PrepayAmount,
SweepConfTarget: loop.DefaultSweepConfTarget,
SweepConfTarget: defaultConfTarget,
Initiator: autoloopSwapInitiator,
}
)

View File

@ -22,8 +22,12 @@ This file tracks release notes for the loop client.
peer-level rules, provide the 'setrule' command with the peer's pubkey.
* Autoloop's fee API has been simplified to allow setting a single percentage
which will be used to limit total swap fees to a percentage of the amount
being swapped. Use `loop setparams --feepercent={percentage}` to update
this value. This fee setting has been updated to the default for autoloop.
being swapped, the default budget has been updated to reflect this. Use
`loop setparams --feepercent={percentage}` to update this value. This fee
setting has been updated to the default for autoloop.
* The default confirmation target for automated loop out swap sweeps has been
increased to 100 blocks. This change will not affect the time it takes to
acquire inbound liquidity, but will decrease the cost of swaps.
#### Breaking Changes