Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincheng96 committed Oct 13, 2023
1 parent 0ccd691 commit acd1e06
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/CometWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,9 @@ contract CometWrapper is ERC4626, IERC7246, CometHelpers {
if (amount > encumberedToTaker) {
uint256 excessAmount = amount - encumberedToTaker;

// WARNING: this check needs to happen BEFORE _releaseEncumbrance,
// otherwise the released encumbrance will increase
// availableBalanceOf(from), allowing dst to transfer tokens that
// are encumbered to someone else
// WARNING: this check needs to happen BEFORE releaseEncumbranceInternal,
// otherwise the released encumbrance will increase availableBalanceOf(from),
// allowing msg.sender to transfer tokens that are encumbered to someone else

if (availableBalanceOf(from) < excessAmount) revert InsufficientAvailableBalance();

Expand Down

0 comments on commit acd1e06

Please sign in to comment.