Skip to content

scalecrx/programs

Repository files navigation

Scale Protocol

Scale includes two on-chain market makers for Solana:

  • Scale AMM: A production-ready AMM with constant-product and exponential curves, virtual liquidity shifts, platform-wide fees, per-pool fee beneficiaries, platform base-token enforcement, and authority handoff.
  • Scale VMM: A pre-graduation market maker that lets creators launch base-token pairs with virtual liquidity and fee beneficiaries, then automatically migrates into Scale AMM once a base-token reserve threshold is reached.

Concepts

AMM

AMMs keep liquidity in reserves and price trades by maintaining an invariant like x * y = k. Scale AMM supports constant-product and exponential curves, adds virtual liquidity shifts to shape the initial price curve, and includes time-decaying fees and sniping protection.

VMM

VMM pairs start with virtual base-token liquidity and real token B reserves. Swaps pay platform and beneficiary fees in the base token immediately. Once the base-token reserves meet the graduation threshold, VMM migrates the full base-token reserves into Scale AMM (no shift), carrying token B reserves and curve selection over so the AMM starts with real liquidity.

Documentation

  • Scale AMM: programs/scale_amm/README.md
  • Scale VMM: programs/scale_vmm/README.md
  • SDK (sibling package): ../sdk/README.md
  • Internal scripts (sibling package): ../utils/scripts/README.md

Build

anchor build

Test

COPYFILE_DISABLE=1 npm install
COPYFILE_DISABLE=1 npm test

Tests enable the test-overrides feature to allow authority overrides in test-only flows.

About

Core on-chain Rust programs and test suite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors