Reference
Configuration Every field of a network configuration file, and every environment variable the system reads.
One file per network at config/<network>.json, validated against a Zod schema on load. See
Networks and configuration for how the file
is found and what loading checks.
Field Type Meaning network"mainnet" | "preprod" | "preview"Must match the network the file is loaded as. providersobject Chain access. assetsarray, at least one The asset registry for this network. venuesarray Every venue, enabled or not. oracleobject Pyth configuration. settlementobject This project's settlement validator deployment. taggingobject The CIP-20 label and project name. routingobject Routing parameters. chainLimitsobject Fallback chain limits, asserted against live values by a test.
Field Type Meaning primary"koios" | "blockfrost"The provider that is built and used. fallbacksame, or null Built when configured and its credentials are present. Never a silent substitute for the primary. koios.baseUrlURL For example https://preprod.koios.rest/api/v1. koios.bearerTokenEnvstring or null Name of the variable holding an optional bearer token. blockfrost.baseUrlURL For example https://cardano-preprod.blockfrost.io/api/v0. blockfrost.projectIdEnvstring Name of the variable holding the project id. ogmios.urlstring or null Websocket URL, or null when none is configured. kupo.urlstring or null As above.
Credentials are never inlined. The configuration holds the name of the environment variable.
Field Type Meaning symbolstring Unique per network. Used by --in and --out. policyId56 hex chars 28 byte policy hash, lower case. assetNameHexhex, up to 64 chars Asset name, lower case hex. decimalsinteger 0 to 30 Base unit exponent. fingerprintasset1...CIP-14 fingerprint, recomputed and compared on load. stablecoinboolean The product routes this asset as user input or output. verifiedStablecoinboolean Only true with a signed Cardano Token Registry entry. decimalsSourceenum Where the decimal count came from. decimalsEvidenceURL or null Required when decimalsSource is issuer-declared. notestring, optional Free text recorded with the entry.
Value Meaning token-registryThe signed Cardano Token Registry entry from tokens.cardano.org. provider-token-registryRegistry metadata a chain provider serves for a network the public host does not cover. issuer-declaredThe issuer's own published constant. Requires decimalsEvidence. undeclaredNobody has declared it. decimals must then be 0, so amounts are shown in base units.
Three refinements are enforced by the schema:
An issuer-declared entry must record its evidence URL.
Only a token-registry entry may be a verified stablecoin.
An undeclared entry must carry decimals: 0.
Field Type Meaning idstring Stable venue identifier, for example danogo-clmm. displayNamestring Shown in the interface and in savings claims. executionClass"kernel" | "commitment"Must match the adapter's own declaration. enabledboolean False keeps a venue defined but out of routing here. poolScriptHash56 hex chars or null Null means not deployed on this network, and the venue is skipped. poolScriptAddressbech32 or null orderScriptHash56 hex chars or null Commitment class venues only. orderScriptAddressbech32 or null poolScriptReftxHash#index or nullPublished reference script, so the transaction does not embed it. orderScriptReftxHash#index or nullreferenceUtxosrecord of txHash#index or null Venue specific references, for example a protocol config UTxO. executionFeeLovelacedecimal string or null Execution or batcher fee. depositLovelacedecimal string or null Refundable deposit. paramsrecord Venue specific values the adapter interprets.
Field Type Meaning enabledboolean withdrawScriptHash56 hex chars or null Pyth's own published withdraw script. storageAddressbech32 or null Where the published price UTxO sits. A different script from the withdraw script. rewardAddressbech32 stake or null Reward account of the withdraw script. withdrawScriptReftxHash#index or nullPublished reference script carrying the withdraw script. websocketUrlstring or null apiKeyEnvstring or null Name of the variable holding the Lazer access token. trustedSignerExpirystring or null Recorded expiry of the deployment's trusted signer. feedsrecord of feed Keyed by a short name, for example adaUsd. maxPriceAgeMspositive integer Maximum accepted age of a price update. deviationThresholdBpspositive integer A quote is refused when a pool price differs by more.
A feed carries id (the Lazer numeric feed id), label, and expectedExponent which is an
integer or null.
Field Type Meaning validatorHash56 hex chars or null Null until deployed on this network. addressbech32 or null referenceScripttxHash#index or nulldeploymentTx64 hex chars or null The transaction that published the script. The checker proves the script's first on-chain appearance is this transaction. expirySlotspositive integer How long a settlement UTxO waits before the refund path opens.
Field Type Meaning labelpositive integer CIP-20 metadata label. 674 in both shipped configurations. projectNamenon empty string Every tag must have a line starting with this. Immutable once transactions carry it.
Field Type Meaning intermediateAssetsarray of "ada" or symbol Allowed as an intermediate hop, never as user input or output. maxPathLengthinteger 1 to 4 Maximum hops in a candidate path. maxCandidatePathsinteger 1 to 16 Maximum candidate paths carried into the subset enumeration. defaultSlippageBpsinteger 0 to 10 000 Deducted from the expected output to derive the on-chain minimum. singleClassPreferenceBpsinteger 0 to 10 000 A single class route is preferred when its net output is within this many basis points of a mixed route. dynamicFeePolicy"exclude" | "label"What to do with pools that can change their fee after the quote.
Both shipped configurations use intermediateAssets: ["ada"], maxPathLength: 3,
maxCandidatePaths: 8, defaultSlippageBps: 50, singleClassPreferenceBps: 10 and
dynamicFeePolicy: "exclude".
maxTxSize, maxTxExMem and maxTxExSteps, all positive integers.
Chain limits are read live from the provider at runtime. These values are the fallback used by
budget tests and sizing checks when a live read is not available, and a test asserts them against
the live values.
Variable Required Meaning CARDANO_SWAP_NETWORKWhen --network is omitted mainnet, preprod or preview. There is no default.CARDANO_SWAP_CONFIG_DIRNo Overrides where <network>.json files are found. CARDANO_SWAP_SECRETS_DIRNo Overrides where operator key material lives. Defaults to secrets/ at the repository root. CARDANO_SWAP_OPERATOR_MNEMONICNo Supplies the operator wallet directly instead of reading the stored file. KOIOS_BEARER_TOKENNo Named by providers.koios.bearerTokenEnv. Raises the Koios rate limit. BLOCKFROST_PROJECT_IDWhen Blockfrost is the provider Named by providers.blockfrost.projectIdEnv. PYTH_LAZER_API_KEYFor a direct Lazer subscription Named by oracle.pyth.apiKeyEnv.
requireEnv throws naming the variable when a required one is unset, and never returns an empty
string.
Variable Required Meaning VITE_CARDANO_SWAP_NETWORKYes The network this deployment reads. Unset throws WebConfigError. VITE_KOIOS_BEARER_TOKENNo Raises the Koios rate limit.
Anything given to a VITE_ variable is compiled into the browser bundle and is therefore public.
For a deployment that needs a raised rate limit without publishing the token, put a proxy in front
of the provider and point providers.koios.baseUrl at the proxy.
These gate live tests that spend or emit transactions. They are read by test files, never by
shipped code.
Variable Meaning CARDANO_SWAP_WEB_SUBMITSet to 1 to let the web live test submit. Otherwise it builds and signs only. CARDANO_SWAP_HANDOVER_WINDOW_MSOverrides the submit window that test builds with. CARDANO_SWAP_EMIT_SETTLEMENT_LOCKWrites a signed settlement lock transaction. Never submitted by the test. CARDANO_SWAP_EMIT_SETTLEMENT_CLAIMAs above, for a claim. CARDANO_SWAP_EMIT_SETTLEMENT_REFUNDAs above, for a refund.