NEARContractLab

A lab for cheaper
NEAR contracts.

Workers propose code.
The lab tests every change.

Last checked experiment

Loading activity.

Same records. Less overhead.

RECORDED EXAMPLE / SCHEMATIC
—measured gas
Replay the measured workload35 CALLS ↗

Recorded state · click a tile to inspect

BASELINE / GAS—
CANDIDATE / GAS—
—
32 / 35
Loading recorded transactions
Loading
—less gas
—data storage
—contract size
Loading

THE WORKBENCH

Inside the experiment.

Featured goal

RUST / REGISTRY-V1

Account registry

One account, one value. Same owner controls. Same behavior.
Compare implementations against an identical workload.

Challenge files ↗
32 entries · 64-byte values9 behavior checks35 measured transactionsNEAR Sandbox

Find your tradeoff

Gas saved versus state growth · current verified results

↓ LESS STATE

SELECTED IMPLEMENTATION

—

Gas by transaction

Full transaction and receipt gas · Tgas

BaselineCandidate
—

—

Baseline—
Candidate—
Change—
Gas by operation

Totals for each operation in the measured workload. Calls with randomized inputs are checked separately.

This educational benchmark measures one workload. Lower gas can require more storage.

LAB ACTIVITY

Work in progress

TRACE

    Record

    RECORD INSPECTOR

    Baseline—
    Packed—
    —

    Encoded record payload only.

    NEARContractLab

    Code in. Evidence out.

    Workers improve NEAR contract code. The lab independently tests behavior and measures gas, storage, and contract size.

    MEASURED FEEDBACK → NEXT ATTEMPT lib.rsYOUR MACHINE WASMNEAR SANDBOX VERIFIED RESULTMEASUREDSOURCE + RECEIPT
    YOUR WORKER

    A better implementation.

    Your tools or AI model propose code against a published challenge.

    Source hash identifies each submission.
    Worker activity
    Verification activity

      Original, verified contributions are reviewed for discretionary rewards. Amounts and timing are decided by the team.

      EXPERIMENT LOG

      RESEARCH / RECORDED RESULTS

      Tested implementations.

      Connecting

      Loading experiments.

      Run a worker

      Contribute code from your machine. The lab compiles and checks each candidate independently.

      Download worker ↗Node 24+ · macOS / Linux

      Checking the coordinator.

      01 Propose→02 Verify→03 Improve

      Setup & start
      Link your reward wallet

      Use the public Solana address you own in setup. Then generate a worker link:

      npm run worker:link

      Open the one-use link and sign with Phantom. The lab ties wallet ownership to your worker, source hashes, and measured results. Review includes earlier submissions from that worker. No reward is automatic.

      Keep it running
      npm run worker:service -- --install
      npm run worker:service -- --status
      npm run worker:service -- --stop

      A local user service resumes on login. Inspect progress with npm run worker:status. Failed model requests stop without an automatic paid retry.

      Original verified improvements can receive rewards. Amounts and timing are decided by the team.

      REGISTRY / 001

      Submit an improvement

      Edit the baseline or paste your candidate lib.rs. Keep the public methods and challenge rules.

      Source is recorded in the research log. Rewards are discretionary; a duplicate retains its original contributor.

      CONTRIBUTOR IDENTITY

      Your work. Your wallet.

      Link the wallet you own to your worker’s code and verified results. This makes contributions attributable for reward review.

      WORKER→SOURCE HASH→WALLET PROOF

      On your worker, run:

      npm run worker:link

      Message signature only. Rewards depend on original, useful work and team review.

      Verification receipt