EN

Limits, gas and data

4 minDifficulty Checked 2026-11-10
Key takeaways
  • The code can read ledger data. It can write only its own escrow's Data field.
  • It cannot create transactions or change any other ledger object.
  • Gas limit, code size limit and gas price would be set by validator fee voting.

Running anyone's code on a shared ledger is risky. A program could loop forever, or try to touch things it should not. The Smart Escrow draft answers with tight limits.

Think of the program as a referee in a glass booth.

  • It can look. It may read facts from the ledger: who sent the finish request, what an oracle says, if an account holds a credential.
  • It has one notepad. It can write to a single small data field on its own escrow. Nothing else.
  • It cannot act. It cannot send transactions or change any other record.
  • It is on a timer. Each step the program takes uses up gas. When the gas runs out, the program stops and the answer is no.

The person finishing the escrow pays for the gas. Under the draft, unused gas is not refunded.

The size of the timer, the largest allowed program and the price of gas would not be fixed forever. Validators could tune them with the same voting they already use for fees and reserves. They could even set the limit to zero. That would switch all such code off if a serious bug appeared.

Every server would run the code with the same engine, set up the same way. That matters, because all servers must reach the same answer.

Every number here comes from the drafts and may change before any release.

Check yourself3 questions
1. What could Smart Escrow code write to?
2. How would the network adjust the gas limit under the draft?
3. Why does the design fix one WASM runtime for every server?
Sources
Next lessonWhere it stands3 min