Skip to content

Commit afc154a

Browse files
Merge pull request #905 from lightninglabs/docs-taproot-assets
Update taproot-assets documentation
2 parents f724479 + d4d3d01 commit afc154a

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

docs/taproot-assets/release-notes/release-notes-0.7.0.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
- [An integration test flake was
2727
fixed](https://github.com/lightninglabs/taproot-assets/pull/1651).
2828

29+
- Fixed two send related bugs that would lead to either a `invalid transfer
30+
asset witness` or `unable to fund address send: error funding packet: unable
31+
to list eligible coins: unable to query commitments: mismatch of managed utxo
32+
and constructed tap commitment root` error when sending assets.
33+
The [PR that fixed the two
34+
bugs](https://github.com/lightninglabs/taproot-assets/pull/1741) also
35+
optimized sending to V2 TAP addresses by removing the need for creating
36+
tombstone outputs on a full-value send (by using interactive transfers for V2
37+
addresses).
38+
2939
# New Features
3040

3141
## Functional Enhancements
@@ -81,6 +91,15 @@
8191
tag and also needs to be toggled on via the `channel.noop-htlcs` configuration
8292
option.
8393

94+
- [Two new configuration values were added to improve privacy when using public
95+
or untrusted third-party price
96+
oracles](https://github.com/lightninglabs/taproot-assets/pull/1677):
97+
`experimental.rfq.sendpricehint` controls whether a price hint is queried
98+
from the local price oracle and sent to the peer when requesting a price
99+
quote (opt-in, default `false`). `experimental.rfq.priceoraclesendpeerid`
100+
controls whether the peer's identity public key is sent to the local price
101+
oracle when querying asset price rates.
102+
84103
## RPC Additions
85104

86105
- The [price oracle RPC calls now have an intent, optional peer ID and metadata

docs/taproot-assets/rfq-and-decimal-display.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,42 @@ convert from mSAT to asset units as follows:
208208
`price_in_asset`
209209
* `Y` is the number of asset units per BTC, specified by `price_out_asset`
210210

211+
### Price oracle interaction
212+
213+
```mermaid
214+
sequenceDiagram
215+
actor User
216+
box Seller (user)
217+
participant NodeA as Node A
218+
participant OracleA as Price Oracle A
219+
end
220+
box Buyer (edge node)
221+
participant NodeB as Node B
222+
participant OracleB as Price Oracle B
223+
end
224+
225+
User->>+NodeA: SendPayment
226+
227+
NodeA->>+NodeA: AddAssetSellOrder
228+
229+
NodeA->>+OracleA: Get price rate hint<br/>(QueryAssetRate[type=SALE,intent=PAY_INVOICE_HINT,peer=NodeB])
230+
OracleA-->>-NodeA: Price rate hint
231+
232+
NodeA->>+NodeB: Send sell request with price<br/>rate hint over p2p
233+
234+
NodeB->>+OracleB: Determine actual price<br/>rate using suggested price<br/>(QueryAssetRate[type=PURCHASE,intent=PAY_INVOICE,peer=NodeA])
235+
OracleB-->>-NodeB: Actual price rate
236+
237+
NodeB-->>-NodeA: Return actual price rate
238+
239+
NodeA->>+OracleA: Validate actual price rate<br/>(QueryAssetRate[type=SALE,intent=PAY_INVOICE_QUALIFY,peer=NodeB])
240+
OracleA-->>-NodeA: Approve actual price rate
241+
242+
NodeA->>-NodeA: Send payment over LN using approved actual price rate
243+
244+
NodeA->>-User: Payment result
245+
```
246+
211247
## Buy Order (Receiving via an Invoice)
212248

213249
The buy order covers the second user story: The user wants to get paid, they
@@ -245,6 +281,43 @@ node as:
245281
* `M` is the number of mSAT in a BTC (100,000,000,000), specified by
246282
`price_in_asset`
247283

284+
### Price oracle interaction
285+
286+
```mermaid
287+
sequenceDiagram
288+
actor User
289+
box Buyer (user)
290+
participant NodeA as Node A
291+
participant OracleA as Price Oracle A
292+
end
293+
box Seller (edge node)
294+
participant NodeB as Node B
295+
participant OracleB as Price Oracle B
296+
end
297+
298+
User->>+NodeA: AddInvoice
299+
300+
NodeA->>+NodeA: AddAssetBuyOrder
301+
302+
NodeA->>+OracleA: Get price rate hint<br/>(QueryAssetRate[type=PURCHASE,intent=RECV_PAYMENT_HINT,peer=NodeB])
303+
OracleA-->>-NodeA: Price rate hint
304+
305+
NodeA->>+NodeB: Send buy request with price<br/>rate hint over p2p
306+
307+
NodeB->>+OracleB: Determine actual price<br/>rate using suggested price<br/>(QueryAssetRate[type=SALE,intent=RECV_PAYMENT,peer=NodeA])
308+
OracleB-->>-NodeB: Actual price rate
309+
310+
NodeB-->>-NodeA: Return actual price rate
311+
312+
NodeA->>+OracleA: Validate actual price rate<br/>(QueryAssetRate[type=PURCHASE,intent=RECV_PAYMENT_QUALIFY,peer=NodeB])
313+
OracleA-->>-NodeA: Approve actual price rate
314+
315+
NodeA->>-NodeA: Create invoice using actual price rate
316+
317+
NodeA->>-User: Invoice
318+
```
319+
320+
248321
## Examples
249322

250323
See `TestFindDecimalDisplayBoundaries` and `TestUsdToJpy` in

0 commit comments

Comments
 (0)