Commit Graph

7 Commits

Author SHA1 Message Date
Geoff Taylor bf675122ac Updated ids.json for new group. Updated Group with new structure.
* Extended mechanism for combining instructions.
* Fixed Account's calculations of deposits and borrows.
* Added net_assets to Account.
* Groups now maintain loaded RootBanks, not just PublicKeys of them.
* Fixed simple market-maker's calculation of position sizes.
2021-07-01 21:24:08 +01:00
Geoff Taylor 8b8afe1a0b Refactored PollingLiquidator into ReportingAccountLiquidator and LiquidationProcessor
* ReportingAccountLiquidator wraps an AccountLiquidator but provides before-and-after logging and reporting.
* Sped up fetch_token_prices() by reducing it to one network fetch
* Centralised loading of ripe mangoes by creating MarginAccount.load_all_ripe()
* Clearer, more consistent use of Observables
* Added RxPy Backpressure library
* Improved container building to allow for different tags
2021-05-21 14:28:42 +01:00
Geoff Taylor 02e272e437 Expanded TransactionScout and added new command - report-transactions. 2021-05-15 14:17:42 +01:00
Geoff Taylor 4cfc87d420 Split BasketTokenMetadata up. Improved linting.
* Split BasketTokenMetadata into BasketToken and Token.
* Improved linting and mypy so it worked across files.
2021-05-11 19:24:02 +01:00
Geoff Taylor f2d4e7c13f Added Serum trading.
* Added nasty patch around pyserum bug
* OpenOrders can now provide (on-demand) the pyserum representation OpenOrdersAccount
* New context methods -unwrap_transaction_id_or_raise_exception() and random_client_id()
* Added Retrier and retry_context() function
* Added TradeExecutor and SerumImmediateTradeExecutor classes to trade on Serum
2021-05-04 17:18:09 +01:00
Geoff Taylor 3d6f24aee9 Working through liquidation, adding instructions.
- Moved AccountInfo to Context.ipynb to avoid dependency problems from Context to AccountInfo when Classes depends on Context
- Moved AccountInfo.load() operation into Context
- Expanded use of BalanceSheet - can now get a BalanceSheet for each token, either in native token ints or using current prices. Previous get_balance_sheet is now get_balance_sheet_totals()
- Changed Context's fetch_token_balance() to sum all token accounts with that mint and owner, not just pick the first one.
- Added Context.fetch_largest_token_account_for_owner() to efficiently pick a single token account from all those with the same owner and mint.
- Changed wallet file format and default filename to be more consistent with other Solana programs.
- Added an AccountScout notebook to verify an account has been setup properly for using the liquidator. It can print out a nice report as well.
- Added an Instructions notebook to gather the builders for the underlying instructions that will be sent to Solana.
- Added a Liquidation notebook to gather information about the liquidation process and as a place to add liquidation code in the future. (This is very rough.)
2021-04-22 13:19:34 +01:00
Geoff Taylor 2cc5135517 Initial import. 2021-04-14 16:51:39 +01:00