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

program: tweak withdraw limits to be more lax #400

Merged
merged 5 commits into from
Mar 20, 2023

Conversation

crispheaney
Copy link
Member

No description provided.

.saturating_sub(borrow_token_amount)
.min(deposit_token_amount.saturating_sub(min_deposit_token))
.min(deposit_token_amount.saturating_sub(borrow_token_amount)))
.min(deposit_token_amount.saturating_sub(borrow_token_amount));
Copy link
Member

@0xbigz 0xbigz Mar 20, 2023

Choose a reason for hiding this comment

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

jw, is this just a redundancy guard? should never allow borrow > deposit through rest of system, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah it will fail elsewhere if this isn't here

return Ok(withdraw_limit);
}

borrow_liquidity = token_amount;
Copy link
Member

Choose a reason for hiding this comment

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

can you name this variable indicating its the users existing position used to "pad"

@crispheaney crispheaney merged commit f41331a into master Mar 20, 2023
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.

2 participants