A comprehensive implementation of programmable tokens for Cardano, consisting of smart contracts (Aiken) and off-chain infrastructure (Java).
This implementation builds upon the foundational work of the CIP-143 reference implementation originally developed by Phil DiSarro and the IOG team. The Aiken smart contracts in this repository are migrated from their Plutarch implementation.
Original Work:
- Repository: input-output-hk/wsc-poc
- Specification: CIP-143: Interoperable Programmable Tokens
- Authors: Phil DiSarro, IOG Team
We are deeply grateful for the significant effort and expertise invested in the original design and implementation. Their work has provided an invaluable foundation for advancing programmable token standards on Cardano.
This codebase has been adapted to align with the requirements of CIP-113, which supersedes CIP-143 as a more comprehensive standard for programmable tokens on Cardano.
Important Note: CIP-113 is currently under active development (PR #444) and has not been finalized. The specification may change as the standard evolves. This implementation reflects our current understanding and may require updates as CIP-113 matures.
This repository serves as a temporary home for the codebase while we work toward establishing a permanent organizational structure. We anticipate the code will eventually be transferred to and maintained by organizations such as Pragma, Intersect, or other appropriate Cardano ecosystem entities.
This repository contains two main components:
Location: src/programmable-tokens-onchain-aiken/
Complete on-chain implementation of programmable tokens written in Aiken, including:
- Core validators for token custody and transfer validation
- Token registry (directory) management
- Issuance and lifecycle controls
- Example implementations (blacklist, freeze & seize)
- Comprehensive test suite (89 passing tests)
π View Detailed Documentation
Location: src/programmable-tokens-offchain-java/
Spring Boot application providing transaction building and blockchain integration:
- Transaction construction for protocol operations
- Blockchain data access via Blockfrost/Yaci
- Integration tests for Preview testnet
- API endpoints for protocol interactions
Programmable tokens are native Cardano assets enhanced with customizable validation logic that executes on every transfer, mint, or burn operation. They enable:
- Regulatory Compliance: Enforce KYC/AML requirements, sanctions screening, transfer restrictions
- Lifecycle Controls: Programmatic freeze, seize, and burn capabilities
- Custom Logic: Pluggable validation scripts for blacklists, whitelists, time-locks, and more
- Native Compatibility: Full interoperability with existing Cardano wallets and infrastructure
- Stablecoins with regulatory compliance
- Tokenized securities and real-world assets (RWAs)
- Regulated financial instruments
- Any token requiring programmable transfer rules
Current Status: Research & Development
This is high-quality research code with strong implementation:
- β Core validators implemented and tested
- β Registry operations functional
- β Token issuance and transfer flows working
- β Example freeze & seize functionality complete
- β Good test coverage (89 passing tests)
- β Limited testing on Preview testnet
- β³ Comprehensive real-world testing required
- β³ Professional security audit pending
- Comprehensive security audit by qualified professionals
- Extensive testing across diverse scenarios
- Thorough review by domain experts
- Aiken v1.0.29+ (for smart contracts)
- Java 17+ and Gradle (for off-chain)
- Cardano CLI (optional, for deployment)
cd src/programmable-tokens-onchain-aiken
aiken build
aiken check # Run testscd src/programmable-tokens-offchain-java
./gradlew buildFor detailed setup, testing, and deployment instructions, see the respective README files in each subdirectory.
Token Registry: An on-chain directory of registered programmable tokens implemented as a sorted linked list, enabling constant-time lookups.
Shared Contract Address: All programmable tokens are held at a common smart contract address, with ownership determined by stake credentials.
Validation Scripts: Pluggable logic for transfer validation and issuer controls, allowing customized behavior per token.
Transaction Flow:
- Deploy protocol (one-time setup)
- Register token with validation logic
- Issue tokens
- Transfer with automatic validation
- Burn/seize (when authorized)
For comprehensive technical documentation, see the Aiken implementation docs.
- CIP-143: Interoperable Programmable Tokens (Original specification, now inactive)
- CIP-113: Programmable Tokens (Active development, supersedes CIP-143)
Contributions are welcome as we develop this implementation. Please:
- Read the technical documentation in subdirectory READMEs
- Ensure all tests pass before submitting changes
- Add tests for new functionality
- Open an issue to discuss significant changes
- Follow existing code style and patterns
- π Aiken Language Documentation
- π CIP-143 Specification
- π Cardano Developer Portal
- π¬ Aiken Discord
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright 2024 Cardano Foundation
This project builds on the pioneering work of:
- Phil DiSarro and the IOG Team for the original Plutarch implementation
- The CIP-143/CIP-113 authors and contributors for standard development
- The Aiken team for excellent smart contract tooling
- The Cardano developer community for continued support
Status: Research & Development | Not Production Ready | Security Audit Required