Questions tagged [rent]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
26 views

rent handling in storage

How does this "collecting rent" work exactly(or used to work)? Does it iterate over all the accounts that are not rent exempt per every epoch? in this link, i saw this line: requires the ...
Sepehr Mirnasrollahi's user avatar
2 votes
1 answer
32 views

Cost of logging vs storing data in Solana programs?

The Way Ethereum stores data through Events I want to do the same on Solana but not sure How do the compare the cost of storing it in logs or in Solana programs? Are there any other cheaper ways to ...
Ajay Yadav's user avatar
0 votes
1 answer
30 views

Reducing rent costs

I feel like for some base accounts, I’m getting charged 0.002 sol, which is like $0.20 to store a simple data field on a PDA. Especially for multiple data fields I want to store, this number added ...
AceGravity's user avatar
0 votes
3 answers
69 views

Solana rent and garbage collection

I'm working on a project that can be seen as a centralized exchange. We already have support for Solana deposits/withdrawals and I now I'm adding support for token deposit/withdrawals, but with this, ...
gumminho's user avatar
2 votes
1 answer
45 views

How can I retrieve the rent balance on an address from the native node RPC?

Is there an endpoint in the JSON RPC API which can give me back the rent balance for a given address? https://docs.solana.com/api/http#getaccountinfo
sibabtcs's user avatar
1 vote
1 answer
88 views

PDA rent exemption collection to transaction fee payer error on account close

In a transaction, I’m trying to close an ATA and a PDA. The ATA is closed by calling close_account from the SPL Token 2022 crate / On Chain Program, and the rent exemption can be sent without any ...
Vincent Berthier's user avatar
1 vote
2 answers
49 views

transfer token with rent exempt on solana network

Does anyone know how to transfer token on solana without paying rent which is equivalent to ~0.002 sol?
oofblock_0000's user avatar
3 votes
1 answer
386 views

Is rent collected on Solana?

I have created a wallet account that holds my SOL balance and only sends and receives SOL. Will there be rent on this account? E2B5PspC2A3UVsfyQhrzhFBwb23RMEiMrFsG3Zoy6QfR (testnet) When I made a ...
Koichi's user avatar
  • 61
0 votes
1 answer
51 views

What's rent?. What's estimated become exempt?

I,d like to know what’s rent?. How to calculate it?. Does it work now?. Does it exist now?. When to become rent exempt?. I use Solflare and I’ve an account with more or less 200 Solana and I do ...
Gus's user avatar
  • 21
0 votes
0 answers
82 views

Embedded wallets, USDC and account rental

I'm evaluating Solana as an option to support Generate an embedded, user owned, wallet per sign-up (BYO as secondary option). Only deal with USDC in and between these wallets, i.e. no customer ...
uxcxdx's user avatar
  • 101
0 votes
0 answers
99 views

Send SPL-tokens to unfunded account + set fee payer

I'm trying to create a seamless process for my clients via paying for the transaction fees when initiating a tokenswap (token A to token B) via jupiter. In this scenario, the user doesn't have any sol ...
Franny's user avatar
  • 1
0 votes
1 answer
22 views

How does SOL accounting work in non-rent-exempt programs?

I wonder how does one reason about SOL accounting in non-rent-exempt Programs? It seems to me that static analysis of a Program's balance is impossible besides just assuming that it changes on each ...
Paul Razvan Berg's user avatar
1 vote
3 answers
323 views

Can anyone close non-rent-exempt accounts?

This statement from Alchemy's tutorial has caught my attention (emphasis mine): To reclaim Solana storage fees, developers and everyday Solana users can close accounts to receive their storage fees ...
Paul Razvan Berg's user avatar
2 votes
1 answer
28 views

Can the state of removed Programs be recovered after they failed to pay rent?

From the docs on rent: Accounts that do not maintain their rent exempt status, or have a balance high enough to pay rent, are removed from the network in a process known as garbage collection. What ...
Paul Razvan Berg's user avatar
4 votes
2 answers
383 views

Storage costs on solana

Creating accounts to store data require 2 years worth of rent to be paid upfront, as per the size of the account. This is done to make accounts rent exempt. Also the storage rent per byte gets cheaper ...
Shubham Singh's user avatar
2 votes
3 answers
2k views

How do I close a Solana Account?

We can easily close PDAs to redeem their rent to their owner, however what I'm wondering is can the same be done for a normal, on-curve Solana account? From what I can see once you've sent the minimum ...
Ahri's user avatar
  • 2,403
2 votes
1 answer
109 views

What dataLength to use for getMinimumBalanceForRentExemption() for a SOL account?

According to the Solana documentation the minimum balance/amount to be send to new SOL account can be calculated using getMinimumBalanceForRentExemption() getMinimumBalanceForRentExemption() takes a ...
mahnunchik's user avatar
0 votes
0 answers
169 views

Solana rent account questoin

I have a question. If I hold solana token on my wallet - do I need to pay a rent for my account on chain ? I've red official documentation and I see that there is a garbage collector in solana chain ...
Andriy Vasyltsiv's user avatar
1 vote
2 answers
55 views

Solana Rent Sysvar empty

I'm creating a local cluster with solana version 1.9.29, then I upgrade to solana 1.13.6 by restarting whole validators. I'm facing issue that Rent Sysvar account is empty so any programs using rent ...
Ngọc Bạch Văn's user avatar
0 votes
2 answers
92 views

Paying rent for accounts when initialising as the developer

I am trying to work out a gasless solution for transactions. Currently partially signing a transaction with the octane core Sdk works for normal transactions but for transactions with instructions ...
Anish De's user avatar
2 votes
1 answer
54 views

