microwavedcola1
addb12736f
fixes from cr
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-12 16:53:45 +02:00
microwavedcola1
03ae43017c
account, market and bank names
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-12 16:19:58 +02:00
microwavedcola1
257ccf76ad
multi legged interest rates + keeper ix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-09 16:53:30 +02:00
microwavedcola1
a44120c470
add group to mintinfo, for better gpa support
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-03 19:07:43 +02:00
Christian Kamm
f48a7f5ed9
Clippy: Address issues
2022-04-01 12:21:19 +02:00
Christian Kamm
56e3bd8740
Rearrange accounts to avoid padding bytes
2022-03-31 14:37:05 +02:00
Christian Kamm
85b0b420d4
Disable address lookup tables
...
Because the ALT program isn't available on devnet yet, so prohibits
testing there.
2022-03-31 09:25:47 +02:00
Christian Kamm
82819720e0
liq token: progress
...
Change bank.deposit()/withdraw() to work with I80F48 values so we don't
need to round during liquidation.
2022-03-27 14:46:51 +02:00
microwavedcola1
f135ca4d9b
fix clippy warnings
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-23 09:33:51 +01:00
Christian Kamm
0b2f691f5b
RegisterSerumMarket: pass market_index explicitly
2022-03-14 13:47:34 +01:00
Christian Kamm
07c9b9de7e
Further harmonizing of PDA seeds
2022-03-14 13:39:54 +01:00
Christian Kamm
71cd1755ec
Stop storing token info in Group
...
It is just not needed, the individual Bank accounts have all the
necessary info.
2022-03-14 13:35:38 +01:00
Christian Kamm
1cd0f8d6be
RegisterToken: Pass token_index explicitly
...
This guarantees stability when a gov proposal adds a new token and a new
market in one transaction. This way the RegisterMarket instruction knows
exactly what index the new token will have.
Previously, the new token index was generated automatically, meaning
you couldn't be sure what index a new token would get in advance.
2022-03-14 13:19:50 +01:00
microwavedcola1
e742926ce2
change seeds literals to camelcase, camel case was how mango did in v3, also matches struct names
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-11 20:10:15 +01:00
Christian Kamm
f6d2df1ad4
Rename to Bank and Group
2022-03-07 16:16:34 +01:00
Christian Kamm
98cf8a7cff
Position lifetime, dust etc
...
- withdraw and deposit may deactivate positions explicitly
- adjusting bank positions may collect dust for positions between
0 and 1 native tokens
- health check always assumes all active and new banks/oracles are
passed
2022-03-07 15:21:19 +01:00
Christian Kamm
c6031acbdb
Move to global address lookup tables
2022-03-04 20:57:33 +01:00
microwavedcola1
362b180069
add oracle to to token registration
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 14:44:08 +01:00
Christian Kamm
174d38a199
Don't check PDA seeds on use, instead store addresses
...
This saves about 5000 CU currently, making Deposit/Withdraw go from
26000 CU to 21000 CU.
2022-02-26 12:17:20 +01:00
Christian Kamm
2ef2424ac5
Move the asset/liab weights to the Bank account
2022-02-26 12:04:42 +01:00
Christian Kamm
8f5becc0d5
Asset/liab weights and withdraw amounts
2022-02-25 18:29:54 +01:00
Christian Kamm
5f5ba723d6
Add basic test setup
2022-02-25 13:12:16 +01:00
Christian Kamm
70d3603cb4
Rename group.owner -> group.admin
2022-02-23 10:19:54 +01:00
Christian Kamm
9f013fb22a
Initialize bank indexes
2022-02-23 10:15:33 +01:00
Christian Kamm
5a4b6263ac
Add deposits/borrows tracking
2022-02-23 10:09:01 +01:00
Christian Kamm
1b935335fb
Drop Default impls, manually set account space
...
This fixes stack issues.
I don't know why anchor uses bytemuck::from_bytes(&T::default()).len()
2022-02-22 15:55:30 +01:00
Christian Kamm
fdfab14e43
Drop unneeded associated token account program
2022-02-22 14:35:10 +01:00
Christian Kamm
c9ad4f0c94
Very basic deposit instruction
2022-02-22 14:23:13 +01:00
Christian Kamm
901062d0c1
Add token bank and vault accounts
2022-02-22 13:31:18 +01:00
Christian Kamm
9b16feaf44
CreateAccount instruction outline
2022-02-22 13:15:13 +01:00
Christian Kamm
6a7881b725
RegisterToken instruction outline
2022-02-22 10:19:40 +01:00