CounterpartyXCP / counterparty-core

Counterparty Protocol Reference Implementation
http://counterparty.io
MIT License
288 stars 206 forks source link

Gas System #1431

Closed adamkrellenstein closed 1 month ago

adamkrellenstein commented 8 months ago

Effectively make all XCP fees dynamic based on the ratio between the transactions of a given type seen in the last difficulty period and some hard-coded target value. If there are fewer transactions than the target, the fee should be very low (zero?); if there are more, then the fees should start to increase, say logarithmically. We'll want to implement this for #1939 at least; possibly other things.

Note: This will need to be tested carefully.

adamkrellenstein commented 2 months ago

@ouziel-slama let's set a maximum rate that the gas price can change from difficulty period to difficulty period. (Say 2x and .5x)

adamkrellenstein commented 2 months ago

Two important changes:

  1. We should use a two-week moving average rather than sync to the difficulty period with no min/max rate of change
  2. We should build in a way of having a base fee different for each contract type
adamkrellenstein commented 1 month ago

See https://github.com/CounterpartyXCP/counterparty-core/pull/2180