Skip to content

Commit

Permalink
f Discount unendorsed HTLCs to incentivise endorsement
Browse files Browse the repository at this point in the history
  • Loading branch information
carlaKC committed May 26, 2023
1 parent 6e221f8 commit 109765b
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions 04-onion-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@ are calculated as follows:
- `effective_fees` = `fees` - `opportunity_cost`
- otherwise:
- if successfully resolved AND `resolution_time` <= `resolution_period`
- `effective_fees` = `fees`
- `effective_fees` = `fees` * 0.5
- otherwise:
- `effective_fees` = 0

Expand Down Expand Up @@ -1512,12 +1512,26 @@ A peer is classified as having "good" local reputation iff `reputation_revenue`
otherwise the peer's reputation is classified as "neutral".

### Rationale
If a HTLC is endorsed by a peer they have signaled that they expect the HTLC
to resolve honestly, so will be held accountable for the manner in which they
resolve. By contrast, if a HTLC was not endorsed by the upstream peer, it
should not have a negative impact on reputation. In the case where one of
these "unknown" HTLCs succeeds within the reasonable resolution threshold, the
peer is still credited with fees because the HTLC resolved desirably.

A jamming attack can only be achieved with good reputation, as the resources
available to neutral reputation nodes are limited by resource bucketing. If a
node is attacked, it is guaranteed to have been paid at least its
`routing_revenue` over the previous `reputation_window`.

Reputation is only negatively affected if a HTLC was endorsed to help protect
the network's ability to forward "unknown" HTLCs - those from low-activity or
new entrants that may very well be honest, but have not build up good
reputation through a history of consistent, good behavior.

Intuitively if a HTLC is endorsed by a peer they have signaled that they expect
the HTLC to resolve honestly, they should be held accountable for that signal.
By contrast, if a HTLC was not endorsed by the upstream peer, it should not
have a negative impact on reputation. In the case where one of these
"unknown" HTLCs succeeds within the reasonable resolution threshold, the
peer is still credited with fees because the HTLC resolved desirably. This
allows new, unendorsed entrants to slowly build reputation over time. The fee
contribution of unendorsed HTLCs is discounted by 50% to incentivise nodes to
endorse HTLCs.

# Test Vector

Expand Down

0 comments on commit 109765b

Please sign in to comment.