From 1f7dcebbe0d01110cc5a64ff314691359ec5ee6e Mon Sep 17 00:00:00 2001 From: Rat Poison Date: Sat, 31 Oct 2020 03:35:49 +0100 Subject: [PATCH] loopout: can set exact amount This was proposed here: https://github.com/lightninglabs/loop/issues/234#issuecomment-644417843 --- client.go | 14 +- cmd/loop/loopout.go | 26 +++ cmd/loop/quote.go | 6 + interface.go | 16 ++ loopd/swapclient_server.go | 21 +++ loopdb/loopout.go | 8 + loopin.go | 6 +- loopout.go | 29 +++- looprpc/client.pb.go | 331 ++++++++++++++++++++---------------- looprpc/client.proto | 15 ++ looprpc/client.swagger.json | 25 +++ sweep/sweeper.go | 143 ++++++++++++++-- sweep/sweeper_test.go | 184 ++++++++++++++++++++ 13 files changed, 646 insertions(+), 178 deletions(-) create mode 100644 sweep/sweeper_test.go diff --git a/client.go b/client.go index a58a2d90a9..108260a5f6 100644 --- a/client.go +++ b/client.go @@ -458,14 +458,24 @@ func (s *Client) LoopOutQuote(ctx context.Context, return nil, err } - minerFee, err := s.sweeper.GetSweepFee( + var changeAddr btcutil.Address + if request.WithChange { + changeAddr = p2wshAddress + } + + minerFeeOnlyDest, _, minerFeeBoth, err := s.sweeper.GetSweepFee( ctx, swap.QuoteHtlc.AddSuccessToEstimator, - p2wshAddress, request.SweepConfTarget, + p2wshAddress, changeAddr, request.SweepConfTarget, ) if err != nil { return nil, err } + minerFee := minerFeeOnlyDest + if request.WithChange { + minerFee = minerFeeBoth + } + return &LoopOutQuote{ SwapFee: swapFee, MinerFee: minerFee, diff --git a/cmd/loop/loopout.go b/cmd/loop/loopout.go index 2c8c380845..05bb22d720 100644 --- a/cmd/loop/loopout.go +++ b/cmd/loop/loopout.go @@ -43,6 +43,17 @@ var loopOutCommand = cli.Command{ Name: "amt", Usage: "the amount in satoshis to loop out", }, + cli.Uint64Flag{ + Name: "dest_amt", + Usage: "the optional exact amount in satoshis to send to " + + "'addr'; useful to pay to merchants", + }, + cli.StringFlag{ + Name: "change_addr", + Usage: "the optional address where to send change in case " + + "'dest_amt' is specified; if left empty and 'dest_amt' " + + "is provided, the funds will go to lnd's wallet", + }, cli.Uint64Flag{ Name: "htlc_confs", Usage: "the number of of confirmations, in blocks " + @@ -128,6 +139,19 @@ func loopOut(ctx *cli.Context) error { destAddr = args.First() } + var destAmount btcutil.Amount + if ctx.IsSet("dest_amt") { + destAmount, err = parseAmt(ctx.String("dest_amt")) + if err != nil { + return err + } + } + + var changeAddr string + if ctx.IsSet("change_addr") { + changeAddr = ctx.String("changeAddr") + } + client, cleanup, err := getClient(ctx) if err != nil { return err @@ -185,6 +209,8 @@ func loopOut(ctx *cli.Context) error { resp, err := client.LoopOut(context.Background(), &looprpc.LoopOutRequest{ Amt: int64(amt), Dest: destAddr, + DestAmount: int64(destAmount), + ChangeAddr: changeAddr, MaxMinerFee: int64(limits.maxMinerFee), MaxPrepayAmt: int64(limits.maxPrepayAmt), MaxSwapFee: int64(limits.maxSwapFee), diff --git a/cmd/loop/quote.go b/cmd/loop/quote.go index b63bac9aa8..b2fb9bd17a 100644 --- a/cmd/loop/quote.go +++ b/cmd/loop/quote.go @@ -76,6 +76,11 @@ var quoteOutCommand = cli.Command{ ArgsUsage: "amt", Description: "Allows to determine the cost of a swap up front", Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "with_change", + Usage: "Indicate you want to add change output; " + + "this is needed when making exact amount payment", + }, cli.Uint64Flag{ Name: "conf_target", Usage: "the number of blocks from the swap " + @@ -124,6 +129,7 @@ func quoteOut(ctx *cli.Context) error { ctxb := context.Background() quoteReq := &looprpc.QuoteRequest{ Amt: int64(amt), + WithChange: ctx.Bool("with_change"), ConfTarget: int32(ctx.Uint64("conf_target")), SwapPublicationDeadline: uint64(swapDeadline.Unix()), } diff --git a/interface.go b/interface.go index f03d8b2e13..a61220420e 100644 --- a/interface.go +++ b/interface.go @@ -19,6 +19,17 @@ type OutRequest struct { // Destination address for the swap. DestAddr btcutil.Address + // DestAmount specifies the exact amount to send to DestAddr. If this + // field is enabled, ChangeAddr must also be specified. If it fails to + // send exactly DestAmount to DestAddr due to fees increase, it sends + // everything to ChangeAddr. Otherwise only the change goes to ChangeAddr. + // This is useful when a merchant asks you to pay exactly X to address. + DestAmount btcutil.Amount + + // Where to send change in case DestAmount is specified. See description + // of DestAmount. + ChangeAddr btcutil.Address + // MaxSwapRoutingFee is the maximum off-chain fee in msat that may be // paid for payment to the server. This limit is applied during path // finding. Typically this value is taken from the response of the @@ -106,6 +117,11 @@ type LoopOutQuoteRequest struct { // include the swap and miner fee. Amount btcutil.Amount + // WithChange specifies if change output is added to sweep tx. + // This is useful when a merchant asks you to pay exactly X to address. + // See the description of OutRequest.DestAmount. + WithChange bool + // SweepConfTarget specifies the targeted confirmation target for the // client sweep tx. SweepConfTarget int32 diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 5b12ed9e87..13db8c1b2c 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -81,6 +81,24 @@ func (s *swapClientServer) LoopOut(ctx context.Context, } } + var changeAddr btcutil.Address + if in.ChangeAddr != "" { + var err error + changeAddr, err = btcutil.DecodeAddress( + in.ChangeAddr, s.lnd.ChainParams, + ) + if err != nil { + return nil, fmt.Errorf("decode change address: %v", err) + } + } else if in.DestAmount != 0 { + // Generate change address. + var err error + changeAddr, err = s.lnd.WalletKit.NextAddr(context.Background()) + if err != nil { + return nil, fmt.Errorf("NextAddr error: %v", err) + } + } + // Check that the label is valid. if err := labels.Validate(in.Label); err != nil { return nil, err @@ -89,6 +107,8 @@ func (s *swapClientServer) LoopOut(ctx context.Context, req := &loop.OutRequest{ Amount: btcutil.Amount(in.Amt), DestAddr: sweepAddr, + DestAmount: btcutil.Amount(in.DestAmount), + ChangeAddr: changeAddr, MaxMinerFee: btcutil.Amount(in.MaxMinerFee), MaxPrepayAmount: btcutil.Amount(in.MaxPrepayAmt), MaxPrepayRoutingFee: btcutil.Amount(in.MaxPrepayRoutingFee), @@ -409,6 +429,7 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context, } quote, err := s.impl.LoopOutQuote(ctx, &loop.LoopOutQuoteRequest{ Amount: btcutil.Amount(req.Amt), + WithChange: req.WithChange, SweepConfTarget: confTarget, SwapPublicationDeadline: time.Unix( int64(req.SwapPublicationDeadline), 0, diff --git a/loopdb/loopout.go b/loopdb/loopout.go index 54b31c0b17..07c4ab3607 100644 --- a/loopdb/loopout.go +++ b/loopdb/loopout.go @@ -24,6 +24,14 @@ type LoopOutContract struct { // DestAddr is the destination address of the loop out swap. DestAddr btcutil.Address + // DestAmount specifies the exact amount to send to DestAddr. Optional. + // Used together with ChangeAddr. + DestAmount btcutil.Amount + + // Where to send change in case DestAmount is specified. Optional. + // Used together with DestAmount. + ChangeAddr btcutil.Address + // SwapInvoice is the invoice that is to be paid by the client to // initiate the loop out swap. SwapInvoice string diff --git a/loopin.go b/loopin.go index 689976c48c..a062962167 100644 --- a/loopin.go +++ b/loopin.go @@ -849,8 +849,8 @@ func (s *loopInSwap) publishTimeoutTx(ctx context.Context, } // Calculate sweep tx fee - fee, err := s.sweeper.GetSweepFee( - ctx, s.htlc.AddTimeoutToEstimator, s.timeoutAddr, + fee, _, _, err := s.sweeper.GetSweepFee( + ctx, s.htlc.AddTimeoutToEstimator, s.timeoutAddr, nil, TimeoutTxConfTarget, ) if err != nil { @@ -864,7 +864,7 @@ func (s *loopInSwap) publishTimeoutTx(ctx context.Context, sequence := uint32(0) timeoutTx, err := s.sweeper.CreateSweepTx( ctx, s.height, sequence, s.htlc, *htlcOutpoint, s.SenderKey, - witnessFunc, htlcValue, fee, s.timeoutAddr, + witnessFunc, htlcValue, 0, fee, 0, 0, s.timeoutAddr, nil, ) if err != nil { return err diff --git a/loopout.go b/loopout.go index dc100204ce..2a1fe037a1 100644 --- a/loopout.go +++ b/loopout.go @@ -149,6 +149,8 @@ func newLoopOutSwap(globalCtx context.Context, cfg *swapConfig, contract := loopdb.LoopOutContract{ SwapInvoice: swapResp.swapInvoice, DestAddr: request.DestAddr, + DestAmount: request.DestAmount, + ChangeAddr: request.ChangeAddr, MaxSwapRoutingFee: request.MaxSwapRoutingFee, SweepConfTarget: request.SweepConfTarget, HtlcConfirmations: confs, @@ -910,23 +912,27 @@ func (s *loopOutSwap) sweep(ctx context.Context, confTarget > DefaultSweepConfTarget { confTarget = DefaultSweepConfTarget } - fee, err := s.sweeper.GetSweepFee( - ctx, s.htlc.AddSuccessToEstimator, s.DestAddr, confTarget, + + feeOnlyDest, feeOnlyChange, feeBoth, err := s.sweeper.GetSweepFee( + ctx, s.htlc.AddSuccessToEstimator, s.DestAddr, s.ChangeAddr, confTarget, ) if err != nil { return err } // Ensure it doesn't exceed our maximum fee allowed. - if fee > s.MaxMinerFee { + for _, fee := range []*btcutil.Amount{&feeOnlyDest, &feeOnlyChange, &feeBoth} { + if *fee == 0 || *fee <= s.MaxMinerFee { + continue + } s.log.Warnf("Required fee %v exceeds max miner fee of %v", - fee, s.MaxMinerFee) + *fee, s.MaxMinerFee) if s.state == loopdb.StatePreimageRevealed { // The currently required fee exceeds the max, but we // already revealed the preimage. The best we can do now // is to republish with the max fee. - fee = s.MaxMinerFee + *fee = s.MaxMinerFee } else { s.log.Warnf("Not revealing preimage") return nil @@ -936,7 +942,9 @@ func (s *loopOutSwap) sweep(ctx context.Context, // Create sweep tx. sweepTx, err := s.sweeper.CreateSweepTx( ctx, s.height, s.htlc.SuccessSequence(), s.htlc, htlcOutpoint, - s.ReceiverKey, witnessFunc, htlcValue, fee, s.DestAddr, + s.ReceiverKey, witnessFunc, htlcValue, s.DestAmount, + feeOnlyDest, feeOnlyChange, feeBoth, + s.DestAddr, s.ChangeAddr, ) if err != nil { return err @@ -955,6 +963,11 @@ func (s *loopOutSwap) sweep(ctx context.Context, } // Publish tx. + var sumOutputs int64 + for _, txout := range sweepTx.TxOut { + sumOutputs += txout.Value + } + fee := htlcValue - btcutil.Amount(sumOutputs) s.log.Infof("Sweep on chain HTLC to address %v with fee %v (tx %v)", s.DestAddr, fee, sweepTx.TxHash()) @@ -975,6 +988,10 @@ func validateLoopOutContract(lnd *lndclient.LndServices, height int32, request *OutRequest, swapHash lntypes.Hash, response *newLoopOutResponse) error { + if (request.DestAmount != 0) != (request.ChangeAddr != nil) { + return fmt.Errorf("provide either both DestAmount and ChangeAddr or none of them") + } + // Check invoice amounts. chainParams := lnd.ChainParams diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index fe754f6ae8..adbe317de0 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -208,6 +208,12 @@ type LoopOutRequest struct { //Base58 encoded destination address for the swap. Dest string `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"` //* + //Exact amount in satoshis to send to 'dest'. Optional. + DestAmount int64 `protobuf:"varint,14,opt,name=dest_amount,json=destAmount,proto3" json:"dest_amount,omitempty"` + //* + //Base58 encoded change address for the swap. + ChangeAddr string `protobuf:"bytes,15,opt,name=change_addr,json=changeAddr,proto3" json:"change_addr,omitempty"` + //* //Maximum off-chain fee in sat that may be paid for swap payment to the server. //This limit is applied during path finding. Typically this value is taken //from the response of the GetQuote call. @@ -316,6 +322,20 @@ func (m *LoopOutRequest) GetDest() string { return "" } +func (m *LoopOutRequest) GetDestAmount() int64 { + if m != nil { + return m.DestAmount + } + return 0 +} + +func (m *LoopOutRequest) GetChangeAddr() string { + if m != nil { + return m.ChangeAddr + } + return "" +} + func (m *LoopOutRequest) GetMaxSwapRoutingFee() int64 { if m != nil { return m.MaxSwapRoutingFee @@ -1100,6 +1120,9 @@ type QuoteRequest struct { //The amount to swap in satoshis. Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"` //* + //If change output will be added. This is needed to send exact amount. + WithChange bool `protobuf:"varint,5,opt,name=with_change,json=withChange,proto3" json:"with_change,omitempty"` + //* //The confirmation target that should be used either for the sweep of the //on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for //the confirmation of the on-chain HTLC broadcast by the swap client in the @@ -1153,6 +1176,13 @@ func (m *QuoteRequest) GetAmt() int64 { return 0 } +func (m *QuoteRequest) GetWithChange() bool { + if m != nil { + return m.WithChange + } + return false +} + func (m *QuoteRequest) GetConfTarget() int32 { if m != nil { return m.ConfTarget @@ -1977,155 +2007,158 @@ func init() { func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } var fileDescriptor_014de31d7ac8c57c = []byte{ - // 2365 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6e, 0x23, 0xc7, - 0xf1, 0x5f, 0x7e, 0x89, 0x64, 0xf1, 0x6b, 0xd4, 0xda, 0x95, 0x28, 0x5a, 0x86, 0xb5, 0x63, 0xef, - 0xdf, 0xb2, 0x6c, 0x2f, 0xff, 0x96, 0x2f, 0x89, 0x61, 0x07, 0xd0, 0x52, 0x94, 0xc5, 0x8d, 0x44, - 0x32, 0x43, 0x6a, 0x0d, 0x07, 0x01, 0x06, 0x2d, 0xb2, 0x25, 0x0d, 0xcc, 0xf9, 0xd8, 0x99, 0xe6, - 0xae, 0x04, 0x23, 0x09, 0x90, 0x17, 0xf0, 0x21, 0x6f, 0x90, 0x67, 0xc8, 0x2d, 0x79, 0x84, 0x9c, - 0x92, 0x63, 0xae, 0x01, 0x82, 0x1c, 0xf2, 0x08, 0x01, 0x82, 0xaa, 0x9e, 0x19, 0xce, 0x50, 0x94, - 0x82, 0x1c, 0x72, 0xe3, 0x54, 0xfd, 0xba, 0xba, 0xeb, 0xbb, 0x8a, 0x50, 0x9d, 0xcc, 0x2c, 0xe1, - 0xc8, 0xe7, 0x9e, 0xef, 0x4a, 0x97, 0x15, 0x67, 0xae, 0xeb, 0xf9, 0xde, 0xa4, 0xb5, 0x73, 0xe5, - 0xba, 0x57, 0x33, 0xd1, 0xe6, 0x9e, 0xd5, 0xe6, 0x8e, 0xe3, 0x4a, 0x2e, 0x2d, 0xd7, 0x09, 0x14, - 0x4c,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4d, - 0xff, 0x91, 0x81, 0x2a, 0x05, 0xa9, 0x08, 0x3c, 0xd7, 0x09, 0x04, 0x63, 0x90, 0xb5, 0xa6, 0xa4, - 0x67, 0x99, 0x7c, 0x9e, 0xb5, 0xa6, 0xf8, 0x48, 0x6b, 0x6a, 0x5e, 0xdc, 0x4a, 0x11, 0x90, 0x0e, - 0x55, 0xa3, 0x68, 0x4d, 0x5f, 0xe0, 0x27, 0x7b, 0x06, 0x55, 0xba, 0x9f, 0x4f, 0xa7, 0xbe, 0x08, - 0x02, 0x95, 0x1e, 0x74, 0xb0, 0x82, 0xf4, 0x43, 0x45, 0x66, 0xcf, 0x61, 0x23, 0x09, 0x33, 0x1d, - 0xef, 0xe0, 0x6d, 0x70, 0x4d, 0x1a, 0x97, 0x95, 0x4b, 0x43, 0x64, 0x9f, 0x18, 0xec, 0x93, 0x30, - 0x02, 0x22, 0xbc, 0x82, 0x17, 0x08, 0xae, 0x25, 0xe0, 0x43, 0x42, 0x3f, 0x83, 0x7a, 0x20, 0xfc, - 0x37, 0xc2, 0x37, 0x6d, 0x11, 0x04, 0xfc, 0x4a, 0x90, 0x09, 0xca, 0x46, 0x4d, 0x51, 0xcf, 0x14, - 0x51, 0xd7, 0xa0, 0x7e, 0xe6, 0x3a, 0x96, 0x74, 0xfd, 0xd0, 0xab, 0xfa, 0xef, 0xf3, 0x00, 0xa8, - 0xfd, 0x48, 0x72, 0x39, 0x0f, 0x56, 0x66, 0x3d, 0x5a, 0x23, 0x7b, 0xaf, 0x35, 0x2a, 0xcb, 0xd6, - 0xc8, 0xcb, 0x5b, 0x4f, 0x39, 0xba, 0x7e, 0xb0, 0xfe, 0x3c, 0xac, 0x3f, 0xcf, 0xf1, 0x8e, 0xf1, - 0xad, 0x27, 0x0c, 0x62, 0xb3, 0x3d, 0x28, 0x04, 0x92, 0x4b, 0x95, 0xf5, 0xf5, 0x03, 0x96, 0xc2, - 0xe1, 0x5b, 0x84, 0xa1, 0x00, 0xec, 0x2b, 0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7, 0x6a, 0xbd, 0x7b, 0x0f, 0x37, 0xbc, 0xad, 0x49, 0xb7, 0x31, - 0xa6, 0xe1, 0x6d, 0x38, 0x38, 0xb4, 0x03, 0x05, 0xbb, 0x58, 0xa3, 0xbf, 0x9e, 0x3f, 0xff, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x97, 0x5c, 0x27, 0xb1, 0x16, 0x00, 0x00, + // 2415 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x6f, 0xe3, 0xc6, + 0xf5, 0x5f, 0x49, 0x94, 0x25, 0x3d, 0x51, 0x12, 0x3d, 0xde, 0xb5, 0x65, 0xc5, 0xc1, 0x7a, 0x99, + 0xec, 0x37, 0x8e, 0x93, 0xac, 0xbe, 0x71, 0x2e, 0x6d, 0x90, 0x14, 0xd0, 0xca, 0x72, 0xac, 0xad, + 0x2d, 0xa9, 0x94, 0xbc, 0x41, 0x8a, 0x02, 0xc4, 0x58, 0x1a, 0x4b, 0x44, 0xc4, 0x1f, 0x21, 0x47, + 0xbb, 0x36, 0x82, 0xb6, 0x40, 0xff, 0x81, 0x1e, 0xfa, 0xaf, 0xf4, 0xd6, 0xde, 0x7a, 0xed, 0xa5, + 0xed, 0xb1, 0xd7, 0x02, 0x45, 0x0f, 0xfd, 0x13, 0x0a, 0x14, 0x6f, 0x86, 0xa4, 0x48, 0x59, 0x72, + 0xd1, 0x43, 0x4f, 0x36, 0xdf, 0xfb, 0xcc, 0x9b, 0x79, 0xbf, 0xdf, 0x13, 0xa8, 0xe3, 0xb9, 0xc5, + 0x1c, 0xfe, 0xc2, 0xf3, 0x5d, 0xee, 0x92, 0xc2, 0xdc, 0x75, 0x3d, 0xdf, 0x1b, 0x37, 0x0e, 0xa6, + 0xae, 0x3b, 0x9d, 0xb3, 0x26, 0xf5, 0xac, 0x26, 0x75, 0x1c, 0x97, 0x53,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 0xef, 0x73, 0xd7, 0x23, 0xef, 0x41, 0x85, 0xdd, 0x72, + 0xe6, 0x3b, 0x74, 0x6e, 0xa2, 0xd2, 0xc2, 0xf1, 0x45, 0x43, 0x8d, 0x88, 0xe7, 0x7c, 0x3e, 0x26, + 0x47, 0xa0, 0xc5, 0xa6, 0x8a, 0xac, 0xba, 0x25, 0x0c, 0x55, 0x8d, 0x0c, 0x15, 0x1a, 0x35, 0xd6, + 0xb4, 0x90, 0xd4, 0xf4, 0x1f, 0x19, 0x50, 0x45, 0x90, 0xb2, 0xc0, 0x73, 0x9d, 0x80, 0x11, 0x02, + 0x59, 0x6b, 0x22, 0xf4, 0x2c, 0x09, 0x9f, 0x67, 0xad, 0x09, 0x3e, 0xd2, 0x9a, 0x98, 0xd7, 0x77, + 0x9c, 0x05, 0x42, 0x07, 0xd5, 0x28, 0x58, 0x93, 0x97, 0xf8, 0x49, 0x9e, 0x83, 0x2a, 0xee, 0xc7, + 0x0c, 0x61, 0x41, 0x20, 0x13, 0x4c, 0x1c, 0x2c, 0x23, 0xbd, 0x25, 0xc9, 0xe4, 0x05, 0xec, 0x24, + 0x61, 0xa6, 0xe3, 0x9d, 0xbc, 0x0d, 0x66, 0x42, 0xe3, 0x92, 0x74, 0x69, 0x88, 0xec, 0x09, 0x06, + 0xf9, 0x38, 0x8c, 0x80, 0x08, 0x2f, 0xe1, 0x79, 0x01, 0xd7, 0x12, 0xf0, 0x81, 0x40, 0x3f, 0x87, + 0x6a, 0xc0, 0xfc, 0x37, 0xcc, 0x37, 0x6d, 0x16, 0x04, 0x74, 0xca, 0x84, 0x09, 0x4a, 0x46, 0x45, + 0x52, 0x2f, 0x25, 0x51, 0xd7, 0xa0, 0x7a, 0xe9, 0x3a, 0x16, 0x77, 0xfd, 0xd0, 0xab, 0xfa, 0x6f, + 0x15, 0x00, 0xd4, 0x7e, 0xc8, 0x29, 0x5f, 0x04, 0x6b, 0xeb, 0x06, 0x5a, 0x23, 0xbb, 0xd1, 0x1a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fd, 0x3e, 0x60, 0x14, 0xc2, 0x3d, 0xf6, 0xf8, + 0x39, 0x14, 0xa3, 0xd1, 0x9c, 0xa8, 0x50, 0xbc, 0xe8, 0xf7, 0x07, 0x66, 0xff, 0x6a, 0xa4, 0x3d, + 0x22, 0x65, 0x28, 0x88, 0xaf, 0x6e, 0x4f, 0xcb, 0x1c, 0x07, 0x50, 0x8a, 0x27, 0x73, 0x52, 0x81, + 0x52, 0xb7, 0xd7, 0x1d, 0x75, 0x5b, 0xa3, 0xce, 0xa9, 0xf6, 0x88, 0x3c, 0x81, 0xed, 0x81, 0xd1, + 0xe9, 0x5e, 0xb6, 0xbe, 0xea, 0x98, 0x46, 0xe7, 0x75, 0xa7, 0x75, 0xd1, 0x39, 0xd5, 0x32, 0x84, + 0x40, 0xf5, 0x7c, 0x74, 0xd1, 0x36, 0x07, 0x57, 0x2f, 0x2f, 0xba, 0xc3, 0xf3, 0xce, 0xa9, 0x96, + 0x45, 0x99, 0xc3, 0xab, 0x76, 0xbb, 0x33, 0x1c, 0x6a, 0x39, 0x02, 0xb0, 0x75, 0xd6, 0xea, 0x22, + 0x58, 0x21, 0x3b, 0x50, 0xeb, 0xf6, 0x5e, 0xf7, 0xbb, 0xed, 0x8e, 0x39, 0xec, 0x8c, 0x46, 0x48, + 0xcc, 0x1f, 0xff, 0x33, 0x03, 0x95, 0xd4, 0x70, 0x4f, 0xf6, 0x60, 0x07, 0x8f, 0x5c, 0x19, 0x78, + 0x53, 0x6b, 0xd8, 0xef, 0x99, 0xbd, 0x7e, 0xaf, 0xa3, 0x3d, 0x22, 0xef, 0xc0, 0xde, 0x0a, 0xa3, + 0x7f, 0x76, 0xd6, 0x3e, 0x6f, 0xe1, 0xe3, 0x49, 0x03, 0x76, 0x57, 0x98, 0xa3, 0xee, 0x65, 0x07, + 0xb5, 0xcc, 0x92, 0x43, 0x38, 0x58, 0xe1, 0x0d, 0xbf, 0xee, 0x74, 0x06, 0x31, 0x22, 0x47, 0x9e, + 0xc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11, 0xfa, 0x81, 0xb8, + 0x70, 0x97, 0x3c, 0x16, 0x17, 0x46, 0x80, 0xa6, 0x27, 0xe5, 0xff, 0x02, 0xc8, 0xf0, 0xa1, 0x5b, + 0x37, 0x36, 0xab, 0xc6, 0x7b, 0x0f, 0x62, 0xd2, 0x06, 0xd5, 0xd7, 0x5e, 0x8e, 0x29, 0xcc, 0x40, + 0x4d, 0xf6, 0x1f, 0xb2, 0xd4, 0x65, 0x4d, 0xb7, 0x6a, 0xbc, 0xbb, 0x81, 0x1b, 0xde, 0x56, 0x17, + 0xb7, 0x11, 0xa2, 0xe1, 0x6d, 0x38, 0x38, 0x34, 0x03, 0x09, 0xbb, 0xde, 0x12, 0xbf, 0x6e, 0x7f, + 0xf6, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x8c, 0x0d, 0xec, 0x14, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/looprpc/client.proto b/looprpc/client.proto index e61e263c95..3f52b0dc58 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -153,6 +153,16 @@ message LoopOutRequest { */ string dest = 2; + /** + Exact amount in satoshis to send to 'dest'. Optional. + */ + int64 dest_amount = 14; + + /** + Base58 encoded change address for the swap. + */ + string change_addr = 15; + /** Maximum off-chain fee in sat that may be paid for swap payment to the server. This limit is applied during path finding. Typically this value is taken @@ -571,6 +581,11 @@ message QuoteRequest { */ int64 amt = 1; + /** + If change output will be added. This is needed to send exact amount. + */ + bool with_change = 5; + /** The confirmation target that should be used either for the sweep of the on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index cb3362cfd5..9968ce37b0 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -148,6 +148,14 @@ "type": "string", "format": "int64" }, + { + "name": "with_change", + "description": "*\nIf change output will be added. This is needed to send exact amount.", + "in": "query", + "required": false, + "type": "boolean", + "format": "boolean" + }, { "name": "conf_target", "description": "*\nThe confirmation target that should be used either for the sweep of the\non-chain HTLC broadcast by the swap server in the case of a Loop Out, or for\nthe confirmation of the on-chain HTLC broadcast by the swap client in the\ncase of a Loop In.", @@ -261,6 +269,14 @@ "type": "string", "format": "int64" }, + { + "name": "with_change", + "description": "*\nIf change output will be added. This is needed to send exact amount.", + "in": "query", + "required": false, + "type": "boolean", + "format": "boolean" + }, { "name": "conf_target", "description": "*\nThe confirmation target that should be used either for the sweep of the\non-chain HTLC broadcast by the swap server in the case of a Loop Out, or for\nthe confirmation of the on-chain HTLC broadcast by the swap client in the\ncase of a Loop In.", @@ -611,6 +627,15 @@ "type": "string", "description": "*\nBase58 encoded destination address for the swap." }, + "dest_amount": { + "type": "string", + "format": "int64", + "description": "*\nExact amount in satoshis to send to 'dest'. Optional." + }, + "change_addr": { + "type": "string", + "description": "*\nBase58 encoded change address for the swap." + }, "max_swap_routing_fee": { "type": "string", "format": "int64", diff --git a/sweep/sweeper.go b/sweep/sweeper.go index c22b8dad83..d0beaa3656 100644 --- a/sweep/sweeper.go +++ b/sweep/sweeper.go @@ -25,8 +25,8 @@ func (s *Sweeper) CreateSweepTx( htlc *swap.Htlc, htlcOutpoint wire.OutPoint, keyBytes [33]byte, witnessFunc func(sig []byte) (wire.TxWitness, error), - amount, fee btcutil.Amount, - destAddr btcutil.Address) (*wire.MsgTx, error) { + amount, destAmount, feeOnlyDest, feeOnlyChange, feeBoth btcutil.Amount, + destAddr, changeAddr btcutil.Address) (*wire.MsgTx, error) { // Compose tx. sweepTx := wire.NewMsgTx(2) @@ -40,16 +40,25 @@ func (s *Sweeper) CreateSweepTx( Sequence: sequence, }) - // Add output for the destination address. - sweepPkScript, err := txscript.PayToAddrScript(destAddr) + destinations, err := deduceDestinations(amount, destAmount, + feeOnlyDest, feeOnlyChange, feeBoth, + destAddr, changeAddr) if err != nil { return nil, err } - sweepTx.AddTxOut(&wire.TxOut{ - PkScript: sweepPkScript, - Value: int64(amount - fee), - }) + // Add outputs. + for _, dst := range destinations { + sweepPkScript, err := txscript.PayToAddrScript(dst.addr) + if err != nil { + return nil, err + } + + sweepTx.AddTxOut(&wire.TxOut{ + PkScript: sweepPkScript, + Value: int64(dst.amount), + }) + } // Generate a signature for the swap htlc transaction. @@ -92,18 +101,49 @@ func (s *Sweeper) CreateSweepTx( // estimator. func (s *Sweeper) GetSweepFee(ctx context.Context, addInputEstimate func(*input.TxWeightEstimator), - destAddr btcutil.Address, sweepConfTarget int32) ( - btcutil.Amount, error) { + destAddr, changeAddr btcutil.Address, sweepConfTarget int32) ( + feeOnlyDest, feeOnlyChange, feeBoth btcutil.Amount, err error) { // Get fee estimate from lnd. feeRate, err := s.Lnd.WalletKit.EstimateFee(ctx, sweepConfTarget) if err != nil { - return 0, fmt.Errorf("estimate fee: %v", err) + return 0, 0, 0, fmt.Errorf("estimate fee: %v", err) + } + + // Calculate feeOnlyDest. + var estOnlyDest input.TxWeightEstimator + if err := addOutput(&estOnlyDest, destAddr); err != nil { + return 0, 0, 0, err + } + addInputEstimate(&estOnlyDest) + feeOnlyDest = feeRate.FeeForWeight(int64(estOnlyDest.Weight())) + + if changeAddr != nil { + // Calculate feeOnlyChange. + var estOnlyChange input.TxWeightEstimator + if err := addOutput(&estOnlyChange, changeAddr); err != nil { + return 0, 0, 0, err + } + addInputEstimate(&estOnlyChange) + feeOnlyChange = feeRate.FeeForWeight(int64(estOnlyChange.Weight())) + + // Calculate feeBoth. + var estBoth input.TxWeightEstimator + if err := addOutput(&estBoth, destAddr); err != nil { + return 0, 0, 0, err + } + if err := addOutput(&estBoth, changeAddr); err != nil { + return 0, 0, 0, err + } + addInputEstimate(&estBoth) + feeBoth = feeRate.FeeForWeight(int64(estBoth.Weight())) } - // Calculate weight for this tx. - var weightEstimate input.TxWeightEstimator - switch destAddr.(type) { + return +} + +func addOutput(weightEstimate *input.TxWeightEstimator, addr btcutil.Address) error { + switch addr.(type) { case *btcutil.AddressWitnessScriptHash: weightEstimate.AddP2WSHOutput() case *btcutil.AddressWitnessPubKeyHash: @@ -113,11 +153,78 @@ func (s *Sweeper) GetSweepFee(ctx context.Context, case *btcutil.AddressPubKeyHash: weightEstimate.AddP2PKHOutput() default: - return 0, fmt.Errorf("unknown address type %T", destAddr) + return fmt.Errorf("unknown address type %T", addr) + } + return nil +} + +const dustOutput = 2020 // FIXME: find the actual value. + +type destination struct { + addr btcutil.Address + amount btcutil.Amount +} + +func deduceDestinations(amount, destAmount, feeOnlyDest, feeOnlyChange, feeBoth btcutil.Amount, + destAddr, changeAddr btcutil.Address) ([]destination, error) { + + if (destAmount != 0) != (changeAddr != nil) { + return nil, fmt.Errorf("provide either both destAmount and changeAddr or none of them") + } + if (feeOnlyChange != 0) != (changeAddr != nil) { + return nil, fmt.Errorf("provide either both feeOnlyChange and changeAddr or none of them") + } + if (feeBoth != 0) != (changeAddr != nil) { + return nil, fmt.Errorf("provide either both feeBoth and changeAddr or none of them") + } + + if changeAddr == nil { + // No change. Just put everything on the main destination address. + return []destination{ + { + addr: destAddr, + amount: amount - feeOnlyDest, + }, + }, nil } - addInputEstimate(&weightEstimate) - weight := weightEstimate.Weight() + changeAmount := amount - destAmount - feeBoth + + if changeAmount > dustOutput { + // Change is large enough. Return tx with 2 outputs. + return []destination{ + { + addr: destAddr, + amount: destAmount, + }, + { + addr: changeAddr, + amount: changeAmount, + }, + }, nil + } + + // If we are here, then changeAmount is below dustOutput so we drop the change. + + if amount-destAmount >= feeOnlyDest { + // We still can send destAmount to destAddr. + return []destination{ + { + addr: destAddr, + amount: destAmount, + }, + }, nil + } + + // We can not send destAmount to destAddr. We have to abandon the idea to + // do it, because we must either send exact amount there or do not send + // at all, because it is likely to be an address of a merchant. To recover + // the funds, send everything to changeAddr which is controlled by us. - return feeRate.FeeForWeight(int64(weight)), nil + return []destination{ + { + addr: changeAddr, + amount: amount - feeOnlyChange, + }, + }, nil } diff --git a/sweep/sweeper_test.go b/sweep/sweeper_test.go new file mode 100644 index 0000000000..0db2424167 --- /dev/null +++ b/sweep/sweeper_test.go @@ -0,0 +1,184 @@ +package sweep + +import ( + "reflect" + "testing" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil" +) + +func TestDeduceDestinations(t *testing.T) { + wpkh := [20]byte{} + addr1, err := btcutil.NewAddressWitnessPubKeyHash(wpkh[:], &chaincfg.MainNetParams) + if err != nil { + t.Fatal(err) + } + wsh := [32]byte{} + addr2, err := btcutil.NewAddressWitnessScriptHash(wsh[:], &chaincfg.MainNetParams) + if err != nil { + t.Fatal(err) + } + + testCases := []struct { + name string + amount, destAmount, feeOnlyDest, feeOnlyChange, feeBoth btcutil.Amount + destAddr, changeAddr btcutil.Address + wantedDestinations []destination + wantError bool + }{ + { + name: "missing changeAddr", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 150, + feeOnlyChange: 150, + feeBoth: 200, + destAddr: addr1, + changeAddr: nil, // Error! + wantError: true, + }, + { + name: "missing feeOnlyChange", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 150, + feeOnlyChange: 0, // Error! + feeBoth: 200, + destAddr: addr1, + changeAddr: addr2, + wantError: true, + }, + { + name: "missing feeBoth", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 150, + feeOnlyChange: 150, + feeBoth: 0, // Error! + destAddr: addr1, + changeAddr: addr2, + wantError: true, + }, + + { + name: "exact amount was not requested", + amount: 1000000, + feeOnlyDest: 150, + destAddr: addr1, + wantedDestinations: []destination{ + { + addr: addr1, + amount: 1000000 - 150, + }, + }, + }, + { + name: "exact amount and change", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 150, + feeOnlyChange: 160, + feeBoth: 200, + destAddr: addr1, + changeAddr: addr2, + wantedDestinations: []destination{ + { + addr: addr1, + amount: 950000, + }, + { + addr: addr2, + amount: 1000000 - 950000 - 200, + }, + }, + }, + { + name: "fee for both outputs is too large, but can send to destAddr", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 50000, + feeOnlyChange: 51000, + feeBoth: 70000, + destAddr: addr1, + changeAddr: addr2, + wantedDestinations: []destination{ + { + addr: addr1, + amount: 950000, + }, + }, + }, + { + name: "fee for both outputs does not left room for change output", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 45000, + feeOnlyChange: 46000, + feeBoth: 50000, + destAddr: addr1, + changeAddr: addr2, + wantedDestinations: []destination{ + { + addr: addr1, + amount: 950000, + }, + }, + }, + { + name: "fee for both outputs makes change output below dust", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 45000, + feeOnlyChange: 46000, + feeBoth: 49990, + destAddr: addr1, + changeAddr: addr2, + wantedDestinations: []destination{ + { + addr: addr1, + amount: 950000, + }, + }, + }, + { + name: "fee for both and for dest is too large, send everything to change address", + amount: 1000000, + destAmount: 950000, + feeOnlyDest: 51000, + feeOnlyChange: 52000, + feeBoth: 53000, + destAddr: addr1, + changeAddr: addr2, + wantedDestinations: []destination{ + { + addr: addr2, + amount: 948000, + }, + }, + }, + } + + for _, tc := range testCases { + gotDestinations, err := deduceDestinations( + tc.amount, tc.destAmount, tc.feeOnlyDest, tc.feeOnlyChange, tc.feeBoth, + tc.destAddr, tc.changeAddr, + ) + + if tc.wantError { + if err == nil { + t.Errorf("case %q: wanted error, but there is no error", tc.name) + } + continue + } + + if err != nil { + t.Errorf("case %q: failed: %v", tc.name, err) + continue + } + + if !reflect.DeepEqual(tc.wantedDestinations, gotDestinations) { + t.Errorf("case %q: wanted %v, got %v", tc.name, tc.wantedDestinations, gotDestinations) + } + } +}