Skip to content

Commit 168857d

Browse files
authored
Warn users about dead address controller in ERC-7540 (#236)
1 parent 654e8f6 commit 168857d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

contracts/token/ERC20/extensions/ERC7540.sol

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,12 @@ abstract contract ERC7540 is ERC165, ERC20, IERC4626, IERC7540, IERC7575Share {
406406
* * {_isDepositAsync} must return `true`.
407407
* * `owner` must be `msg.sender` or `msg.sender` must be an approved operator of `owner`.
408408
* * `owner` must have approved the vault for at least `assets` of the underlying token.
409+
*
410+
* NOTE: The `controller` is the only address authorized to claim the resulting Request. Passing an address
411+
* with no claim authority (e.g. `address(0)`, `0x...dead`) or any contract that cannot itself call
412+
* {deposit}/{mint} or designate an operator via {setOperator} will permanently lock the committed
413+
* `assets`, since claims are gated by {onlyOperatorOrController} on `controller` and there is no
414+
* cancellation path. Callers are responsible for supplying a controller capable of authorizing claims.
409415
*/
410416
function requestDeposit(
411417
uint256 assets,
@@ -501,6 +507,12 @@ abstract contract ERC7540 is ERC165, ERC20, IERC4626, IERC7540, IERC7575Share {
501507
* Requirements:
502508
*
503509
* * {_isRedeemAsync} must return `true`.
510+
*
511+
* NOTE: The `controller` is the only address authorized to claim the resulting Request. Passing an address
512+
* with no claim authority (e.g. `address(0)`, `0x...dead`) or any contract that cannot itself call
513+
* {withdraw}/{redeem} or designate an operator via {setOperator} will permanently lock the committed
514+
* `shares`, since claims are gated by {onlyOperatorOrController} on `controller` and there is no
515+
* cancellation path. Callers are responsible for supplying a controller capable of authorizing claims.
504516
*/
505517
function requestRedeem(uint256 shares, address controller, address owner) public virtual returns (uint256) {
506518
return _requestRedeem(shares, controller, owner, 0);

0 commit comments

Comments
 (0)