File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -688,7 +688,25 @@ func (m *Manager) UpsertAssetBuyOffer(offer BuyOffer) error {
688688 return nil
689689}
690690
691- // BuyOrder is a struct that represents a buy order.
691+ // BuyOrder instructs the RFQ (Request For Quote) system to request a quote from
692+ // a peer for the acquisition of an asset.
693+ //
694+ // The normal use of a buy order is as follows:
695+ // 1. Alice, operating a wallet node, wants to receive a Tap asset as payment
696+ // by issuing a Lightning invoice.
697+ // 2. Alice has an asset channel established with Bob's edge node.
698+ // 3. Before issuing the invoice, Alice needs to agree on an exchange rate with
699+ // Bob, who will facilitate the asset transfer.
700+ // 4. To obtain the best exchange rate, Alice creates a buy order specifying
701+ // the desired asset.
702+ // 5. Alice's RFQ subsystem processes the buy order and sends buy requests to
703+ // relevant peers to find the best rate. In this example, Bob is the only
704+ // available peer.
705+ // 6. Once Bob provides a satisfactory quote, Alice accepts it.
706+ // 7. Alice issues the Lightning invoice, which Charlie will pay.
707+ // 8. Instead of paying Alice directly, Charlie pays Bob.
708+ // 9. Bob then forwards the agreed amount of the Tap asset to Alice over their
709+ // asset channel.
692710type BuyOrder struct {
693711 // AssetSpecifier is the asset that the buyer is interested in.
694712 AssetSpecifier asset.Specifier
You can’t perform that action at this time.
0 commit comments