Skip to content

Commit

Permalink
fixing max withdraw limit
Browse files Browse the repository at this point in the history
  • Loading branch information
0xddong committed Aug 15, 2024
1 parent 4eef899 commit 5d5c621
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/Strategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1158,16 +1158,7 @@ contract Strategy is BaseStrategy, Pausable, ReentrancyGuard {
function availableWithdrawLimit(
address /*_owner*/
) public view override returns (uint256) {
// NOTE: Withdraw limitations such as liquidity constraints should be accounted for HERE
// rather than _freeFunds in order to not count them as losses on withdraws.

// TODO: If desired implement withdraw limit logic and any needed state variables.

// EX:
// if(yieldSource.notShutdown()) {
// return asset.balanceOf(address(this)) + asset.balanceOf(yieldSource);
// }
return type(uint256).max;
return _totalLiquidBalance(address(this));
}

/**
Expand Down

0 comments on commit 5d5c621

Please sign in to comment.