Zeta FuZe [DEPRECATED] - Please use Zeta ABI
FuZe is Zeta's cross-program integration ecosystem.
This repository contains the Zeta Cross Program Invocation (CPI) interface as well as a number of helpful examples and reference implementations on how to compose (fuse) with the Zeta DEX.
| Key | Value |
|---|---|
| Devnet | Live |
| Mainnet | Live |
The instructions currently supported are as follows:
initialize_margin_account- create and initialize a user's margin accountdeposit- deposit USDC collateral into the margin accountwithdraw- withdraw USDC collateral from the margin accountplace_order- place an order of (price, size, side) on the relevant marketcancel_order- cancel a specified order
The accounts and relevant data that is currently supported (non-exhaustive):
ZetaGroup- contains information relating to all derivatives market for an underlying- Underlying
- Serum Market
- Strike
- Kind (Call, Put, Future)
- Expiry
Greeks- Mark Price
- Delta
- Vega
- IV
MarginAccount- Balance
- Positions
Oracle- Price
Basic usage examples outlined in a dummy proxy program that simply calls the main zeta program instructions. Also includes account layouts and outlines how to read all relevant on-chain data from the Zeta program.
This should give all the boilerplate needed to execute core program functionality both on the Rust program and Typescript client (via tests/zeta_cpi.ts).
Work in progress
Reference implementation for a put selling vault that uses the Zeta DEX under the hood.
- Zeta program interface
- Core CPI instruction examples
- Examples on how to read and deserialize Zeta account data
- Typescript client examples
- Proper tests (current tests don't really check and validate state)
- Put selling vault sample
- Multi-leg product vault e.g. straddles
