Commit Graph

2197 Commits

Author SHA1 Message Date
Christian Kamm fd997e2e2c Cargo: Remove explicit workspace-inheritance feature use
solana-release cargo version was updated
2023-10-05 11:05:12 +02:00
Christian Kamm 32e08af598 Idl update 2023-10-05 11:04:20 +02:00
Steve f625284593
Update to solana 1.16.14 and anchor 0.28.0 (#718)
- Change fixed to be a git dependency (no more submodules!)
- Upgrade fixed to a version compatible with borsh 0.10
- Upgrade openbook-v2 dependency (for anchor compat)
- Move services from mango-feeds repo into bin/
- Update mango-feeds-connector

Co-authored-by: Christian Kamm <mail@ckamm.de>
Co-authored-by: Riordan Panayides <riordan@panayid.es>
2023-10-05 10:56:45 +02:00
Christian Kamm 2ad6ec4166
Add script to fetch an account's transactions (#740) 2023-10-04 09:19:30 +02:00
Christian Kamm 1afcff5dc2
Changelog and version bump for v0.20.0 (#739) 2023-10-04 09:18:57 +02:00
microwavedcola1 2df4df048c
program: be more relaxed with max rate (#734)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-10-03 21:13:50 +02:00
Christian Kamm ea7fae4687 Changelog, version bump for program v0.19.1 2023-10-02 19:54:09 +02:00
Christian Kamm 1d241de75a
FlashLoan: Allow jup v6 for delegates (#737) 2023-10-02 19:40:43 +02:00
microwavedcola1 39ed3a3fb5
program: if position is not negative then continue ahead with withdrawal, also deactivate if position is 0 (#736)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-10-02 09:11:44 +02:00
Christian Kamm 1db3d21529
Make getBorrowRateWithoutUpkeepRate() work in more cases (#731)
In particular when util0 == 0
2023-09-27 12:57:06 +02:00
Christian Kamm eca4550fa2
Client: fix issue when no serum program is registered (#732)
The serum StreamMap exiting aborts the whole streaming job.
2023-09-27 12:56:52 +02:00
Christian Kamm ac38ccc687
Drop HealthCache from idl, disable ComputeAccountData ix (#723)
It's used for tests, we don't want people depending on it.
2023-09-19 10:01:44 +02:00
Christian Kamm 2c4009eab1
Token deposit: Require valid oracle for new token positions (#722)
This avoids making an account accidentally or intentionally unusable
(except for deposits/withdraws) by depositing a token with a stale
oracle.
2023-09-19 09:08:32 +02:00
Christian Kamm 9b224eae1b
Jupiter: Ensure source account is initialized (#721) 2023-09-18 09:21:46 +02:00
Christian Kamm 40ad0b7b66
Rust client: Use alts for every transaction (#720) 2023-09-18 09:21:30 +02:00
Christian Kamm 2adc0339dc
Serum3 open orders: Fix health overestimation (#716)
When bids or asks crossed the oracle price, the serum3 health would be
overestimated before.

The health code has no access to the open order quantites or prices and
used to assume all orders are at oracle price.

Now we track an account's max bid and min ask in each market and use that
as a worst-case price. The tracking isn't perfect for technical reasons
(compute cost, no notifications on fill) but produces an upper bound on
bids (lower bound on asks) that is sufficient to make health not
overestimate.

The tracked price is reset every time the serum3 open orders on a book
side are completely cleared.
2023-09-13 09:35:10 +02:00
Christian Kamm 7b8a92dcea
Idl compatibility check: Also cover ix args and field renames (#709) 2023-09-08 21:13:30 +02:00
Christian Kamm 0aabd28cdc Merge remote-tracking branch 'origin/deploy' into dev 2023-09-07 13:14:03 +02:00
Christian Kamm 97d3ec01c1 scripts: fix mainnet-no-margin-group post-merge 2023-09-07 13:07:55 +02:00
Christian Kamm d60bea7436 Merge remote-tracking branch 'origin/main' into deploy 2023-09-07 12:59:50 +02:00
microwavedcola1 56eb48904a Merge tag 'program-v0.19.0' 2023-09-07 10:46:37 +02:00
tjs 1861d127bc only remove active filter from Ids on perp markets 2023-09-06 14:11:25 -04:00
tjs 335c98a09a v0.19.14 2023-09-06 13:53:07 -04:00
tjs f2eb37b598 ids should return all subitems for a group regardless of active state 2023-09-06 13:51:40 -04:00
tjs 7b4d46e135 v0.19.13 2023-09-05 10:59:55 -04:00
microwavedcola1 b42a35cdb9 sb logs
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-09-05 15:56:04 +02:00
tlrsssss 025f594fb2
Merge pull request #705 from blockworks-foundation/ts/ids-fixes
Ts/ids fixes
2023-09-05 09:41:08 -04:00
tjs c7c362292c Support reloading reloadSerum3ExternalMarkets from Ids class
remove console logs
2023-09-05 09:35:17 -04:00
tjs 3715a9a7f2 Update Ids class so the array filters in the getters work
Also add placeholder values in ids.json so types work; Deprecate ids.json
2023-09-04 21:04:42 -04:00
Adrian Brzeziński 2110cf7f55 v0.19.12 2023-09-04 18:20:02 +02:00
Adrian Brzeziński 79ea2bc7df
preprended instruction change (#703)
* fix

* fix
2023-09-04 18:06:37 +02:00
microwavedcola1 0a2bf3abd5
ts: example script no margin group (#697)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-09-04 17:11:04 +02:00
Harrison Green bffb77064a
Add audit report for 0.19.0 (#704) 2023-09-04 09:33:14 +02:00
Christian Kamm ba6bd96784
Allow account shrinking and migration (#692)
- The AccountExpand instruction can now shrink accounts by reducing
  the number of token/perp/serum/tcs/perp oo slots.
- A new AccountSizeMigration instruction can permissionlessly shrink
  accounts that are too large and migrate them to the v3 layout.
2023-09-04 09:30:57 +02:00
Christian Kamm 139555a46e
liquidator: Make the check interval configurable (#702)
And reduce the default from 5s to 1s.
2023-09-01 16:27:17 +02:00
Christian Kamm aca2b2e679
liquidator: Work on groups without openbook markets (#701) 2023-09-01 15:05:43 +02:00
Adrian Brzeziński bb478b9631 v0.19.11 2023-08-31 14:37:29 +02:00
Adrian Brzeziński d9f756b346
additional functions mechanizm (#700) 2023-08-31 14:36:04 +02:00
Christian Kamm c07978fb68
max_swap: Fix swapping between zero weight tokens (#699)
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-31 14:01:18 +02:00
Christian Kamm e37f1ed996 update idl 2023-08-30 10:59:14 +02:00
Christian Kamm 289c3ff828 FlashLoan: Log the approved amount (#696)
Previously only the part of the approved amount that was a loan got
logged, missing some interesting information.

(cherry picked from commit 03378bb808)
2023-08-30 10:58:17 +02:00
Christian Kamm 03378bb808
FlashLoan: Log the approved amount (#696)
Previously only the part of the approved amount that was a loan got
logged, missing some interesting information.
2023-08-30 10:57:41 +02:00
microwavedcola1 e0de779d96 v0.19.10 2023-08-30 07:21:53 +02:00
microwavedcola1 e730bcd146 ts: perpCancelOrderByClientOrderIdIx
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-30 07:21:03 +02:00
Christian Kamm 7125058ce5 Account expansion: Transfer more lamports only if needed (#694)
Result of audit feedback

(cherry picked from commit 020a978270)
2023-08-29 10:03:54 +02:00
Christian Kamm 2d392c8fff FlashLoan: fee fixes (#693)
- Rename the new "swap fee" to "deposit fee" and let it apply to all
  deposits, not just for Swap-type flash loans.
- But don't apply it to withdrawals (effectively giving rebates!)

Result of audit feedback

(cherry picked from commit 1d6ce550f3)
2023-08-29 10:03:53 +02:00
Christian Kamm 020a978270
Account expansion: Transfer more lamports only if needed (#694)
Result of audit feedback
2023-08-29 10:03:24 +02:00
Christian Kamm 1d6ce550f3
FlashLoan: fee fixes (#693)
- Rename the new "swap fee" to "deposit fee" and let it apply to all
  deposits, not just for Swap-type flash loans.
- But don't apply it to withdrawals (effectively giving rebates!)

Result of audit feedback
2023-08-29 10:03:07 +02:00
microwavedcola1 0ee9af749f ts: getInstantaneousFundingRatePerSecond
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-08-28 17:56:14 +02:00
microwavedcola1 92be5b7de6 v0.19.9 2023-08-28 17:34:52 +02:00