The court

The court is a GenLayer Intelligent Contract that decides a disputed job from what its validators read for themselves. Whoever asks for a hearing passes only the job number. The contract is contracts/gavelr_court_v2.py, deployed on GenLayer Studionet at 0xc8A2E6d689dB095cb9cA817D7dd046039851942F (version 2.1) and bound, when it was deployed, to escrow v2. Jobs 1 and 2 were heard by version 2.0 at 0x2aC8…A9F0, which keeps their rulings; see Versions.

What a hearing reads

A GenLayer Intelligent Contract is Python that runs on every validator, and can fetch web data and call an AI model as part of a transaction. Each validator in a Gavelr hearing does all of this itself, in order:

  1. The job, from escrow v2, by an eth_call to getJob through https://bsc-rpc.publicnode.com, falling back to https://bsc-dataseed.binance.org. The job must be Disputed and its kind must be generic/v1 or bsc-pool-audit/v1; otherwise the hearing is refused.
  2. The object's record on Greenfield: owner, seal status, checksum, size and timestamps, from https://greenfield-chain.bnbchain.org/greenfield/storage/head_object/<bucket>/<object>.
  3. The file's bytes, from the evidence URL stored at delivery. It must be https and end in /view/<bucket>/<object> for the object named in the job.
  4. For pool audits only: each pool's contracts, owner and LP lock from live BNB Smart Chain state, and its creation time from DEX indexers.
  5. Only then, the file itself, read by the validator's own AI model under the job's terms.

Checks before any model reads the file

For both kinds, before any model runs, the hearing checks that:

  1. the URI is a gnfd://bucket/object address, and the Greenfield chain has that object, sealed and public. The court then downloads it from the storage provider the chain names for it, not from the URL the seller supplied;
  2. the bytes hash to the SHA-256 the seller committed on BNB Smart Chain;
  3. the object is sealed on Greenfield and the bytes match Greenfield's own checksum, which for a file under 16 MB is the SHA-256 of the SHA-256;
  4. the object is owned by the seller named in the escrow;
  5. the object was not created or updated after the delivery was committed.

If any check fails, the ruling is REJECT_FULL_REFUND with score 0, the reasoning says which check failed, and the file is not judged. The same full refund applies to a pool audit whose file is not a JSON object with an audited_pools list. That includes a delivery the court cannot read for a reason the seller controls: a malformed URI, a bucket or object missing from Greenfield, an upload that never sealed, or a private object. Only an outage on Greenfield's side stops the hearing without a ruling, so it can be requested again. See Names and sizes the court accepts.

Versions

A GenLayer contract cannot be changed once deployed, so a fix is a new court. Escrow v2 never checks which court ruled: the court verifier does, against the court named in sdk/deployments.json, and every ruling still has to match the evidence hash the escrow froze. Old rulings stay readable in the court that made them.

VersionAddressHeardWhat changed
2.10xc8A2…942FNew disputesA delivery the court cannot read for a reason the seller controls is refunded in full instead of stopping the hearing, and the file is read from the storage provider the Greenfield chain names rather than the seller's URL.
2.00x2aC8…A9F0Jobs 1 and 2First release. Source at git tag court-v2.0.

The escrow's court() value still names 2.0, because it was fixed when the escrow was deployed. It is a record, not a check.

The two kinds of hearing

The buyer picks the kind at hire. It is stored in the job, so neither side can change it later.

generic/v1: any file, judged against the terms

For data, a report, code or text. The model sees the terms, the buyer's dispute reason and the file, and nothing else: no web lookups, no chain reads.

bsc-pool-audit/v1: security audits of new PancakeSwap pools

The file must be a JSON object with an audited_pools array. The court reads up to 8 pools; with fewer than 5, the missing ones count as failed.

{
  "audited_pools": [
    {
      "pool_index": 1,
      "symbol": "TAPEX/WBNB",
      "token_address": "0x…",
      "pair_address": "0x…",
      "pool_deployed_at": 1795090000,
      "honeypot_status": "SAFE",
      "lp_locked_pct": 100,
      "owner_renounced": true,
      "deployer_rug_history": "NONE"
    }
  ]
}

Before the model reads the file, every pool is checked against chain data. A pool that fails any of these has failed, and no model can pass it:

CheckFails whenIn the contract
CompletenessOne of token_address, pair_address, pool_deployed_at, honeypot_status, lp_locked_pct, owner_renounced, deployer_rug_history is missing or emptyREQUIRED_FIELDS
AddressesAn address is invalid, no contract answers at the pair or the token, or the pair does not hold the token_read_pool_facts
FreshnessThe pool was really created more than 86,400 seconds before delivery, or no indexer dates itMAX_AGE_SECONDS
Creation timepool_deployed_at is more than 3,600 seconds from the real creation timeDEPLOY_TIME_TOLERANCE_SECONDS
OwnerThe file says owner_renounced: true but the token's owner() returns an address other than zero or 0x…dEaDBURN_ADDRESSES
LP lockThe file's lp_locked_pct is more than 15 points above the share of LP tokens that are burned or held by PinkLock V2 or the UNCX V2 lockerLP_TOLERANCE_PCT

Creation times come from GeckoTerminal, and from DexScreener for any pool GeckoTerminal does not know. If neither indexer answers at all, the hearing stops with a temporary error and can be requested again. A token with no owner() function counts as having no owner. The model may also fail a pool that passed every chain check, but only for a breach of the terms it can point to in the file. Each finding records who decided it: chain, jury or chain+jury.

From findings to a split

Each pool, or each requirement, is one unit. The decision follows from how many units passed:

DecisionWhenScoreTo buyerTo seller
1 · APPROVE_FULLEvery unit passed1000%100%
2 · PARTIAL_SLASHSome passed; for example 3 of 56040%60%
3 · REJECT_FULL_REFUNDNone passed, or a check before the hearing failed0100%0%

For a partial slash, the seller's share is round(passed × 10000 / total) basis points and the score is round(passed × 100 / total), both computed in _quantize(). The ruling also carries a verdict hash that the escrow recomputes before paying:

sha256(abi.encode(jobId, evidenceSha256, uint256(decision), uint256(buyerRefundBps), uint256(sellerPayoutBps), uint256(score)))

How the validators agree

GenLayer picks a lead validator, which runs the hearing and proposes its result. Every other validator runs the whole hearing again, with its own AI model and its own web requests, and agrees only if it reaches:

If the lead's hearing failed, a validator agrees only if its own run failed the same way. The court stores the lead validator's ruling once a majority agree. Each job can be heard once: a second adjudicate for a job that has a ruling is refused with "verdicts cannot be replaced". A hearing that ends without agreement stores nothing and can be requested again.

Reading a ruling

ViewReturns
get_verdict_json(job_id)The ruling as JSON text: decision, score, split, units, the verdict hash and the reasoning. The SDK's waitForRuling() and the verifier read this.
get_case_json(job_id)The whole case: the job as read from the escrow, the Greenfield record, every finding with what the file claimed and what the chain showed, and the reasoning.
has_verdict(job_id)Whether the job has been ruled.
get_bnb_escrow()The escrow address the court is bound to.
get_total_cases()How many jobs it has ruled.

The ruling for job 1 on escrow v2, as get_verdict_json(1) returns it:

{
  "buyerRefundBps": 4000,
  "decision": 2,
  "decisionLabel": "PARTIAL_SLASH",
  "evidenceSha256": "0x60423e130baeb77cb9107429085f353031e35ce90e7c82c0920bd1940931d79e",
  "jobId": 1,
  "reasoning": "Pools 1 through 3 successfully passed all audit criteria and on-chain checks. However, Pool 4 failed due to violating the freshness rule by being deployed far beyond the 24-hour limit, and Pool 5 failed due to inaccurate on-chain ownership status reporting. Therefore, the delivery contains invalid pools and the buyer's dispute is upheld for those items.",
  "score": 60,
  "sellerPayoutBps": 6000,
  "snapshotVerified": true,
  "totalUnits": 5,
  "validUnits": 3,
  "verdictHash": "0xb210893bdb117364a6e48c2c32121ae51a83554751fadde4788d19565575d70d"
}

Earlier courts

Version 1 used two other contracts on Studionet. The pool court, contracts/gavelr_pool_court.py, ruled Case No. 3: it heard only pool audits, and only for jobs whose terms hashed to one fixed SLA. The first arbiter, contracts/gavelr_arbiter.py, ruled jobs 1 and 2. Neither hears jobs on escrow v2. A fourth contract, contracts/gavelr_court.py, is the Lab's trial court and holds no money.

Caveats