You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Guaranteed-stake-updates.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Below, a whitelisted contract refers to a contract that is a part of a middlewar
8
8
9
9
For each operator, the Slasher contract stores:
10
10
11
-
1. A `mapping(address => mapping(address => MiddlewareDetails))`, from operator address to contract whitelisted by the operator to slash them, to [details](https://github.com/Layr-Labs/eignlayr-contracts/blob/master/src/contracts/interfaces/ISlasher.sol) about that contract formatted as
11
+
1. A `mapping(address => mapping(address => MiddlewareDetails))`, from operator address to contract whitelisted by the operator to slash them, to [details](../src/contracts/contracts/interfaces/ISlasher.sol) about that contract formatted as
12
12
```solidity
13
13
struct MiddlewareDetails {
14
14
// the UTC timestamp before which the contract is allowed to slash the user
Deposits `amount` of `token` into the specified `strategy`, with the resultant shares credited to `depositor`
239
240
240
241
_The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf.
241
-
Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen)._
242
+
Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen).
243
+
244
+
WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors
245
+
where the token balance and corresponding strategy shares are not in syncupon reentrancy._
242
246
243
247
#### Parameters
244
248
@@ -260,7 +264,10 @@ who must sign off on the action
260
264
_The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf.
261
265
A signature is required for this function to eliminate the possibility of griefing attacks, specifically those
262
266
targetting stakers who may be attempting to undelegate.
263
-
Cannot be called on behalf of a staker that is 'frozen' (this function will revert if the `staker` is frozen)._
267
+
Cannot be called on behalf of a staker that is 'frozen' (this function will revert if the `staker` is frozen).
268
+
269
+
WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors
270
+
where the token balance and corresponding strategy shares are not in syncupon reentrancy_
264
271
265
272
#### Parameters
266
273
@@ -334,6 +341,17 @@ _middlewareTimesIndex should be calculated off chain before calling this functio
334
341
| middlewareTimesIndex | uint256 | is the index in the operator that the staker who triggered the withdrawal was delegated to's middleware times array |
335
342
| receiveAsTokens | bool | If true, the shares specified in the queued withdrawal will be withdrawn from the specified strategies themselves and sent to the caller, through calls to `queuedWithdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies will simply be transferred to the caller directly. |
0 commit comments