-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oracleless ctoken mint and redeem #69
Conversation
@@ -16,7 +16,7 @@ async fn test_success() { | |||
); | |||
|
|||
// limit to track compute unit increase | |||
test.set_bpf_compute_max_units(30_000); | |||
test.set_bpf_compute_max_units(35_000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we can assert that the reserve interest has been refreshed in these tests?
lgtm |
…ss deposit_obligation_collateral, updated instruction.rs for writable account
dc820e7
to
1d2a0b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -112,4 +127,6 @@ async fn test_success() { | |||
user_collateral_balance, | |||
initial_user_collateral_balance - SOL_DEPOSIT_AMOUNT_LAMPORTS | |||
); | |||
|
|||
assert!(sol_reserve.liquidity.cumulative_borrow_rate_wads > old_borrow_rate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/// | ||
/// Accounts expected by this instruction: | ||
/// | ||
/// 0. `[writable]` Source collateral token account. | ||
/// Minted by deposit reserve collateral mint. | ||
/// $authority can transfer $collateral_amount. | ||
/// 1. `[writable]` Destination deposit reserve collateral supply SPL Token account. | ||
/// 2. `[]` Deposit reserve account - refreshed. | ||
/// 2. `[writable]` Deposit reserve account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Do we need to make the same comment change for RedeemReserveCollateral
given it no longer needs to be refreshed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeh prob should change comment (the reserve over there was alright writable so just removing the "refreshed"
cool gonna merge this and try to test it on beta later today |
* fix ci solana version (#67) * Update switchboard-program to v0.2.0 (#66) * oracleless repay (#64) * oracleless repay * lint * the easy way * updated test to make sure interest accumulates before repay * remove unused programs (#60) * remove unused programs * slight consisency changes Co-authored-by: ra <RealAwesomeness@users.noreply.github.com> Co-authored-by: Nope X <nope@solend.fi> * Oracleless ctoken mint and redeem (#69) * no need to refresh on mint/redeem * test fixes * added more robust tests to make sure interest accrues, added oracleless deposit_obligation_collateral, updated instruction.rs for writable account * comment change Co-authored-by: 0xkiplet <98113383+0xkiplet@users.noreply.github.com> Co-authored-by: ra <40503841+RealAwesomeness@users.noreply.github.com> Co-authored-by: ra <RealAwesomeness@users.noreply.github.com>
No description provided.