How It Works
Completely automatic. Buy a hat, it ships via Printify, profits buy tokens, fees get reinvested. Every minute. No manual steps.
The Loop
Buy Hat
You pay 0.25 SOL via Phantom wallet. Order is created and payment is confirmed on-chain.
Profits Buy Token
After the hat cost, remaining SOL is automatically swapped for the token via Bags.
More Hats Sold
More people buy hats. Each sale triggers another token purchase.
More Tokens Bought
Continuous buy pressure from real merchandise sales.
The Product
Step 1: You Pay with Phantom
When you click "Pay with Phantom", the site creates a Solana transaction that transfers 0.25 SOL from your wallet to the payment address. Phantom prompts you to approve it.
const transaction = new Transaction().add(
SystemProgram.transfer({
fromPubkey, // Your wallet
toPubkey, // Payment wallet
lamports // 0.25 SOL in lamports
})
);
// Phantom signs and sends
const { signature } = await window.solana.signAndSendTransaction(transaction);
Once you confirm, the transaction is broadcast to Solana. The site waits for confirmation, then notifies the server that payment is complete.
Step 2: Server Confirms Payment
The server receives the transaction signature and marks your order as paid. This triggers the token purchase automatically in the background.
app.post('/api/orders/:orderId/paid', async (req, res) => {
const order = orders.get(orderId);
order.status = 'paid';
order.txSignature = txSignature;
// Trigger token buy
buyMemecoin(order);
res.json({ success: true });
});
Step 3: Automatic Token Purchase
The server uses the Bags SDK to swap SOL for the token. It gets a quote, creates a swap transaction, signs it with the developer wallet, and executes it on-chain.
async function buyMemecoin(order) {
const sdk = new BagsSDK(BAGS_API_KEY, connection);
// Get swap quote
const quote = await sdk.trade.getQuote({
inputMint: SOL_MINT,
outputMint: MEMECOIN_MINT,
amount: profitLamports,
slippageMode: 'auto'
});
// Execute swap
const swapResult = await sdk.trade.createSwapTransaction({
quoteResponse: quote,
userPublicKey: keypair.publicKey
});
const signature = await signAndSendTransaction(
connection,
swapResult.transaction,
keypair
);
// Swap complete - tokens bought
order.coinBuyTx = signature;
}
Every token purchase is recorded on-chain. You can verify any transaction on Solscan using the signature.
Step 4: Automatic Fee Reinvestment
The Bags token generates trading fees. Every minute, the server automatically claims any accumulated fees and uses them to buy more tokens. This creates additional buy pressure on top of hat sales.
async function claimFeesAndBuyToken() {
// Get all claimable fee positions for our token
const allPositions = await sdk.fee.getAllClaimablePositions(keypair.publicKey);
const targetPositions = allPositions.filter(
position => position.baseMint === MEMECOIN_MINT
);
// Claim fees from each position
for (const position of targetPositions) {
const claimTransactions = await sdk.fee.getClaimTransaction(
keypair.publicKey,
position
);
for (const transaction of claimTransactions) {
await signAndSendTransaction(connection, transaction, keypair);
}
}
// Buy tokens with claimed fees
const quote = await sdk.trade.getQuote({
inputMint: SOL_MINT,
outputMint: MEMECOIN_MINT,
amount: totalClaimedLamports,
slippageMode: 'auto'
});
// Execute swap with claimed fees
await signAndSendTransaction(connection, swapResult.transaction, keypair);
}
// Run every 60 seconds
setInterval(claimFeesAndBuyToken, 60 * 1000);
This runs continuously in the background. Fees from trading activity are never left sitting — they're automatically converted back into buy pressure.
Step 5: Hat Ships Automatically
Once payment is confirmed on-chain, your order is automatically sent to Printify for fulfillment. Printify prints, packs, and ships the hat directly to your address. You'll receive tracking via email. No manual intervention required.
1. You pay 0.25 SOL via Phantom
2. Payment detected automatically (within 30 seconds)
3. Order sent to Printify → hat printed and shipped
4. Profit portion buys tokens automatically
5. Trading fees claimed every 60 seconds
6. Claimed fees buy more tokens
All on-chain. All verifiable. All automatic.
FAQ
Do I need Phantom?
Yes. Get it at phantom.app
Is anything manual?
No. Payment detection, Printify fulfillment, token buys, and fee claiming are all fully automatic.
How long is shipping?
7-14 business days depending on location. Fulfilled by Printify.
Can I see the token buys?
Yes. All transactions are on-chain and verifiable on Solscan.
How often are fees claimed?
Every 60 seconds. Claimed fees are immediately swapped for tokens.
How fast is payment detected?
Within 30 seconds of your Solana transaction confirming.