Is possible to distribute fee to holders or charity/marketing wallet like in BSC?

Hello, I would like to ask if is for Solana tokens possible to distribute fee to holders or charity/marketing wallet like in BSC?

I mean for example this.

Thank you for reply.

Hi @mir90 and welcome to the forum! :wave:

It’s absolutely possible to do something like that with Solana, but it might require developing your own smart contract to provide the functionality that you want. The smart contract is what would determine the rules for exactly how tokens are minted and distributed.

1 Like

Ok, and can you show me some source code for this function? I can´t find it.
Thank you

Unfortunately I’m not aware of an existing example that I can give you. I could figure out, but it would take me some investigation on exactly how to do it.

The closest thing I have to a set of example smart contracts is the Solana Program Library but none of those does exactly what you are thinking.

Solana Smart Contracts are a little bit difficult to develop at the moment. I haven’t use Solidity on Ethereum myself, but I believe that it is a much easier experience at the moment than Solana is. This is being worked on by the folks working on Anchor, but Anchor isn’t ready to use yet.

If I were to attempt developing what you describe, it would be by having token holders be able to make a transaction to claim their bonus tokens whenever they want. When they try to claim their bonus tokens, the smart contract would check how long it’s been since they last claimed their bonus, and how many tokens they were holding, to determine how many bonus tokens to mint. It’d be something like that, but there’s a bit more that would go into it.

It’s 100% possible, but it’s not just a super simple example, probably.

1 Like