lightninglabs / lightninglabs/taproot-assets
[feature]: Allow end users to receive Taproot Assets without running their own RFQ oracle
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 525
- Forks
- 150
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
**Is your feature request related to a problem? Please describe.**
I believe end-users should not have to run their own RFQ service or oracle to be able to receive Taproot Assets payments over Lightning channels. As of now, they can send assets to their edge node and beyond if the edge node has RFQ set up, but they cannot receive payments.
**Set Up**
In this testing setup we used three nodes using a Taproot Asset and Bitcoin:
Hannah <--> Leo <--> Charlie
USD <--> Edge Node <-> BTC
Hannah's RFQ configuration:
`taproot-assets.experimental.rfq.skipacceptquotepricecheck=true`
Leo's RFQ configuration:
`taproot-assets.experimental.rfq.priceoracleaddress=use_mock_price_oracle_service_promise_to_not_use_on_mainnet`
`taproot-assets.experimental.rfq.mockoraclesatsperasset=1`
Situation A:
Charlie creates a sat-denominated invoice, and Hannah pays it from their node. Her node requests a quote from Leo, she confirms to send the asset, the payment succeeds.
Situation B:
Hannah requests to be paid in a Taproot Asset. Leo pays the invoice, but he is unable to complete the payment:
`Asking peer 03e347d089c071c27680e26299223e80a740cf3e3fc4b4237fa219bb67121a670b for quote to sell assets to pay for invoice over 50000 msats; waiting up to 60s
[litcli] peer 03e347d089c071c27680e26299223e80a740cf3e3fc4b4237fa219bb67121a670b rejected the quote, code: 1, error message: price oracle unavailable`
Situation C:
Hannah requests to be paid in a Taproot Asset. Charlie has sats and pays the invoice, but Leo's node is unable to forward it through the desired channel. The full logs are attached. Excerpt
[2024-08-08_lnd.log](https://github.com/user-attachments/files/16554165/2024-08-08_lnd.log)
:
```
2024-08-08 23:25:43.623 [DBG] RFQS: Handling incoming HTLC, incoming channel ID: 3158705591608868864, outgoing channel ID: 2665057856057245696 (incoming amount: 51000 mSAT, outgoing amount: 50000 mSAT)
2024-08-08 23:25:43.623 [TRC] RFQS: Have inbound policy: false: (interface {})
2024-08-08 23:25:43.623 [TRC] RFQS: Have outbound policy: false: (interface {})
2024-08-08 23:25:43.623 [DBG] RFQS: Failed to find a policy for the HTLC. Resuming.
2024-08-08 23:25:43.623 [TRC] RRPC: Resolving intercepted packet incoming_circuit_key:{chan_id:3158705591608868864} action:RESUME
2024-08-08 23:25:43.625 [TRC] HSWC: Committing fresh circuits: ([]models.CircuitKey) (len=1 cap=1) {
(models.CircuitKey) (Chan ID=2872826:483:0, HTLC ID=0)
```
**Describe the solution you'd like**
If Leo's node identifies itself as an edge node, it should not request a quote from Hannah's node when paying an invoice. It should pay the invoice as if it was a forwarded payment, using the quote requested by Hannah's node at the time of invoice creation. The hop hint is still present in the invoice and should be honored.
**Describe alternatives you've considered**
**Additional context**
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the RFQS handling of incoming HTLCs and the quote flow shown in the logs, then compare the edge-node forwarding path with the invoice-payment path. Review how the price oracle and invoice hop hint are used in the described setup. Done means an end user can receive a Taproot Asset payment without running an RFQ service or oracle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, payments
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100