Skip to content

Commit b53fe95

Browse files
committed
updated DATA_MODEL to make it complete
1 parent 6f4c9ce commit b53fe95

1 file changed

Lines changed: 322 additions & 17 deletions

File tree

docs/DATA_MODEL.md

Lines changed: 322 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,251 @@ Records issuance of stock to stakeholders.
165165
}
166166
```
167167

168-
Other transaction types include:
169-
- EquityCompensationIssuance
170-
- ConvertibleIssuance
171-
- WarrantIssuance
172-
- StockTransfer
173-
- StockCancellation
174-
- StockConsolidation
175-
- EquityCompensationExercise
176-
- And many others (acceptance, adjustment, conversion, release, repurchase, return_to_pool, split, etc.)
168+
#### ConvertibleAcceptance
169+
Records the acceptance of a convertible security by a stakeholder.
170+
171+
```javascript
172+
{
173+
_id: String (UUID),
174+
object_type: "TX_CONVERTIBLE_ACCEPTANCE",
175+
comments: [String],
176+
security_id: String,
177+
date: String,
178+
issuer: String // Reference to Issuer._id
179+
}
180+
```
181+
182+
#### EquityCompensationAcceptance
183+
Records the acceptance of equity compensation by a stakeholder. The `object_type` can be either `TX_PLAN_SECURITY_ACCEPTANCE` or `TX_EQUITY_COMPENSATION_ACCEPTANCE`.
184+
185+
```javascript
186+
{
187+
_id: String (UUID),
188+
object_type: ["TX_PLAN_SECURITY_ACCEPTANCE", "TX_EQUITY_COMPENSATION_ACCEPTANCE"],
189+
comments: [String],
190+
security_id: String,
191+
date: String,
192+
issuer: String // Reference to Issuer._id
193+
}
194+
```
195+
196+
#### PlanSecurityAcceptance
197+
Records the acceptance of a plan security by a stakeholder.
198+
199+
```javascript
200+
{
201+
_id: String (UUID),
202+
object_type: "TX_PLAN_SECURITY_ACCEPTANCE",
203+
comments: [String],
204+
security_id: String,
205+
date: String,
206+
issuer: String // Reference to Issuer._id
207+
}
208+
```
209+
210+
#### StockAcceptance
211+
Records the acceptance of a stock by a stakeholder.
212+
213+
```javascript
214+
{
215+
_id: String (UUID),
216+
object_type: "TX_STOCK_ACCEPTANCE",
217+
comments: [String],
218+
security_id: String,
219+
date: String,
220+
issuer: String // Reference to Issuer._id
221+
}
222+
```
223+
224+
#### WarrantAcceptance
225+
Records the acceptance of a warrant by a stakeholder.
226+
227+
```javascript
228+
{
229+
_id: String (UUID),
230+
object_type: "TX_WARRANT_ACCEPTANCE",
231+
comments: [String],
232+
security_id: String,
233+
date: String,
234+
issuer: String // Reference to Issuer._id
235+
}
236+
```
237+
238+
#### IssuerAuthorizedSharesAdjustment
239+
Records an adjustment to the number of authorized shares for the issuer.
240+
241+
```javascript
242+
{
243+
_id: String (UUID),
244+
object_type: "TX_ISSUER_AUTHORIZED_SHARES_ADJUSTMENT",
245+
comments: [String],
246+
date: String,
247+
issuer_id: String,
248+
new_shares_authorized: String,
249+
board_approval_date: String,
250+
stockholder_approval_date: String,
251+
is_onchain_synced: Boolean,
252+
issuer: String, // Reference to Issuer._id
253+
tx_hash: String
254+
}
255+
```
256+
257+
#### StockClassAuthorizedSharesAdjustment
258+
Records an adjustment to the number of authorized shares for a specific stock class.
259+
260+
```javascript
261+
{
262+
_id: String (UUID),
263+
object_type: "TX_STOCK_CLASS_AUTHORIZED_SHARES_ADJUSTMENT",
264+
comments: [String],
265+
date: String,
266+
stock_class_id: String,
267+
new_shares_authorized: String,
268+
board_approval_date: String,
269+
stockholder_approval_date: String,
270+
is_onchain_synced: Boolean,
271+
issuer: String, // Reference to Issuer._id
272+
tx_hash: String
273+
}
274+
```
275+
276+
#### StockClassConversionRatioAdjustment
277+
Records an adjustment to the conversion ratio of a stock class.
278+
279+
```javascript
280+
{
281+
_id: String (UUID),
282+
object_type: "TX_STOCK_CLASS_CONVERSION_RATIO_ADJUSTMENT",
283+
comments: [String],
284+
date: String,
285+
stock_class_id: String,
286+
new_ratio_conversion_mechanism: Object,
287+
issuer: String // Reference to Issuer._id
288+
}
289+
```
290+
291+
#### StockPlanPoolAdjustment
292+
Records an adjustment to the pool of shares reserved for a stock plan.
293+
294+
```javascript
295+
{
296+
_id: String (UUID),
297+
object_type: "TX_STOCK_PLAN_POOL_ADJUSTMENT",
298+
comments: [String],
299+
date: String,
300+
stock_plan_id: String,
301+
board_approval_date: String,
302+
stockholder_approval_date: String,
303+
shares_reserved: String,
304+
is_onchain_synced: Boolean,
305+
issuer: String, // Reference to Issuer._id
306+
tx_hash: String
307+
}
308+
```
309+
310+
#### ConvertibleCancellation
311+
Records the cancellation of a convertible security.
312+
313+
```javascript
314+
{
315+
_id: String (UUID),
316+
object_type: "TX_CONVERTIBLE_CANCELLATION",
317+
amount: Object,
318+
comments: [String],
319+
security_id: String,
320+
date: String,
321+
balance_security_id: String,
322+
reason_text: String,
323+
issuer: String // Reference to Issuer._id
324+
}
325+
```
326+
327+
#### EquityCompensationCancellation
328+
Records the cancellation of equity compensation. The `object_type` can be either `TX_PLAN_SECURITY_CANCELLATION` or `TX_EQUITY_COMPENSATION_CANCELLATION`.
329+
330+
```javascript
331+
{
332+
_id: String (UUID),
333+
object_type: ["TX_PLAN_SECURITY_CANCELLATION", "TX_EQUITY_COMPENSATION_CANCELLATION"],
334+
quantity: String,
335+
comments: [String],
336+
security_id: String,
337+
date: String,
338+
balance_security_id: String,
339+
reason_text: String,
340+
issuer: String // Reference to Issuer._id
341+
}
342+
```
343+
344+
#### PlanSecurityCancellation
345+
Records the cancellation of a plan security.
346+
347+
```javascript
348+
{
349+
_id: String (UUID),
350+
object_type: "TX_PLAN_SECURITY_CANCELLATION",
351+
comments: [String],
352+
security_id: String,
353+
date: String,
354+
quantity: String,
355+
balance_security_id: String,
356+
reason_text: String,
357+
issuer: String // Reference to Issuer._id
358+
}
359+
```
360+
361+
#### StockCancellation
362+
Records the cancellation of a stock.
363+
364+
```javascript
365+
{
366+
_id: String (UUID),
367+
object_type: "TX_STOCK_CANCELLATION",
368+
quantity: String,
369+
comments: [String],
370+
security_id: String,
371+
date: String,
372+
balance_security_id: String,
373+
reason_text: String,
374+
issuer: String, // Reference to Issuer._id
375+
tx_hash: String
376+
}
377+
```
378+
379+
#### WarrantCancellation
380+
Records the cancellation of a warrant.
381+
382+
```javascript
383+
{
384+
_id: String (UUID),
385+
object_type: "TX_WARRANT_CANCELLATION",
386+
quantity: String,
387+
comments: [String],
388+
security_id: String,
389+
date: String,
390+
balance_security_id: String,
391+
reason_text: String,
392+
issuer: String // Reference to Issuer._id
393+
}
394+
```
395+
396+
#### StockConsolidation
397+
Records the consolidation of multiple stock securities into a single resulting security.
398+
399+
```javascript
400+
{
401+
_id: String (UUID),
402+
object_type: "TX_STOCK_CONSOLIDATION",
403+
security_ids: [String],
404+
resulting_security_id: String,
405+
comments: [String],
406+
date: String,
407+
reason_text: String,
408+
issuer: String, // Reference to Issuer._id
409+
is_onchain_synced: Boolean,
410+
tx_hash: String
411+
}
412+
```
177413

178414
### MongoDB Relationships
179415

@@ -200,7 +436,7 @@ struct Storage {
200436
mapping(bytes32 => bytes32) roleAdmin; // hierarchy of roles
201437
address currentAdmin; // Current admin address
202438
address pendingAdmin; // Pending admin address for ownership transfer
203-
439+
204440
// Cap Table storage
205441
Issuer issuer;
206442
bytes16[] stakeholders;
@@ -307,13 +543,82 @@ struct IssueStockParams {
307543
}
308544
```
309545

