ERC-1462 Basic security token standard (Base Security Token)

Stagnant · Tokens · created 2018-10-01

Adds to ERC-20 tokens a check function that verifies regulatory compliance before transfer, along with a feature that links off-chain legal documents, making it possible to create tokens that comply with securities regulations such as KYC and AML.

Why it is needed

Security tokens must comply with regulations such as KYC and AML, must be able to block transfers or lock the token if a legal dispute arises, and must also be linked to off-chain legal documents. However, existing proposals such as ERC-1400 and ERC-1450 have many detailed conditions tailored to specific issuers or markets, making them hard to use generically, and the ERC-1400 family depends on ERC-777, which is not yet finalized, risking delayed adoption. ERC-1404, a simpler attempt, also could not check transfer and transferFrom separately and had no way to link legal documents to the token. As a result, each issuer had to build compliance logic in a different way, and it was hard for wallets or exchanges to guarantee compatibility.

What to implement

In depth

Why it was designed with a narrow scope

This EIP holds that existing security token proposals such as ERC-1400 and ERC-1450 contain many requirements tailored to specific issuers or markets, which hurts general applicability. In particular, the ERC-1400 family depends on ERC-1410 while extending beyond the security token scope, and its dependency on ERC-777 risks delaying adoption until ERC-777 is finalized. Conversely, the simpler ERC-1404 could not distinguish checks between transfer and transferFrom, and had no way to link legal documents. For this reason, this standard defines only the core functionality at a minimum, and is designed so that additional constraints or policies can be freely layered on a per-project basis.

Four Check Functions

It newly defines four functions: checkTransferAllowed, checkTransferFromAllowed, checkMintAllowed, and checkBurnAllowed. The implementation method is left to the issuer, and any on-chain approach can be used, including whitelist/blacklist registry lookups, internal contract logic, or off-chain oracle queries. The reason transfer and transferFrom are checked by separate functions is that the two functions are usually called in different contexts. For example, a token like ERC-1450 may block transfer entirely and allow only transferFrom. approve is considered to share the same context as checkTransferFromAllowed, so a separate checkApprove function was not added.

ERC-1066 status code convention

Each check function returns an ERC-1066 status code (byte) instead of a bool. If allowed, it must return 0x11 (Allowed) or an issuer-specific code with the same meaning; if disallowed, it must return 0x10 (Disallowed) or a corresponding code. If an internal error occurs, it returns the most appropriate code (e.g. 0xF0, Off-Chain Failure). Status codes are used because they are more useful for debugging and process mining than a simple true/false. Localizing codes into human-readable text is outside the scope of this standard and can be handled at an application layer such as ERC-1444.

How to apply it to ERC-20 tokens

ERC-20-based tokens must override the transfer function to check the result of checkTransferAllowed, and transferFrom and approve must check the result of checkTransferFromAllowed. If mint or burn functions exist, they must be checked with checkMintAllowed and checkBurnAllowed respectively. If a check function has not been overridden, it must always return 0x11 (Allowed) for compatibility with ERC-20/ERC-777 wallets, and an overridden check function must revert if the action is disallowed or an error occurs.

How to apply it to ERC-777 tokens

ERC-777-based tokens must override the send function so that checkTransferAllowed is checked when the token owner calls it themselves, and checkTransferFromAllowed is checked when an operator calls it on their behalf. The burn function must check checkBurnAllowed, and if the token is mintable, the mint function must call checkMintAllowed and check the result. This is because ERC-777 handles transfers through a single send function, so the check function applied differs depending on the calling context.

Document attachment and lookup functions

attachDocument links a reference to an off-chain legal document to the token using a name (bytes32), a URI, and a content hash (up to 32 bytes). The standard does not specify the hashing algorithm, but the resulting hash cannot exceed 32 bytes. A reference already registered under the same name cannot be overwritten, and implementations must check for name duplication. lookupDocument looks up the URI and hash of a document registered under a given name. Neither function is mandatory to use; both are provided as optional components of a legal framework. They are used to create a dual-binding structure in which the token and the off-chain document reference each other, and Neufund's Employee Stock Option Plan (ESOP) legal framework is cited as an example of such a use case.

Backwards compatibility and implementations

This EIP is fully backwards compatible since it extends the functionality of ERC-20 and ERC-777. A reference implementation is published in the AtlantPlatform BaseSecurityToken repository.

Standard status

This proposal is currently in Stagnant status, with no further progress since it was written in October 2018. In other words, it has not yet been finalized and may still change or never be adopted.

Original ERC · ← ERCs