Commit Graph

12 Commits

Author SHA1 Message Date
Christian Kamm f8d4b2443c Liq: Don't log common+expected simulation errors 2022-07-20 09:47:37 +02:00
Christian Kamm a82bab4ed7 Better error when vault doesn't have enough funds
The spl_token transfer cpi instruction just says "error code: 1", which
is too opaque.
2022-07-19 13:43:05 +02:00
Christian Kamm f132f30874 Better error messages 2022-07-08 12:48:43 +02:00
Christian Kamm c8ebc1f611 Rename MarginTrade -> FlashLoan 2022-06-23 10:23:52 +02:00
Christian Kamm babbff6bec Add is_bankrupt check to most instructions 2022-03-30 12:24:49 +02:00
Christian Kamm 449fe4dc6d Add checked_math library for convenient overflow checking
Instead of
    x.checked_add(y).ok_or(error!(MangoError::MathError))?
we can write
    cm!(x + y)
2022-03-13 15:45:50 +01:00
Christian Kamm 9692f9976f Compile and warning fixes 2022-03-03 13:10:20 +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 d9c7260375 code review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-01 06:28:12 +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 d4246f7da1 Upgrade to anchor 0.22.0 2022-02-22 10:09:40 +01:00
microwavedcola1 66172881a1 First commit
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-21 19:21:46 +01:00