Skip to content

Token which locks up future ETHW for current ETH (as part of the ETH PoS migration)

License

Notifications You must be signed in to change notification settings

twtaylor/ethw-promissory-note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goals / Motivation

The goal of this exercise is to create an ERC20 token that represents a claim on ETHw post-merge. This can be used as an on-chain price-discovery mechanism until the Merge.

Design

  1. User deposits ETH (everything gets converted into WETH) pre-merge (mint()). Alternatively, user deposits WETH after approve() is called on this contract.
  2. User receives an ERC20 token, we'll call it ETHw-PN
  3. This user's address is recorded in originalOwnerNotes
  4. This token represents pre-merge:
  • chain: 1 - The ETH that has been deposited is wholly unrecoverable until post-merge.
  • ERC20 token - The ERC20 token is now tradeable.
  1. But post-merge...
  • chain: 1 - The contract can be called by the original minter for WETH to be sent back forward to an address to.
  • chain: 10001 - The ERC20 token can be redeemed for the balance of WETH in the contract.

Deployed

Currently deployed on mainnet at 0xc3dCB001Db19dCd67B30873E733f451bfaab2682

Testing

Run forge test -vvv for Ethereum testing.

Legal

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these file(s) except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Token which locks up future ETHW for current ETH (as part of the ETH PoS migration)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published