Part of the ODW ASSETTECH Legacy RWA / STO Reference Stack
This is the ERC-1400 Smart Contracts: a Solidity implementation of the ERC-1400 security token standard and its supporting extensions (validators, holdable tokens, partition logic, DvP swaps, etc.). It is the on-chain core of the legacy STO stack, and serves as a useful reference for designing compliant, partitioned security tokens before migrating to ERC-3643 or other modern standards.
Back in 2024, the ODW Team built a full Security Token Offering (STO) solution using the ERCโ1400 token standard on a private EVM chain running ConsenSys Quorum. Since then, the ecosystem has evolved: Quorum is no longer actively supported by ConsenSys (with Hyperledger Besu recommended as the successor), and STOs are now more commonly framed under the broader RealโWorld Assets (RWA) narrative.
On the token side, ERCโ3643 (TโREX) and ERCโ1155 have emerged as the most commonly used standards for regulated STO/RWA projects, with ERCโ3643 gaining prominence for its advanced, onโchain compliance (DID, KYC/AML, transfer restrictions), and ERCโ1155 enabling efficient multiโasset, multiโclass tokenization.
We are openโsourcing this repository as a reference implementation to share architecture, design patterns, and integration approaches around ERCโ1400โbased STOs on permissioned EVM chains.
Important: This repository is not intended for production use. A productionโgrade RWA/STO system today should:
- Migrate from Quorum โ Hyperledger Besu (or another actively maintained EVM execution client), and
- Refactor token logic from ERCโ1400 โ ERCโ3643 and/or ERCโ1155, with modern compliance and identity tooling.
This repository is part of the ODW ASSETTECH legacy RWA collection:
- ERC1400 Token Dashboard (Frontend Dashboard)
- STO Backend API (Express.js API with JWT, Wallet Auth)
- STO Web Client (Next.js Web Interface)
- ERC1400 Smart Contracts โ You are here (Solidity Implementation)
Each repository can be explored independently, but together they form a complete STO platform architecture.
This repository implements the ERC1400 security token standard, designed for tokenized financial assets. ERC1400 extends ERC20 with advanced compliance features including partitioned tokens, granular transfer controls, and certificate-based authorization.
- Partitioned Tokens: Partial fungibility - tokens within a partition are fungible, across partitions they're non-fungible
- Granular Transfer Controls: Certificate-based and allowlist/blocklist validation
- Token Holds: Lock tokens while maintaining accurate investor registry
- Document Management: Bind legal documents to tokens (IERC1643)
- Operator Management: Global and partition-specific operator authorization
- Controller Operations: Force transfers and redemptions for compliance
-
ERC1400 Core (
contracts/ERC1400.sol)- Main token implementation
- ERC20 retrocompatible
- Partition management
- Document management
-
Token Extensions
- ERC1400TokensValidator: Transfer validation, holds, certificates
- ERC1400TokensChecker: View-only transfer validation
-
User Extensions
- IERC1400TokensSender: Sender hooks
- IERC1400TokensRecipient: Recipient hooks
-
Holdable Token (
contracts/tokens/ERC1400HoldableToken.sol)- Pre-configured token with validator extension
- Ready-to-deploy implementation
-
Delivery-vs-Payment (
contracts/tools/Swaps.sol)- Atomic token swaps
- Multi-standard support (ETH, ERC20, ERC721, ERC1400)
- Price oracle integration
contracts/
โโโ ERC1400.sol # Core token implementation
โโโ IERC1400.sol # ERC1400 interface
โโโ tokens/
โ โโโ ERC1400HoldableToken.sol # Pre-configured holdable token
โ โโโ ERC20Token.sol # Basic ERC20 implementation
โ โโโ ERC721Token.sol # Basic ERC721 implementation
โโโ extensions/
โ โโโ tokenExtensions/
โ โ โโโ ERC1400TokensValidator.sol # Transfer validation extension
โ โ โโโ ERC1400TokensChecker.sol # View-only validation
โ โโโ userExtensions/
โ โโโ IERC1400TokensSender.sol # Sender hooks
โ โโโ IERC1400TokensRecipient.sol # Recipient hooks
โโโ tools/
โ โโโ Swaps.sol # Delivery-vs-payment
โ โโโ FundIssuer.sol # Fund issuance tool
โ โโโ BatchTokenIssuer.sol # Batch issuance
โโโ roles/ # Role-based access control
โโโ certificate/ # Certificate implementations
โโโ interface/ # Interface definitions
Partitions enable partial fungibility:
- Tokens within a partition are fungible
- Tokens across partitions are non-fungible
- Use cases: asset classes, lock-up periods, corporate actions
Off-chain signed certificates for granular transfer control:
- Nonce-based: Sequential nonce prevents replay
- Salt-based: Unique salt for one-time use
- Enhanced security and auditability
Alternative to escrow that preserves investor registry:
- Tokens remain in holder's wallet but are locked
- Supports HTLC (Hash Time Locked Contracts)
- Enables delivery-vs-payment without registry loss
ERC1400 introduces new concepts on top of ERC20:
- Granular transfer controls: Certificate-based validation via
datafield - Controllers: Force transfers and redemptions
- Partitioned tokens: Partial fungibility for asset classes
- Document management: Legal document binding (IERC1643)
- Hooks: Sender/recipient hooks via ERC1820 (optional)
- Upgradeability: ERC1820-based migration support
# Install Node.js and Yarn
brew install yarn
brew install nvmgit clone https://github.com/OnDemandWorld/erc1400-contracts.git
cd erc1400-contracts
nvm use
yarn install# Run all tests
yarn test
# Run with coverage
yarn coverageCreate a .env file:
# Copy example
cp .env.example .env
# Required variables:
MNEMONIC=your_wallet_mnemonic_here # [MANDATORY]
INFURA_API_KEY=your_infura_key # [OPTIONAL]
RPC_ENDPOINT=http://localhost:8545 # [OPTIONAL]
NETWORK_ID=1337 # [OPTIONAL]MNEMONIC- Ethereum wallet mnemonic for deployment
INFURA_API_KEY- For mainnet/ropsten/testnet accessRPC_ENDPOINT- Custom RPC endpointNETWORK_ID- Network ID for deployment
# Start Ganache
yarn start:chain
# or
ganache-cli -p 7545
# In another terminal, deploy
yarn truffle migrate# Deploy to Ropsten
yarn truffle migrate --network ropsten
# Deploy using .env configuration
yarn migrateSupported networks:
development- Local Ganacheropsten- Ethereum Ropsten testnetmainnet- Ethereum mainnet (not recommended for legacy code)
# Run all tests
yarn test
# Run with coverage
yarn coverage
# Lint code
yarn lint:all
# Fix linting issues
yarn lint:all:fixTests cover:
- Core ERC1400 functionality
- Partition management
- Transfer validation
- Document management
- Hold functionality
- Operator management
- Controller operations
// ERC20 compatible transfer
token.transfer(recipient, 1000);
// ERC1400 transfer with data
token.transferWithData(recipient, 1000, "");
// Partition transfer
bytes32 partition = keccak256("equity");
token.transferByPartition(partition, recipient, 1000, "");bytes32 holdId = keccak256("hold-1");
bytes32 secretHash = keccak256(abi.encodePacked(secret));
uint256 expiration = block.timestamp + 30 days;
validator.hold(
address(token),
holdId,
recipient,
notary,
partition,
1000,
expiration,
secretHash,
certificate
);// Issue tokens to a specific partition
token.issueByPartition(partition, recipient, 1000, "");
// Get balance in partition
uint256 balance = token.balanceOfByPartition(partition, holder);
// Get partition list
bytes32[] memory partitions = token.partitionsOf(holder);- Access Control: Properly configure controllers and operators
- Certificate Management: Use secure certificate signing
- Hold Management: Validate hold parameters carefully
- Migration: Test migration procedures thoroughly
- Audit: Have contracts professionally audited before production use
# Build all contracts
yarn build
# Build specific contract
yarn build:ERC1400# Lint Solidity
yarn lint:sol
# Lint JavaScript
yarn lint
# Fix all linting issues
yarn lint:all:fix# Start Remix for contract interaction
yarn remixRecent improvements:
- โ Removed SafeMath (Solidity 0.8.0+ built-in protection)
- โ Optimized partition management
- โ Efficient storage layout
Based on EIP-1400 specification with modifications for:
Business Requirements
- Sender/recipient hooks (ERC777-inspired, ERC1400-compliant)
- Validator hooks for upgradeable validation policies
- Partition-aware allowances
- ERC1820 migration support
Gas Optimizations
- Removed separate controller functions (merged into operator functions)
- Optional checker hooks (view functions moved to optional extension)
- SafeMath removed (Solidity 0.8.0+ has built-in overflow protection)
The contract supports ERC1820-based migration:
// Migrate to new contract
token.migrate(newContractAddress, false); // Non-definitive
token.migrate(newContractAddress, true); // Definitive- Architecture Documentation - Deep dive into system architecture
- API Reference - Complete API documentation
- Improvement Roadmap - Future enhancements and optimizations
- Certificate System - Certificate-based transfers
- Swaps Documentation - Delivery-vs-payment system
Apache 2.0 - See LICENSE file for details.
If this repository is useful to you as a reference for STO/RWA design, please consider:
- Giving the project a โญ star on GitHub
- Watching the repo to follow updates
- Opening issues for questions, ideas, or problems you hit
- Submitting pull requests with improvements or fixes
Your feedback and contributions help us decide how much more to invest in evolving these openโsource building blocks.
ODW ASSETTECH specializes in:
- RWA / STO architecture & solution design
- Smart contract engineering (ERCโ3643, ERCโ1155, custom compliance modules)
- Blockchain infrastructure - Hyperledger Besu setup and deployment
- Security auditing - Contract review and optimization
- Migration of legacy ERCโ1400 / Quorum stacks to Hyperledger Besu and modern standards
- Regulated environments: focusing on complianceโaware tokenization flows
If you are:
- A financial institution or issuer exploring tokenization,
- A startup building an RWA platform, or
- An engineering team looking to modernize an existing STO stack,
we'd be happy to discuss how we can help.
- Email: office@odw.ai
- Contact Page: https://ondemandworld.com/contact-us/
- GitHub Issues: Report bugs and request features
- GitHub Discussions: Ask questions and share ideas
- ERC1400 Token Dashboard โ Next.js dashboard UI for managing ERCโ1400 tokens
- STO Backend API โ TypeScript/Express backend for auth, users, and wallet integration
- STO Web Client โ Next.js web client for endโuser STO workflows
- ERC1400 Smart Contracts โ Solidity implementation of ERCโ1400 and related extensions
This repository is one component of a 4โrepo reference stack. For a fuller picture, explore the other repos in the ODW ASSETTECH organization.
Made by the ODW Team โ sharing our 2024 STO stack as a reference for today's RWA builders.