Deployment Guide
Deploy a Pull Oracle network on Cardano using the Platform SDK with optional multisig governance.
Prerequisites
- SDK installed (Setup Guide)
- Configuration file prepared (
oracle-config.yaml) - Funded wallet with sufficient ADA:
- Testnet: ~100 ADA
- Mainnet: ~150 ADA
- For multisig: All party verification key hashes (hex format)
ADA Breakdown:
- Reference script: ~64 ADA (one-time)
- UTXO pairs: ~5 ADA per UTXO
- Transaction fees: ~5-10 ADA
- Buffer: ~20 ADA
Example cost calculation:
reward_count = 3, aggstate_count = 3
Total = 64 + (3 + 3) × 5 + 10 = 104 ADAStep 1: Mint Platform Auth NFT
The Platform Auth NFT authorizes all platform operations and must be created before oracle deployment.
Single Signature (threshold = 1)
charli3 platform token mint --config oracle-config.yamlWorkflow:
- SDK builds minting transaction
- Transaction auto-signs with wallet
- Transaction auto-submits to blockchain
- NFT sent to platform address
- Policy ID displayed
Save the policy ID for your configuration:
tokens:
platform_auth_policy: "<policy_id_from_output>"Multisig (threshold > 1)
# Party 1: Build minting transaction
charli3 platform token mint --config party1-config.yaml
# Output: tx_platform_auth_mint.json
# Parties 2-N: Add signatures
charli3 platform token sign-tx \
--config party2-config.yaml \
--tx-file tx_platform_auth_mint.json
# Final party: Submit when threshold is met
charli3 platform token submit-tx \
--config partyN-config.yaml \
--tx-file tx_platform_auth_mint.jsonAfter minting, update all configurations:
tokens:
platform_auth_policy: "<policy_id_from_output>"Step 2: Deploy Oracle Contracts
Automatic Deployment (threshold = 1)
charli3 oracle deploy --config oracle-config.yamlThe SDK automatically:
- Validates configuration parameters
- Creates reference script (~64 ADA) if
create_reference: true - Builds deployment transaction
- Mints oracle NFTs (CoreSettings, AggState, RewardAccount)
- Creates initial UTXO pairs
- Signs and submits transaction
Expected output:
✓ Configuration validated
✓ Reference script created
✓ Deployment transaction built
✓ Transaction signed and submitted
✓ Oracle policy ID: <policy_id>
Deployment successful!Multisig Deployment (threshold > 1)
# Party 1: Build deployment transaction
charli3 oracle deploy --config party1-config.yaml
# Output: tx_oracle_deployment.json (saved, not submitted)
# Parties 2-N: Add signatures
charli3 oracle sign-tx \
--config party2-config.yaml \
--tx-file tx_oracle_deployment.json
# Final party: Submit when threshold is met
charli3 oracle submit-tx \
--config partyN-config.yaml \
--tx-file tx_oracle_deployment.jsonMultisig coordination:
- Party 1 builds transaction with their config
- Transaction file is shared with other parties
- Each party signs with their own config and key
- Final party submits when threshold is met
- All parties should use identical oracle parameters
Step 3: Verify Deployment
Check Transaction Status
Wait for confirmation:
# If using Blockfrost
curl "https://cardano-preprod.blockfrost.io/api/v0/txs/<tx_id>" \
-H "project_id: <project_id>"Look for confirmation count > 0.
Query Oracle UTXOs
Using Blockfrost:
curl "https://cardano-preprod.blockfrost.io/api/v0/addresses/<script_address>/utxos" \
-H "project_id: <project_id>"Using Kupo:
curl "http://localhost:1442/matches/<script_address>/*"Verify the following UTXOs were created:
| NFT | Count | Purpose |
|---|---|---|
C3CS | 1 | CoreSettings - holds oracle configuration |
C3RA | N | RewardAccount - manages reward distribution (N = reward_count) |
C3AS | N | AggState - tracks aggregation states (N = aggstate_count) |
Example verification:
# Count specific NFT type
curl "<oracle_address_utxos_endpoint>" | jq '[.[] | select(.amount[] | .unit | contains("C3RA"))] | length'Should return reward_count for RewardAccount NFTs.
Inspect Transaction Details
cardano-cli transaction view --tx-file tx_oracle_deployment.jsonVerify:
- Correct number of outputs (1 CoreSettings + reward_count + aggstate_count)
- Each output has appropriate NFT
- ADA amounts match
utxo_size_safety_buffer - Reference script output present (if
create_reference: true)
Understanding UTXO Scaling
The reward_count and aggstate_count parameters determine initial capacity:
| Parameter | Creates | Purpose | Impact |
|---|---|---|---|
reward_count | N RewardAccount UTXOs | Parallel reward distribution | Higher throughput for rewards |
aggstate_count | N AggState UTXOs | Parallel aggregation tracking | Higher throughput for aggregations |
Capacity calculation:
- Each UTXO pair enables one parallel transaction
reward_count: 3, aggstate_count: 3= 3 parallel operations
Cost calculation:
Deployment cost = 64 (ref script) + (reward_count + aggstate_count) × 5 + feesRecommendation:
- Low volume (< 10 req/day): Start with
reward_count: 1, aggstate_count: 1 - Medium volume (10-100 req/day): Use
reward_count: 2-3, aggstate_count: 2-3 - High volume (> 100 req/day): Use
reward_count: 5+, aggstate_count: 5+
You can scale up or down after deployment using governance commands.
Reference Script
The reference script allows validators to be referenced rather than included in each transaction, significantly reducing transaction sizes and fees.
Default behavior (create_reference: true):
- SDK automatically creates reference script during deployment
- Costs ~64 ADA (locked, recoverable)
- Reduces per-transaction costs
If reference script creation fails:
# Manually create reference script
charli3 oracle create-reference-script --config oracle-config.yamlTroubleshooting
“Platform auth NFT not found”
- Cause: Platform auth NFT wasn’t minted or is at wrong address
- Solution:
- Verify NFT exists: Query platform address for assets
- Check policy ID matches config:
tokens.platform_auth_policy - Ensure NFT is at correct address (platform or admin address)
- Re-mint if necessary:
charli3 platform token mint
“Reference script creation failed”
- Cause: Insufficient funds or network issue
- Solution:
- Ensure wallet has ≥64 ADA available
- Check network connectivity (Blockfrost/Ogmios)
- Retry:
charli3 oracle create-reference-script - Or deploy without reference: Set
create_reference: falsein config
“Insufficient signatures”
- Cause: Multisig threshold not met
- Solution:
- Check signature count:
cat tx_file.json | jq '.signed_by | length' - Verify matches threshold:
cat tx_file.json | jq '.threshold' - Ensure each party signed exactly once (no duplicates)
- Check all parties have correct signing keys
- Check signature count:
“Transaction too large”
- Cause: Too many UTXOs being created in single transaction
- Solution:
- Reduce
reward_countandaggstate_countin config - Deploy with fewer UTXOs initially
- Scale up later using
charli3 oracle scale-up
- Reduce
“Invalid configuration: reward_dismissing_period must be greater than pause_period”
- Cause: Timing constraint violation
- Solution: Update
timingsection in config:timing: pause_period: 3600000 # 1 hour reward_dismissing_period: 7200000 # Must be > pause_period
“Invalid node verification key hash format”
- Cause: Node keys in wrong format
- Solution: Node keys must be hex-encoded VKHs, not bech32:
nodes: feed_vkh: - "007df380..." # Correct: hex format # - "ed25519_pk1..." # Wrong: bech32 format
“Wallet address mismatch”
- Cause: Wallet in config doesn’t match platform address
- Solution:
- Verify wallet derives to correct address
- Check network matches (testnet vs mainnet)
- Ensure mnemonic or signing key is correct
“Insufficient funds”
- Cause: Wallet doesn’t have enough ADA
- Solution:
- Calculate required amount (see Prerequisites)
- Send ADA to wallet address
- Wait for confirmation before retrying
- Use testnet faucet for testing: https://docs.cardano.org/cardano-testnet/tools/faucet/
Post-Deployment Checklist
- Verify oracle policy ID saved
- Confirm all UTXOs created (CoreSettings, RewardAccount, AggState)
- Reference script created and accessible
- Test node operator connectivity
- Document oracle parameters for team
- Test aggregation submission (optional)
Next Steps
- Platform Operations - Manage your oracle