Two faced Token - Governance plus Utility Token

How can we make a two faced token on Solana like the token should be both a governance and a utility token both like the same token can be used for governance and for do simple transaction or other things, Can some one guide me on this that how to make this, Like how to start to make a token like this

You don’t necessarily need to create a custom token contract in order to use a token for governance and utility.

You mentioned earlier creating your own ERC-20 contract on Solana, but in Solana there already exists the SPL Token program, which can be used to create your own tokens without deploying another contract. These tokens can then be minted, transferred, etc. by sending transactions to the SPL Token program.

SPL tokens are the ecosystem equivalent to ERC-20 on Ethereum. I think Solana is a little different than Ethereum in the way the data flow is designed, though, because everybody uses the same SPL Token program.

After you create your own SPL token, which you can do with the spl-token CLI, you can make your own contracts for using that SPL token for governance and utility. That is where you would make your own contracts: for implementing the governance and utility. But you wouldn’t need another contract for the token itself.

As for how to go about implementing governance, I recommend reading the Tribeca Docs, which gives a great overview of how they are implementing governance, and you could look at their code for how they do that, or just use their governance solution if it works for you!

For implementing utility, it depends on what you want to do.

In summary, you would want to:

  1. Make a new token using the spl-token CLI ( see here )
  2. Create a contract for implementing governance
    • But start by reading up on Tribeca
  3. Create one or more contracts for implementing whatever utility functions you want the token to have maybe

And ask questions if you need more explanation!

Thanks @zicklag for a such a summarized answer thanks things are very much clear now to me and as per utility implementation the things i want to do is to just to deducted some percentages of amount on every transfer and it will be distributed to different wallets, So what i understand is that you are saying that i should deploy a SPL token contract through cli and then use then make a different contract that i will be my own and in which i can use and declare my SPL token contract address and in my own custom contract i can write my business logic for that deployed SPL token transfer function of what i am saying of deducting a certain percentage of amount and send it to different wallet address. Am i now on right path?

Oh, that would require your own token contract I think.

SPL tokens can be transferred with “no strings attached” so-to-speak. You can’t charge a user for transfers of an SPL token, as far as I understand. So if you wanted to charge a kind of tax for every transfer, you would need to use your own token contract that could do that.

The issue is that wallets only support SPL tokens, so if you created your own token contract, that token wouldn’t pop up in existing wallets such as Phantom. Users could still use Phantom, but they would have to use your own web-app’s interface to transfer, and check the balances of your token.

So for your use-case, you would need to make your own token contract. This could be a fork of the existing SPL Token contract with your own modifications if you wanted, though.

I’d say it’d be good to read through the docs here if you haven’t already, and then maybe start reading the docs and source for the SPL Token Program to understand how it works.

Then you could write your own token program similar in concept to the SPL Token program, but with your own modifications for handling the fees.

I guess you would have to do something similar for governance, taking the ideas possibly from Tribeca, but forking it or making your own to make it work with your custom token contract, instead of SPL tokens.

Yes, exactly thats the thing i was saying earlier because i studied the same that the SPL token can be used only for transferring tokens from on user to another we can not add this thing there of deduction of the fee, So is there any other way to list your custom Solana based tokens on any other wallet or we just have to be have our own website to do the transferring and to view balance.

Yeah, sorry I misunderstood your use-case. :slight_smile:

You’ll just have to use your own website for transferring and viewing the balance.

Maybe we’ll come up with a way to list and transfer different kinds of tokens in wallets later, but there are no standards for that in Solana right now.

1 Like