* Fix script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix docs build job (#501)
* workaround where rpc rejects base58 encoded pubkeys (#502)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Rename settle-bot to settler, fix build (#492)
* Fix settler build, rename due to heroku not liking '-'
* Temporarily remove ref tag
* Remove temporary branch trigger
* Add oracleProvider to Bank and PerpMarket (#491)
* Add oracleProvider to Bank and PerpMarket
* v0.9.6
* Fix null checks on getters for PerpMarket and Bank (#505)
* Export OracleProvider
* Fix null checks on getters
* token_liq_bankruptcy: Use oracle for valuing insurance fund tokens (#503)
Previously a token from the insurance fund was valued at 1 USD. Now it
uses the oracle associated with it (USDC oracle).
* v0.9.7
* ts: Fix ix gate enum, add code for creating a disable-tx gov ix
* Fee buyback: Respect USDC oracle (#504)
* refactor script (#509)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* IxGateSet: Log AccountBuybackFeesWithMngo state
* TokenRegister: Sanity checks on token_index
* Allow token/market names to fill storage bytes completely
Previously the last byte was always zero.
* HealthRegion: Whitelist allowed instruction types (#508)
This fixes a security issue where bankruptcy related instructions could
be called inside a health region. Now health regions are limited to
compute optimization like when placing multiple orders in one
transaction.
This limitation also makes it impossible to abuse health regions for
flash loans. Use the FlashLoan instructions for that purpose.
* Add fly deploy scripts (#490)
* Bump program version to v0.10.0
* liquidator docs (#512)
* liquidator docs
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
---------
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Quality of life fixes (#511)
* breaking: make pegLimit an optional arg
* pass externally cached blockhashes to sendTransaction
* convenience accessors for connection & walletPk on client
* add script to sim accounts with leverage change (#514)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix bug: only account for borrows we are offsetting (#513)
* Fix bug: only account for borrows we are offsetting
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fix
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Bank: Unittest for net borrow limits
---------
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
* extend script, fix util function
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix interest rate computation in client (#520)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* minor ts fixes
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Temporarily disable health region use on mm script (#507)
* Use new shared mango-feeds-connector crate for chain_data (#515)
* Add prometheus metrics to crank (#517)
* Add prometheus metrics to keeper
* update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fix bug where unrealised profit was not abs'ed
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* in perp settle fees, dont error, rather return early, this enables blindly concatenating perp settle fees to perp settle pnl (#526)
* in perp settle fees, dont error, rather return early
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
---------
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Net borrow limits: Use correct price for check (#527)
* Changelog for program-v0.10.0 and idl update
* script for grabbing logs
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Perp funding: Fix logging in update funding + deactivate pos (#528)
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix test
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* sync rate params to latest proposal (#523)
* sync rate params to latest proposal
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>
* Limit funding and interest accrual during downtimes (#529)
Previously, if the funding or interest updating instruction wasn't
called for a long time (like for a solana downtime or the security
council halting the program), the next update would apply funding or
interest for the whole time interval since the last update.
This could lead to a bad downtime situation becoming worse. Instead,
limit the maximum funding and interest time interval to one hour.
* Changelog for program-v0.11.0, bump version, update idl
* Don't reload openorders if there's no active markets
* update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* reorg
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Emit perp fees settled on update_funding. Required to have a full picture of total perp market fees. (#530)
---------
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <89031858+microwavedcola1@users.noreply.github.com>
Co-authored-by: Christian Kamm <mail@ckamm.de>
Co-authored-by: Maximilian Schneider <mail@maximilianschneider.net>
Co-authored-by: tlrsssss <tjshipe@gmail.com>
Co-authored-by: Nicholas Clarke <nicholasgclarke@gmail.com>
* get bids and asks for a user on a serum3 market
* get orderbook for a market
* get max bid or ask that a user can place for a market
* simulate health if a bid or ask were to be placed
misc:
* fix remaining accounts list for health when placing perp bids
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
remove testing code
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>
script adjustment
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
comments
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>