6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Solana Agent Kit x Light Protocolで作るエアドロップボット:zk圧縮を使った大量配布設計

Posted at

Solana Agent Kit v2(以下 SAK)を使えば、ZK Compression 対応のエアドロップを簡潔に実装できます。これは従来のループ送金より圧倒的に安価かつ高速で、最大 1000 件の一括送金にも対応可能です。本記事では、sendCompressedAirdrop アクションを使ったエアドロップボットの設計を解説します。

なぜ ZK Compression なのか?

通常の SPL トークン送信では 1 件ごとにトランザクションが必要です。しかし Light Protocol の ZK 圧縮を用いることで、1 件あたり 300 lamports 程度までコストを圧縮できます。これにより、大量配布(例:キャンペーン報酬、ファンギフト)が実用的になります。

セットアップ

npm install @solana-agent-kit/plugin-token
import TokenPlugin from '@solana-agent-kit/plugin-token';

const agent = new SolanaAgentKit(wallet, RPC_URL).use(TokenPlugin);

コア関数の実行

await agent.methods.sendCompressedAirdrop(
  new PublicKey('token-mint-address'), // 例:BONKやJUP
  42, // 送付量
  6, // トークンのdecimals
  recipients, // PublicKey[] 形式
  30000, // Priority fee(任意)
  true // ログ表示
);

補足事項

  • 最大受信者数:1000 件まで
  • 分割処理:15 件ごとに 1 トランザクションでバッチ化されます
  • 推奨 RPC:Helius(圧縮対応)

費用の目安

const cost = getAirdropCostEstimate(recipients.length, 30000);
console.log(`見積コスト: ${cost / 1e9} SOL`);

1,000 人に送っても 0.05〜0.2 SOL 程度です。

よくある用途

  • Discord コミュニティへの感謝還元
  • NFT ミント参加者へのトークン報酬
  • フォロー&RT キャンペーン報酬配布
  • 政治ポジション表明者へのインセンティブ設計(例:思想 NFT と連動)

まとめ

sendCompressedAirdrop を活用すれば、高速・低コスト・安全なエアドロップが誰でも実装可能です。トークン配布を通じたオンチェーンの社会的行動設計にも応用できます。AI やスケジューラと組み合わせれば、定期的な自動送金エージェントにも拡張できます。

6
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?