Skip to content

price algo to be more aggressive #214

@segfault-magnet

Description

@segfault-magnet

Note: this task is only relevant when using Ethereum for DA. EigenDA has fixed pricing.

The block committer today prevents postings whenever prices spike by comparing two moving averages—a long‑term average (LTA) and a short‑term average (STA). Whenever the STA falls below the LTA, the system considers the market “cool” and allows a post.

While this approach generally works, it reacts sluggishly when the LTA itself climbs sharply. Because a simple moving average gives equal weight to all data points, a sudden surge causes the LTA to remain elevated long after prices have retraced. During that lag, the algorithm will accept any price below this inflated LTA—even if the market has already cooled far beneath it.

To tighten that response, we can switch the LTA to a weighted moving average that emphasizes the most recent prices. By assigning heavier weights to newer data, the LTA will climb and fall more rapidly. Alternatively, we could introduce an adaptive decay factor: if the market drops sharply, we temporarily accelerate the LTA’s decay rate so it tracks downward swings more aggressively. In either case, the goal is to preserve the “no‑posting on spikes” safeguard while ensuring the reference price—the LTA—quickly reflects sudden price drops.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions