Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-1996: Holdable token #1996

Merged
merged 12 commits into from
Nov 22, 2019
Merged

EIP-1996: Holdable token #1996

merged 12 commits into from
Nov 22, 2019

Conversation

daniel-iobuilders
Copy link
Contributor

An extension to the ERC-20 standard token that allows tokens to be put on hold. This guarantees a future transfer and makes the held tokens unavailable for transfer in the mean time. Holds are similar to escrows in that are firm and lead to final settlement.

A hold specifies a payer, a payee, a maximum amount, a notary and an expiration time. When the hold is created, the specified token balance from the payer is put on hold. A held balance cannot be transferred until the hold is either executed or released. The hold can only be executed by the notary, which triggers the transfer of the tokens from the payer to the payee. If a hold is released, either by the notary at any time, or by anyone after the expiration, no transfer is carried out and the amount is available again for the payer.

@daniel-iobuilders
Copy link
Contributor Author

@axic This is me first proposal, so I'm not exactly sure about the process.
The pipeline fails, but it seems only because the EIP does not have a number yet. It's says that the number will be assigned by an editor. Can you tell me how exactly this is going to happen?

@wighawag
Copy link
Contributor

wighawag commented May 8, 2019

@daniel-iobuilders
Since you created PR 1996 you can rename the file eip-1996.md and use 1996 as EIP number.

@daniel-iobuilders daniel-iobuilders changed the title Holdable token EIP-1996: Holdable token May 8, 2019
@axic axic added the ERC label May 20, 2019
@kikoncuo
Copy link

A design question and a possible race condition problem which would allow the user to avoid paying any money on escrow.

  1. Design question: Why are we using string operationIds? This is usually the role of the transaction hash itself, it can be calculated on runtime, the format is not dependant on the user, would be a more standard identifier, and would require less parameters.

  2. Possible race condition: The user could monitor the mempool and whenever a notary calls executeHold, the user could call releaseHold with a higher fee, executing that transaction first and making the executeHold transaction fail. It's not clear to me why the user has this capability, maybe it makes more sense to limit it only after expiration.
    In your example, the user can safely avoid paying for the hotel, (Maybe this is an ok behaviour not exploitable in the real world).

This is a great step to create a bridge with traditional finance, thanks for your effort!

@daniel-iobuilders
Copy link
Contributor Author

@wighawag Are there any other steps to do, before this EIP can be merged?

@daniel-iobuilders
Copy link
Contributor Author

@kikoncuo

Regarding your points:

  1. The intention of the operation id is to allow easy traceability of the status of a hold by external (off chain) systems. Those systems should not need to know anything about the underlying blockchain technology, except that there are events to which they need to react to. While you are right, that this makes the EIP a bit more complex, we think the trade-off is worth it. I've added some explanations about this in the Rational part, to state our idea behind it.
  2. A user, the account who needs to pay if a hold is executed, can not release a hold. I have rewritten this part to make it clearer to the reader. After going over it I can see how this could have been misunderstood before.

Thank you for your feedback! The changes from it have been pushed already.

@axic axic merged commit 60edc53 into ethereum:master Nov 22, 2019
CarlBeek added a commit to CarlBeek/EIPs that referenced this pull request Nov 26, 2019
…tore

* 'bls_keystore' of github.com:CarlBeek/EIPs: (47 commits)
  fix link to heading
  Fix spelling
  Fix email address
  Draft EIP: BLS12-381 Deterministic Account Hierarchy (ethereum#2334)
  Fix some URLs and require 2333 too
  Add name to metadata title (ethereum#2370)
  Draft: BLS12-381 Key Generation (ethereum#2333)
  Automatically merged updates to draft EIP(s)  (ethereum#2397)
  Hard fork proposal to address the Ice age (ethereum#2387)
  Automatically merged updates to draft EIP(s) 1767 (ethereum#2262)
  EIP-2021: Payoutable Token (ethereum#2021)
  EIP-2009: Compliance Service (ethereum#2009)
  EIP-2019: Fundable Token (ethereum#2019)
  Use solidity/javascript highlighting in various EIPs (ethereum#2372)
  EIP-2018: Clearable Token (ethereum#2018)
  EIP-1996: Holdable token (ethereum#1996)
  Fix the username of @pizza-r0b in EIP-2309 (ethereum#2389)
  Clarify that empty accounts also return 0 in EIP-1052 (ethereum#2388)
  dType Functions Extension - Decentralized Type System for EVM (ethereum#2267)
  Fix spelling of GitHub [R4R] (ethereum#2369)
  ...
tkstanczak pushed a commit to tkstanczak/EIPs that referenced this pull request Nov 7, 2020
Arachnid pushed a commit to Arachnid/EIPs that referenced this pull request Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants