calculateValue

Calculates the current value of this dust token at a specific time.

Algorithm:

  1. Generation Phase (creation → full capacity):

    • Value increases linearly: rate × time_elapsed + initial_value

    • Rate: backing_night_value × generation_decay_rate

    • Cap: backing_night_value × night_dust_ratio

  2. Full Phase (full capacity → backing night destroyed):

    • Value stays constant at cap

  3. Decay Phase (backing night destroyed → empty):

    • Value decreases linearly: cap - (rate × time_since_destroyed)

    • Falls to zero

  4. Empty Phase: Value stays at zero

Note: The full time-phase calculation is not yet implemented; this currently returns the initial value. Full evaluation requires the dust generation info, the backing Night value, and its destruction time.

Return

Current dust value in Specks

Parameters

now

Current time in milliseconds

params

Dust generation parameters