Commit Graph

79 Commits

Author SHA1 Message Date
Christian Kamm 5a05e9cb2e
Update anchor to v0.27.0, stop using submodule (#582) 2023-05-12 13:54:53 +02:00
Christian Kamm 2205fe7260
Changelog for program v0.15.0, version bump, idl update (#577) 2023-05-08 08:13:50 +02:00
microwavedcola1 29002e7197
Spot based token rebalancer (#541)
* script to relabance account to usdc

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* update procfile

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fix script

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fixes from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* add prio fees

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* reset

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fixes from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fixes from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-04-19 18:15:39 +02:00
Christian Kamm 61a4f62ea4 Bump program version to v0.13.0 and update idl 2023-04-13 09:53:15 +02:00
Christian Kamm 74f7282d4e Bump program version to v0.12.0 and update idl 2023-04-13 09:46:58 +02:00
Christian Kamm 8d18e55eee Update mango-feeds-connector dependency 2023-04-08 08:37:08 +02:00
Christian Kamm 535b0b2d0c Changelog for program-v0.11.0, bump version, update idl 2023-03-31 18:47:34 +02:00
riordanp 6be7810c56
Add prometheus metrics to crank (#517)
* Add prometheus metrics to keeper
2023-03-29 15:51:32 +01:00
Christian Kamm 30984bbef1
Use new shared mango-feeds-connector crate for chain_data (#515) 2023-03-29 09:46:06 +02:00
Christian Kamm 7c02075c80 Bump program version to v0.10.0 2023-03-21 12:51:21 +01:00
Christian Kamm b7dd8e0663
Fee buyback: Respect USDC oracle (#504) 2023-03-20 11:18:11 +01:00
Christian Kamm 0349ace3b6
Downgrade the `fixed` crate to v1.11.0 (#500) 2023-03-12 08:50:42 +01:00
Christian Kamm c7dd6cd9e3 Bump program version to v0.9.0 2023-03-12 08:19:05 +01:00
Christian Kamm 5c7a2e3e10
Use the overflow-checks=true equivalent with the fixed crate (#476)
* Vendor `fixed` crate to have checked math in release mode
* remove all cm!()
* drop superfluous parens
* drop use of checked_math crate
* manual removal of redundant checked_* functions
2023-02-24 11:56:33 +01:00
Christian Kamm cfcda705e6 Bump program version to v0.8.0 2023-02-22 14:49:18 +01:00
Christian Kamm 6c33044e92
Dependency updates for bzip2 and openssl-src (#475) 2023-02-22 12:43:22 +01:00
Christian Kamm 7b9e19cc08
Organize paths, rename crates (#466)
liquidator, keeper, cli and settle-bot moved to bin/
client moved to lib/client

All crates have a "mango-v4-" prefix
2023-02-20 14:08:38 +01:00
Christian Kamm 7a51ce0619
Add a "settle-bot" binary (#465)
The bot will call settle on all accounts with unsettled pnl where it can
receive either the flat or low-health fee.
2023-02-20 12:09:17 +01:00
Christian Kamm 15b509b353 Client: Move data feeds to client/ 2023-02-15 15:12:14 +01:00
Christian Kamm 30a84ce6c0 Bump to program version to v0.7.0 2023-02-14 16:09:53 +01:00
Maximilian Schneider 4c9490f004
update serum to most recent openbook version (#437) 2023-02-05 10:26:04 +09:00
Christian Kamm 40696f40a1 Bump program version to 0.6.0 2023-02-02 10:54:54 +01:00
Christian Kamm 1224fa4297 Bump program version to v0.5.0 2023-01-24 10:24:50 +01:00
Christian Kamm ff90c85874
Liquidator: reduce perp base pos if possible (#398)
- send reduce-only ioc order if possible
- settle pnl if needed
- deactivate position
2023-01-18 10:50:23 +01:00
Christian Kamm 15b9b911d1 Bump program version to 0.3.0 2023-01-13 11:38:56 +01:00
Christian Kamm c238ed4f28 Bump version to v0.2.0 2023-01-13 11:25:08 +01:00
Christian Kamm 70616f74dd
idl update (#384) 2023-01-13 10:42:31 +01:00
silas 15784ecd2b
add security policy and on-chain metadata (#361)
* add security-txt macro

* minor fmt fix
2023-01-04 18:13:29 +00:00
Christian Kamm 6cef8caa34
rust client: Make AccountFetcher futures Send (#357)
This required redoing the cached account fetcher logic to properly deal
with locking and repeated calls while a fetch is ongoing.
2023-01-04 16:15:46 +01:00
Christian Kamm 5a38506f04
Liquidator, liqtest and rust client fixes (#336)
Liquidator, liqtest and rust client fixes

- Make rust MangoClient fully async
- Update and improve liquidation test setup scripts
- Update liquidator to use versioned transactions
- Update liquidator to use mango and jupiter account lookup tables
- Use jupiter v4 api to get versioned transactions

Perp liquidation is still not fully good. See discussion aboult perp_liq_pnl_with_token.
2022-12-16 13:10:46 +01:00
Christian Kamm 0ed7175341 Upgrade to solana ~1.14.9
- Update anchor submodule
- Fork and submodule switchboard-v2 package to update dep
2022-12-13 17:00:57 +01:00
Christian Kamm ec41fe4413 Don't compile the margin-trade fixture all the time 2022-12-08 20:48:44 +01:00
Christian Kamm 57e4510b08 Remove mango-macro 2022-12-08 20:48:44 +01:00
Christian Kamm f236a0521a
Fast I80F48 division with reduced precision (#300) 2022-11-24 11:59:00 +01:00
riordanp 5d780a86dc
Upgrade to Solana 1.10.35 (#291)
* 1.10.35 upgrade & compatibility

* Patch Anchor

* Fix test compile

* Serum program update

Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-11-16 10:50:40 +00:00
riordanp df1c2782f1
Use cargo-chef for dependency caching in docker build (#278)
* Try cargo chef for caching build deps in docker

* Run docker build on pan/cargo-chef

* Replace before cheffing

* Fix serum_dex conflict

* Only build what's needed and only once

* Fix typo

* Force liquidator rebuild

* Upgrade vulnerable package lz4-sys

* Revert "Force liquidator rebuild"

This reverts commit c169779542.

* Revert "Temporarily run docker build on branch"

This reverts commit 63ee27eb1e.
2022-11-04 14:30:31 +00:00
Christian Kamm 8bde9e2bff Liquidator: Force cancel serum orders 2022-09-02 12:23:59 +02:00
Christian Kamm c9fb4c7133 Tests: Fix program log capture 2022-08-24 10:07:45 +02:00
Christian Kamm a3067e2448 Avoid custom Debug impls by using derivative crate 2022-08-13 10:18:04 +02:00
Christian Kamm 3139b0816a Client: Jupiter swaps preserve ata/token instructions 2022-08-10 16:24:48 +02:00
microwavedcola1 24c359ef92
keeper token rate update - group multiple ixs into one (#151)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-08 13:40:33 +02:00
Christian Kamm 681c69e3a5
Client: Add jupiter_swap (#139) 2022-08-04 17:01:00 +02:00
Christian Kamm c22590302a Add "cli" command line tool to generate pda addresses 2022-08-02 09:45:12 +02:00
microwavedcola1 c516e45d08
mc/review reserved on accounts (#130)
* review and extend reserved on accounts

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* revert changes to node size, stack gets smashed in rust unit tests

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* max possible

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* max

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fixes from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* header version

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fix from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* fix

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* fixes from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* fix from review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-01 16:53:30 +02:00
microwavedcola1 c88297f42e
mc/ts and keeper improvements (#127)
* ts and keeper improvements

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* remove stray heroku experiments

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* Fixes from reviews

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-31 09:25:11 +02:00
microwavedcola1 f2bfb951fd
anchor as submodule (#121)
* anchor as submodule
* Use anchor submodule as dependency

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-07-27 08:52:41 +02:00
microwavedcola1 2fb92abad8
Mc/ts upgrade (#122)
* upgrade anchor fork, supports anchor idl close now

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* upgrade ts deps

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-26 17:14:07 +02:00
microwavedcola1 0b2e1e6e6c
Mc/realloc 4 (#119)
Realloc + dynamic mango account

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
2022-07-25 16:07:53 +02:00
Christian Kamm ea85824ccb Remove code copied from solana-address-lookup-table-program
This removes the ProgramInstruction enum from the IDL, which was unused
and could break clients.
2022-07-21 06:49:04 +02:00
microwavedcola1 3eae2cdc34 upgrade anchor to latest, upgrade solana dependencies to match what latest anchor uses
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-07-20 15:51:10 +02:00