> For the complete documentation index, see [llms.txt](https://docs.megaeth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.megaeth.com/mega-evme/configuration/salt-buckets.md).

# SALT Buckets

MegaETH uses SALT buckets to dynamically scale storage gas costs. Each account and storage slot maps to a SALT bucket; the gas cost of storage operations is multiplied by a factor derived from the bucket's capacity. Crowded state regions become progressively more expensive, while fresh storage (minimum-sized buckets) is free.

The `--bucket-capacity` flag lets you configure bucket capacities for testing how storage gas costs behave under different state conditions.

## Options

| Flag                              | Default | Description                      |
| --------------------------------- | ------- | -------------------------------- |
| `--bucket-capacity <ID:CAPACITY>` | empty   | Set bucket capacity (repeatable) |

Format: `bucket_id:capacity`, where:

* `bucket_id` — 32-bit bucket identifier
* `capacity` — current capacity in bytes

## Examples

```bash
# Single bucket
mega-evme run contract.hex --bucket-capacity 123:1000000

# Multiple buckets
mega-evme run contract.hex \
  --bucket-capacity 123:1000000 \
  --bucket-capacity 456:2000000 \
  --bucket-capacity 789:500000

# Combined with state and tracing to observe gas costs
mega-evme tx \
  --receiver 0x1234... \
  --input 0x55... \
  --bucket-capacity 1:1000 \
  --trace --tracer opcode
```

## Notes

* Without any `--bucket-capacity` flags, all buckets default to the minimum size, which means storage operations incur zero storage gas.
* This option is available in all commands (`run`, `tx`, and `replay`).
* SALT-based dynamic gas pricing is active in MiniRex and later specs. In `Equivalence` mode, bucket capacities have no effect.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.megaeth.com/mega-evme/configuration/salt-buckets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
