ERC-2020 E-money standard token

Stagnant · Tokens · created 2019-05-10

Adds compliance checks, clearing, holds, and funding/payout requests to an ERC-20 e-money token, allowing e-money institutions, banks, and central banks to issue and manage currency while complying with regulations.

Why it is needed

Institutions dealing in e-money, bank deposits, and central bank money must all comply with Know Your Customer (KYC) and Anti-Money Laundering (AML) regulations. However, an ordinary ERC-20 token can be transferred instantly by anyone, giving the issuer no way to check compliance before a transaction, reverse a transfer after the fact through a clearing process, or lock up a disputed amount. There is also no standardized way for a smart contract to receive and process requests to tokenize funds from a bank account (funding) or redeem tokens back into a bank account (redemption). As a result, regulated institutions wanting to issue e-money on Ethereum had to design a custom contract from scratch every time.

What to implement

In depth

Compliance checks and required checks

This standard defines a family of check functions that must pass before ERC-20 functions can be executed. Implementations must require that the corresponding check function returns an Allowed status code before executing transfer, approve, hold, orderTransfer, orderFund, orderPayout, and the various operator authorization actions, and must revert otherwise. The allowed status code is 0x11 (Allowed) or an equivalent but more specific issuer-defined code, and the disallowed status code is 0x10 (Disallowed) or an equivalent issuer-defined code.

Currency, version, and available funds

currency() returns the currency backing this token as an ISO 4217 code, and version() returns the contract version, with the format left to the implementer. availableFunds(account) returns the net funds an account can actually use, excluding any held amounts, from its nominal balance.

Clearing

Instead of a plain ERC-20 transfer, a transfer that must go through the issuer's off-chain clearing is first registered as an order only, via orderTransfer. The token contract's operator then performs the off-chain clearing work and subsequently either executes or rejects that order. In other words, the transfer is split into an ordering stage and an execution stage. checkOrderTransferAllowed and checkAuthorizeClearableTransferOperatorAllowed verify compliance at the ordering stage and the operator authorization stage, respectively.

Hold

A hold locks part of a token balance by designating a payer, a payee, and a notary who has the authority to resolve the hold. The held amount cannot be used for other purposes until it is executed or released. Holds have an expiration period, after which anyone can release the hold. Like an escrow, it is deterministic and leads to final settlement, and it can also be used for collateralization. checkHoldAllowed and checkAuthorizeHoldOperatorAllowed verify hold execution and hold operator authorization, respectively.

Funding request

A user can call the smart contract with an attached debit instruction string to request that their wallet be funded. The tokenizer reads this request, interprets the debit instruction, and triggers a transfer in the bank ledger to begin the tokenization process. orderFund, checkOrderFundAllowed, and checkAuthorizeFundOperatorAllowed handle the ordering and operator authorization in this flow.

Payout

A user can request a payout (withdrawal) by calling the smart contract with an attached payment instruction string. The (de)tokenizer reads this request, interprets the payment instruction, and, where possible, transfers funds mainly from an omnibus account to the destination account. A redemption request is a special case of payout where the destination bank account is linked to the token wallet. orderPayout, checkOrderPayoutAllowed, and checkAuthorizePayoutOperatorAllowed handle this flow.

A design unifying four ERCs

This standard combines ERC-1996 (hold), ERC-2018 (clearing), ERC-2019 (funding), and ERC-2021 (payout) into one, adding compliance check functions on top. The four individual ERCs can be used independently, but the E-Money Standard Token presents a combination that provides everything needed for regulated e-money in one package. The naming convention for the check functions is borrowed from ERC-1462, but it is not mandatory to require it.

Proposal status

This proposal is in Stagnant status, a draft that is no longer actively discussed or revised.

Original ERC · ← ERCs