ERC-3643

πŸ“œ ERC-3643: The Security Token Standard

ERC-3643 is a comprehensive standard for security tokens on the Ethereum blockchain. It provides a framework for issuing, managing, and trading compliant security tokens.

πŸ—οΈ Architecture

The ERC-3643 standard consists of several interconnected components:

🧠 Core Concepts

1. Token πŸ’°

The main ERC-3643 token contract that implements the standard's interfaces.

2. Identity Registry πŸ†”

Manages the identities of token holders and their associated claims.

3. Compliance πŸ“‹

Enforces transfer restrictions and other compliance rules.

4. Trusted Issuers Registry πŸ“š

Maintains a list of trusted claim issuers.

5. Claim Topics Registry πŸ“

Defines the types of claims that can be associated with identities.

🚢 User Flow

Here's a typical user flow for interacting with ERC-3643 tokens:

πŸ’» Implementation Details

Token Interface

interface IERC3643 is IERC20 {
    function setIdentityRegistry(address _identityRegistry) external;
    function setCompliance(address _compliance) external;
    function forcedTransfer(address _from, address _to, uint256 _amount) external returns (bool);
    function mint(address _to, uint256 _amount) external;
    function burn(address _from, uint256 _amount) external;
    // ... additional functions
}

Identity Registry Interface

interface IIdentityRegistry {
    function registerIdentity(address _address, uint16 _country, bytes32 _hash) external;
    function updateIdentity(address _address, uint16 _country, bytes32 _hash) external;
    function deleteIdentity(address _address) external;
    function isVerified(address _address) external view returns (bool);
    // ... additional functions
}

Compliance Interface

interface ICompliance {
    function canTransfer(address _from, address _to, uint256 _amount) external view returns (bool);
    function transferred(address _from, address _to, uint256 _amount) external;
    function created(address _to, uint256 _amount) external;
    function destroyed(address _from, uint256 _amount) external;
    // ... additional functions
}

πŸš€ Example Implementation

Here's a basic implementation of the ERC-3643 token:

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./interfaces/IERC3643.sol";
import "./interfaces/IIdentityRegistry.sol";
import "./interfaces/ICompliance.sol";

contract ERC3643Token is ERC20, IERC3643 {
    IIdentityRegistry public identityRegistry;
    ICompliance public compliance;

    constructor(string memory name, string memory symbol) ERC20(name, symbol) {
        // Initialize with default identity registry and compliance
    }

    function setIdentityRegistry(address _identityRegistry) external override {
        // Implementation
    }

    function setCompliance(address _compliance) external override {
        // Implementation
    }

    function transfer(address recipient, uint256 amount) public virtual override(ERC20, IERC20) returns (bool) {
        require(compliance.canTransfer(msg.sender, recipient, amount), "Transfer not allowed");
        bool success = super.transfer(recipient, amount);
        if (success) {
            compliance.transferred(msg.sender, recipient, amount);
        }
        return success;
    }

    // Implement other required functions...
}

πŸ”‘ Key Features

  • πŸ”’ Built-in compliance and regulatory features

  • πŸ†” Identity management for token holders

  • πŸ”„ Flexible transfer restrictions

  • πŸ“Š Granular control over token issuance and management

  • 🌐 Support for global regulatory requirements

ERC-3643 provides a comprehensive framework for security tokens, addressing the complex regulatory requirements of tokenized securities. Its modular design allows for flexibility in implementing various compliance rules and identity verification processes.

Last updated

Was this helpful?