Skip to content

Commit

Permalink
Update ERC-7535: Move to Review
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
Joeysantoro authored Nov 28, 2023
1 parent 6d4ab9d commit 707bc79
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ERCS/erc-7535.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Native Asset ERC-4626 Tokenized Vault
description: ERC-4626 Tokenized Vaults with Ether (Native Asset) as the underlying asset
author: Joey Santoro (@joeysantoro)
discussions-to: https://ethereum-magicians.org/t/eip-7535-eth-native-asset-tokenized-vault/16068
status: Draft
status: Review
type: Standards Track
category: ERC
created: 2023-10-12
Expand Down Expand Up @@ -57,7 +57,7 @@ Mints `shares` Vault shares to `receiver` by depositing exactly `msg.value` of E

MUST have state mutability of `payable`.

MUST use `msg.value` as the primary input parameter for calculating the `shares` output. MAY ignore `assets` parameter as an input.
MUST use `msg.value` as the primary input parameter for calculating the `shares` output. I.e. MAY ignore `assets` parameter as an input.

MUST emit the `Deposit` event.

Expand Down Expand Up @@ -124,6 +124,14 @@ This standard was designed to maximize compatibility with ERC-4626 while minimiz

All breaking implementation level changes with ERC-4626 are purely to accomodate for the usage of Ether or any native asset instead of an ERC-20 token.

### Allowing assets Parameter to be Ignored in a Deposit
`msg.value` must always be passed anyway to fund a `deposit`, therefore it may as well be treated as the primary input number. Allowing `assets` to be used either forces a strict equality and extra unnecessary gas overhead for redundancy, or allows different values which could cause footguns and undefined behavior.

The last option which could work is to require that `assets` MUST be 0, but this still requires gas to enforce at the implementation level and can more easily be left unspecified, as the input is functionally ignorable in the spec as written.

### Allowing msg.value to Not Equal assets Output in a Mint
There may be many cases where a user deposits slightly too much Ether in a `mint` call. In these cases, enforcing `msg.value` to equal `assets` would cause unnecessary reversions. It is up to the vault implementer to decide whether to refund or absorb any excess Ether, and up to depositors to deposit as close to the exact amount as possible.

## Backwards Compatibility

ERC-7535 is fully backward compatible with ERC-4626 at the function interface level. Certain implementation behaviors are different due to the fact that ETH is not ERC-20 compliant, such as the priority of `msg.value` over `assets`.
Expand Down

0 comments on commit 707bc79

Please sign in to comment.