Skip to content

[High] Build an adversarial-solver economic simulation test suite #419

Description

@james2177

Description:
Write deterministic simulation tests where adversarial solver strategies play against honest users and solvers over thousands of intents. The strategies are: accept-and-abandon griefing, wash-trading for tier, self-slash to farm the backstop, bid sniping, and exposure stacking. Assert that each strategy's P&L is negative under the current parameters.

Problem Statement & Context:
Parameter choices such as a 10% slash, a 50 USDC minimum bond, and a 1-hour cooldown were made individually. Only a combined simulation shows whether the protocol's incentives actually hold.

Scope & Acceptance Criteria:

  • A strategy framework in Rust tests, with at least 6 adversarial strategies.
  • Output a P&L table, and fail the test if any strategy is profitable.
  • Parameter-sweep mode (ignored by default) that finds the break-even parameters.
  • Write up the results in docs/.
  • Out of scope: off-chain market-price modelling beyond a simple random walk.

Implementation Guidelines:

  1. Key Files/Modules: new intent_settlement/tests/econ_sim.rs, docs/.
  2. Design/Architecture: A seeded RNG for reproducibility.
  3. Edge Cases/Constraints: Runtime (a small default configuration).
  4. Testing: As described in the scope.

Definition of "Done":

  • Suite plus report merged.
  • Reviewed and approved.

Resources:

Complexity: High (200 points)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programhigh (200 pts)Drips Wave complexity: high, 200 pointssecuritySecurity hardening or audit finding

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions