Commit Graph

236 Commits

Author SHA1 Message Date
Maximilian Schneider 0d67dc1361 upgrade to switchboard v2 2023-11-15 12:16:16 +00:00
Maximilian Schneider 30e2bb4fec update switchboard oracle acc length 2023-11-14 14:46:31 +00:00
Maximilian Schneider eeddeb011c update switchboard oracle acc length 2023-11-14 14:17:32 +00:00
Maximilian Schneider 9a5a50efb7 add switchboard oracle 2023-11-14 13:31:09 +00:00
Maximilian Schneider 1cd9a9dd3f release v2.2.1 2022-08-17 16:28:13 +02:00
Maximilian Schneider 663d909d38 fix overflow issue due to larger oracle decimals 2022-08-17 16:25:21 +02:00
Maximilian Schneider a96083d1f9 update README and release 2.2.0 2022-08-16 22:34:00 +02:00
Maximilian Schneider 234d8e2682
support pyth oracle to deprecate flux aggregator (#33)
* add pyth client

* add pyth oracle and instruction to switch

* implement cli for oracle switch

* fix common build

* fix build for cli

* fix devnet url

* rename arg
2022-08-02 16:59:07 +02:00
dd 141b10577b Removed common library dependency from mango program; Added ability to deposit into other users' accounts for reimbursements; Added settle borrow at end of deposit 2021-08-27 12:15:38 -04:00
dafyddd fcfc26dba9
Merge pull request #31 from armaniferrante/publish
Add Anchor.toml for publishing verifiable source
2021-08-12 16:43:15 -04:00
armaniferrante 63d9eab005
Add Anchor.toml for publishing verifiable source 2021-08-11 01:41:51 -07:00
dafyddd 5556f483f9
Merge pull request #30 from blockworks-foundation/interest_change
Interest change
2021-07-04 11:27:38 -04:00
dd 8d49dc63ff updated version 2021-07-04 11:24:01 -04:00
dd 7a9af58186 interest function changed 2021-07-04 10:44:18 -04:00
dafyddd 02ca658620
Merge pull request #28 from blockworks-foundation/dd/gui-hoster
Dd/gui hoster
2021-06-12 16:38:36 -04:00
dd f4b60d7946 updated version num 2021-06-12 16:38:05 -04:00
dd df14fb62a2 got rid of the last_update check in partial_liquidate because devnet sucks 2021-06-12 16:32:59 -04:00
dd 5b3078cda1 updated assets calculations 2021-06-12 11:30:47 -04:00
dd 328756de3e fixed invoke_settle 2021-06-11 10:10:36 -04:00
dd 4d79e88ff6 gui hoster fee now goes to user's margin account; partial_liquidate will update indexes if invalid 2021-06-11 10:06:56 -04:00
dd 1c09e227d9 changed version number to 2.0.0 2021-06-09 11:37:12 -04:00
dd 9f62096058 updated version numbers to 1.0.0; added code in partial_liquidate to update indexes but not yet uncommented; 2021-06-09 11:37:12 -04:00
dd a5c18a6ccc reduce size of MarginAccount to keep it consistent with previous version; change location of info array 2021-06-09 11:37:12 -04:00
dd e4fe8e7084 Added AddMarginAccountInfo 2021-06-09 11:37:12 -04:00
dd c685014017 cleaned up for mainnet and cargo updated 2021-06-09 11:37:12 -04:00
dd 4acc2dc206 added todo 2021-06-09 11:37:12 -04:00
dd ec5c1862c3 got rid of update_indexes in partial_liquidate; not ready for prod because DUST_THRESHOLD is artificially high 2021-06-09 11:37:12 -04:00
dd d4fe5c879e bad code; WILL THROW STACK FRAME ERROR IN PROD 2021-06-09 11:37:12 -04:00
dd 43e5e83f13 fixed logging for partial_liquidation and deprecated liquidate() function. partial_liquidate() is not tested but compiles 2021-06-09 11:37:12 -04:00
dd 690ad95c99 changed devnet_deploy.sh for 5_tokens, did cargo update, made cli work for deploying new group 2021-06-09 11:37:12 -04:00
dd 2dc272b1cf moved the logging to one function in state.rs 2021-06-09 11:37:12 -04:00
Nicholas Clarke ae1b688cf8 Fix to incorrect merge (duplicated msg calls). 2021-06-09 11:37:12 -04:00
Nicholas Clarke 874076dcf5 Refactor partial_liquidate and liquidate to reduce compute. 2021-06-09 11:37:12 -04:00
Nicholas Clarke 5bfffa1f8d Log liquidation details (assets, liabs, prices, collateral ratio) at the start of the liquidation and partial liquidation transactions. 2021-06-09 11:37:12 -04:00
Riordan Panayides e86e43268b update tests to work with 5 tokens, add tests for disabled serum deposit/widthdraw 2021-06-09 11:37:12 -04:00
Riordan Panayides 7d895dcf66 increase marginaccount padding 2021-06-09 11:37:12 -04:00
Riordan Panayides ef0c45dc36 Fix return type, add assertions to borrow tests 2021-06-09 11:33:04 -04:00
Riordan Panayides 61790d6850 Fix Ok call 2021-06-09 11:33:04 -04:00
Riordan Panayides 81afd8bca7 Update comment 2021-06-09 11:33:04 -04:00
Riordan Panayides 85f64e9af9 Ensure errors in mango_group checked borrow funcs are propogated, return Ok on success 2021-06-09 11:33:04 -04:00
Riordan Panayides 8a76b9809d Use a better function for removing borrows, add quantity check to add_borrow 2021-06-09 11:33:04 -04:00
Riordan Panayides 2468a83232 Move borrow flag setting to lower order function 2021-06-09 11:33:04 -04:00
Riordan Panayides 7de3e4d65c Add has_borrows flag to margin account 2021-06-09 11:33:04 -04:00
Ralfs 0b7c6481fc Reuse SRM vault if it's in the group 2021-06-09 11:33:04 -04:00
Ralfs 0e0741ee4e Deposit/Withdraw SRM checks 2021-06-09 11:33:04 -04:00
Ralfs 64c16ba0c6 Change the NUM_TOKENS constant 2021-06-09 11:33:04 -04:00
Nicholas Clarke 8af143c35a
Log liquidation details (assets, liabs, prices, collateral ratio) at the start of the liquidation and partial liquidation transactions. (#25) 2021-05-17 12:21:00 +03:00
dafyddd 708c215b50
Merge pull request #24 from blockworks-foundation/interest_logs
Interest logs
2021-05-12 12:39:05 -04:00
dd e2483baba2 Merge remote-tracking branch 'origin/interest_logs' into interest_logs
# Conflicts:
#	cli/Cargo.lock
#	cli/new_group.md
#	program/Cargo.lock
2021-05-12 12:37:36 -04:00
dd 0aebcc3756 rebased onto master 2021-05-12 12:37:16 -04:00