GithubHelp home page GithubHelp logo

0xmisaka / mango-money-multiplier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kekloldyormarket/mango-money-multiplier

4.0 0.0 5.0 7.46 MB

Dockerfile 0.07% Shell 0.37% JavaScript 19.06% TypeScript 74.16% Procfile 0.01% Python 6.33%

mango-money-multiplier's Introduction

Mango Money Multiplier

Description

It's a funding arbitrage bot for mango.markets. What that means is that one element of this software assesses the relative opportunity out of the aggregate opportunity for the subset of perps and leveraged spot markets on Mango.

You can do a fair bit of research( dyor or due diligence, six of one - half dozen of other ) on the mechanics within these two older pieces of content of mine:

https://hacks.substack.com/p/how-the-big-kids-make-a-shtt0n-of

https://jarettdunn.medium.com/what-dydx-and-starkwares-partnership-means-for-defi-s-perps-future-s-e88612b860ef

Todo

The other half of this trick is to simultaneously measure and maybe enter into the cash n carry arbitrage opportunities for the given subset of markets. I gather from a mango competitor that Zeta allows for expiring onchain futures markets.

Cash n carry futures arbitrage exists on a longer timeframe than funding opps, so it's easier to get into position slowly over time as maker post-only.

To optimize we probably need to assess when a given funding opp exceeds net fees to get in @ market, and execute if so.

Another idea is to exploit the cross-exchange opportunities in the divergence of the new superset, especially insofar as the most divergent funding/cash n carry futures opps.

A good idea for reproducability (sp I'm in plaintext editor) is to change the nginx reverse proxy from 80, in case the given machine is already running a web server of any kind (or solana RPC for that matter, as I've heard). This results in conflicts when our reverse nginx proxy tries to bind.

Requirements

  1. docker
  2. docker-compose
  3. python
  4. poetry
  5. you'll need a solana private key as UInt8Array inside a json file called id.json. There are two ways to achieve this: you can run solana-keygen new after installing solana cli, and it'll be in ~/.config/solana/id.json (I dunno about inferior operating systems - give it a search on your favorite search engine) or you can the node bs58 package to translate your key into a machine-readable key (instructions live here: https://www.npmjs.com/package/bs58)
  6. In retrospect you'll need this same file to also be in ~/.config/solana/id.json
  7. node, npm, yarn
  8. a paid solana rpc service, better yet your own running on localhost

Install Steps

meAndTheBoys is the list of public keys for wallets where you have access to trade mango. This includes you and people that delegate to you. Male or female. This is your root wallet pubkey, not the mango account within the interface.

Delays env var is the range for each thread to delay every cycle, randomly selected each cycle. The default 1,100 means it'll randomly select a number between 1 and 100, per thread, and sleep that long.

  1. Fork this shit. PRs welcome.
  2. git clone https://github.com/dyor-market/mango-money-multiplier
  3. cd mango-money-multiplier
  4. cp ~/.config/solana/id.json ./mango-service-v3
  5. don't panic (I removed a step and didn't feel like re-numbering)
  6. configure docker.env
  7. sudo docker build .
  8. sudo docker-compose up
  9. pip install tenacity httpx pydantic
  10. cd opportunities-assessor
  11. yarn install && yarn build
  12. node lib/examples/example.js
  13. cd ../py
  14. export delays="1,100"
  15. edit mango-service-v3/src/mango.simple.client.ts with your pubkeys
  16. python3 example3_market_maker.py
  17. tip the address stacc.sol

Listen very carefully.

  1. this is incredibly alpha software, and untested.
  2. historical data are no indication let alone assurance of future results.
  3. trading at leverage is extremely risky, and you may lose all your funds.
  4. none of this should ever be misconstrued for financial advice. this repository and any associated code is reference, educational, and entertainment only.
  5. for the sweet love all that is unholy, risk only what u can afford to lose.

mango-money-multiplier's People

Contributors

staccdotsol avatar

Stargazers

Stefano Zingg avatar  avatar Luca avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.