Skip to content

Conversation

@billythedummy
Copy link

Suggested Modifications:

  • track borrows by saving the current borrowed amount in the pool account instead of using a boolean flag
  • remove amount arg from repay; the instruction just repays the current borrowed amount saved in the pool account

This should enable safe CPI borrows and repays, including multiple borrows in the same tx. I haven't fully thought through if this change opens new vectors of attack but reducing user input should reduce attack surface.

Just a suggestion, feel free to disregard

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.

1 participant