Reference
Program and accounts
Addresses, tokens and account seeds, for integrators.
Programs
| Program | Address |
|---|---|
| Ditto | H8rFWg92RtHsA3wLsVBivfaThdw3DAPw4uiiNWNe3XQh |
| Pyth receiver | rec2HHDDnjLfj4kE7VyEtFA1HPGQLK33259532cRyHp |
| Wormhole, for Pyth's guardian signatures | HDw2E7P8X1SkCyjvoGsfBGAVUutKcj874bXjHrpVYrVL |
| Token-2022, for LONG, SHORT and shares | TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb |
| SPL Token, for USDC | TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA |
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.
| Account | Seeds |
|---|---|
| Policy | config |
| Series | series, feed, L (i64), H (i64), expiry (i64) |
| LONG mint | long, series |
| SHORT mint | short, series |
| Series collateral | collateral, series |
| Vault | vault, feed, creator |
| Share mint | shares, vault |
| Vault LONG | vault-long, vault, series |
| Vault USDC | vault-cash, vault |
| Offer | offer, vault, auction number (u64), maker |
| Offer escrow | escrow, offer |
The fee treasury is a USDC account named in the policy.
Units
| Value | Unit |
|---|---|
| L, H, prices, payouts, USDC | Six decimals: 1 USDC is 1,000,000 |
| LONG and SHORT | Whole tokens |
| Vault shares | Six decimals |
| Fees | Basis points: 10 is 0.10% |