Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 2.63 KB

README.md

File metadata and controls

87 lines (65 loc) · 2.63 KB

Zeta FuZe 🧬

Discord Chat License

Zeta FuZe

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.

Networks

Key Value
Devnet Live
Mainnet Live

Cross Program Invocations

Instructions

The instructions currently supported are as follows:

  • initialize_margin_account - create and initialize a user's margin account
  • deposit - deposit USDC collateral into the margin account
  • withdraw - withdraw USDC collateral from the margin account
  • place_order - place an order of (price, size, side) on the relevant market
  • cancel_order - cancel a specified order

Accounts

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

Programs

zeta-cpi

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).

examples/vault-put-sell (WIP)

Work in progress

Reference implementation for a put selling vault that uses the Zeta DEX under the hood.

Feature Requests

  • 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