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

Add warning on repay/withdraw #279

Merged
merged 3 commits into from
Aug 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/interfaces/IMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ interface IMorpho is IFlashLender {
/// @dev Either `amount` or `shares` should be zero.
/// To withdraw the whole position, pass the `shares`'s balance of `onBehalf`.
/// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions.
/// @dev Withdrawing more than the available balance will revert.
MerlinEgalite marked this conversation as resolved.
Show resolved Hide resolved
/// @param market The market to withdraw assets from.
/// @param shares The amount of amount to withdraw.
/// @param shares The amount of shares to burn.
Expand Down Expand Up @@ -157,6 +158,7 @@ interface IMorpho is IFlashLender {
/// optionally calling back the caller's `onMorphoReplay` function with the given `data`.
/// @dev Either `amount` or `shares` should be zero.
/// To repay the whole debt, pass the `shares`'s balance of `onBehalf`.
/// @dev Repaying more than the available balance will revert.
MerlinEgalite marked this conversation as resolved.
Show resolved Hide resolved
/// @param market The market to repay assets to.
/// @param amount The amount of assets to repay.
/// @param shares The amount of shares to burn.
Expand All @@ -179,6 +181,7 @@ interface IMorpho is IFlashLender {

/// @notice Withdraws the given `amount` of collateral from the given `market` on behalf of `onBehalf`.
/// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions.
/// @dev Withdrawing more than the available balance will revert.
MerlinEgalite marked this conversation as resolved.
Show resolved Hide resolved
/// @param market The market to withdraw collateral from.
/// @param amount The amount of collateral to withdraw.
/// @param onBehalf The address of the owner of the collateral.
Expand Down