Commit Graph

2567 Commits

Author SHA1 Message Date
microwavedcola1 3338edae88 v0.23.1 2024-03-10 14:28:41 +01:00
microwavedcola1 d9068758d2 ts: fix lint
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-10 14:27:31 +01:00
microwavedcola1 f2442428b6 Merge branch 'main' into deploy 2024-03-10 14:26:29 +01:00
Christian Kamm 077199ed39
ts: rework getMaxWithdrawWithBorrowForToken (#900)
* ts: rework getMaxWithdrawWithBorrowForToken

* binary seach for maxWithdraw

* tests

* warnings

* revert later, change for debugging

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

* fix looking deeper than 0.5 tokens

* no borrows on no-borrow-tokens

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-10 14:11:30 +01:00
Adrian Brzeziński ef5da37fba switchboard migrator example 2024-03-08 16:47:24 +01:00
Adrian Brzeziński 6841ca5166 add mangolana, fee and auto retry to create proposal for scripts 2024-03-07 13:27:57 +01:00
microwavedcola1 043b08fcc3 ts: update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-07 09:08:36 +01:00
Adrian Brzeziński b296c23bbe v0.22.5 2024-03-05 17:15:07 +01:00
Adrian Brzeziński 1a6a544ecd
max accounts error margin fcn (#905)
* add error for max accounts limit

* fix
2024-03-05 16:56:35 +01:00
microwavedcola1 8aff0fb8c5 ts: add missing fields
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-04 14:28:49 +01:00
microwavedcola1 26e238bcd8 v0.22.3 2024-03-04 13:24:12 +01:00
microwavedcola1 a006b25e39 ts: fix client errors
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-03-04 13:21:42 +01:00
Christian Kamm 27ecc14000 Merge tag 'program-v0.22.0' into deploy 2024-03-04 11:32:42 +01:00
Christian Kamm a30c5a9e06 Bump program version to v0.23.0, update idl 2024-03-04 11:22:08 +01:00
Serge Farny bc166ea54b ts client: fix imports (#898)
(cherry picked from commit 53517f876b)
2024-03-04 11:21:54 +01:00
Christian Kamm 0fee3d69c0 Changelog for v0.23.0 (#903)
(cherry picked from commit df15672522)
2024-03-04 11:20:44 +01:00
Serge Farny a6ed29b5a1 service-mango-health: read env variable for more configuration entries (#901)
(cherry picked from commit af9b21c430)
2024-03-01 17:08:33 +01:00
Serge Farny acef7278a0 Dockerfile: try to fix issue with cargo-chef not building 2024-03-01 11:59:56 +01:00
Serge Farny 5629017a8a service-mango-health: fix format 2024-03-01 11:44:06 +01:00
Serge Farny a06801db5c service-mango-health: monitors/historizes accounts health (#890)
* service-mango-health:  add a new service that compute health for all mango accounts and persist an history in postgres sql

(cherry picked from commit 6aa8a883f4)
2024-03-01 11:24:56 +01:00
Lou-Kamades 6b13841513 add TokenBalanceLog in token_charge_collateral_fees (#894)
* add TokenBalanceLog in token_charge_collateral_fees

* increase cu_per_charge_collateral_fees_token

(cherry picked from commit e7f9af9261)
2024-02-29 08:10:13 +01:00
Christian Kamm d2c55c23e1 Bank: more parameter sanity checks (#895)
(cherry picked from commit aa9bc8b1f1)
2024-02-29 08:10:09 +01:00
Christian Kamm 54674e4b20 keeper: fix tx size limits on charge collateral fee batching 2024-02-26 09:21:53 +01:00
Christian Kamm d9f55c4c22 keeper: cu limit when batching charge_collateral_fee ix 2024-02-24 10:04:30 +01:00
microwavedcola1 cacf668999
ts: account for max swap fee rate, when swapping (#892)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-02-23 09:23:30 +01:00
Serge Farny ab8393b52d
liquidator: avoid logging same oracle error (same token) in loop (#889)
* liquidator: avoid logging same oracle error (same token) in loop
2024-02-21 16:35:28 +01:00
Christian Kamm e107b281f9 Idl update 2024-02-21 15:06:34 +01:00
Christian Kamm d6a25f0699 Changelog for v0.22.0 2024-02-21 15:06:26 +01:00
Christian Kamm 8f19514a25 Audit v0.22 fixes (#887)
- apply recurring settle allowance constraint also in
  available_settle_limit
- bank constraints on util0, util1
- cleanup
- perp liq: take over oneshot and recurring limits separately

(cherry picked from commit efe4a1ae3d)
2024-02-21 09:01:23 +01:00
Christian Kamm efe4a1ae3d
Audit v0.22 fixes (#887)
- apply recurring settle allowance constraint also in
  available_settle_limit
- bank constraints on util0, util1
- cleanup
- perp liq: take over oneshot and recurring limits separately
2024-02-21 09:00:57 +01:00
Adrian Brzeziński 2e5883324a v0.21.31 2024-02-20 12:54:50 +01:00
Adrian Brzeziński 6aabbb4ded
fix multi cancel (#888)
* fix multi cancel

* fix

* fix
2024-02-20 12:45:06 +01:00
Christian Kamm 46c6e86206
Add force_withdraw state and instruction (#884)
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2024-02-19 15:06:51 +01:00
microwavedcola1 4f84f984e8 ts: update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-02-19 13:30:12 +01:00
microwavedcola1 355bc55955 ts: sort
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-02-19 12:24:39 +01:00
Serge Farny 338a9cb7b8
liquidator: add allow/forbid token list (#883)
liquidator: add a way to restrict token accepted by the liquidator 

- add allow/forbid list of token for liquidation & conditional token swap triggering
- add allow/forbid list for perp market liquidation
- housekeeping: extract cli args to a dedicated file
- move more hardcoded thing to config and stop using token name (replace with token index)
2024-02-19 10:20:12 +01:00
microwavedcola1 654b7b6ad5 v0.21.30 2024-02-19 09:34:21 +01:00
microwavedcola1 f216b7b696
Mc/tcs premium auction (#870)
* tcs: move to premium auctions by default

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

* tcs: error out if premium cant be computed

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

---------

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-02-19 09:32:39 +01:00
Christian Kamm 8a3a3bf70b
flash loan: Add a "swap without fees" option (#882) 2024-02-19 09:00:30 +01:00
Serge Farny 5d29eb2f0b
Rust client: auto close spot account if needed to place a new order (#877)
rust client: 
- add serum3 place order to command
- add serum3 create open orders command
- add serum3 close open orders command
- auto create serum3 open orders if needed when placing a new order
- auto close serum3 slot if needed when placing a new order & also close unused token if needed to place a serum3 order
2024-02-16 14:01:18 +01:00
Christian Kamm 34d86ef0f4
collateral fees: better compute estimation (#881) 2024-02-16 11:30:32 +01:00
Adrian Brzeziński 5bbed4a519
adjust loanoriginafeerate for untrusted (#885) 2024-02-16 11:26:12 +01:00
microwavedcola1 5b001a9002 ts: update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-02-15 10:05:20 +01:00
Serge Farny 7a8d46e362
rust client: remove jupiter v4 (#879)
* rust client: remove jupiter v4

* rust client: remove dead code

* rust client: allow large enum variant for RawQuote enum
2024-02-14 14:20:23 +01:00
Christian Kamm 3993a3fa66
collateral fees: fixes after devnet test (#880) 2024-02-14 11:32:57 +01:00
Christian Kamm 7a1be5a188 Merge remote-tracking branch 'origin/deploy' into dev 2024-02-14 10:24:12 +01:00
Christian Kamm 4f5ec41d7a
tests: Check mango account backwards compatibility (#878) 2024-02-14 10:00:09 +01:00
Christian Kamm e57dcdc2a9
Add collateral fees (#868)
- New permissionless instruction to regularly charge collateral fees
- Bank and group configuration to set rate and interval
- Keeper addition to call the instruction
2024-02-13 12:39:28 +01:00
Christian Kamm ae833621ad
ci/releasing: Include git sha and refname in release builds (#876) 2024-02-12 15:32:43 +01:00
Christian Kamm 007cf0da6e
liquidator: make tcs max amount configurable (#874) 2024-02-09 11:31:37 +01:00