microwavedcola1
8921ac0441
todo
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-07 15:24:50 +01:00
microwavedcola1
2882476724
clipppy
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-07 15:24:50 +01:00
microwavedcola1
dcacadbcbf
margin trade test
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-07 15:24:50 +01:00
Christian Kamm
425e22a086
Deposit: Compute account health
...
Even if it's currently unused, it will become useful in the future.
Make a function to get the list of accounts needed for health checks in
tests, which is now shared between deposit and withdraw.
2022-03-07 15:22:23 +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
51991d8546
Add global address lookup table test
2022-03-04 20:57:33 +01:00
Christian Kamm
c6031acbdb
Move to global address lookup tables
2022-03-04 20:57:33 +01:00
microwavedcola1
e7736a8c88
Merge pull request #15 from blockworks-foundation/mc/py
...
wip mangopy
2022-03-03 13:12:45 +01:00
Christian Kamm
9692f9976f
Compile and warning fixes
2022-03-03 13:10:20 +01:00
microwavedcola1
528baab867
Merge pull request #17 from blockworks-foundation/mc/margin_trade
...
wip: mc/margin trade
2022-03-03 11:44:23 +01:00
microwavedcola1
ce5f2027a1
extract health, flesh out margin trade, todo - test
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-03 11:43:56 +01:00
microwavedcola1
6702cdbba6
mc/pyth ( #14 )
...
* pyth integration
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-02 21:11:05 +01:00
microwavedcola1
359c6ab814
rename
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-01 20:55:10 +01:00
microwavedcola1
aa35a7ff4e
basic poetry setup
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-01 20:53:09 +01:00
microwavedcola1
071feea56c
prepare for monorepo
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-01 20:48:59 +01:00
Christian Kamm
01e8458093
Tests: Read banks/oracles from address lookup table
2022-03-01 15:12:53 +01:00
Christian Kamm
fa008a8aa1
Move address map functions into separate module
2022-03-01 15:01:50 +01:00
Christian Kamm
eb38fb4f18
Make module for address_lookup_table functions
2022-03-01 13:57:46 +01:00
Christian Kamm
a7975d390d
Tests: Fix warnings
2022-03-01 13:49:59 +01:00
microwavedcola1
2a698f3135
Merge pull request #13 from blockworks-foundation/mc/oracle-in-withdraw
...
basic stub oracle integration in tests and withdraw
2022-03-01 06:38:13 +01:00
microwavedcola1
d9c7260375
code review
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-01 06:28:12 +01:00
microwavedcola1
c626b68a4a
suppress known issues
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-01 06:16:10 +01:00
Christian Kamm
3e6d722e01
Deposit: Don't add accounts to lookup table twice
2022-02-28 20:12:37 +01:00
Christian Kamm
5ebf425a65
Deposit: Extend the lookup table with bank and oracle
...
When the position goes from inactive to active.
2022-02-28 19:43:40 +01:00
microwavedcola1
5299e31ff8
basic stub oracle integration in tests and withdraw
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 17:17:01 +01:00
Christian Kamm
9a50325718
fix outdated comment
2022-02-28 15:45:56 +01:00
Christian Kamm
75092f7681
CreateAccount: Initialize an address lookup table
2022-02-28 15:43:08 +01:00
microwavedcola1
c7cd564d11
fix test, was missing oracle
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 14:48:59 +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
microwavedcola1
ccab3b867f
github workflows
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 12:58:39 +01:00
microwavedcola1
12d2a9f962
make clippy happy
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 12:56:26 +01:00
microwavedcola1
1c47f0d004
add ix handling for stub oracles
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 12:37:12 +01:00
microwavedcola1
3355ed1dcf
dont need special crate for this
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 11:18:55 +01:00
microwavedcola1
364f5d895b
fix use statement location
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 11:18:35 +01:00
microwavedcola1
e8b1563223
optimise imports
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 11:07:04 +01:00
microwavedcola1
3648cba0d0
use discriminator to differentiate between oracles, removes need for a magic constant, same could be done for other oracles
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 11:05:15 +01:00
microwavedcola1
575833c752
ignore expanded file
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 10:52:07 +01:00
microwavedcola1
6345d3ebd4
add todo
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 10:45:03 +01:00
microwavedcola1
c0c115bd03
remove unused
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 10:44:08 +01:00
microwavedcola1
4791990d89
Merge pull request #12 from blockworks-foundation/mc/stub-oracles
...
stub oracle ix and account state
2022-02-28 10:37:24 +01:00
microwavedcola1
823fbeb6b5
stub oracle ix and account state
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-28 10:36:31 +01:00
Christian Kamm
b88989bf3a
Tests: Transport error info on send_tx()
2022-02-28 09:12:24 +01:00
Christian Kamm
7aa2cd7e13
Test cleanups
2022-02-28 09:03:43 +01:00
Christian Kamm
1b404cc652
Basic health check, no oracles yet
2022-02-26 17:47:16 +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
d1e2cc28b7
Outline of withdraw instruction
2022-02-25 15:14:15 +01:00
Christian Kamm
5f5ba723d6
Add basic test setup
2022-02-25 13:12:16 +01:00
microwavedcola1
e6e17dd88c
Merge pull request #10 from blockworks-foundation/mc/ts-client
...
mc/ts-client
2022-02-23 11:13:13 +01:00