Updated README now that V3 code is in main.

This commit is contained in:
Geoff Taylor 2021-08-30 15:52:34 +01:00
parent bf7dc95a9d
commit b3bc928121
2 changed files with 16 additions and 47 deletions

View File

@ -11,63 +11,36 @@ Run these notebooks on Binder: [![Binder](https://mybinder.org/badge_logo.svg)](
**I am not yet confident in the figures and calculations. Please don't rely on this code yet!**
This is a project to explore and provide useful code for [Mango Markets](https://mango.markets/).
There are some notebook pages to explore Mango account structures for your own accounts.
There is also a functional liquidator.
There is also a functional liquidator (in the V2 branch) and a functional marketmaker (in the main branch).
## Running the marketmaker
There is a [Marketmaking Quickstart](docs/MarketmakingQuickstart.md) - a walkthrough of setting up and running the marketmaker, from setting up the account, depositing tokens, to running the marketmaker itself.
It can take around 30 minutes to run through.
Requirements:
* A server with docker installed
**Note** This walkthrough is devnet-only so no actual funds are used or at-risk.
The goal is not to be easy to use (although that would be nice!). The goal is to show you how the system works and allow you to use some simeple code to interact with it.
## Running the liquidator
Check out the [Quickstart](Quickstart.md) documentation - it's a walkthrough of setting up and running the liquidator, from creating the account, 'balancing' the wallet across the different tokens, and running the liquidator itself.
There is a [Liquidator Quickstart](docs/LiquidatorQuickstart.md) - a walkthrough of setting up and running the liquidator, from creating the account, 'balancing' the wallet across the different tokens, and running the liquidator itself.
It can take around 30 minutes to run through.
Requirements:
* A server with docker installed
* Some SOL to pay for transactions
* Some USDT to fund the liquidation wallet
* Some USDC to fund the liquidation wallet
## Running the notebooks
Most notebooks are currently 'runnable' - if you open them in your browser and press the 'fast-forward' button (⏩) on the toolbar
## Verify a user's account is properly set up for Mango Markets liquidators
Mango Markets should set up your account automatically for trading, but the requirements for running a liquidator can be a bit more extensive. For instance, for trading you need token accounts for both tokens in the trade but to run a liquidator you need token accounts for all tokens in the `Group`.
## Show your Mango margin accounts
To try this out, go to the [Show Account](ShowAccount.ipynb) page and enter your public key. (Note: I know you're running untrusted code, but it can't do much if you only give it your public key.)
## Show all Mango margin accounts
To try this out, go to the [Show All Margin Accounts](ShowAllMarginAccounts.ipynb) page and run the code.
## Show details of the current Mango gorup
You can use the [Show Group](ShowGroup.ipynb) page to inspect the details of the current Mango group.
## Load all margin accounts into a Pandas `DataFrame`
To try this out, go to the [Pandas](Pandas.ipynb) page and run the code.
[Pandas](https://pandas.pydata.org/) is a data analysis and manipulation tool and it's useful for sorting and slicing large data sets.
The [Pandas](Pandas.ipynb) page can currently show you:
* The total assets and liabilities currently in [Mango Markets](https://mango.markets/) margin accounts.
* The top ten margin accounts with the most assets.
* The top ten margin accounts with the most liabilities.
* The top ten margin accounts with the lowest collateralisation.
**Note** This is only for liquidating Mango V2. There is no Python V3 liquidator for Mango here (yet).
## References
@ -78,9 +51,6 @@ The [Pandas](Pandas.ipynb) page can currently show you:
* [Twitter](https://twitter.com/mangomarkets)
* [Github](https://github.com/blockworks-foundation)
* [Email](mailto:hello@blockworks.foundation)
* [Mango On-Chain Rust Code](https://github.com/blockworks-foundation/mango)
* [Mango TypeScript Client](https://github.com/blockworks-foundation/mango-client-ts)
* [Mango TypeScript Liquidator](https://github.com/blockworks-foundation/liquidator)
* [PySerum](https://github.com/serum-community/pyserum/)
* [SolanaPy](https://github.com/michaelhly/solana-py/)
* [Python Decimal Class](https://docs.python.org/3/library/decimal.html)
@ -88,7 +58,6 @@ The [Pandas](Pandas.ipynb) page can currently show you:
* [Python Observables](https://rxpy.readthedocs.io/en/latest/)
* [RxPy Backpressure](https://github.com/daliclass/rxpy-backpressure)
* [Pyston](https://www.pyston.org/)
* [Flux Aggregator](https://github.com/octopus-network/solana-flux-aggregator)
# Support