Skip to content

BM-2410: Order generator address rotation#1613

Open
capossele wants to merge 31 commits intomainfrom
angelo/rotate-address
Open

BM-2410: Order generator address rotation#1613
capossele wants to merge 31 commits intomainfrom
angelo/rotate-address

Conversation

@capossele
Copy link
Contributor

@capossele capossele commented Feb 6, 2026

Adds key rotation support to the order generator, allowing it to cycle through a set of derived wallet addresses at a configurable interval. This prevents long-running order activity from being easily linked to a single address.

  • Key derivation (derivation.rs): BIP-39/BIP-32 key derivation from a mnemonic, producing a funding key (index 0) and N rotation keys (indices 1..N)
  • Indexer integration (indexer.rs, indexer_client.rs): Tracks open requests per address to determine when it's safe to rotate (i.e., no pending requests)
  • Rotation logic (rotation.rs, main.rs): Orchestrates the rotation cycle, waits for outstanding requests to settle, sweeps funds back to the funding key, then activates the next key
  • Infra (order-generator.ts, index.ts): Updates Pulumi infra to wire up the new mnemonic/rotation config;

@github-actions github-actions bot changed the title Order generator address rotation and simplified config BM-2410: Order generator address rotation and simplified config Feb 6, 2026
@linear
Copy link

linear bot commented Feb 6, 2026

@capossele capossele changed the title BM-2410: Order generator address rotation and simplified config BM-2410: Order generator address rotation Feb 20, 2026
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: in a follow up PR, these structs should be merged with the indexer one, to avoid code repetition and desync risks (already happening for the aggregation one)

@capossele capossele marked this pull request as ready for review February 24, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant