4
votes
Accepted
How does non-custodial NFT staking work?
Those non-custodial NFT staking solution must use the freeze_delegated_account instruction from the metaplex token metadata program.
https://github.com/metaplex-foundation/metaplex-program-library/...
3
votes
Accepted
How to import METADATA_PROGRAM_ID. (Buildspace Solana Staking Anchor course)
You can install @metaplex-foundation/mpl-token-metadata from here and import it like
import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"
Else you can ...
3
votes
Accepted
Getting solana staking rewards for wallet
If you can find the instruction that delegated the stake account, and you never merged other stakes into it, you can simply take the difference in the balance at delegation and now.
3
votes
Accepted
Unable to execute delegate transaction on testnet
custom program error: 0xc corresponds to StakeError::InsufficientDelegation. On testnet, there is now an enforced 1 SOL minimum delegation, so you'll need more SOL in the account in order to delegate ...
3
votes
Accepted
Getting staking rewards by stake public key
That's the right approach, you may be using the call incorrectly. Try doing:
curl https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc&...
3
votes
Job allocation to validators
Validators currently have two jobs:
Block production (leading), which only one validator does for four slots at a time (~1.6 seconds). Every epoch, the network creates a leader schedule based on a ...
3
votes
What does it mean Lamport?
A Lamport is the smallest unit of currency within Solana.
1 SOL = 1 billion Lamports
3
votes
spl-stake-pool create-pool: RPC response error -32002
This is a bit annoying, but it looks like the program deployed to devnet and testnet is out-of-date, so you'll need to use an older version of the CLI to properly initialize your pool.
Please try ...
3
votes
How to write factory pattern staking pool solana program
The SPL stake pool does not have configuration knobs per user, opting instead to use a fungible token to represent fractional ownership in the pool.
If you need more configuration than that, you'll ...
3
votes
Accepted
Improve performance of getParsedProgramAccounts for StakeAccount
The call is trying to filter through all stake accounts, which is on the order of 1 million accounts. Unfortunately, this will take a long time no matter what using the standard RPC node.
If you want ...
2
votes
Freezing SPL Token accounts Via JS SDK
If the mint's freeze_authority is set to None then account freezing is permanently disabled.
Otherwise, you can use the SetAuthority instruction to change a Mint's freeze_authority
https://spl.solana....
2
votes
Accepted
Staking reward split between staker and validator
As a staker you do not have anything to do, the runtime will split the rewards between the validators and your delegated staking account.
The runtime reads the validator commission % and split rewards ...
2
votes
Solana wallet adapter '{ children: Element[]; }'?
After doing some research, it seems it is a error in react as @kafinsalim stated, I dont know if this is a good workaround but to solve the issue and create a build while keeping everything working ...
2
votes
Getting staking accounts of wallet
dataSize here seems redundant. And for offset you should use 12
Result:
const accounts = await connection.getParsedProgramAccounts(
STAKE_PROGRAM_ID,
{
filters: [
{
...
2
votes
Accepted
Identifying stake and unstake transactions for a given stake account
You've got the first part right! If you call getTransaction with the jsonParsed return option, the transaction type will tell you exactly what kind of transaction it is.
For example, if you look at ...
2
votes
How to calculate transaction fees collected by a validator
This will require a combination of things.
find out the slots for which the validator was the leader using getLeaderSchedule https://docs.solana.com/developing/clients/jsonrpc-api#getleaderschedule
...
2
votes
Using VersionedTransactions with staking
You can put in a PR with the implementations, but essentially you just need to change the inner function. For example, here's how you would do delegate with a versioned transaction:
static delegate(...
2
votes
Accepted
Rewards after merge staking accounts
You will never lose rewards from merging stake accounts.
If you use the getInflationReward endpoint on the resulting stake account, however, it won't merge the history of the two stake accounts. You ...
2
votes
When staking SOL on-chain... questions about Stake Accounts
Staking rewards will be distributed (every epoch) by the provider you are staking too. So this all is correct and nothing to worry about.
The fact that you are seeing transactions associated with your ...
2
votes
Accepted
Unable to get inflation/staking rewards after Epoch 398
null response means there was no staking reward. I tried getInflationReward for an account I know has been staked and active during epoch 398 and I managed to get a response for epochs around 398 with ...
2
votes
Solana inflation mechanism design
Good question! The answer is yes - inflation rate is relative to the current supply.
This is why individual staking rates go up when the percentage of SOL staked goes down, and why rates go down when ...
2
votes
Creating an SPL Staking Contract + Understanding Staking
The way i would think about staking a token is only via a smart contract that can save the lock time in a PDA, send rewards based on that and have the authority to lock and unlock token in the user ...
2
votes
Accepted
Why does the active stake plus the rent reserve not equal to the total balance? How to correctly calculate the total balance?
Anyone can have more SOL on a staking account by sending more SOL to the account. That SOL is not staked and doesn't earn staking rewards, and can be withdrawn with a withdraw-stake instruction.
2
votes
Accepted
Who initiates the reward claim transaction to delegated stake accounts?
Historically all reward have been collected at epoch boundaries. This led to performance problems because this basically took multiple seconds every epoch:
https://github.com/solana-labs/solana/issues/...
2
votes
Who owns the private key of delegated Staked Accounts?
By "most accounts", I'm assuming that you mean associated token accounts, which are program-derived addresses from the associated-token-account program.
Stake accounts, on the other hand, ...
2
votes
Accepted
How to deserialize StakePool account data on a solana native program on chain?
This is saying you don't have the BorshDeserialize trait in scope/are using the wrong try_from_slice_unchecked. Unfortunately solana_program exports a bunch of borsh versions that all work with a ...
2
votes
How can I find basics about staking system?
Here are a few resources that give different info on Staking on Solana:
Staking and Inflation FAQ (solana.com)
Staking on Solana (solana.com)
Solana Staking 101 (marinade.finance)
How to Stake SOL (...
1
vote
When staking SOL on-chain... questions about Stake Accounts
If transaction is signed by GZctHpWXmsZC1YHACTGGcHhYxjdRqQvTpYkb9LMvxDib it's the distribution of MEV rewards from Jito.
From: https://jito-foundation.gitbook.io/mev/jito-solana/command-line-arguments
...
1
vote
What are common practices for solana staking account address generation for wallet developers?
You have a few options, but yes, typically you just use new random keypairs for your stake accounts. When you want to fetch all of your stake accounts, you can use get_program_accounts with a memcmp ...
1
vote
How to track the total SOL rewards? I see 4 reward types, but I'm not sure which to use
It depends on your definition of rewards, which is why there are 4 types. Transaction fees are also considered "block rewards" to the validator that produced the block, same as rent.
If you ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
staking × 90solana-program × 16
web3.js × 12
rewards × 10
anchor × 8
nft × 7
spl-token × 5
stake × 5
vote-account × 5
account × 4
validator × 4
spl × 4
sol × 4
wallet × 3
rust × 3
metaplex × 3
token × 3
solana-cli × 3
fees × 3
transaction × 3
nextjs × 2
lamports × 2
balance × 2
native-programs × 2
getprogramaccounts × 2