OutLayer Documentation

Pricing & Limits

Dynamic Pricing Model#

Pay only for resources you use. Pricing is based on requested resource limits, not fixed fees. Excess payment is automatically refunded after execution.

Cost Calculation#

Execution cost = base_fee + (instructions × instruction_rate) + (time_ms × time_rate)

Use the estimate_execution_cost view method to calculate costs before submitting a request.

Resource Limits#

  • Max Instructions: 500 billion instructions per execution
  • Max Memory: Configurable up to platform limits
  • Max Execution Time: 180 seconds per execution (default: 60 seconds)
  • Max Compilation Time: Enforced during GitHub compilation

These limits are configured in the smart contract and may change without documentation updates. See current values at Stats.

Refund Policy#

If your execution uses less resources than requested, the difference is automatically refunded. However, failed executions are not refunded (anti-DoS protection).

Optimization Tips#

  • Request only the resources you need to minimize upfront costs
  • Optimize your WASM code to reduce instruction count
  • Use immutable WASM storage to avoid repeated compilation costs
  • Consider caching results in your smart contract for frequently-accessed data