Skip to main content

AUTOMATED DEPLOYMENT - QUICK START

🚀 ONE TRANSACTION - FULLY AUTOMATED!

DeploymentResult memory result = StrategyDeploymentBatcher(BATCHER_ADDRESS).batchDeployStrategies(
CREATOR_TOKEN_ADDRESS, // Your token
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, // USDC on Base
VAULT_ADDRESS, // Your CreatorOVault
AJNA_FACTORY_OR_ZERO, // Ajna factory (or address(0))
3000, // 0.3% fee tier
SQRT_PRICE_X96, // Initial price (99/1 ratio)
CREATOR_ADDRESS // ⭐ Creator becomes owner
);

DONE!

  • ✅ V3 pool created
  • ✅ CharmAlphaVault deployed
  • ✅ Strategy set
  • ✅ Rebalance called
  • ✅ Creator owns everything
  • NO MANUAL STEPS NEEDED!

🎯 WHO SHOULD BE THE OWNER?

owner: creatorAddress  // The person launching their token vault

Use when: Building a platform where creators own their own vaults

owner: 0x7d429eCbdcE5ff516D6e0a93299cbBa97203f2d3  // Your multisig

Use when: You want centralized control for all creator vaults

Option 3: Platform Contract (Advanced)

owner: platformManagerAddress  // Smart contract that manages creators

Use when: Building complex platform logic


📊 WHAT GETS DEPLOYED:

ContractOwnerNotes
CharmAlphaVaultDeployowner paramImmediate ownership
CreatorCharmStrategyV2owner paramImmediate ownership
AjnaStrategyowner paramImmediate ownership

All ownership is IMMEDIATE - no manual acceptance!


🔢 CALCULATING SQRT_PRICE_X96:

For 99/1 CREATOR/USDC ratio:

// 1 CREATOR = $0.01 (or 100 CREATOR per USDC)
const priceRatio = 100;
const sqrtPrice = Math.sqrt(priceRatio);
const sqrtPriceX96 = BigInt(Math.floor(sqrtPrice * 2**96));

// Adjust for decimals (CREATOR=18, USDC=6)
const decimalAdjustment = 10n ** 6n;
const adjustedSqrtPriceX96 = sqrtPriceX96 * decimalAdjustment;

console.log(adjustedSqrtPriceX96.toString());
// Use this value ☝️

🎉 THAT'S IT!

One transaction. Fully automated. Creator owns everything.

See FULL_AUTOMATION_IMPLEMENTED.md for complete details.