Reference

Program and accounts

Addresses, tokens and account seeds, for integrators.

Programs

ProgramAddress
DittoH8rFWg92RtHsA3wLsVBivfaThdw3DAPw4uiiNWNe3XQh
Pyth receiverrec2HHDDnjLfj4kE7VyEtFA1HPGQLK33259532cRyHp
Wormhole, for Pyth's guardian signaturesHDw2E7P8X1SkCyjvoGsfBGAVUutKcj874bXjHrpVYrVL
Token-2022, for LONG, SHORT and sharesTokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
SPL Token, for USDCTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

Every Ditto transaction from the app also carries a signed memo, ditto:<request id>, through the Memo program MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr.

Account seeds

All accounts are program-derived addresses of the Ditto program, from these seeds in order. Integers are little-endian; a feed is its 32-byte Pyth ID.

AccountSeeds
Policyconfig
Seriesseries, feed, L (i64), H (i64), expiry (i64)
LONG mintlong, series
SHORT mintshort, series
Series collateralcollateral, series
Vaultvault, feed, creator
Share mintshares, vault
Vault LONGvault-long, vault, series
Vault USDCvault-cash, vault
Offeroffer, vault, auction number (u64), maker
Offer escrowescrow, offer

The fee treasury is a USDC account named in the policy.

Units

ValueUnit
L, H, prices, payouts, USDCSix decimals: 1 USDC is 1,000,000
LONG and SHORTWhole tokens
Vault sharesSix decimals
FeesBasis points: 10 is 0.10%