Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advertise liquidity ads rates #1145

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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: 1 addition & 1 deletion 01-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ The `features` field MUST be padded to bytes with 0s.
* [`...*byte`:`data`]
1. type: 5 (`option_will_fund`)
2. data:
* [`...*16*byte`:`lease_rates`]
* [`...*24*byte`:`lease_rates`]

The optional `networks` indicates the chains the node is interested in.
The optional `remote_addr` can be used to circumvent NAT issues.
Expand Down
10 changes: 9 additions & 1 deletion 07-routing-gossip.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,13 @@ nodes not associated with an already known channel are ignored.
2. types:
1. type: 1 (`option_will_fund`)
2. data:
* [`...*16*byte`:`lease_rates`]
* [`...*24*byte`:`lease_rates`]

1. subtype: `lease_rate`
t-bast marked this conversation as resolved.
Show resolved Hide resolved
2. data:
* [`u16`:`lease_duration`]
* [`u32`:`min_lease_amount_sat`]
* [`u32`:`max_lease_amount_sat`]
* [`u16`:`funding_weight`]
* [`u16`:`lease_fee_basis`]
* [`u32`:`lease_fee_base_sat`]
Expand Down Expand Up @@ -360,7 +362,11 @@ The origin node:
- If it includes `option_will_fund`:
- MUST set `lease_duration` to the number of blocks during which the lease
will be active.
- MUST set `min_lease_amount_sat` and `max_lease_amount_sat` to the minimum
and maximum amount it will contribute at this rate.
Comment on lines +365 to +366
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this actually be enforced? I wonder if this should be "SHOULD"

- SHOULD include one `lease_rate` for each lease duration it supports.
- SHOULD include one `lease_rate` for each amount range it supports.
- MUST NOT include more than ten `lease_rate`s.
- MUST set `lease_fee_base_sat` to the base fee (in satoshi) it will charge.
- MUST set `lease_fee_basis` to the amount it will charge per contributed
satoshi (in basis points, ie 1/10_000).
Expand Down Expand Up @@ -412,6 +418,8 @@ any future fields appended to the end):
- if more than one `type 5` address is announced:
- SHOULD ignore the additional data.
- MUST not forward the `node_announcement`.
- if more than ten `lease_rate`s are included:
- MUST not forward the `node_announcement`.

### Rationale

Expand Down