What is SolGate?
SolGate is a minimal HTTP 402 payment layer. Add a configurable fee on every paid request and route it into a buyback vault — converting real usage into real buy pressure.
Quickstart + configuration
SolGate is a minimal HTTP 402 payment layer. Add a configurable fee on every paid request and route it into a buyback vault — converting real usage into real buy pressure.
// Payment split math (example)
basePrice = 0.01 USDC
feeBps = 50 // 0.50%
fee = basePrice * (feeBps / 10_000) = 0.00005 USDC
merchant = basePrice - fee = 0.00995 USDCnpm i solgate
# or
pnpm add solgateimport express from "express";
import { solgate } from "solgate";
const app = express();
app.get(
"/api/pro",
solgate({
merchant: {
address: "MERCHANT_WALLET",
priceUSDC: 0.01
},
fee: {
bps: 50,
destination: "BUYBACK_VAULT_WALLET"
}
}),
async (req, res) => {
res.json({ ok: true });
}
);Minimal config you need to run SolGate.
type SolGateConfig = {
merchant: {
address: string; // merchant destination address
priceUSDC: number; // base price per request
};
fee: {
bps: number; // basis points (e.g. 50 = 0.50%)
destination: string; // buyback vault / treasury address
};
};
// Example
solgate({
merchant: {
address: "MERCHANT_WALLET",
priceUSDC: 0.01
},
fee: {
bps: 50,
destination: "BUYBACK_VAULT_WALLET"
}
});SolGate routes fee revenue to a vault address. Buybacks can be run on a schedule (cron) or manually — publish receipts either way.
// buyback-bot pseudocode
// 1) read vault USDC balance
// 2) if balance >= MIN_SWAP:
// - swap USDC -> target token via DEX aggregator
// - send bought tokens to burn/treasury
// 3) log tx hash + amount for receiptsDoes this create sell pressure?
No transfer taxes. Fees come from paid usage, then can be swapped into buybacks.
Can any project use it?
Yes. They set their vault + fee parameters in config.
Do buybacks have to be automatic?
No. You can run scheduled buybacks or manual buybacks with public receipts.