Does minimum balance for rent exempt change over time

I am building a wallet where I have multiple accounts. I would like to know what the rent exempt line is at all times. So that when transfers are being made, they don't end up failing because they go ...
Nissen41's user avatar
2 votes
1 answer
74 views

How to proceed when a program rent expires

When creating a program, it is generally rent-exempt, which allows it to run for 2 years. After this time the SOL of that account is finished and the Garbage collection closes it. So, to avoid this, ...
cris.sol's user avatar
  • 272
1 vote
1 answer
40 views

Is Solana a bad choice to track inexpensive assets on-chain?

I'm interested in using NFTs to track assets that valued at around $3 USD As I understand it, each NFT requires: Token Metadata account Master edition account Associated token account A token mint ...
Sandy Soto's user avatar
1 vote
1 answer
283 views

Custom program error code 0x0 while sending a transaction

While trying to create a transaction containing as instructions the creation of a mint account, initialize mint instruction and ATA creation), it gives me the custom program error code 0x0 while ...
ASCorreia's user avatar
  • 243
0 votes
1 answer
49 views

Build fails when using rent_exempt = skip in account initialization

I want to skip rent exemption when initializing PDA account with anchor. Sol will be transfer to PDA right after initialization so there is no need to pay extra sol for rent when PDA is initialized. ...
Void's user avatar
  • 396
1 vote
2 answers
354 views

How to find the exact number of bytes to allocate for a Solana Account in Rust

I want to create wallet account via Rust program by using payer & mint account, in that case how to predict the number of bytes to allocate for the new account data so that I can pay less rent ? ...
Souvagya's user avatar
  • 131
2 votes
1 answer
129 views

How do i figure out that how many rents should i pay?

How do i figure out that how many rents should i pay? If i use the rpc api named "getMinimumBalanceForRentExemption" , I really don`t know "account data length"
pengten's user avatar
  • 21
1 vote
2 answers
253 views

What is the rent exemption minimum for a SystemProgram account created by a SOL transfer

Trying to figure out the exact lamports needed to make a "wallet" (account created by a SOL transfer) rent exempt. There are lots of contradictory information on this topic, some sources say ...
jac0xb.sol's user avatar
8 votes
2 answers
812 views

How can I calculate the cost the deploy a progam to main net?

I want to deployed a program to main net would like to figure out before hand how much it will cost. For accounts I can just calculate it by counting the bytes to be rent exempt but how do I do that ...
Jonas H.'s user avatar
  • 3,973
1 vote
1 answer
113 views

Rent in PDA derived account

If I write a solana program which creates PDAs based on a seed and user's public key, do I need to fund all such accounts with lamports beforehand so that my clients can store data in it without ...
felix's user avatar
  • 270
1 vote
1 answer
25 views

Do I have to pay when deploy a project with one code account and one store data account

I'm new to the Solana network. I wonder do I need to pay rent for each account I deploy on Solana network. for example, if I have a project with one account store execute code and one project to store ...
Dũng Đàm's user avatar
0 votes
2 answers
126 views

How does Solana's Rent Fee work? What is it exactly? And why 2 years?

I've been reading about this "rent fee" feature on Solana. What is this exactly and how does it work? Coming from BTC and ETH. Why do I need to pay "rent" on Solana?
Patoshi パトシ's user avatar
4 votes
2 answers
162 views

How do I solve this: `Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x0`

I have this in my lib.rs file: #[derive(Accounts)] pub struct Initialize<'info> { #[account( init, payer = authority, space = 8 + Config::SIZE, seeds = ["config"....
Ademola's user avatar
  • 3,718
3 votes
2 answers
182 views

How can I make token accounts rent exempt when I create them?

Hi I am struggling to understand how to make token accounts rent exempt. I have used the following code to create my token account for an SPL token lifted out of the Solana docs. I see that Solana is ...
colinwink's user avatar
3 votes
2 answers
116 views

Anchor : Do you need to pass rent account when doing a init in a instruction

Hey so i seem to facing a weird situation where some of my init tx require rent to be passed in where as in other tx which use init, and rent is perfectly omitted without any issue not sure if its a ...
Nabeel Naveed's user avatar
1 vote
1 answer
17 views

What impact does rent exemption have on validators' economics?

I understand that rent is only collected on legacy accounts that were created in the past, before it was enforced that all accounts be rent-exempt by depositing 2 years of rent. While the rent went ...
AllBlooming's user avatar
  • 2,249
0 votes
1 answer
40 views

Runtime Error: "InvalidRentPayingAccount" [closed]

Why am I getting this error? This is the runtime error version of Can you create accounts with less lamports than the rent-exempt minimum?
Lando's user avatar
  • 140
5 votes
2 answers
100 views

How is Solana able to provide infinite-time storage for a fixed cost?

How can Solana store something forever for a fixed cost that is reclaimable if you close the account?
itsfarseen's user avatar
5 votes
2 answers
605 views

How much rent is needed to create a new account?

When creating a new account on Solana, how do I calculate the amount of rent (SOL) needed to pay for and create the account?
DonnySolana's user avatar
3 votes
1 answer
178 views

Can you create accounts with less lamports than the rent-exempt minimum?

Accounts on Solana are considered rent-exempt if they hold at least the cost of their rent for 2 years (based on the size of the account's data). Is it possible to create an account that's not rent-...
Joe C's user avatar
  • 1,026
5 votes
1 answer
115 views

Solana rent exempt account, period of exemption

Hey so we are all said to make rent-exempt accounts at creation time but is the rent exemption permanent? If not, how is the top-up handled after the exemption period? Like as soon as it ends you add ...
Nabeel Naveed's user avatar