Skip to main content
Inflexion’s configuration lives in four scopes, each with its own .env or process.env read site:
  • Root .env — contracts, deploy scripts, and shared keys (.env.example).
  • Frontend apps/web — build-time NEXT_PUBLIC_* keys (apps/web/.env.example).
  • Engine packages/engine — the Path-B matching relayer (process.env).
  • API packages/api — the public REST surface over the subgraph (process.env).
This page documents every variable, its default, and what it controls. Two of these — DEMAND_LOG and COMPETITION_LOG — are day-one sinks: the behavioral signals they capture cannot be reconstructed after the fact, so they must be set from the very first deploy.
Contract addresses are not an env-var concern. The SDK loads them from the on-chain address registry and hardcodes nothing. See /reference/deployments for the live registry. The only address that flows through env is the engine’s VERIFYING_CONTRACT, which defaults to the registry value anyway.

Root .env (contracts / deploy / shared)

Used by Foundry deploy scripts, Stylus deploys, and verification.
Limit: DEPLOYER_PRIVATE_KEY and OPERATOR_PRIVATE_KEY are plaintext in the local .env. Why: the live deployment is a public testnet (Arbitrum Sepolia) where the deployer/treasury EOA is a throwaway testnet key (0x96455C9b00D530BD0629b71B674298440328b1Dd), not custody of real value. Mitigation: these keys are scoped to Sepolia + local only by convention and must never hold a mainnet key. A mainnet deploy would move signing to a hardware/MPC signer and never touch a flat env file.

Frontend apps/web (NEXT_PUBLIC_*)

All build-time public keys — they are inlined into the client bundle, so they hold no secrets.
The frontend is designed to degrade, never fail. With no NEXT_PUBLIC_ENGINE_URL and no NEXT_PUBLIC_API_URL, the app reads everything it needs straight from chain via the SDK and prices off the always-on cvAMM pool (Path A). Wiring in the engine adds the Path-B MM quotes; wiring in the API adds historical/aggregate views. This mirrors the SDK’s graceful degradation contract.

Engine packages/engine (process.env)

The Path-B matching relayer.

The MM bot

The reference market-maker bot reads its own set:

API packages/api (process.env)

The public REST surface over the subgraph.
SUBGRAPH_URL is set on the hosted backend, pointing at the deployed inflexion-arb-sepolia subgraph on The Graph Studio. History, aggregate, and time-series surfaces are served live from the subgraph via the API. The subgraph has indexed on-chain history from the redeploy block, so the QuoteFilled / SwapPriced events and CvammPricing.loadComponents() reads are all available.Graceful degradation is still a design property: if SUBGRAPH_URL were unset, the API would return a typed pending state ('rich-events-absent' / 'no-history-source') rather than erroring, and live reads via RPC would still work.

Day-one: the DEMAND_LOG / COMPETITION_LOG rule

DEMAND_LOG and COMPETITION_LOG are not ordinary optional knobs. They are append-only telemetry sinks for two of the five data-moat signals, and the data they capture is unreconstructable retroactively:

DEMAND_LOG → Signal 4

The latent / unfilled half of moneyness-and-demand skew: interest that was previewed or quoted but never executed. Nothing on-chain records a swap that didn’t happen, so if you don’t log it at request time, it is gone forever.

COMPETITION_LOG → Signal 2

The losing side of quote competition: every MM quote, not just the winner. The chain only commits the executed rail (so invariant I7 holds), so the losers — the raw material for win-rate and the pool-vs-MM spread — exist only in this log.
Rule: set DEMAND_LOG and COMPETITION_LOG from the first deploy, on both the engine and (for read-out) the API. Why: these two signals are derived from events that never reach the chain — unfilled interest and losing quotes. There is no backfill: a day run without these sinks is a permanent hole in the moat dataset. Mitigation: the sinks are append-only JSONL with negligible cost, so the safe default is always on.
Structures ship from day one; the full DYNAMICS (pool-vs-MM spread as a forward-vol signal) mature with multiple competing MMs and volume. The dataset begins at the single redeploy; the off-chain telemetry halves begin at the first interaction logged.What Inflexion offers today is the architecture and the first public view into the microstructure of the DeFi LP volatility-risk premium — not yet a mature dataset:
  • Structures are present day-one. All five non-circular behavioral signals are defined and queryable from launch.
  • Dynamics mature with volume. The richer signal — the pool-vs-MM spread read as a forward-vol indicator — only sharpens once multiple market makers compete and real flow accumulates.
  • The dataset begins at the single redeploy, and the off-chain telemetry halves begin at the first interaction logged. History is served live from the subgraph via the API; if a backing (subgraph URL / RPC / telemetry) is absent, surfaces degrade to a typed pending state — never an error.

Minimal configurations

.env
packages/engine/.env
apps/web/.env.local

See also

Deployments

The live address registry — what env never holds.

Decimals & units

dUSDC (6), dWETH (18), feeds (8), WAD (1e18).

Status & caveats

Live surfaces, dataset maturity, and remaining caveats.

The five signals

What DEMAND_LOG and COMPETITION_LOG feed.