Commit Graph

2341 Commits

Author SHA1 Message Date
microwavedcola1 5ca349f94b use mngo cloud for risl
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-12 14:30:47 +02:00
Christian Kamm 77da9d49a6 liquidator: when rebalancing allow multi-hop jupiter routes
and if that doesn't fit into a transaction, try a direct route with USDC
or SOL.

(cherry picked from commit db8f5ae30d)
2023-07-12 10:32:35 +02:00
Christian Kamm 2be2c29101 Client: jupiter swap and tx builder improvements
- jupiter swap now supports multiple hops
- tx builder can check resulting tx size

(cherry picked from commit c58ee91356)
2023-07-12 10:32:35 +02:00
microwavedcola1 d5472d790e v0.17.6 2023-07-12 09:54:12 +02:00
microwavedcola1 604c38ed5b fix max swap
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-12 09:53:38 +02:00
microwavedcola1 54f1e9e1e5 v0.17.5 2023-07-12 09:39:47 +02:00
microwavedcola1 a6fe8dfd48 fix max swap
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-12 09:38:48 +02:00
Christian Kamm db8f5ae30d liquidator: when rebalancing allow multi-hop jupiter routes
and if that doesn't fit into a transaction, try a direct route with USDC
or SOL.
2023-07-12 08:57:21 +02:00
Christian Kamm c58ee91356 Client: jupiter swap and tx builder improvements
- jupiter swap now supports multiple hops
- tx builder can check resulting tx size
2023-07-12 08:57:21 +02:00
Christian Kamm b8376b4b89
logging improvements (#641)
- switch logging to tracing crate
- update liquidator logging to use tracing features
2023-07-12 08:38:38 +02:00
Christian Kamm 6b2f6af6e4 Idl: remove references to undefined openbook_v2 enums 2023-07-11 13:01:55 +02:00
Christian Kamm a7ac6f8dfb Update Cargo.lock and IDL after merge 2023-07-11 10:39:06 +02:00
galactus 6461743f35
Openbook v2 integration: instructions and accounts (#628) 2023-07-11 09:59:50 +02:00
Christian Kamm 65c747b36a
Flash loan: Better errors for missing banks (#639)
Check for missing banks _before_ checking for "exactly two token
changes" because the missing banks can be a cause of the latter error.
2023-07-10 16:20:43 +02:00
Christian Kamm ff55a7910c
Changelog for v0.18.0 (#636) 2023-07-07 17:31:35 +02:00
Christian Kamm 5a70917a91
client: Fix seeds for create_account() (#635) 2023-07-07 17:20:03 +02:00
microwavedcola1 c40bffb047 Merge branch 'main' into deploy 2023-07-07 15:44:50 +02:00
microwavedcola1 3b7092a6a2 v0.17.4 2023-07-06 18:46:21 +02:00
microwavedcola1 2060245f31 optimise
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-06 18:45:42 +02:00
microwavedcola1 ea66b34d36 v0.17.3 2023-07-06 18:18:10 +02:00
microwavedcola1 05b9f8f5da ui helper
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-06 18:17:24 +02:00
microwavedcola1 ca4a8c179a v0.17.2 2023-07-06 15:22:08 +02:00
microwavedcola1 4b82771487 also consider shorts
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-06 15:21:30 +02:00
Christian Kamm 30cb4d7753
Tcs: Switch prices from f32 to f64 (#634)
To have more precision when storing user supplied prices and ensure that
the rounding that will occur will be tiny compared to the user-provided
precision.
2023-07-06 14:48:49 +02:00
Lou-Kamades 801a66d682
Merge pull request #624 from blockworks-foundation/lou/avgEntryPricePerBaseLot-logs 2023-07-05 08:19:48 -05:00
Lou-Kamades fad5aca654
add comment for pnl fields of FillLogV3 2023-07-05 07:56:07 -05:00
Christian Kamm e535e81257
Pyth: Read agg.price or prev_price, depending on staleness (#631)
This updates our use of pyth oracle accounts to be more in line with
what the pyth sdk is doing.
2023-07-05 12:58:42 +02:00
microwavedcola1 7ab0164d38 v0.17.1 2023-07-05 07:32:26 +02:00
Lou-Kamades 8177680415
feat: closed pnl is calculated via realized_trade_pnl_native 2023-07-04 10:39:47 -05:00
microwavedcola1 08188f3cf2 updarte
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-04 11:20:21 +02:00
Christian Kamm 3867d902d2 Bump program version to v0.18.0 2023-07-04 11:10:31 +02:00
Christian Kamm cc4a39850a Bump version and idl to v0.17.1 2023-07-04 11:08:59 +02:00
Christian Kamm f2cdb8aeec Changelog for v0.17.1 2023-07-04 11:08:53 +02:00
Christian Kamm dd56881a41 Revert "Pyth oracles: Check that status is "trading" (#607)"
This reverts commit bbf0186398.
2023-07-04 11:08:48 +02:00
microwavedcola1 7e4ec9e14f Merge branch 'deploy-2' into dev 2023-07-04 11:05:39 +02:00
microwavedcola1 baab384055 update
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-04 10:55:59 +02:00
microwavedcola1 580a565705 token-delegate-example
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-04 10:55:14 +02:00
microwavedcola1 6b1ac492dc v0.17.0 2023-07-04 09:27:53 +02:00
microwavedcola1 1ffa65d01b optimise getAllMangoAccounts
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-04 09:26:59 +02:00
Lou-Kamades 6c6504aefa
feat: emit closed_pnl in FillEventLog3 2023-07-03 13:04:33 -05:00
Christian Kamm ae66dbc462 Bump version and idl to v0.17.1 2023-07-03 19:54:21 +02:00
Christian Kamm a9a3c63f91 Changelog for v0.17.1 2023-07-03 19:25:42 +02:00
Christian Kamm cb3a43236d Revert "Pyth oracles: Check that status is "trading" (#607)"
This reverts commit bbf0186398.
2023-07-03 19:16:17 +02:00
Christian Kamm c67360071e Fix tcs test script 2023-07-03 15:23:22 +02:00
Christian Kamm 35064d4ab0
Token conditional swaps (#604)
Users can request token swaps to happen when the oracle price
is within a price band. Once the price is right, an executor can
trigger the swap. The executors are rewarded with a premium
over the oracle price.

This allows limit and stop loss orders on arbitrary spot pairs.

The PR comes with basic ts support and adjustments to the liquidator,
to execute available token conditional swaps.

Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-03 14:09:11 +02:00
Christian Kamm 34e41b6719
Token bankruptcy: Separate checks (#629)
This makes it easier to debug, since we know what value did not match
the requirements.
2023-07-03 10:25:02 +02:00
microwavedcola1 5ea81fc0d5 v0.16.12 2023-07-03 09:03:08 +02:00
microwavedcola1 c2e48df051 Merge branch 'main' into deploy 2023-07-03 09:02:25 +02:00
microwavedcola1 6f2345edcb v0.16.11 2023-07-03 08:20:50 +02:00
microwavedcola1 eba7b4d15b add perp market filter
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-07-03 08:20:13 +02:00