Skip to main contentA-REX Core

决策记录 · ADR-011

ADR-011: Pre-harvest lots are first-class (producedAt == 0)

A batch may be created before the goods exist: producedAt == 0 means not yet produced, so forwards, warrants and crop receivables use the same token as the delivered lot.

Accepted
文档 ID
ADR-011
日期
2026-09-21
仅提供英文版
本文档以英文发布。白皮书章节和示意图已翻译;规范性标准、系统设计指南和决策记录保持英文,以确保只有一个权威文本。
FieldValue
IDADR-011
Subject areaData model
StatusAccepted
Date2026-09-21
OwnersA-REX Contributors
Related requirementsFR-03 (SDD §3)
Supersedes / superseded by—

Context

Most agricultural credit in Latin America finances a harvest before it exists: Brazil's CPR, forward contracts and input-for-grain swaps. The earlier design required the harvest date to be in the past, which made these instruments unrepresentable and forced a second token type for the same crop.

Issue

Can a batch represent goods that have not been harvested yet, and who decides whether such a batch can move?

Assumptions

  • Pre-harvest instruments are the dominant form of agricultural credit in the region.
  • Whether pre-harvest units may trade depends on the market, not on the standard.

Constraints

  • One token type from field to delivery.

Alternatives considered

AlternativeForAgainstOutcome
A separate future-lot tokenExplicitTwo standards for one crop; lineage breaks at harvestRejected
producedAt == 0 means not yet produced; hooks decide transferabilityOne token for the whole life of the cropReaders must handle a zero dateAccepted

Decision

createBatch accepts producedAt == 0. The standard does not say whether such a batch may be transferred; the reference ExpiryHook(allowPreHarvestTransfers) shows both policies, returning AREX:BATCH_NOT_PRODUCED when transfers are disallowed.

Argument

The date being unknown is a fact about the goods; whether they may trade is a policy of the market. Keeping the fact in the record and the policy in a hook serves both a spot marketplace and a crop-finance platform with the same token.

Consequences

Positive

  • Crop receivables, forwards and warrants are expressible.
  • Lineage continues from the pre-harvest lot to the harvested and processed lots.

Negative

  • Integrators must not treat producedAt == 0 as 1970.

Obligations it creates

  • Spot-only marketplaces register ExpiryHook(false).

Implementation and evidence

WhatWhere
ValidationARexToken._storeBatch
Hookcontracts/reference/hooks/ExpiryHook.sol
Teststest/standard/ARexToken.test.js: allows pre-harvest batches (producedAt == 0), ExpiryHook can block pre-harvest transfers
  • ADR-006: Open codes instead of closed enumerations
  • ADR-010: Authority comes from roles, never from balances; RETIRED is terminal
  • ADR-013: Legal neutrality: the standard does not classify the token