Skip to main content

Resource Limits & Fees

Resource Limits

note

Resource limitations and fees only apply to smart contract transactions. Read more about the inner workings of fees on Stellar in the Fees section.

Per-transaction limits

These define the maximum amount of work a single Smart contract transaction can do.

Network SettingValue
Max CPU instructions100 million
Max memory (RAM)40 MB
Max number of keys in the footprint100
Disk reads*100 entries/200 KB
Disk writes50 entries/132 KB
Transaction size132 KB
Events+return value size bytes16 KB
Individual ledger key size (contract storage key)250 bytes
Individual ledger entry size (including Wasm entries)128 KiB

* Most transactions don't perform any disk reads, as only archived entries and 'classic' entries (G-accounts, trustlines) are considered to be disk reads. Live smart contract state is in-memory and is not counted towards this limit.

TTL extension parameters

These define TTL extension parameters.

Network SettingValue
Persistent entry TTL on creation120 days
Temporary entry TTL on creation1 day
Max ledger entry TTL extension6 months

Ledger-wide limits

These define the maximum amount of work done by all the transactions in a single ledger (single block).

Network SettingValue
Max CPU instructions600 million
Max memory (RAM)no explicit limit
Max number of keys in the footprintno explicit limit
Disk reads1000 entries/7 MB
Disk writes500 entries/143 KB
Transactions size133 KB
Events+return value size bytesno explicit limit

Resource Fees

Network SettingCost (stroops)
10,000 CPU instructions25 (250,000/max tx)
Read 1 ledger entry from disk6,250 (625,000/max tx)
Read 1KB from disk1,786 (357,200/max tx)
Write 1 ledger entry10,000 (500,000/max tx)
Write 1KB to disk3,500 (462'000/max tx)
1KB of transaction size (bandwidth)1,624 (214,368/max tx)
1KB of transaction size (history)16,235 (2,143,020/max tx)
1KB of Events/return value10,000 (160,000/max tx)
30 days of rent for 1 KB of persistent storage~427,000
30 days of rent for 1 KB of temporary storage~213,500

Note, that the rent fees provided here may go up in case if a lot of contract data is written to the ledger within a short time period. This happens because the rent fees are designed in such a way that the closer the state size to some validator-defined threshold, the more expensive it gets to write new data or extend the TTLs.