Equity Cap Table Modeling for an AI Company IPO: A Technical Guide
This article uses a large language model (LLM) company's IPO as a case study to explain how to model and compute equity data under a multi-class share structure. It covers the three sources of share changes, an event-sourcing data model for cap tables, a calculation engine that produces multi-basis reports (fully diluted shares, voting power), handling of IPO-specific events such as greenshoe and RSUs, and common pitfalls such as confusing ownership percentage with voting percentage. Backend developers and data engineers can use the model and pseudocode to build their own equity calculation systems and understand why the same company shows different numbers under different bases.
Introduction: The Equity Data Problem Behind an IPO
A leading large language model (LLM) company is about to go public. According to its prospectus, two early strategic investors are expected to gain more than $100 billion in paper value. On the surface, this is a capital market wealth story. For engineering teams, however, it is a classic equity data modeling problem.
Fast-growing companies of this kind typically adopt a structure of “multiple classes of common stock + preferred stock financing rounds + large-scale equity incentives.” This raises the question: in the IPO filing, how are figures such as “issued share capital,” “percentage of a certain class,” and “voting power ratio” actually calculated?
Using this case as a thread, this article abstracts a reusable data model and calculation workflow, along with pseudocode. Readers can use it to build their own equity calculation systems and understand why the same company shows different “numbers” under different bases.
Terminology note: In this article, “a major cloud vendor” refers to one of the company’s main cloud service investors, and “a major internet platform vendor” refers to another large internet investor. Both are referred to in a neutral way.
1. Background: Where Do the Share Capital Numbers in the Prospectus Come From?
According to publicly disclosed information about this case (figures are illustrative): a major cloud vendor and a major internet platform vendor each invested heavily across multiple funding rounds. After this offering and the concurrent private placements, based on the Class A and Class N common shares issued as of September 30, 2026 (taking into account the impact of preferred stock conversions, convertible note conversions, Class F share issuance, the initial charitable offering, and RSU settlements), the two would hold 1,920,511,218 and 1,789,598,269 Class N common shares, respectively:
- Representing 33.9% and 31.6% of the total issued Class N common shares, respectively;
- Representing 14.7% and 13.7% of the total issued share capital, respectively.
Consider a few key facts first.
- The founding team is the joint actual controller: The company is jointly controlled by seven co-founders.
- Early investors are the biggest beneficiaries: The largest shareholders with the highest paper gains are not the founding team, but the two early investors.
- Multiple early investors achieved returns on the order of 100x: According to investment documents cited by multiple media outlets, four of the institutions each invested about $500 million, and after the IPO their holdings were each worth more than $50 billion, a return of over 100x.
From a technical perspective, three features of this disclosure are worth noting.
1. The data is the result of a “pro forma calculation.” The phrase “taking into account the impact of…” indicates that the share counts in the report cannot be obtained by simply querying current holdings. Instead, a series of corporate actions—preferred stock conversions, note-to-equity conversions, new share issuances, restricted stock settlements—must all be simulated to the same reference date.
2. The share capital structure is split into multiple classes. Class A and Class N coexist, and the same holder simultaneously has both a “percentage of a certain class” and a “percentage of total share capital.” With voting rights differences layered on top, the same shareholder often has three “percentages”:
- The percentage of a specific class of shares;
- The percentage of total share capital;
- The percentage of total voting rights.
3. Early investors are the biggest beneficiaries in terms of paper gains. Roughly back-calculated from the illustrative data above, the two investors held roughly 10% to 20% each before the IPO. After multiple rounds of large-scale financing, other shareholders’ stakes were continuously diluted, while their relative percentages actually increased—a phenomenon that is itself worth analyzing at the calculation level.
2. Modeling Foundations: Identifying the Three Sources of Share Changes
To accurately reconstruct the share capital, you first need to understand three things:
- Share capital is not a static snapshot, but a state that changes over time;
- Every change is a “corporate action”;
- A single action can be summarized as “who, when, which shares, under what rules, converted into how many.”
Accordingly, the sources of change can be grouped into three categories.
2.1 Corporate actions that have occurred and taken effect
These include capital increases, secondary share transfers, share splits and consolidations, capitalization of capital reserves, share buybacks and cancellations, and treasury share reissuances, among others. Among these, a secondary share transfer only changes the holder structure and does not change the total share capital, so this distinction must be made in the model.
2.2 Signed but not yet effective potential shares
These include unconverted preferred stock, unmatured convertible notes, unexercised options, and unvested RSUs. Whether they count toward share capital depends on the analysis basis, which is precisely why the concept of “fully diluted” exists.
2.3 IPO-specific matters
- New IPO shares: Including the public offering portion and the concurrent private placement;
- Special classes of shares: Classes created on an ad hoc basis before the offering, carrying specific rights arrangements;
- Initial charitable offering: Typically shares linked to corporate philanthropy commitments, subject to special restrictions;
- Greenshoe mechanism: The over-allotment option, which allows underwriters to oversell shares within an agreed period and to fulfill that obligation with shares issued by the company.
The same matter can have different meanings under different bases, so each must be modeled explicitly.
3. Data Model: Building the Cap Table with Event Sourcing
3.1 Core entities
- Company: The entity of the share capital. In multi-group scenarios, consolidated bases must be supported;
- Holder: Institutions, founders, employee shareholding vehicles, etc.;
- SecurityClass: Class code, votes per share, liquidation priority order, whether it counts toward dilution, sunset clauses, and other attributes;
- Position: The number of shares a holder holds in a class, derived from events and not maintained manually;
- Instrument: Potential share vehicles such as preferred stock, convertible notes, options, and RSUs, together with their conversion terms;
- CorporateAction: The factual record of every change in share capital.
3.2 Why choose event sourcing
The conventional approach is to maintain a “current holdings table” and update the balance directly on every change. It works well enough for day-to-day management but struggles to answer the following questions:
- How many shares did each shareholder hold at any given point in history?
- If a vesting calculation two months ago was wrong, how can historical reports be corrected?
- Can the pro forma data in the prospectus be reproduced?
- How can you prove which agreements and resolutions a given number was derived from?
Event Sourcing records every change in share capital as an immutable domain event, with the current state obtained by replaying the event stream. Its advantages include:
- Naturally traceable: Every number can be traced back to a specific event;
- Reproducible: The same set of events replayed at any point in time yields the same result;
- Easy to correct: Historical data can be corrected by appending correction events, without overwriting the original records;
- Easy to produce multiple bases: Replaying under different rule sets generates different reports.
The cost is that reads require projection, so snapshots can be generated periodically to speed up queries.
3.3 Illustrative event structure
// Pseudocode: unified structure for corporate action eventsEvent {eventId: string // globally unique identifier, also the idempotency keycompanyId: string // the company it belongs totype: string // event type, e.g., PREF_CONVERT / NOTE_CONVERT / RSU_SETTLE / IPO_ISSUE ...recordDate: date // record date: determines who is entitled to participate in the actioneffectiveDate: date // effective date: the date from which the share increase starts to countstatus: string // effective / draft / cancelled / supersededpayload: object // event-specific fields: conversion ratio, exercise price, vested quantity, etc.meta: {source: string // source: board resolution, shareholders' agreement, underwriting agreement, etc.operator: string // the person or system task that entered the recordversion: number // optimistic lock version number}}
A few design points:
- Distinguish record date from effective date: The record date determines who is entitled to participate in the action; the effective date determines from when the new shares count toward weighted average shares.
- No physical deletion: Cancellations or corrections are expressed by appending “cancel/supersede” events.
- Unique idempotency key: A unique constraint on
eventIdprevents duplicate postings caused by network retries. - Pre-write validation: Before writing, validate rules such as holder identity, security class, available quantity, and the version of the conversion terms.
4. Calculation Engine: From the Event Stream to Multi-Basis Reports
4.1 Replay, snapshots, and parallelism
The basic algorithm is “start from zero and apply events one by one in chronological order”:
// Pseudocode: replay the event stream to obtain a holdings snapshot at a given point in timefunction buildSnapshot(events, asOf):positions = {} // key: (holderId, classId) -> share countfor e in sortBy(events, [recordDate, eventId]): // event order must be stableif e.effectiveDate > asOf:continue // events not yet effective are not countedif e.status == CANCELLED:continuepositions = applyEvent(positions, e) // event type -> handler functionreturn positions
In practice, two optimizations are needed:
- Layered snapshots: Materialize intermediate snapshots by “month/quarter,” and on query only replay events after the snapshot;
- Shard-based parallelism: Use
companyIdas the shard key, so that event streams for different companies can be replayed in parallel.
When multiple legal entities are involved, support for eliminating internal holdings by equity ratio on a consolidated basis is also required.
4.2 Corporate action processing: preferred stock conversion as an example
// Pseudocode: convert preferred stock into Class N common sharesfunction applyPreferredConversion(pos, e):// 1. Resolve the conversion ratio from the terms version in the event; do not read the "current" termsterms = ruleSet.get(e.payload.termsVersion)ratio = terms.conversionRatio(e) // e.g., 1 preferred share = 2.4 Class N common sharesfor lot in e.payload.lots: // each tranche of preferred shares// 2. Reduce the original shares and issue new onespos.subtract(lot.holderId, lot.classId, lot.shares)newShares = floorToShare(lot.shares * ratio) // handle fractional shares per the termspos.add(lot.holderId, terms.targetClass, newShares)// 3. Record the conversion cost basis for return and paper gain analysispos.recordCostBasis(lot.holderId, terms.targetClass,lot.originalCost, newShares)return pos
- The conversion ratio must be resolved from the “terms version” bound to the event, not from the current terms; otherwise historical recalculation will be distorted.
- Conversion cost must be carried forward. Only by preserving the original invested cost can you calculate paper gains, internal rate of return (IRR), and multiple on invested capital (MOIC).
4.3 Fully diluted basis and the treasury stock method
Fully diluted shares build on outstanding common shares by adding all potentially convertible shares. The options and RSU portion typically uses the “treasury stock method”:
- Assume all options are exercised, and the exercise proceeds are used to repurchase shares at the current fair value;
- The share increase is “shares exercised − shares repurchased,” i.e.,
N × (1 − K / P). - When the exercise price is not lower than the fair value, the increment is 0.
// Pseudocode: compute fully diluted shares at point Tfunction computeFullyDiluted(positions, asOf):common = sumShares(positions, CLASS_COMMON)prefAsCommon = 0for each preferred series still outstanding:// preferred stock with agreed conversion is treated as already convertedprefAsCommon += preferredShares * conversionRatio(series)price = fairValueAt(asOf) // fair value per share at the exercise dateoptionIncrement = 0for each unexercised option grant:intrinsic = max(0, price - strikePrice)if intrinsic > 0:// repurchased shares = shares exercised × strike price / fair valuerepurchased = grant.shares * strikePrice / priceoptionIncrement += grant.shares - repurchasedrsuIncrement = 0for each unvested RSUnit:vested = countVestedUnits(rsu, asOf) // service period + performance conditionswithheld = estimateWithholdingShares(vested, price) // estimated tax withholding sharesrsuIncrement += vested - withheld // share increment under net settlementnoteIncrement = 0for each convertible note outstanding:noteIncrement += floorToShare(note.principal / conversionPrice(note))return common + prefAsCommon + optionIncrement + rsuIncrement + noteIncrement
4.4 Voting power: separating control from economic interest
// Pseudocode: weight by votes per share for each classfunction computeVotingPower(positions, classMeta):totalVotes = 0holderVotes = {}for (holderId, classId), shares in positions:votes = shares * classMeta[classId].votesPerSharetotalVotes += votesholderVotes[holderId] += votesreturn { holderId: holderVotes[h] / totalVotes }
There are three common misconceptions in voting power calculations:
- Treating ownership percentage as voting power percentage. Under a multi-class structure, votes per share often differ between classes and between shareholders.
- Ignoring voting power sunset clauses. For example, high voting power may lapse or convert to ordinary voting power when a founder’s holding falls below a certain percentage, transfers shares, or no longer holds office.
- Double counting treasury shares. Treasury shares typically carry neither voting rights nor dividend rights and should be excluded from the denominator.
Back to the case: the founders hold a smaller percentage than the early investors, yet are able to “jointly control” the company with their co-founders. The core is precisely this kind of structured control arrangement. There are three reasons the early investors became the biggest winners:
- They invested early, at low cost, with a high margin of safety;
- They continued to add to their positions in subsequent large financing rounds, slowing the pace of dilution;
- After the IPO, the share price was far above the valuations of previous rounds, causing paper gains to expand sharply.
4.5 Numerical precision and date handling
- Share counts and amounts: Store them as 64-bit integers in the smallest unit, or use high-precision decimals. Do not use floating-point numbers for share counts and amounts;
0.1 + 0.2-type errors can accumulate enough to push tail differences beyond acceptable limits. - Unified rounding rules: Multiplying the conversion ratio by the share count often produces fractional shares, so uniformly apply truncation, rounding, or round-up as specified in the terms, and record it in the calculation metadata.
- Date time zones: Store uniformly in UTC and convert to the exchange’s local time zone when displaying, to avoid cross-day events falling on the wrong date.
5. Handling IPO-Stage Special Matters
5.1 Distinguishing issuance types
| Issuance type | Impact on total share capital | Modeling points |
|---|---|---|
| Public offering | Increase | Record the offering price, underwriting discount, and greenshoe arrangements |
| Concurrent private placement | Increase | Distinguish cornerstone investors from general investors; lock-up arrangements vary |
| Secondary share transfer | No change | Only the holder changes; involves existing shareholder sell-downs and lock-up periods |
| Over-allotment | Increase (if exercised) | Track within the agreed window whether it is exercised, to avoid overstating or understating the share capital |
5.2 Special classes and charitable shares
- Special classes of shares: Before adding them, clarify votes per share, conversion conditions, and sunset arrangements, and handle them separately in the voting power calculation.
- Initial charitable offering: Generally shares with special restrictions attached, used to support corporate philanthropy commitments. You need to record their quantity, holding entities, lock-up arrangements, and the corresponding commitment matters, to avoid omitting or double counting them in calculations.
5.3 RSUs and the option pool
- Separating vesting from settlement: Vesting is the confirmation of a right, while settlement is the delivery of shares; there may be a time gap between the two. The handling team must maintain three states: “unvested—vested but unsettled—settled.”
- Expanding the option pool: Increasing the option pool before or after a financing round directly dilutes all shareholders. The allocation rules are written in the transaction documents, and the calculation must remain consistent with the event order.
6. Engineering Implementation: Validation, Security, and Observability
6.1 Consistency checks
Both writes and batch processing should adopt an idempotent design, so that retries do not produce duplicate events. After each calculation round, run reconciliation rules:
- The treasury share count must not be negative;
- The sum of holdings across all classes equals the total share capital;
- The sum of shareholders’ percentages (under the fully diluted basis) is approximately 100%, with tail differences within a threshold;
- After conversion into common shares, the original share count is cleared to zero;
- Historical snapshots confirmed in the previous period remain consistent after replay in the current round.
6.2 Permissions and privacy
The shareholder register is highly sensitive data, involving shareholding and cost information about founders, employees, and investment institutions, and is subject to privacy regulations. It is recommended to follow the principle of least privilege: control visible fields by role—for example, cost price and exercise price are open only to authorized roles—and fully audit queries and exports.
6.3 Observability
- Metrics: Event backlog, replay duration, number of validation failures, snapshot generation time;
- Logs: Structurally record the event scope, parameter versions, and result summary of each calculation;
- Alerts: Alert promptly when negative share counts, abnormal percentage totals, or drift in recalculation results occur;
- Archiving: Write key snapshots to object storage and retain multiple versions to ensure historical conclusions can still be reproduced years later.
Components such as message queues, container platforms, logging services, monitoring and alerting, and object storage are all general cloud product categories that can be selected on demand on platforms such as Baidu AI Cloud. The architectural focus is on “replayable, reconcilable, and auditable,” independent of the specific underlying platform.
7. Common Pitfalls Checklist
- Using current terms to calculate historical conversion ratios, distorting historical recalculation;
- Confusing ownership percentage with voting power percentage;
- Counting options in full at the exercised share count for dilution, ignoring repurchased shares under the treasury stock method;
- Misrecording a secondary share transfer as an increase in total share capital;
- Cancelled or amended vesting plans still participating in the calculation;
- Using floating-point numbers for share counts and amounts, accumulating tail differences;
- Keeping only the current balance, unable to handle audit tracing and after-the-fact corrections;
- Multi-currency financing without recording exchange rates, causing systematic bias in paper gain calculations;
- Counting over-allotment shares in advance when the greenshoe is not exercised;
- Treasury shares still participating in voting power allocation.
Conclusion
Back to the question at the start: the early investors becoming the biggest winners was no accident. They started with early, low-cost investment, continued to add to their positions during massive financing, and ultimately—leveraging a multi-class share structure and structured control arrangements—achieved a separation of control and economic interest.
For developers, this is a problem that can be engineered: treat share capital as an event stream, treat rules as versioned terms, and treat reports as projections across multiple bases. On this foundation, use fully diluted calculation to measure true percentages, use voting power to characterize control, and then layer on paper gain and return rate analysis to see the full capital structure behind a prospectus.
