Migration and External AMM
Atomic migration on the final curve purchase, USDC precision conversion, LP locking, donation boundaries, and external constant-product pricing.
Once internal-market Token sale inventory reaches zero, BigShortProtocol-EVM establishes external liquidity using reserved Token + the curve's actual net USDC reserves and starts that Token's independent Short Engine. Migration does not use virtual USDC, mix in funds from other Token curves, or use lending reserves as initial external liquidity.
1. Trigger and Execution Order
| Order | Action | Business result |
|---|---|---|
| 1 | Settle the final purchase | Token sale inventory reaches zero; state becomes Complete |
| 2 | Deliver this purchase's Token and refund excess payment | The transaction initiator receives the refund |
| 3 | Emit internal-market trade and completion events | Record the final internal-market reserve snapshot |
| 4 | Recheck the Token's configuration snapshot and predicted Engine address | Do not switch to a default Profile selected later |
| 5 | Set state to Migrating and validate the main Pair | Check Pair identity, runtime code, reserves, and balances |
| 6 | Transfer 206,900,000 Token and the representable actual USDC amount | Establish actual external-market liquidity |
| 7 | Mint migration LP to the zero address and verify it | Check that all initial LP is held by the zero address |
| 8 | Deploy and initialize the Short Engine | Bind actual Pair reserves and existing lending inventory |
| 9 | Validate bindings and enable main Pair trading | externalTradingEnabled becomes true |
| 10 | Clear the curve's actual USDC balance and record migration | Final state is Migrated |
2. From native18 to Six-Decimal ERC-20 USDC
Native Arc USDC balances and the external-market USDC ERC-20 interface represent the same quote asset with different precisions. The current code uses:
| Scenario | Precision | One USDC |
|---|---|---|
| Internal-market payments, Factory ledger, Engine internal accounting | native18 | 10¹⁸ |
| External Pair's USDC ERC-20 interface | external6 | 10⁶ |
| Conversion factor | — | 10¹² |
Let actual USDC reserves to migrate be
Here,
Ownership of Migration Remainders
Migration removes this curve's full
3. Full-Scale Curve-Completion Example and Three Valuations
Example D: Buying All Initial Inventory at Once, without Tax or Donations
to buy all 793,100,000 Token. Net USDC entering the curve is:
| Item | Exact result |
|---|---|
| Net USDC entering the curve | 12,161.433369060378706681 |
| Token added to the Pair | 206,900,000 Token |
| USDC added to the Pair | 12,161.433369 USDC |
| external6 USDC integer | 12,161,433,369 |
| Migration remainder | 0.000000060378706681 USDC |
These are one-shot examples with a defined initial baseline, not a promise that every sequence of buys and sells accumulates exactly the same smallest-unit result. Per-trade integer rounding and the exact-budget entry point can produce differences.
Distinguish the Curve Endpoint, Actual External Values, and Ideal Anchors
| Metric | Value in this example | Purpose |
|---|---|---|
| Internal-market virtual USDC after the final trade | 16,453.433369060378706681 | Virtual reserve record at the end of the internal market |
| Virtual Token at the internal-market endpoint | 279,900,000 | Virtual reserve record at the end of the internal market |
| Protocol market cap at the internal-market endpoint | 58,783.256052377201524405 USDC | Calculated from internal-market virtual reserves |
| Actual initial external-market USDC | 12,161.433369 | Actual Pair funds |
| Actual initial external-market Token | 206,900,000 | Actual Pair funds |
| Actual initial external-market protocol market cap | 58,779.281628806186563557 USDC | actualStartMarketCap |
| Fixed ideal migration USDC parameter | 12,161.433370 | Risk-model parameter, not a mandatory transfer amount |
| Fixed ideal migration market cap | 58,779.281633639439342677 USDC | startMarketCap, the anchor for risk / margin curves |
The actual initial external-market price is approximately 0.000058779281628806186564 USDC/Token. Current parameters do not enforce exact smallest-unit continuity of marginal prices across migration; internal virtual reserves and actual migration reserves are distinct values.
Fixed ideal anchors provide a reproducible risk-model baseline; actual Pair reserves determine spot prices, debt buyback costs, and every executed swap. Do not describe the model parameter 12,161.433370 USDC as funds that every migration must receive.
4. Pair Pre-Creation, Donations, and Contamination Protection
Which Pre-Existing States Are Accepted?
At the start of migration:
- The Pair's Token reserve must be 0.
- The Pair's actual Token balance must be 0.
- Total LP supply must be 0; previously issued LP held by others must not exist.
- The Pair's USDC reserve must not exceed its actual USDC balance.
- Pair address, constituent tokens, associated venue, and code identity must pass Profile validation.
After migration transfers, the actual USDC increase is checked. After LP minting, the Token reserve must equal the migration allocation, and the USDC reserve must equal actual USDC balance before migration + USDC added in this migration. A mismatch triggers PairContaminated or the applicable validation error and reverts.
Checking a configuration snapshot goes beyond checking a version number. Migration revalidates code hashes and relationships for the Engine deployer, Engine implementation, and venue Factory/Router, checks the Engine parameter hash and Oracle configuration, derives the expected Pair address from its initialization code hash, and validates the actual Pair through its runtime code hash. If deployer or implementation runtime code differs from the registered value, the final buy reverts atomically instead of silently using the changed implementation.
These rules do not guarantee acceptance of donations of any size; integer reserve ranges, LP minting, and other execution constraints still apply. Donations not yet recorded in reserves may also be removed by normal Pair operations before migration, so the balance at execution is what matters.
Where Do Donations Go?
Let the pre-existing USDC balance at migration be
The curve still adds a fixed 206,900,000 Token. USDC donations retained at migration enter the actual pool, with no refund to the donor or final buyer. They raise the actual starting price and actualStartMarketCap, do not rewrite the fixed ideal migration anchors. A high-price donation at migration does not immediately complete time-weighted capacity release either.
Example E: Retaining an Extra 170 USDC in Example D's Main Pair
| Item | No donation | With an additional 170 USDC donation |
|---|---|---|
| External-market Token reserve | 206,900,000 | 206,900,000 |
| External-market USDC reserve | 12,161.433369 | 12,331.433369 |
| Actual initial protocol market cap | 58,779.281628806186563557 | 59,600.934601256645722571 |
| Fixed ideal migration market cap | 58,779.281633639439342677 | 58,779.281633639439342677 |
Transferring USDC directly to the Factory is different: it does not automatically increase a Token's realNativeReserves and therefore does not automatically become that Token's migration funds. Distinguish curve ledger balances, the Factory's total balance, and actual Pair balances.
5. Final Destinations of LP and Lending Inventory
Ordinary Holders Cannot Redeem Any Initial LP
It also requires LP minted in this operation to be greater than 0 and total LP to exceed the liquidity amount returned by this call, accounting for V2's initial minimum-liquidity structure. Neither the creator, operators, protocol wallets, nor the final buyer receives this migration LP.
Here, burning LP means LP is held by the zero address and cannot be retrieved and redeemed by ordinary accounts; it does not mean ERC-20 Total supply becomes 0, nor that Token in the Pair is burned. The migration check concerns the initial instant and does not establish that liquidity can never be added or other LP minted in the external AMM later.
Lending Reserves Remain Independent
The predicted Engine address already holds 199,861,071 Token. Migration only deploys and initializes the Engine; it does not mint again or transfer this principal into the Pair. Initialization reads actual Pair reserves and tracks available lending principal in a separate ledger.