Christian Kamm
8a3a3bf70b
flash loan: Add a "swap without fees" option ( #882 )
2024-02-19 09:00:30 +01:00
Christian Kamm
7a1be5a188
Merge remote-tracking branch 'origin/deploy' into dev
2024-02-14 10:24:12 +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
microwavedcola1
4cce7aad32
extend maintain alts script ( #872 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-02-08 08:04:52 +01:00
Adrian Brzeziński
6c29adddae
fix conversion for sourceamount (tokens with a lot of decimals)
2024-02-07 17:42:21 +04:00
Christian Kamm
d9a9c7d664
liquidation: Add flag to disable asset liquidation ( #867 )
...
This can be used to remove the oracle dependency for tokens with zero maint asset
weight that are not borrowable.
2024-02-07 12:52:01 +01:00
Christian Kamm
ae5907ba3a
fix perp settle limit materialization ( #865 )
...
Previously, we tried to keep track of "other" and "trade" realized pnl.
An issue occured when a perp base position went to zero: the way we
computed the trade pnl included potential non-trade unsettled pnl.
That caused follow-up trouble because the value could change sign and
reset the settle limit for trade pnl.
This change aims to simplify in some ways:
- explicitly talk about oneshot-settleable pnl (fees, funding,
liquidation) and recurring-settleable pnl (materialization of settle
limit derived from the stable value of the base position when reducing
the base position)
- instead of directly tracking realized settleable amounts (which
doesn't really work), just decrease the recurring settleable amount
when it exceeds the remaining unsettled pnl
- get rid of the directionality to avoid bugs of that kind
- stop tracking unsettled-realized trade pnl (it was wrong before, and
no client uses it) - we already track position-lifetime realized trade
pnl
2024-02-01 11:23:45 +01:00
Adrian Brzeziński
ea7eeb92dc
fix decoding of broken oracle ( #864 )
...
* fix
* fix
* fix
* fix
2024-01-31 15:52:06 +01:00
microwavedcola1
e16a7db8dd
Merge branch 'main' into deploy
2024-01-30 12:19:45 +01:00
Christian Kamm
6c6a75d90d
liquidator: batch serum-cancel step ( #861 )
2024-01-29 15:07:24 +01:00
GoodDaisy
2f10a710c9
chore: fix typos ( #854 )
2024-01-29 13:39:33 +01:00
Christian Kamm
5519f77d8e
ts: fallback oracles in bank and token_edit
2024-01-29 13:37:44 +01:00
Adrian Brzeziński
80cad71af5
add set to deepclone
2024-01-28 14:34:04 +01:00
Christian Kamm
5fc5646aff
ts: Fix registering tokens and stub oracles ( #859 )
2024-01-26 21:10:33 +01:00
Christian Kamm
39c5d029d0
Program version bump, changelog and idl update
2024-01-26 12:39:31 +01:00
Christian Kamm
fcc8c85f6e
perp: Add platform liquidation fee for base ( #858 )
2024-01-26 10:24:20 +01:00
microwavedcola1
e079f199c2
ts: use potential serum tokens in deposit limits ( #857 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-24 14:26:33 +01:00
Adrian Brzeziński
e69214f408
max borrow fix ( #855 )
...
* fix
* ts: compute correct init scaled asset weight
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
---------
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-22 18:56:50 +01:00
Christian Kamm
8383109f0d
Add a token-token platform liquidation fee ( #849 )
...
The liqor liquidation fee and platform liquidation fee for the asset and
liab token are both payed by the liqee.
The platform liquidation fee is added to the Bank's
collected_fees_native and tracked in collected_liquidation_fees.
2024-01-19 16:34:55 +01:00
Adrian Brzeziński
bff4828bbf
use deposit limits ( #852 )
...
* edit max source token
* deposit limits adjustments
* fix comment
* pr fixes
* fix
* fix
2024-01-18 17:47:57 +01:00
microwavedcola1
5d677b858d
ts: fix import
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-16 14:55:23 +01:00
Adrian Brzeziński
e4bbc41a88
import fix
2024-01-16 11:02:39 +01:00
Adrian Brzeziński
dfccdaf1fb
Feature/confirm txes fix ( #847 )
...
* connections
* merge
* use new mangolana
* v0.21.21
* fix
* fix
* fix error parsing
* fix
* fix
* fix
* v0.21.24
* fix version
* fix
* fix
2024-01-16 10:59:18 +01:00
microwavedcola1
5d186421bb
ts: take liquidation batches to a script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-16 10:47:52 +01:00
microwavedcola1
fce4e18735
Merge branch 'mc/deposit-limits' into deploy
2024-01-16 10:22:04 +01:00
microwavedcola1
6e3c284220
ts: deposit limits
2024-01-16 10:21:15 +01:00
Christian Kamm
18729cf04c
Configurable interest rate for 0% utilization ( #848 )
2024-01-15 12:45:00 +01:00
microwavedcola1
f7dcb99c5f
ts: fix node fetch
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-12 13:12:19 +01:00
Christian Kamm
637b43fec4
Idl update
2024-01-12 10:56:24 +01:00
Adrian Brzeziński
6e72188bd4
Revert "Improve tx confirmation ( #846 )"
...
This reverts commit 19a0f7d59d
.
2024-01-12 02:03:46 +01:00
Adrian Brzeziński
19a0f7d59d
Improve tx confirmation ( #846 )
...
* improve tx confirmation with mangolana
* dedupe
* support multiple connections
* fix
2024-01-11 21:14:05 +01:00
Adrian Brzeziński
68e119e726
use fast clone ( #843 )
...
* use fast clone
* fix
* add health check copy tests
* fix
* fix
* add more test
2024-01-11 21:13:41 +01:00
Lou-Kamades
c9531f4bc4
Add TxCallbackOptions ( #844 )
...
* ts: include slot when fetching LatestBlockHash
* ts: add txSignatureBlockHash to postTxConfirmationCallback
* v0.21.9
* v0.21.11
* v0.21.12
* v0.21.13 - add TxCallbackOptions
2024-01-10 14:12:04 -06:00
Lou-Kamades
0971557047
Expand usage of postTxConfirmationCallback ( #842 )
...
* ts: include slot when fetching LatestBlockHash
* ts: add txSignatureBlockHash to postTxConfirmationCallback
* v0.21.9
2024-01-09 14:38:57 -06:00
Christian Kamm
ce0713070a
Merge remote-tracking branch 'origin/deploy' into dev
2024-01-09 12:31:20 +01:00
Adrian Brzeziński
bc8bdaed89
small type fixes + post tx approve fcn ( #830 )
...
* background confirmations
* fixes
* background confirmation callback
* fix
* fix
2024-01-07 20:14:26 +01:00
Christian Kamm
40f2842c10
ts client: Support deposit-into-existing ( #837 )
...
And add a script for using it.
2024-01-04 20:21:09 +01:00
microwavedcola1
cf1ca29cee
ts: stock mm, fix perp market name
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 10:25:54 +01:00
microwavedcola1
56e45ad7e4
ts: rndr stock mm, quote at liq price for liqudiations
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 10:17:26 +01:00
microwavedcola1
f3365d4e58
ts: make backup keeper relaxed
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 09:55:39 +01:00
microwavedcola1
375284df25
ts: update script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 09:46:17 +01:00
microwavedcola1
5636146fac
ts: clean up script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 09:08:18 +01:00
microwavedcola1
55d22e07c5
risk: use know mm's endpoint + add fallback to known mms pubkeys
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2024-01-03 08:43:48 +01:00
Christian Kamm
f10fc01388
Fix idl generation, update it ( #834 )
2024-01-03 08:36:19 +01:00
Christian Kamm
943f578bc5
Program v0.21.1 version bump, changelog draft, idl update
2023-12-31 11:45:09 +01:00
microwavedcola1
a57ec4018d
Mc/no usdc health cache ( #831 )
...
* ts: sim usdc pos for max perp trades even if no usdc token position exists
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
---------
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-12-29 14:21:01 +01:00
Lou-Kamades
48993ed130
ts: improve sending txns using muiltiple connections ( #826 )
2023-12-28 21:48:59 -06:00
microwavedcola1
ce3a243749
ts: export class
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2023-12-26 11:35:11 +01:00
Christian Kamm
27b1ceebe8
Accounts: Expect only the v3 MangoAccounts now ( #783 )
2023-12-19 10:08:46 +01:00
Christian Kamm
06da4768f3
Gov instruction creation helpers
...
- Add one to make a proposal for all serum markets
- Switch created proposals to be drafts
- Add PROPOSAL_LINK env arg
- Add serum3EditMarketIx()
2023-12-14 11:34:17 +01:00