EIPs Explained

ERC-1080 · Stagnant · ERC · 2018-05-02

ERC-1080: Recoverable Token

A proposed ERC-20 extension that adds chargebacks, theft reporting and lost-account recovery to tokens, so holders can opt into a dispute process instead of losing funds for good.

What problem does it solve?

On Ethereum a transfer is final and a lost private key means lost tokens. That is a feature for many users, but a problem for tokens that represent real-world value, or for users who would rather have a safety net than absolute finality.

ERC-1080 argues that the protocol itself should never be changed to undo losses or thefts, but that a token contract can offer recovery on an opt-in basis. It proposes a standard API, on top of ERC-20, so wallets and apps can expose the same "report stolen", "claim lost" and "charge back" actions for any token that supports them.

How it works

The standard adds three kinds of protection:

  • Lost accounts. Anyone calls claimLost(lostAccount), which emits AccountClaimedLost. If the owner does not cancel within a waiting period (getLostAccountRecoveryTimeInMinutes), the token must provide some mechanism to determine the rightful owner and move the tokens to a new account, emitting AccountRecovered. The real owner can cancel the claim (cancelLostClaim) as long as recovery has not started.
  • Stolen accounts. reportStolen() freezes the caller's tokens and emits AccountFrozen. Again, the implementer must provide a way to establish the correct owner and move the funds.
  • Chargebacks. Outgoing transfers sit in a pending state for a configurable window (setPendingTransferTime), recorded with a PendingTransfer event and a transfer number. During that window the sender can call chargeback(pendingTransferNumber) to request a reversal.

Each account sets its own time windows, and these may not be changed while a dispute or pending transfer is open. The standard deliberately does not define how disputes are judged: an arbitrator, a multisig or a court-like contract are all left to the implementer.

Sample code

An interface sketch based on the method list in the spec (names cleaned up where the draft is inconsistent):

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IRecoverableToken /* is IERC20 */ {
    event AccountClaimedLost(address indexed account);
    event AccountClaimedLostCanceled(address indexed account);
    event AccountRecovered(address indexed account, address indexed newAccount);
    event AccountFrozen(address indexed reported);
    event PendingTransfer(address indexed from, address indexed to, uint256 value, uint256 pendingTransferNumber);
    event ChargebackRequested(address indexed from, address indexed to, uint256 value, uint256 pendingTransferNumber);
    event Chargeback(address indexed from, address indexed to, uint256 value, uint256 indexed pendingTransferNumber);

    function claimLost(address lostAccount) external returns (bool);
    function cancelLostClaim() external returns (bool);
    function reportStolen() external returns (bool);
    function chargeback(uint256 pendingTransferNumber) external returns (bool);

    function getPendingTransferTime(address account) external view returns (uint256 minutes_);
    function setPendingTransferTime(uint256 minutes_) external returns (bool);
    function getLostAccountRecoveryTimeInMinutes(address account) external view returns (uint256 minutes_);
    function setLostAccountRecoveryTimeInMinutes(uint256 minutes_) external returns (bool);
}

Things to know

  • Status is Stagnant. The spec has no reference implementation ("Pending") and was never widely adopted.
  • The draft contains copy-paste errors: cancelLostClaim is shown with the signature claimLost(), and several event headings do not match their signatures. Treat it as a design idea, not a drop-in interface.
  • The hard part, deciding who the "correct owner" is, is left entirely to the implementer. Whoever controls that process effectively controls every recoverable balance, which is a significant trust assumption.
  • Pending transfers change ERC-20 semantics: a recipient cannot treat a received balance as final until the sender's chargeback window has passed.

#token #recovery #chargeback #security

Details

Authors
Bradley Leatherwood <[email protected]>
Status
Stagnant
Type
Standards Track / ERC
Created
2018-05-02

Machine-readable: Markdown · JSON