> For the complete documentation index, see [llms.txt](https://comboox.gitbook.io/whitepaper-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://comboox.gitbook.io/whitepaper-en/technical-brochure/behaviors-and-process/share-transaction.md).

# Share Transaction

The action flow by various stakeholders to promote share transactions through legal behaviors is shown in the table below:

<figure><img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FtFrpDR1IIFFG3nMGwhau%2F(En)EquityShareTransaction-General.jpg?alt=media&amp;token=f726d42c-43c3-49fa-9fc2-261e76c4dd14" alt=""><figcaption></figcaption></figure>

The detailed flow of algorithmic instruction interactions between system smart contracts at each step of the action is as follows:

<details>

<summary>(0) Query the caller's user number</summary>

* As the pre-defined process for identity verification, almost each **legal behavior** in the system starts with querying caller's user number.
* **Logical flow**: as follow.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FmoO176QFtBgRmaaoT1Fr%2F%EF%BC%88En%EF%BC%8900-msgSender().jpg?alt=media&amp;token=d0d0e67b-0817-43af-add4-69043d517358" alt="" data-size="original">

</details>

### A. Draft Investment Agreement

<details>

<summary>(1)  <strong>Create Investment Agreement</strong></summary>

* **Actor**: it is generally triggered by the share transferor (in share transaction) or the actual controller (in a capital increase transaction)
* **Calling API**: (to be added)
* **Action Consequences**:

1. Create and deploy a new clone contract based on the **investment agreement** contract template;
2. Initialize access control settings for the new **investment agreement** contract;
3. Registering the address of the new **investment agreement** contract in the **investment agreement** registry.

* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2F0c615HeKnT3zHH7Bkk6K%2F%EF%BC%88En%EF%BC%8901-createIA%20(1).jpg?alt=media&amp;token=0c2a13bb-cb23-41e5-a4f3-62d6f958e814" alt="" data-size="original">

</details>

<details>

<summary>(2) Appoint General Counsel</summary>

* **Actor**: the creator of **investment agreement**s
* **Calling API**: (to be added)
* **Action Consequences**: Set the **general counsel** role in **investment agreement** to a specific account address;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2F33wo9AkHkljyBi6RYhon%2F02-appointGC.jpg?alt=media&amp;token=04828c19-3a45-4edb-af8a-5abf4b709d37" alt="" data-size="original">

</details>

<details>

<summary>(3) Draft the Contract</summary>

* **Actor:** the **general counsel** of **investment agreement**s
* **Calling API:** (to be added)
* **Action Consequences:** Set the order objects in **investment agreement**;
* **Logical flow:** as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FkvLO6CnRgtCm5FyFWW6e%2F(En)03-addDeal.jpg?alt=media&amp;token=504812b7-ca9b-4d92-abaa-4d0e0e1c049b" alt="" data-size="original">

</details>

<details>

<summary>(4) Set the Signature and Closing Deadline</summary>

* **Actor**: the **general counsel** of **investment agreements**
* **Calling API**: (to be added)
* **Action Consequences**: Set the signature and delivery deadline in **investment agreement**;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FvZ92c5WS868VBzoLeCGw%2F(En)04-setTiming.jpg?alt=media&amp;token=1e1e9b46-2feb-4699-abbc-c6646459fbd0" alt="" data-size="original">

</details>

<details>

<summary>(5) Set the Parties</summary>

* **Actor:** the **general counsel** of **investment agreement**s
* **Calling API**: (to be added)
* **Action Consequences**: Add or delete a signature for the parties to the contract on the **SigPage** of the **investment agreement**;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FCXlBEOeNUqpqUjJSLUZG%2F(En)05-addBlank.jpg?alt=media&amp;token=e6eeef0e-0323-4307-9784-9d2062987fa3" alt="" data-size="original">

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2F5hgR4d1ubvGqFAtVnozC%2F(En)05-1-removeBlank.jpg?alt=media&amp;token=ec6ef470-0c6d-4d41-9c76-84e9ab36d210" alt="" data-size="original">

</details>

<details>

<summary>(6) Finalize the Contract</summary>

* **Actor:** need to be triggered by the shareholder who creates the contract after reviewing the content;
* **Calling API**: (to be added)
* **Action Consequences:** Revoke the "**Attorney**" in contracts and transfer of the "**Owner**" to a zero address, revoking the right to modify the contract;
* **Logical flow:** as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2Fr4bI5xMoSdy6eaWGtrHU%2F%EF%BC%88EN%EF%BC%8906-finalizeIA.jpg?alt=media&amp;token=882e2dbb-5b77-4624-b343-09bc68b89ef7" alt="" data-size="original">

</details>

### B. Sign Investment Agreement

<details>

<summary>(7) Circulate the Contract</summary>

* **Actor:** triggered by the **contractual parties**
* **Calling API**: (to be added)
* **Action Consequences:** Write the period of enforcement into the data objects of **investment agreement**s, in accordance with the voting rules in the **investment agreement**;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2F5Y78pC8v2ljKopEoVkkr%2F%EF%BC%88En%EF%BC%8907-circualteIA.jpg?alt=media&amp;token=361aaacb-6fa4-40ee-a033-4fa58b1c44c2" alt="" data-size="original">

</details>

<details>

<summary>(8) <strong>Sign the Investment Agreement</strong></summary>

* **Actor:** triggered by the **contractual parties**
* **Calling API**: (to be added)
* **Action Consequences:** Lock the transactions related to the **investment agreement** and record the caller's signature on the first signature page;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FLQm7twi5qr75pxyFfzxD%2F(En)08-signIA.jpg?alt=media&amp;token=a7b580bf-d483-41ff-af2b-fe8851c50b7f" alt="" data-size="original">

</details>

### C. **Review and Vote for Investment Agreement**

<details>

<summary>(9) Submit to General Meeting</summary>

* **Actor:** triggered by an account that process both **signature** and **shareholder** identity;
* **Calling API**: (to be added)
* **Action Consequences:** Lock the transactions related to the **investment agreement** and record the caller's signature on the first signature page;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FacrQ3bma0SLz46nYUEI7%2F(EN)09-proposeDocOfGM.jpg?alt=media&amp;token=8db8e3e1-9d51-4038-9595-0d918429125d" alt="" data-size="original">

</details>

<details>

<summary>(10) Delegate </summary>

* **Actor**: triggered by the **shareholders** who have never given delegate;
* **Input parameters:** motion number, the user number of the designated user;
* **Action Consequences**: Vest the number of shareholders giving delegate and the weight of their votes to the designated user;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FtZtpwqeYemZPTNHip440%2F%EF%BC%88EN%EF%BC%8910-entrustDelegateForGM.jpg?alt=media&amp;token=dbd764ea-0cc8-4c6e-99fd-7a755a7688ac" alt="" data-size="original">

</details>

<details>

<summary>(11) Vote</summary>

* **Actor**: triggered by the **shareholders** who have never voted or delegated to vote;
* **Input parameters**: motion number, voting attitude, Signature File Hash(selectable);
* **Action Consequences:** Add the votes to ballots case;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FtpeVNIk1nuZY4y9v0mm7%2F(En)11-castVoteInGM.jpg?alt=media&amp;token=0fbcfa28-7717-474b-9930-23398d33e681" alt="" data-size="original">

</details>

<details>

<summary>(12) Ballots</summary>

* **Actor**: triggered any accounts (to avoid the delayed voting calculation by the losing party);
* **Input parameters**: motion number;
* **Action Consequences:** Vest the number of shareholders giving delegate and the weight of their votes to the designated user;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FQQX9SOLn4u2gdV1yXJHZ%2F(En)12-voteCountingOfGM.jpg?alt=media&amp;token=ac75a9c8-f794-484e-b3fc-18361a7fac37" alt="" data-size="original">

</details>

### D. Execution of Investment Agreement

<details>

<summary>(13) Deliver the Shares directly</summary>

* **Actor**: The **seller** in the share transfer transaction;
* **Input parameters**: the contract address of **investment agreement** and the deal number;
* **Action Consequences:** **Cancel** the underlying shares of deals and issue new shares with the same class, amount and weight to the **buye**r;
* **Logical flow**: as follows.

<img src="https://64063186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiMYvBTHrhIGXLjYJyYBW%2Fuploads%2FqDLnIEZvxEJ99E5YdMcN%2F(En)13-transferTargetShare%20(1).jpg?alt=media&amp;token=336d8d08-278e-486d-a113-0c0e4d7053fd" alt="" data-size="original">

</details>
