Skip to content

refactor: move from single market per pmm to multi#22

Merged
lbkolev merged 5 commits intomasterfrom
support-mulitple-markets-per-pmm
Feb 13, 2026
Merged

refactor: move from single market per pmm to multi#22
lbkolev merged 5 commits intomasterfrom
support-mulitple-markets-per-pmm

Conversation

@lbkolev
Copy link
Copy Markdown
Collaborator

@lbkolev lbkolev commented Feb 12, 2026

the pr allows us to specify multiple markets of the same prop AMM during swaps. It also introduces versioned swaps so we can specify both protocol version and swap kind, as some amms offer multiple instructions.

with this pr, this is a valid call:

./target/release/pmm-sim single --amount-in=15000 --pmms=humidifi_Fk,humidifi_DB,humidifi_Av,bisonfi_51F --weights=25,25,40,10 --src-token=USDC --dst-token=WSOL

the swap goes through four different humidifi pools and ends with bisonfi's 51FQwjrvo8J8zXUaKyAznJ5NYpoiTCuqAqCu3HAMB9NZ.

to explicitly specify which pool a swap should take from the list of defined markets (reference cfg/setup.toml) - suffix the pmm name with the market's address - or a substring of the address (as we've done in the example above).

If no explicit address is specified, we'll default to the first one defined in cfg/setup.toml.

@lbkolev lbkolev merged commit e97974c into master Feb 13, 2026
4 checks passed
@lbkolev lbkolev deleted the support-mulitple-markets-per-pmm branch February 13, 2026 08:22
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