Skip to content

Making composability with the Zeta DEX a breeze, FuZe provides CPI interfaces and sample implementations for on-chain program integration.

License

Notifications You must be signed in to change notification settings

zetamarkets/fuze

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Making composability with the Zeta DEX a breeze, FuZe provides CPI interfaces and sample implementations for on-chain program integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •