Solana has a memo program -
Program - https://github.com/solana-program/memo
Adding memo to a txn - https://solana.com/developers/cookbook/transactions/add-memo
import {
Connection,
Keypair,
LAMPORTS_PER_SOL,
SystemInstruction,
SystemProgram,
Transaction,
sendAndConfirmTransaction
} from "@solana/web3.js";
import { createMemoInstruction } from "@solana/spl-memo";
// Connect to Solana cluster
const connection = new Connection("<http://localhost:8899>", "confirmed");
// Create keypair for the fee payer
const feePayer = Keypair.generate();
// Request and confirm airdrop
const airdropSignature = await connection.requestAirdrop(
feePayer.publicKey,
LAMPORTS_PER_SOL
);
// Get latest blockhash for confirmation
const { blockhash, lastValidBlockHeight } =
await connection.getLatestBlockhash();
await connection.confirmTransaction({
signature: airdropSignature,
blockhash,
lastValidBlockHeight
});
// Create a memo instruction
const memoInstruction = createMemoInstruction("Hello, World!");
const sendSolana = SystemProgram.transfer({
fromPubkey: feePayer.publicKey,
toPubkey: Keypair.generate().publicKey,
lamports: 0.5 * 1000_000_000
})
// Create transaction and add the memo instruction
const transaction = new Transaction().add(sendSolana).add(memoInstruction);
// Sign and send transaction
const transactionSignature = await sendAndConfirmTransaction(
connection,
transaction,
[feePayer]
);
console.log("Transaction Signature: ", transactionSignature);
Required memo extension - https://solana.com/developers/courses/token-extensions/required-memo
You can index a single address and let all the users send funds to the same address.
That way, all you have to do is index a single account on the blockchain and you can accept sol/other tokens from the users.