Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
02ec9f6
rfqmsg: add AssetRateLimit TLV 29 wire field to request
jtobin Mar 23, 2026
3220947
rfqmsg+rfq: surface min fill and rate limit fields
jtobin Mar 23, 2026
de0f36c
rfq+rpcserver: add proto fields, RPC marshalling, and reject codes
jtobin Mar 23, 2026
ef5578b
rfq: enforce rate bound and min fill in VerifyAcceptQuote
jtobin Mar 23, 2026
46c63d2
itest: log min fill and rate limit in portfolio pilot
jtobin Mar 23, 2026
26df44b
rfqmsg+rfq: add tests for limit-order constraints
jtobin Mar 23, 2026
8df1ad3
itest+rfqmsg: add integration tests for limit-order constraints
jtobin Mar 23, 2026
dd6e20a
rfqmsg+rfq: address review findings for limit-order constraints
jtobin Mar 23, 2026
693ab07
multi: fix lint and itest failures
jtobin Apr 3, 2026
194d0c1
docs: add release note
jtobin Apr 3, 2026
211a8d8
rfqmsg: add execution policy type and wire encoding
jtobin Mar 25, 2026
eb8b36f
rfqmsg+rfq: surface execution policy through orders and negotiator
jtobin Mar 25, 2026
42ed924
rfq: add FOK reject code and enforcement in VerifyAcceptQuote
jtobin Mar 25, 2026
78c650f
rfq+rpcserver: add execution policy proto field and RPC unmarshal
jtobin Mar 25, 2026
194dac4
rfqmsg: add unit and property tests for execution policy
jtobin Mar 25, 2026
3e46b47
rfq: add TestCheckFOK for FOK enforcement
jtobin Mar 25, 2026
8eeaaff
itest: add execution policy integration tests
jtobin Mar 25, 2026
0b222f6
rfqmsg+rfq+rpcserver: address review findings for execution policy
jtobin Mar 25, 2026
ba96c91
rfqmsg+itest: fix execution-policy build errors
jtobin Apr 3, 2026
8b18f7c
rfq+rfqmsg: use NewBigIntFixedPoint helper, treat wire 0 as None
jtobin Apr 3, 2026
b20fcee
docs: add release note
jtobin Apr 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ cmd/tapd/tapd
/itest/custom_channels/*.log.*

/docs/examples/basic-price-oracle/basic-price-oracle
/docs/examples/basic-portfolio-pilot/basic-portfolio-pilot
basic-portfolio-pilot

# Test binary, built with `go test -c`
*.test
Expand Down
14 changes: 12 additions & 2 deletions docs/examples/basic-portfolio-pilot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,19 @@ func (p *RpcPortfolioPilotServer) ResolveRequest(_ context.Context,
var hint *portfoliopilotrpc.AssetRate
switch r := req.GetRequest().(type) {
case *portfoliopilotrpc.ResolveRequestRequest_BuyRequest:
hint = r.BuyRequest.GetAssetRateHint()
br := r.BuyRequest
hint = br.GetAssetRateHint()
log.Printf("ResolveRequest buy: max=%d min=%d "+
"rate_limit=%v", br.GetAssetMaxAmount(),
br.GetAssetMinAmount(),
br.GetAssetRateLimit())
case *portfoliopilotrpc.ResolveRequestRequest_SellRequest:
hint = r.SellRequest.GetAssetRateHint()
sr := r.SellRequest
hint = sr.GetAssetRateHint()
log.Printf("ResolveRequest sell: max=%d min=%d "+
"rate_limit=%v", sr.GetPaymentMaxAmount(),
sr.GetPaymentMinAmount(),
sr.GetAssetRateLimit())
default:
return nil, fmt.Errorf("unknown request type: %T", r)
}
Expand Down
36 changes: 36 additions & 0 deletions docs/release-notes/release-notes-0.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@
**Note:** For full functionality, it is highly recommended to start LND with
the `--store-final-htlc-resolutions` flag enabled, which is disabled by default.

- [Limit-Order Constraints](https://github.com/lightninglabs/taproot-assets/pull/2048):
RFQ buy and sell orders can now carry explicit limit-price bounds
(`asset_rate_limit`) and minimum fill sizes (`asset_min_amt` /
`payment_min_amt`). Quotes that violate these constraints are rejected
with machine-readable reasons (`RATE_BOUND_MISS`, `MIN_FILL_NOT_MET`).
New fields are optional and backward-compatible; constraint validation
only activates when they are present.

- [Execution Policy](https://github.com/lightninglabs/taproot-assets/pull/2049):
RFQ buy and sell orders can now specify an execution policy: IOC
(Immediate-Or-Cancel, the default) allows partial fills above the
minimum, while FOK (Fill-Or-Kill) requires the full requested amount
or rejects the quote. FOK viability is checked in `VerifyAcceptQuote`
with a new `FOK_NOT_VIABLE` reject code. New fields are optional and
backward-compatible.

## Functional Enhancements

- [Wallet Backup/Restore](https://github.com/lightninglabs/taproot-assets/pull/1980):
Expand Down Expand Up @@ -148,6 +164,19 @@
Add `RemoveMessage` RPC to the auth mailbox service. Receivers can
authenticate with a Schnorr signature to delete their own messages by ID.

- [PR#2048](https://github.com/lightninglabs/taproot-assets/pull/2048):
Add `asset_rate_limit` to `AddAssetBuyOrder` and `AddAssetSellOrder`
requests. Add `asset_min_amt` to buy orders and `payment_min_amt`
to sell orders. Add `asset_rate_limit` and min fill fields to
`PortfolioPilot.ResolveRequest` for constraint forwarding. Add
`RATE_BOUND_MISS` and `MIN_FILL_NOT_MET` to `QuoteRespStatus`.

- [PR#2049](https://github.com/lightninglabs/taproot-assets/pull/2049):
Add `execution_policy` enum (`EXECUTION_POLICY_IOC`,
`EXECUTION_POLICY_FOK`) to `AddAssetBuyOrder` and `AddAssetSellOrder`
requests, and to `PortfolioPilot.ResolveRequest` for constraint
forwarding. Add `FOK_NOT_VIABLE` to `QuoteRespStatus`.

## tapcli Additions

- [Wallet Backup CLI](https://github.com/lightninglabs/taproot-assets/pull/1980):
Expand Down Expand Up @@ -331,6 +360,13 @@
New integration test `testForwardingEventHistory` verifies that forwarding events are
properly logged when routing asset payments.

- [PR#2048](https://github.com/lightninglabs/taproot-assets/pull/2048):
Add unit, property-based, and integration tests for limit-order
constraint fields.

- [PR#2049](https://github.com/lightninglabs/taproot-assets/pull/2049):
Add unit, property-based, and integration tests for execution policy.

## Database

- [forwards table](https://github.com/lightninglabs/taproot-assets/pull/1921):
Expand Down
4 changes: 4 additions & 0 deletions itest/custom_channels/custom_channels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ var testCases = []*ccTestCase{
name: "invoice quote expiry mismatch",
test: testCustomChannelsInvoiceQuoteExpiryMismatch,
},
{
name: "limit constraints",
test: testCustomChannelsLimitConstraints,
},
{
name: "fee",
test: testCustomChannelsFee,
Expand Down
Loading