Skip to content
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

Merged
merged 4 commits into from
Feb 17, 2022

Conversation

nope-finance
Copy link
Member

No description provided.

@@ -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);
Copy link

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?

@oxrooter
Copy link
Member

oxrooter commented Feb 5, 2022

lgtm

…ss deposit_obligation_collateral, updated instruction.rs for writable account
@nope-finance nope-finance force-pushed the oracleless_ctoken_mint_and_redeem branch from dc820e7 to 1d2a0b6 Compare February 13, 2022 02:06
Copy link

@0xodia 0xodia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@oxrooter oxrooter left a 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);

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.

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?

Copy link
Member Author

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"

@nope-finance
Copy link
Member Author

cool gonna merge this and try to test it on beta later today

@nope-finance nope-finance merged commit a6c27d9 into upcoming Feb 17, 2022
@nope-finance nope-finance deleted the oracleless_ctoken_mint_and_redeem branch February 17, 2022 23:36
nope-finance added a commit that referenced this pull request Feb 18, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants