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

Function default_lease_rates

plugins/funder_policy.c:114–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114struct lease_rates *
115default_lease_rates(const tal_t *ctx)
116{
117 struct lease_rates *rates = tal(ctx, struct lease_rates);
118
119 /* Default basis is .65%, (7.8% APR) */
120 rates->lease_fee_basis = 65;
121 /* 2000sat base rate */
122 rates->lease_fee_base_sat = 2000;
123 /* Max of 100,000ppm (10%) */
124 rates->channel_fee_max_proportional_thousandths = 100;
125 /* Max of 5000sat */
126 rates->channel_fee_max_base_msat = 5000000;
127
128 /* Let's set our default max weight to two inputs + an output
129 * (use helpers b/c elements). We're mainly taproot now. */
130 rates->funding_weight
131 = 2 * bitcoin_tx_input_weight(false, bitcoin_tx_input_witness_weight(UTXO_P2TR))
132 + bitcoin_tx_output_weight(BITCOIN_SCRIPTPUBKEY_P2WPKH_LEN);
133
134 return rates;
135}
136
137char *funder_check_policy(const struct funder_policy *policy)
138{

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 3

bitcoin_tx_input_weightFunction · 0.85
bitcoin_tx_output_weightFunction · 0.85

Tested by

no test coverage detected