Skip to content

feat: AMM Protocol Swap Fees#19

Closed
lalalune wants to merge 91 commits intomainfrom
feat/amm-swap-fees
Closed

feat: AMM Protocol Swap Fees#19
lalalune wants to merge 91 commits intomainfrom
feat/amm-swap-fees

Conversation

@lalalune
Copy link
Contributor

This PR implements protocol-level swap fees for both EVM and Solana AMMs.

Key changes:

  • EVM: Added treasury/fee config to Router and Market.
  • Solana: Added treasury/fee to Bet state and buy/sell instructions.
  • Optimization: Boxed Solana accounts to avoid stack overflow.
  • Support: Added EVM deploy-amm script and updated test helpers.

dutchiono and others added 24 commits March 12, 2026 14:30
rndrntwrk added a commit that referenced this pull request Mar 20, 2026
29 files from lvr_amm EVM contracts, Solana program, and test.
PM-core contracts (DuelOutcomeOracle, GoldClob, fight_oracle, gold_clob_market) unchanged.
rndrntwrk added a commit that referenced this pull request Mar 20, 2026
Cherry-pick deploy-amm.ts and amm-test-helpers.ts from
feat/amm-swap-fees, updated for hardened interfaces:
- Router constructor now takes 4 params (mUSD, treasury, feeBps, admin)
- Solana create_bet reads fee/treasury from AmmConfig PDA
- Test helpers gain ensureAmmConfig() for protocol config setup
@rndrntwrk rndrntwrk added the duplicate This issue or pull request already exists label Mar 20, 2026
@rndrntwrk rndrntwrk closed this Mar 20, 2026
@rndrntwrk
Copy link
Collaborator

work captured in 29

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

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants