Staking a custom sol token

Hi,

I am interested in creating a stakable token based on Solana. Is there any tools or documentation about this?

If not, what would be the best way to approach this?

Thanks!

I’ve never heard of a “stakable tienen” before, could you describe more what that is?

Ah sorry about the typo… I meant stakable token

Ah, no problem. :slight_smile:

What do you want to do with the token when you stake it? Do you want it to earn more of that token when it is staked?

Yes exactly. I’d like to know the best way to approach this.

Sorry for the delayed response, I forgot about this topic.

I think the easiest way I’ve found to create your own stakable token would be to use Quarry, but it doesn’t look like there’s support for launching your own pool just yet:

On the home page is says “Launch a Quarry ( comming soon )”. Once that is available, I think you will be able to create a pool for your custom token that gives out rewards for staking that token, like this Marinade reward pool.


There’s probably already a smart contract that exists for creating stake pools yourself, but I haven’t found it yet. I’ll try to remember to comment here again if I find any other solutions.

Hi no problem. Thanks for your answer and happy new year 2022.

I’m not sure I understand how quarry can help here. Could you please explain it a little bit?

Cheers

Happy new year. :slight_smile: :tada:

Quarry allows pools to be created for tokens. The pool can be configured to give out rewards to people who deposit their tokens into the pool.

So if Quarry supports creating your own pools soon, then I think you could setup a pool for your token, that would give out rewards for people who stake in your pool. Those rewards could be whatever token you want, I think, even your custom token.

Cool! Sounds like what we are looking for.
Will keep an eye on this.

Thanks for the info!

1 Like

@JGP I just found that Step Finance also has a token staking pool solution coming soon, so that’s something else to keep an eye on:

Hi, this is interesting. Thanks for the info!

It’d be great if we had more information about timeframes, because “coming soon” is a little bit vague.

Question: In the worst case that these solutions are not showing up in the short / medium term: would this be “as easy” as having our on solan program that gets ownership of the staked tokens and then have a server program that periodically mints tokens to those addresses?

I think I could feasibly produce a smart contract that would do that in a short time frame, but the biggest would be lack of peer review and an audit, because a bug in the contract could potentially siphon all of the tokens from the reward pool.

But to answer your question, yes, I think that is a relatively easy thing to accomplish. Also I would do some more research to make sure nobody else has done something similar first.

Sure, you are absolutely right. I was just wondering if I got the basic idea behind this right.

Another question: we are also experimenting with the idea of “stakeless” rewards in a way thatyou are just rewarded for holding a token (not actively staking it).

In this case it would be even more simple because you’d just have to query the users’ balances and mint tokens for them right? This wouldn’t even require a solana program / smart contract, right?

Technically neither staking/stakless strategy needs a smart contract. You could implement either one with a server program.

But I think using a smart contract would be a good idea because then users don’t have to depend on your servers in order to receive their rewards.

And yes, a “stakeless” solution might be simpler to code, because you don’t need a program derived account to store people’s staked funds and stuff like that, there’s a lot less accounting I think.

I think if you did a stakeless design you might still need to have your users come and manually claim their rewards, but I don’t think that’s too inconvenient.

I see that makes sense.

Last Question: Wouldn’t a normal staking solution based on smart contracts still require users to manually claim their rewards?

Thanks a lot for the info!

Yes, but if you did a server program for the stakeless solution, it could possibly be simple to distribute the rewards directly to the users wallet without them having to claim it manually, it just wouldn’t be decentralized like the smart contract.

No problem, glad I could help! :slight_smile:

Oh, and BTW, there is another kind of staking idea you might be interested in, it’s just a cool idea to keep in mind. You can have “yield bearing assets”. Which are tokens you get for staking that automatically become worth more of the underlying asset over time.

Probably not what you need for your use-case, but again, good to know about when thinking up different tokenomics ideas.

image

I think I’m not completely getting the idea. Can you explain it a little bit more?

You’re getting another token instead of the one you’re staking?

Yeah. For example, it’s a common pattern with Solana stake pools such as JPool, Lido, Marinade, etc.

I take my SOL token and I deposit it into the pool. When I deposit it it gives me a certain amount of JSOL tokens back. As the pool accumulates value, my JSOL becomes worth more SOL. At any time, I can swap my JSOL back to SOL, but it will give me more SOL back than I put in, based on how long it’s been sitting and accumulating rewards.

1 Like

@JGP I just discovered that the Quarry smart contracts seem to be usable for any project, even ones not listed in the Quarry UI, which I think means it should be easy to create your own stake pool using Quarry, without having to develop your own contract.

You would probably want your own UI for it, but quarry also has a typescript SDK, which would make that very simple to do.

Quarry seems focused on liquidity mining more than singe-token staking, but if you wanted to avoid writing your own UI and they were OK with you listing your project on Quarry.so, they have a GitHub repo you just need to submit a pull request to in order to add your project to their website.


If you wanted help setting this up I’m looking for jobs that pay in crypto if you’re interested in that. I can setup a modern SPA frontend using Quasar and investigate hooking it up to the Quarry smart contract.