# Solana reference

## Identity and status

- Program ID: `DZzj8jz1vicWa6WAqSNrxwDQg8uH9Um6QeE7yLnfw3H3`.
- Basket: exactly 7 ordered public Pyth `PriceUpdateV2` accounts.
- Basket version: `2`; formula basket hash: `5d13fe3aa4ebca82b5db4a60cb308a829a3f2d69970f53720efdc3a2a694bdd7`.
- Markets, in order: BTC, ETH, SOL, RENDER, ZEC, HYPE, AAVE (USD).
- Freshness: at most 600 seconds against the chain clock; future observations fail.
- Normalized exponent: `-18`.
- Instruction discriminator: bytes `[232, 156, 246, 208, 173, 96, 51, 69]`.
- Dated evidence, 2026-10-14: deployed devnet bytes match the 42,016-byte artifact; checked call rejected stale RENDER, ZEC, HYPE and AAVE with error 6016. A later confirmed seven-feed call and public-reader check passed after a one-time authenticated refresh; future calls still require fresh inputs. The Solana mainnet deployment is live. Read deployment.json for the current verified program identity.
- Published evidence route: https://bttlabs.fun/randomifiers/evidence/ (captured observations and reproduction).
- October 15 release rehearsal: the reviewed 42,184-byte SBPFv2 artifact reproduced all 95 output bytes against seven real mainnet feed account snapshots in a local validator, at 14,138 CU. The October 14 devnet artifact remains separate dated evidence. See https://bttlabs.fun/randomifiers/evidence/#release-proof.
- Status is time-sensitive. Probe again before presenting it as current.

## Call path

Build a direct instruction or invoke the same instruction through CPI:

```ts
const instruction = new TransactionInstruction({
  programId,
  keys: orderedFeedAccounts.map((pubkey) => ({
    pubkey,
    isSigner: false,
    isWritable: false,
  })),
  data: Buffer.from([232, 156, 246, 208, 173, 96, 51, 69]),
});
```

Use the canonical accounts published in https://bttlabs.fun/randomifiers/code/solana-read.mjs. Preserve their order. Maintainers with authorized repository access can regenerate them with the basket tooling. The implementation repository currently requires authorized access.

Direct and CPI consumers receive the same validation. Read return data immediately after CPI, before another invocation replaces it. Validate the return program ID and every schema/identity field before consuming X.

## Result

Read transaction return data only when its program ID matches the Randomifier program. The 95-byte result binds:

- magic `UMRFXV1\0`;
- basket version and formula basket hash;
- normalized exponent and sample count;
- composite X as `u128`;
- composite hash.

## Mapping and public inputs

Use exact integers. In the dated capture all seven price exponents are −8, so X at −18 has ten trailing zero digits. Direct `rawX % 2` and `% 100` therefore return zero for every captured sample. Test the application mapping and timing/retry policy. Hashing public inputs does not hide them or make an already visible result unpredictable.

## Costs and availability

The Randomifier charges no application service fee. A submitted Solana transaction still pays the
ordinary network fee. Devnet feed freshness may not support the full production basket; an executable
program account alone does not prove that a successful complete X is currently available.
