Stellar Core Advancement Proposals (CAPs) are formal documents that propose changes, enhancements, or new features to the Stellar protocol, specifically targeting the Stellar Core software, which is the reference implementation of the Stellar Consensus Protocol (SCP). CAPs are a critical part of the Stellar ecosystem’s governance and development process, allowing the community, developers, and stakeholders to collaboratively refine and evolve the network’s underlying technology.
### What Are CAPs?
CAPs are akin to Ethereum’s EIPs (Ethereum Improvement Proposals) or Bitcoin’s BIPs (Bitcoin Improvement Proposals). They provide a structured mechanism for proposing, discussing, and implementing improvements to Stellar Core, ensuring that changes are well-documented, reviewed, and aligned with the network’s goals. Each CAP outlines a specific technical modification or addition, including its motivation, specification (often with XDR changes), rationale, and implications.
### Key Characteristics of CAPs
1. **Focus on Stellar Core**: CAPs target the core protocol and its implementation in Stellar Core, distinguishing them from Stellar Ecosystem Proposals (SEPs), which address higher-level standards for applications, wallets, and integrations built on top of Stellar.
2. **Technical Detail**: They include detailed specifications, such as changes to the XDR (External Data Representation) schema, semantics, and design rationale, ensuring clarity for developers implementing the changes.
3. **Community-Driven**: CAPs are proposed and discussed by the Stellar community, often involving working groups of authors and consulted experts, fostering a collaborative approach.
4. **Protocol Evolution**: They drive the evolution of the Stellar network by introducing new features, optimizing performance, enhancing security, or improving scalability.
### Structure of a CAP
A typical CAP document includes:
- **Preamble**: Metadata such as CAP number, title, authors, status (e.g., Draft, Final), creation date, and protocol version affected.
- **Simple Summary**: A concise overview of the proposal’s purpose.
- **Motivation**: The problem or opportunity addressed, explaining why the change is needed.
- **Goals Alignment**: How the proposal aligns with Stellar’s network goals (e.g., scalability, usability, cross-border payments).
- **Abstract**: A high-level description of the change.
- **Specification**: Technical details, including XDR changes and semantics.
- **Design Rationale**: Justification for the chosen approach and alternatives considered.
- **Backwards Incompatibilities**: Impact on existing systems.
- **Resource Utilization**: Effects on network performance.
- **Security Concerns**: Potential risks and mitigations.
- **Test Cases/Implementation**: Supporting evidence or code references.
### Examples from Provided CAPs
- **CAP-0020: Bucket Initial Entries**: Simplifies the bucket list by removing shadows, optimizing storage and merge latency.
- **CAP-0021: Generalized Transaction Preconditions**: Enhances flexibility with preconditions like `ledgerBounds`, aiding payment channels.
- **CAP-0038: Automated Market Makers**: Introduces liquidity pools, easing asset exchange.
- **CAP-0043: ECDSA Signers**: Adds P-256 and secp256k1 curves, integrating with FIPS-compliant systems.
### Process
1. **Drafting**: An author submits a CAP as a draft, typically via a pull request to the Stellar Protocol repository on GitHub.
2. **Discussion**: The community reviews and debates the proposal (e.g., on Stellar’s developer mailing list or GitHub).
3. **Refinement**: Feedback refines the CAP; it may remain a draft or advance to "Final" status.
4. **Implementation**: Once finalized, the change is implemented in Stellar Core, tested, and deployed via a protocol upgrade, requiring validator consensus.
5. **Adoption**: Validators vote to adopt the new protocol version, activating the CAP’s changes network-wide.
### Impact
CAPs ensure Stellar remains adaptable, secure, and efficient. They address technical limitations (e.g., CAP-0025 removes bucket shadowing for performance) and expand functionality (e.g., CAP-0040 simplifies payment channel signing). By empowering validators and developers, CAPs uphold Stellar’s mission of equitable, scalable financial access.