Solana Fee Model and Cost Prediction
Solana’s fee model is significantly different from EVM chains – it’s generally much cheaper and more predictable. A quick breakdown relevant to Nyvo developers:
Base Fee
Every transaction pays a base fee of 5000 lamports per signature. 5000 lamports is 0.000005 SOL, so even with, say, 2 signatures (maybe a user and a service key), that’s 0.00001 SOL (~a thousandth of a cent at typical prices). Nyvo’s one-click deployments and user transactions usually involve 1 signature (the user’s), so 5000 lamports is the typical fee burned per transaction. Half of this is burned and half goes to the validator
Writing to Accounts
Unlike Ethereum gas, Solana doesn’t charge more for how many instructions you include or how much state you modify, except that more instructions mean more compute (which is bounded by the limit). There is no direct fee per instruction beyond the compute aspect. So Nyvo can batch multiple actions in one transaction and you still only pay the one base fee (plus any priority fee if used). This encourages transaction batching, making the user experience better. For example, in a Nyvo marketplace purchase, the program might transfer an NFT and update some record in one go – the user pays one fee for the combined action.
Priority Fees
These are optional and related to compute unit price. If the network is very busy, offering a priority fee (like a tip) can help your transaction get processed sooner by the leader. Nyvo will typically not set a priority fee by default (i.e., price=0), meaning transactions are processed in normal order. If you anticipate high demand (maybe a hyped token launch where many users will try to buy at once), you might configure Nyvo to add a small priority fee for critical transactions to improve UX for your users. For instance, adding 0.0001 SOL fee to a launchpad buy transaction could ensure it’s prioritized. This is still trivial in cost relative to Ethereum gas.
Cost Prediction
To predict fees, you don’t need complex gas calculus as on Ethereum. The primary variable is the number of signatures and whether you add a priority fee. Nyvo can calculate this easily: e.g., a simple user action (1 signature, no priority) will always cost 5000 lamports.
A more complex transaction with 1 signature and a compute limit with price might cost: 5000 + (compute_limit * price_per_CU)
lamports. If price_per_CU is in micro-lamports, remember to divide by 1e6 as 1 lamport = 1e6 micro-lamports. We can express base fee and priority fee as formulas:
Base fee =
5000 * (# of signatures)
lamports.Priority fee =
CU_limit * CU_price
(micro-lamports) =(CU_limit * CU_price) / 1,000,000
lamports For example, if Nyvo sets a compute limit of 300,000 and a price of 2 micro-lamports/CU, the priority fee = 300,000 * 2 = 600,000 micro-lamports = 0.6 lamports. Total fee might be ~5000.6 lamports (the 0.6 is negligible). This demonstrates how low Solana fees are for typical use cases.
Last updated