diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index 3a3c579..91a6fb7 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -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(), } diff --git a/liquidity/liquidity_test.go b/liquidity/liquidity_test.go index 909525d..c95e26a 100644 --- a/liquidity/liquidity_test.go +++ b/liquidity/liquidity_test.go @@ -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, } ) diff --git a/release_notes.md b/release_notes.md index b2190ac..6af2e2a 100644 --- a/release_notes.md +++ b/release_notes.md @@ -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