Strata
Strataは、Solana 上に構築されたトークンをローンチするためのプロトコルです。 Strata を使用して、ソーシャルトークンから daoおよびgamefiトークンに至るまで、あらゆる種類の代替可能トークンをローンチできます。 また、固定価格制の仕組みを採用しているものとStrataの組み合わせにより、Metaplex CandyMachineのような動的な価格設定の仕組みを構築できます。
より詳細なドキュメントはこちらから入手できます。Strata LaunchpadでGUIの使用も可能です。
フルマネージドトークンの作成方法
フルマネージドStrataトークンは、流動性がプロトコルによって管理されるトークンです。その結果、プールや流動性プロバイダーを必要とせずに、すぐに取引可能なトークンを取得できます。 フルマネージドトークンは、metaplexトークンのメタデータと関連するボンディングカーブを、持つ通常のsplトークンです。 ボンディングカーブは、そのトークンの流動性、価格設定、および供給を管理します。
Press </> button to view full source
import {
  SplTokenBonding,
  ExponentialCurveConfig,
} from "@strata-foundation/spl-token-bonding";
import * as anchor from "@project-serum/anchor";
import { NATIVE_MINT } from "@solana/spl-token";
(async () => {
  const provider = anchor.getProvider();
  const tokenBondingSdk = await SplTokenBonding.init(provider);
  // Price = 0.01 * sqrt(Supply)
  const curve = await tokenBondingSdk.initializeCurve({
    config: new ExponentialCurveConfig({
      c: 0.01,
      b: 0,
      pow: 1,
      frac: 2,
    }),
  });
  const { tokenBonding, baseMint, targetMint } =
    await tokenBondingSdk.createTokenBonding({
      curve,
      baseMint: NATIVE_MINT,
      targetMintDecimals: 2,
      buyBaseRoyaltyPercentage: 5,
      buyTargetRoyaltyPercentage: 5,
    });
  console.log(
    `You can use ${baseMint.toBase58()} to buy ${targetMint.toBase58()} using the bonding curve at address ${tokenBonding.toBase58()}`
  );
})();
// Price = 0.01 * sqrt(Supply)
const curve = await tokenBondingSdk.initializeCurve({
  config: new ExponentialCurveConfig({
    c: 0.01,
    b: 0,
    pow: 1,
    frac: 2,
  }),
});
const { tokenBonding } = await tokenBondingSdk.createTokenBonding({
  curve,
  baseMint: NATIVE_MINT,
  targetMintDecimals: 2,
  buyBaseRoyaltyPercentage: 5,
  buyTargetRoyaltyPercentage: 5,
});
トークンの売買方法
Press </> button to view full source
import { SplTokenBonding } from "@strata-foundation/spl-token-bonding";
import * as anchor from "@project-serum/anchor";
(async () => {
  const provider = anchor.getProvider();
  const tokenBondingSdk = await SplTokenBonding.init(provider);
  await tokenBondingSdk.buy({
    tokenBonding: new PublicKey("..."),
    baseAmount: 0.01, // Amount of the baseMint from create token to use for this purchase.
    slippage: 0.05,
  });
  await tokenBondingSdk.buy({
    tokenBonding: new PublicKey("..."),
    desiredTargetAmount: 0.01, // Purchase instead using the amount of targetMint you want to receive
    slippage: 0.05,
  });
})();
await tokenBondingSdk.buy({
  tokenBonding: new PublicKey("..."),
  baseAmount: 0.01, // Amount of the baseMint from create token to use for this purchase.
  slippage: 0.05,
});
await tokenBondingSdk.buy({
  tokenBonding: new PublicKey("..."),
  desiredTargetAmount: 0.01, // Purchase instead using the amount of targetMint you want to receive
  slippage: 0.05,
});
Press </> button to view full source
import { SplTokenBonding } from "@strata-foundation/spl-token-bonding";
import * as anchor from "@project-serum/anchor";
(async () => {
  const provider = anchor.getProvider();
  const tokenBondingSdk = await SplTokenBonding.init(provider);
  await tokenBondingSdk.sell({
    tokenBonding: new PublicKey("..."),
    targetAmount: 0.01, // Amount of the targetMint to sell off
    slippage: 0.05,
  });
})();
await tokenBondingSdk.sell({
  tokenBonding: new PublicKey("..."),
  targetAmount: 0.01, // Amount of the targetMint to sell off
  slippage: 0.05,
});
流動性のブートストラップ方法
Strata は、供給を手動で管理したい場合にトークンを販売することもできます。これは、トークンをdexにリストする前の流動性のブートストラップに役立ちますこれらの詳細については、こちらを確認するか、Strata Launchpadで独自のものをローンチできます。
Press </> button to view full source
import { MarketplaceSdk } from "@strata-foundation/marketplace-sdk";
import * as anchor from "@project-serum/anchor";
(async () => {
  const provider = anchor.getProvider();
  const marketplaceSdk = await MarketplaceSdk.init(provider);
  const { tokenBonding, targetMint } =
    await marketplaceSdk.createLiquidityBootstrapper({
      baseMint: NATIVE_MINT,
      startPrice: 0.05,
      minPrice: 0.01,
      interval: 5 * 60 * 60,
      maxSupply: 100,
      bondingArgs: {
        targetMintDecimals: 0,
      },
    });
})();
const { tokenBonding, targetMint } =
  await marketplaceSdk.createLiquidityBootstrapper({
    baseMint: NATIVE_MINT,
    startPrice: 0.05,
    minPrice: 0.01,
    interval: 5 * 60 * 60,
    maxSupply: 100,
    bondingArgs: {
      targetMintDecimals: 0,
    },
  });
その他参考資料
- Typescript Client Documentation - Strataトークンを作成および管理するためのライブ コード例
 - Strata Launchpad - GUIを使用してトークンをローンチする