SPEC 006 — Convertible Instruments
Confluence source incorporated: “Convertible Note Fully Diluted Equation” — see section 6.1a below
1. Feature Purpose
Convertible Instruments manages pre-equity financing instruments — SAFEs (Simple Agreements for Future Equity), convertible notes, SAFTs (Simple Agreements for Future Tokens), and custom instruments. Investors provide capital via these instruments, which later convert into equity shares upon a qualifying event (funding round, acquisition, or maturity). The module tracks instrument terms, calculates accrued interest, models conversion scenarios, and executes conversions that create new shareholdings on the cap table.2. Current State (Verified)
2.1 Backend
2.2 Frontend
3. Data Model
3.1 ConvertibleInstruments
Core instrument terms stored as content-addressed records.
Source:
schema.ts lines 1501–1534
3.2 ConvertibleInstrumentType Enum
9 instrument types, each identified by a UUID constant (utility.ts lines 4–14):
3.3 AccrualFrequency Enum
Source:
utility.ts lines 28–32
3.4 InstrumentConversions
Records when a convertible instrument converts to equity.
Source:
schema.ts lines 1536–1546
3.5 NoteConversions
Per-note distribution details within a conversion event.
Source:
schema.ts lines 1548–1564
3.6 Repayments
Records when a convertible instrument is repaid instead of converted.
Source:
schema.ts lines 1566–1573
3.7 Holdings (Relationship)
Convertible instruments are tracked as Holdings with aconvertibleInstrument field:
Source:
schema.ts lines 1417–1498 (Holdings entity, convertibleInstrument field)
Relationships
4. API Endpoints
Convertible instruments are managed through the Holdings API (shared with other holding types on the cap table).
Source:
captable-endpoints.ts lines 429–442 (convert/repay), holdings CRUD throughout file
Request Schemas
5. Frontend Components
Pages
Components
Routes
Source:
paths.ts lines 118–126, routes.ts lines 689–715
Form Fields
ConvertibleInstrumentFormFields (17 fields,types.ts lines 3–21):
ConvertibleNoteFormFields (3 fields,
types.ts lines 23–27):
6. Business Rules and Validation
6.1 Interest Calculations
The module provides 17 calculation functions (utility.ts):
6.1a Fully Diluted Equation (from Confluence KnowledgeBase)
Source: Confluence KnowledgeBase — Convertible Note Fully Diluted Equation (by Christopher Johnson, extracted from source code)Inputs:
- From Convertible Instrument: Accrual Frequency, Discount Rate, Interest Rate, Maturity Date (optional), Minimum Valuation
- From Convertible Note: Issue Date, Principle
- From Organization: Total Units
- End Date = Maturity Date (if specified), otherwise Today
- If End Date is before Issue Date, Fully Diluted = 0
- Accrual Steps calculation:
- Daily: number of days from Issue Date to End Date (not counting Issue Date)
- Monthly: days rounded down to the most recent day-of-month matching Issue Date
- Annual: days rounded down to the most recent matching day-of-month AND month
Interest = Principle * Accrual Steps * Interest Rate / 365 / 100
6.2 Conversion Rules
- User enters organization valuation at time of conversion
- System calculates shares owed per note: note value (principle + accrued interest) divided by conversion price
- Conversion price = min(valuation cap / total units, valuation / total units) * (1 - discount)
- Per-note share distributions can be manually adjusted before execution
- Conversion creates new Holdings (destination) linked back to source notes via NoteConversions
- The InstrumentConversions record captures the total shares and valuation used
6.3 Validation
6.4 Instrument Type Behavior
Different instrument types control which form fields are displayed (dynamic fields inutility.ts lines 200–206):
- SAFEs: No interest rate, no maturity date, no accrual frequency
- Convertible notes: Interest rate, accrual frequency, maturity date are active
- Custom: All fields available
7. Acceptance Criteria
- All 9 instrument types can be created with the correct fields active/hidden per type
- Convertible notes accrue interest correctly using simple or compound calculation based on accrual frequency
- Interest calculation matches the formula: simple =
steps * principle * rate, compound =principle * (1 + rate)^steps - principle - Conversion calculates shares owed per note using valuation, discount, and cap
- Conversion creates new destination Holdings and NoteConversion records
- Repayment creates a Repayment record with the instrument reference and date
- Instrument terms are immutable (content-addressed via HashedTable)
- Form validation prevents zero-valuation conversions
- The convertibles list page shows all instruments in a capitalization block
- Note issuance captures principle, owner, and issue date
- Share distribution amounts in the conversion form default to calculated shares owed
-
getMaxSharescorrectly computes maximum shares using valuation floor and discount - All 8 frontend routes resolve to the correct page components