310-
Similar parameter structs exist for other transaction types like:
311-
- IssueConvertibleParams
312-
- IssueEquityCompensationParams
313-
- IssueWarrantParams
314-
- StockConsolidationTx
315-
- StockTransferTx
316-
- StockCancellationTx
546+
#### IssueConvertibleParams
547+
```solidity
548+
struct IssueConvertibleParams {
549+
bytes16 id;
550+
bytes16 stakeholder_id;
551+
uint256 investment_amount;
552+
bytes16 security_id;
553+
string convertible_type;
554+
uint256 seniority;
555+
string custom_id;
556+
string security_law_exemptions_mapping;
557+
string conversion_triggers_mapping;
558+
}
559+
```
560+
561+
#### IssueEquityCompensationParams
562+
```solidity
563+
struct IssueEquityCompensationParams {
564+
bytes16 id;
565+
bytes16 stakeholder_id;
566+
bytes16 stock_class_id;
567+
bytes16 stock_plan_id;
568+
uint256 quantity;
569+
bytes16 security_id;
570+
string compensation_type;
571+
uint256 exercise_price;
572+
uint256 base_price;
573+
string expiration_date;
574+
string custom_id;
575+
string termination_exercise_windows_mapping;
576+
string security_law_exemptions_mapping;
577+
}
578+
```
579+
580+
#### IssueWarrantParams
581+
```solidity
582+
struct IssueWarrantParams {
583+
bytes16 id;
584+
bytes16 stakeholder_id;
585+
uint256 quantity;
586+
bytes16 security_id;
587+
uint256 purchase_price;
588+
string custom_id;
589+
string security_law_exemptions_mapping;
590+
string exercise_triggers_mapping;
591+
}
592+
```
593+
594+
#### StockConsolidationTx
595+
```solidity
596+
struct StockConsolidationTx {
597+
bytes16[] security_ids;
598+
bytes16 resulting_security_id;
599+
}
600+
```
601+
602+
#### StockTransferTx
603+
```solidity
604+
struct StockTransferTx {
605+
bytes16 consolidated_security_id;
606+
bytes16 transferee_security_id;
607+
bytes16 remainder_security_id;
608+
uint256 quantity;
609+
uint256 share_price;
610+
}
611+
```
612+
613+
#### StockCancellationTx
614+
```solidity
615+
struct StockCancellationTx {
616+
bytes16 id;
617+
bytes16 security_id;
618+
bytes16 balance_security_id;
619+
uint256 quantity;
620+
}
621+
```
317622

318623
### Diamond Pattern Implementation
319624

0 commit comments

Comments
 (0)