This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add slippage constraint to borrow instruction #3423
Merged
joncinque
merged 14 commits into
solana-labs:master
from
jmalcic:add-slippage-constraint-to-borrows
Aug 17, 2022
Merged
Add slippage constraint to borrow instruction #3423
joncinque
merged 14 commits into
solana-labs:master
from
jmalcic:add-slippage-constraint-to-borrows
Aug 17, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joncinque
reviewed
Aug 4, 2022
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.
The logic and tests look great! Let me know what you think about separating into two instructions. I know it's a bit more work, but it'll be much clearer for users
jordaaash
reviewed
Aug 11, 2022
…y into add-slippage-constraint-to-borrows
This reverts commit 3eba494. # Conflicts: # token-lending/program/tests/borrow_obligation_liquidity.rs
joncinque
reviewed
Aug 16, 2022
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.
Just a couple of little bits, then this is good to go!
And thanks also for this one, nice job! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves #988 by adding a slippage constraint to the borrow instruction. As outlined in #1441 this only applies if the borrow is 100% of available borrowing power (
u64::MAX
).