Spec
What Aruna claims, what it does not, and where it relies on trust. Two parties must be trusted: the attestor, permanently, and at this stage a dispute arbiter. The words used here are verifiable and reproducible.
Limits, stated openly
The attestor must be trusted, permanently
Five routes without a third party were tested and all are closed. The arbiter is a second trust assumption. Aruna runs both at first, openly.
immutable_verified is a bounded claim
It means no detected upgrade path under the checks listed. Import presence is conservative, so the basis is always shown.
An immutable vault cannot be patched
A bug is remedied by migrating to a new vault.
Recorded exposure is not current value
The vault cannot read the target's state.
The TOCTOU window is at least 3 blocks
A single-shard lower bound. The vault can refuse the next transaction, not one in flight.
Aruna itself is not covered
The vault is a central point of failure. Mitigation is a TVL cap, immutability and an audit.
What Aruna does not promise
No guarantee that an agent decides well, no reimbursement for trading losses, no claim that any contract is safe, no assumption that every code change is an attack, no guarantee the pool always suffices.
Closed detection routes
| Route | Why it is closed |
|---|---|
| A contract reading another account's code_hash, state or access keys | No host function exists. near-sys offers own-account storage, promises, crypto, validators. |
| A contract calling RPC | The runtime provides no such path. |
| A cross-contract call reading raw state | It can invoke methods only. |
| Guaranteeing the target's code at execution time by checking beforehand | TOCTOU window of at least 3 blocks. |
| Trusting a target to report its own code identity | Malicious code can return a false value. |
The measured behaviour behind each row is on the lab results page.
Assumption register
| ID | Assumption | Status | Source |
|---|---|---|---|
| A1 | The attestor is trusted to observe code changes and report them. | Permanent under the current protocol. Aruna runs it openly; an independent attestor is a condition of mainnet coverage. | ARCHITECTURE.md, DECISIONS.md D-22 |
| A2 | The arbiter resolves disputed drift reports. | A contract cannot verify counter-evidence from chain data. At MVP the arbiter is the protocol owner. | ARCHITECTURE.md, DECISIONS.md D-22 |
| A3 | A lookback bound limits backdating of a reported change. | It bounds backdating and does not eliminate it. It is not temporal truth. | DECISIONS.md D-23 |
| A4 | The window between a check and execution is at least 3 blocks. | Measured single-shard, a lower bound. Multi-shard is untested. | NEAR-FACTS.md section 5 |
| A5 | Function-call key semantics measured with gas keys carry over to classic keys on a contract account. | Expected, not proved. Tests T5 to T9 are owed before relying on it. | NEAR-FACTS.md section 2 |
| A6 | Testnet behaves like the lab. | Not assumed. The lab ran at protocol 88; confirm the testnet protocol version and re-measure gas before the demo. | NEAR-FACTS.md section 8 |
| A7 | A contract cannot call a host function it does not import. | Sound for absence. Presence of an import is weaker: it means a route may exist, not that it is reachable. | NEAR-FACTS.md section 4 |
| A8 | A contract that deletes its own account cannot be recreated with other code. | Open. The delete-account import is scanned, and lab test T9 must confirm the behaviour before the word proof is used without qualification. | NEAR-FACTS.md section 4 |
| A9 | Event probabilities and capital cost used for premiums. | Underwriting assumptions owned by the contract team, not measurements. The pricing dial on the landing page is a mock. | CONTRACTS.md, premium |
Three contracts
vault
One per client, deployed by hash, no full-access key
Funds, agents, policy, budgets, exposure, cached classes. The whole spend path stays inside the vault.
registry
Shared
Classifications, drift reports, challenge windows, attestor bonds, authorized classifiers, vault versions. Only authorized classifiers may write a class.
pool
Shared, testnet only until release gate B
Underwriter capital, coverage policies, capital adequacy, concentration limits, payouts. A waiting period defends against self-dealing.
Refusals return, authorization failures panic. A panic reverts state, so a refusal that panicked could not count toward auto-disable. Policy refusals return a blocked outcome and persist their effects.
| Reason | Counts toward auto-disable | Why not |
|---|---|---|
| ARUNA_TARGET_NOT_ALLOWED | yes | |
| ARUNA_MAX_PER_TX_EXCEEDED | yes | |
| ARUNA_DAILY_CAP_EXCEEDED | yes | |
| ARUNA_SLIPPAGE_TOO_HIGH | yes | |
| ARUNA_RISK_CLASS_NOT_ALLOWED | no | a target can be reclassified under an honest agent |
| ARUNA_TARGET_FROZEN | no | a freeze hits every honest agent on the target |
| ARUNA_CLASS_STALE | no | routine, and absorbed by the SDK |
| ARUNA_INSUFFICIENT_BALANCE | no | the owner's funding, not the agent's behaviour |
| ARUNA_AGENT_NOT_ACTIVE | no | already stopped |
| ARUNA_AGENT_AUTO_DISABLED | no | already stopped |
Coverage lifecycle
attestor observes a change
thenreport_drift(DriftReport)
Bond locks. Lookback bound checked.
thentarget frozen
Pushed in batches. A missed vault learns at its next refresh. New transactions are refused, not atomic across vaults. Anything already in flight cannot be stopped.
thenchallenge window
closes clean
claim approved
parametric payout from pool, to the owner
conflicting report
Disputed: no payout
arbiter decides
- report upheld: claim approved, payout
- report rejected: claim rejected, bond slashed
Not covered
- poor investment decisions, such as an agent buying a worthless token
- losses from price movement
- a vulnerability exploited without a code change
- bugs or exploits in Aruna itself, explicitly excluded