MCPcopy Create free account
hub / github.com/ElementsProject/lightning / default_lease_rates

Function default_lease_rates

plugins/funder_policy.c:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102struct lease_rates *
103default_lease_rates(const tal_t *ctx)
104{
105 struct lease_rates *rates = tal(ctx, struct lease_rates);
106
107 /* Default basis is .65%, (7.8% APR) */
108 rates->lease_fee_basis = 65;
109 /* 2000sat base rate */
110 rates->lease_fee_base_sat = 2000;
111 /* Max of 100,000ppm (10%) */
112 rates->channel_fee_max_proportional_thousandths = 100;
113 /* Max of 5000sat */
114 rates->channel_fee_max_base_msat = 5000000;
115
116 /* Let's set our default max weight to two inputs + an output
117 * (use helpers b/c elements) */
118 rates->funding_weight
119 = 2 * bitcoin_tx_simple_input_weight(false)
120 + bitcoin_tx_output_weight(BITCOIN_SCRIPTPUBKEY_P2WPKH_LEN);
121
122 return rates;
123}
124
125char *funder_check_policy(const struct funder_policy *policy)
126{

Callers 6

parse_lease_ratesFunction · 0.85
option_channel_baseFunction · 0.85
option_lease_fee_baseFunction · 0.85
option_lease_fee_basisFunction · 0.85
option_lease_weight_maxFunction · 0.85

Calls 2

bitcoin_tx_output_weightFunction · 0.85

Tested by

no test coverage detected