Skip to content

Commit

Permalink
Update ERC-7540: Remove inequality
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
hieronx authored Jun 22, 2024
1 parent dd8834d commit 576f7f7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ERCS/erc-7540.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ After submission, Requests go through Pending, Claimable, and Claimed stages. An

Note that `maxDeposit` increases and decreases in sync with `claimableDepositRequest`.

An important Vault inequality is that following a Request(s), the cumulative requested quantity MUST be more than `pendingDepositRequest + maxDeposit - claimed`. The inequality may come from fees or other state transitions outside implemented by Vault logic such as cancellation of a Request, otherwise, this would be a strict equality.

Requests MUST NOT skip or otherwise short-circuit the Claim state. In other words, to initiate and claim a Request, a user MUST call both request* and the corresponding claim* function separately, even in the same block. Vaults MUST NOT "push" tokens onto the user after a Request, users MUST "pull" the tokens via the Claim function.

For asynchronous Vaults, the exchange rate between `shares` and `assets` including fees and yield is up to the Vault implementation. In other words, pending redemption Requests MAY NOT be yield-bearing and MAY NOT have a fixed exchange rate.
Expand Down Expand Up @@ -192,7 +190,7 @@ The output `requestId` is used to discriminate the request along with the `contr

In either case, the `shares` MUST be removed from the custody of `owner` upon `requestRedeem` and burned by the time the request is Claimed.

Redeem Request approval of `shares` for a `msg.sender` NOT equal to `owner` may come either from ERC-20 approval over the `shares` of `owner` or if the `owner` has approved the `msg.sender` as an operator.
Redeem Request approval of `shares` for a `msg.sender` NOT equal to `owner` may come either from ERC-20 approval over the `shares` of `owner` or if the `owner` has approved the `msg.sender` as an operator. This MUST be consistent with similar behaviour pointed out in [ERC-6909](./eip-6909.md), within "Approvals and Operators" section: "In accordance with the transferFrom method, spenders with operator permission are not subject to allowance restrictions, spenders with infinite approvals SHOULD NOT have their allowance deducted on delegated transfers, but spenders with non-infinite approvals MUST have their balance deducted on delegated transfers."

When the Request is Claimable, `claimableRedeemRequest` will be increased for the `controller`. `redeem` or `withdraw` can subsequently be called by `controller` to receive `assets`. A Request MAY transition straight to Claimable state but MUST NOT skip the Claimable state.

Expand Down

0 comments on commit 576f7f7

Please sign in to comment.