Skip to content

Commit c17631e

Browse files
committed
liquidity: increase default confirmation target
1 parent 4535018 commit c17631e

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

liquidity/liquidity.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ const (
6060
// a channel is part of a temporarily failed swap.
6161
defaultFailureBackoff = time.Hour * 24
6262

63+
// defaultConfTarget is the default sweep target we use for loop outs.
64+
// We get our inbound liquidity quickly using preimage push, so we can
65+
// use a long conf target without worrying about ux impact.
66+
defaultConfTarget = 100
67+
6368
// FeeBase is the base that we use to express fees.
6469
FeeBase = 1e6
6570

@@ -95,7 +100,7 @@ var (
95100
ChannelRules: make(map[lnwire.ShortChannelID]*ThresholdRule),
96101
PeerRules: make(map[route.Vertex]*ThresholdRule),
97102
FailureBackOff: defaultFailureBackoff,
98-
SweepConfTarget: loop.DefaultSweepConfTarget,
103+
SweepConfTarget: defaultConfTarget,
99104
FeeLimit: defaultFeePortion(),
100105
}
101106

liquidity/liquidity_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ var (
6666
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
6767
MaxSwapFee: testQuote.SwapFee,
6868
MaxPrepayAmount: testQuote.PrepayAmount,
69-
SweepConfTarget: loop.DefaultSweepConfTarget,
69+
SweepConfTarget: defaultConfTarget,
7070
Initiator: autoloopSwapInitiator,
7171
}
7272

@@ -79,7 +79,7 @@ var (
7979
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
8080
MaxPrepayAmount: testQuote.PrepayAmount,
8181
MaxSwapFee: testQuote.SwapFee,
82-
SweepConfTarget: loop.DefaultSweepConfTarget,
82+
SweepConfTarget: defaultConfTarget,
8383
Initiator: autoloopSwapInitiator,
8484
}
8585

@@ -612,7 +612,7 @@ func TestSweepFeeLimit(t *testing.T) {
612612

613613
// Set our test case's fee rate for our mock lnd.
614614
lnd.SetFeeEstimate(
615-
loop.DefaultSweepConfTarget, testCase.feeRate,
615+
defaultConfTarget, testCase.feeRate,
616616
)
617617

618618
lnd.Channels = []lndclient.ChannelInfo{
@@ -732,7 +732,7 @@ func TestSuggestSwaps(t *testing.T) {
732732
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
733733
MaxSwapFee: testQuote.SwapFee,
734734
MaxPrepayAmount: testQuote.PrepayAmount,
735-
SweepConfTarget: loop.DefaultSweepConfTarget,
735+
SweepConfTarget: defaultConfTarget,
736736
Initiator: autoloopSwapInitiator,
737737
},
738738
},
@@ -1227,7 +1227,7 @@ func TestSizeRestrictions(t *testing.T) {
12271227
MaxMinerFee: scaleMinerFee(testQuote.MinerFee),
12281228
MaxSwapFee: testQuote.SwapFee,
12291229
MaxPrepayAmount: testQuote.PrepayAmount,
1230-
SweepConfTarget: loop.DefaultSweepConfTarget,
1230+
SweepConfTarget: defaultConfTarget,
12311231
Initiator: autoloopSwapInitiator,
12321232
}
12331233
)
@@ -1376,7 +1376,7 @@ func TestFeePercentage(t *testing.T) {
13761376
MaxMinerFee: scaleMinerFee(okQuote.MinerFee),
13771377
MaxSwapFee: okQuote.SwapFee,
13781378
MaxPrepayAmount: okQuote.PrepayAmount,
1379-
SweepConfTarget: loop.DefaultSweepConfTarget,
1379+
SweepConfTarget: defaultConfTarget,
13801380
Initiator: autoloopSwapInitiator,
13811381
}
13821382
)

release_notes.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ This file tracks release notes for the loop client.
2222
peer-level rules, provide the 'setrule' command with the peer's pubkey.
2323
* Autoloop's fee API has been simplified to allow setting a single percentage
2424
which will be used to limit total swap fees to a percentage of the amount
25-
being swapped. Use `loop setparams --feepercent={percentage}` to update
26-
this value. This fee setting has been updated to the default for autoloop.
25+
being swapped, the default budget has been updated to reflect this. Use
26+
`loop setparams --feepercent={percentage}` to update this value. This fee
27+
setting has been updated to the default for autoloop.
28+
* The default confirmation target for automated loop out swap sweeps has been
29+
increased to 100 blocks. This change will not affect the time it takes to
30+
acquire inbound liquidity, but will decrease the cost of swaps.
2731

2832
#### Breaking Changes
2933

0 commit comments

Comments
 (0)