# EDGAR Filing Document

**Accession Number:** 0002024815
**File Stem:** 0002024815-25-000008
**Filing Date:** 2025-10
**Character Count:** 1541055
**Document Hash:** 859d5e77f1db88152a57038531a9ac32
**Contains OCR:** False
**Source Format:** 

## Filing Content

## Filing Summary
**0002024815-25-000008.hdr.sgml**: 20251007

**ACCESSION NUMBER**: 0002024815-25-000008

**CONFORMED SUBMISSION TYPE**: DRS/A

**PUBLIC DOCUMENT COUNT**: 125

**FILED AS OF DATE**: 20251007

**DATE AS OF CHANGE**: 20251007

**FILER**: 

**COMPANY DATA:**
- **COMPANY CONFORMED NAME:** Comboox DAO LLC
- **CENTRAL INDEX KEY:** 0002024815
- **STANDARD INDUSTRIAL CLASSIFICATION:** FINANCE SERVICES [6199]
- **ORGANIZATION NAME:** 09 Crypto Assets
- **EIN:** 000000000
- **STATE OF INCORPORATION:** WY
- **FISCAL YEAR END:** 1231

**FILING VALUES:**
- **FORM TYPE:** DRS/A
- **SEC ACT:** 1933 Act
- **SEC FILE NUMBER:** 377-07391
- **FILM NUMBER:** 251378239

**BUSINESS ADDRESS:**
- **STREET 1:** 30 N GOULD ST STE R
- **CITY:** SHERIDAN
- **STATE:** WY
- **ZIP:** 82801
- **BUSINESS PHONE:** 307-200-2803

**MAIL ADDRESS:**
- **STREET 1:** 30 N GOULD ST STE R
- **CITY:** SHERIDAN
- **STATE:** WY
- **ZIP:** 82801

&nbsp;&nbsp;&nbsp;&nbsp; **As filed with the U.S. Securities and Exchange Commission on October ______, 2025.** 

&nbsp;&nbsp;&nbsp;&nbsp; **Registration No. ______________** 

UNITED STATES <br> SECURITIES AND EXCHANGE COMMISSION <br> Washington, D.C. 20549

## FORM S-1
REGISTRATION STATEMENT<br> UNDER THE SECURITIES ACT OF 1933

# COMBOOX DAO LLC
&nbsp;&nbsp;&nbsp;&nbsp; (Name of small business issuer in its charter)

---

| | | |
|:---|:---|:---|
| **Wyoming** | **6794** | **38-432-2575** |
| (State or other jurisdiction of incorporation or organization) | (Primary Standard Industrial Classification Code Number) | (I.R.S. Employer Identification Number) |
|  | <br> **30 N Gold St Ste R** <br> **Sheridan, Wyoming 82801** <br> **(307) 200-2803** <br>(Address, including zip code, and telephone number, including area code, of registrant's principal executive offices) <br>**Registered Agents Inc** <br> **30 N Gold St Ste R** <br> **Sheridan, Wyoming 82801** <br> **(307) 200-2803** <br>(Name, address, including zip code, and telephone number, including area code, of agent for service)  |  |

---

&nbsp;&nbsp;&nbsp;&nbsp; Approximate date of commencement of proposed sale to the public: **As soon as practicable after this Registration Statement is declared effective**.

&nbsp;&nbsp;&nbsp;&nbsp; If any of the securities being registered on this Form are to be offered on a delayed or continuous basis pursuant to Rule 415 under the Securities Act of 1933 check the following box: □

&nbsp;&nbsp;&nbsp;&nbsp; If this Form is filed to register additional securities for an offering pursuant to Rule 462(b) under the Securities Act, please check the following box and list the Securities Act registration statement number of the earlier effective registration statement for the same offering. □

&nbsp;&nbsp;&nbsp;&nbsp; If this Form is a post-effective amendment filed pursuant to Rule 462(c) under the Securities Act, check the following box and list the Securities Act registration statement number of the earlier effective registration statement for the same offering. □

&nbsp;&nbsp;&nbsp;&nbsp; If this Form is a post-effective amendment filed pursuant to Rule 462(d) under the Securities Act, check the following box and list the Securities Act registration statement number of the earlier effective registration statement for the same offering. □

&nbsp;&nbsp;&nbsp;&nbsp; Indicate by check mark whether the registrant is a large accelerated filer, an accelerated filer, a non-accelerated filer, smaller reporting company, or an emerging growth company. See the definitions of "large accelerated filer," "accelerated filer," "smaller reporting company," and "emerging growth company" in Rule 12b-2 of the Exchange Act.

Large accelerated filer □ <br> Non-accelerated filer 🗹 <br> Accelerated filer □ <br> Smaller reporting company 🗹 <br> Emerging growth company 🗹 <br>

&nbsp;&nbsp;&nbsp;&nbsp; If an emerging growth company, indicate by check mark if the registrant has elected not to use the extended transition period for complying with any new or revised financial accounting standards provided pursuant to Section 7(a)(2)(B) of the Securities Act. □

**&nbsp;&nbsp;&nbsp;&nbsp; The registrant hereby amends this registration statement on such date or dates as may be necessary to delay its effective date until the registrant shall file a further amendment which specifically states that this registration statement shall thereafter become effective in accordance with Section 8(a) of the Securities Act of 1933 or until the registration statement shall become effective on such date as the Securities and Exchange Commission, acting pursuant to said Section 8(a), may determine.** 

i

**&nbsp;&nbsp;&nbsp;&nbsp; THE INFORMATION IN THIS PROSPECTUS IS NOT COMPLETE AND MAY BE CHANGED. WE MAY NOT SELL THESE SECURITIES UNTIL THE REGISTRATION STATEMENT FILED WITH THE SECURITIES AND EXCHANGE COMMISSION IS EFFECTIVE. THIS PROSPECTUS IS NOT AN OFFER TO SELL THESE SECURITIES AND IT IS NOT SOLICITING AN OFFER TO BUY THESE SECURITIES IN ANY STATE WHERE THE OFFER OR SALE IS NOT PERMITTED.**![](comboox_s1img1.jpg)

## PRELIMINARY PROSPECTUS
&nbsp;&nbsp;&nbsp;&nbsp; Subject to Completion

&nbsp;&nbsp;&nbsp;&nbsp; October _________, 2025

## COMBOOX DAO LLC
(A Wyoming Limited Liability Company)

#### Offering $3,760,000 Class B Shares
ComBoox DAO LLC ("**we**","**our**" or the "**Company**") is a Wyoming limited liability company electing to be a decentralized autonomous organization ("**DAO**") pursuant to the Wyoming Limited Liability Company Act (the "**Act**") and the Wyoming Decentralized Autonomous Organization Supplement (the "**Supplement**"), formed on November 8, 2023.

&nbsp;&nbsp;&nbsp;&nbsp; This prospectus relates to the offer and sale of our Class B members' ownership interests and rights ("**Class B Shares**") of the Company. We are offering for sale 37,600,000,000 Class B Shares (the "**Offered Shares**") at an offering price of $0.0001 per share.

&nbsp;&nbsp;&nbsp;&nbsp; We have already offered and sold 2,500,000,000 Class A Shares and 500,000,000 Class B Shares, with par value of each Share as 0.0001 USD. Each Class A Share entitles the holder to forty votes per share, while each Class B Share entitles the holder to one vote per share. However, both Class A and Class B Shares carry equal economic rights, including the same per-share entitlement to profit distributions and liquidation proceeds. See "Dilution" for additional information regarding the Class A Shares.

As of the date of this Registration Statement, the Founding Member, Mr. Li Li, owns and holds 100% of the Company's issued Class A Shares and 100% of the Company's issued Class B Shares. Following the offering, assuming full subscription of the Class B Shares as planned, the Founding Member's ownership will be as follows: 100% of Class A Shares, 1.31% of Class B Shares, representing in total approximately 72.77% of the Company's voting power.

Pursuant to the currently effective Operating Agreement, the approval of an Ordinary Resolution requires at least 75% of the voting power, and the approval of a Special Resolution requires at least 80% of the voting power. Accordingly, without the support of the Founding Member, no Ordinary Resolution or Special Resolution can be passed.

ii

The Company will be arranged, as much as possible, as a passive income entity and an on-chain DAO. It will hold the intellectual property right ("**IPR**") of smart contracts, and will automatically collect royalties incurred thereof as its revenue. All assets of the Company will be held or materially controlled by smart contracts on the public block chain. All payments and legal acts of the Company can only be conducted upon prior approvals of members by public voting. No employees will be hired, and no managers or members will be paid for remuneration either. All the legal acts of members and the Company will be automatically recorded and processed by predefined smart contracts, and can only be triggered by the specific right-holders directly with no intermediaries or agents involved.

Prior to this offering, there has been no public market for our shares, and, probably there will be no such legal markets within a predictable future either. Subject to the satisfaction of certain contingent conditions: (1) the registration statement, of which this prospectus forms a part, is qualified by the United States Securities and Exchange Commission (the "**SEC**"); (2) the Company is either registered with the SEC as a transfer agent for its own shares or has entered into a collaboration with a registered transfer agent; and (3) the Company's smart contracts for share trading by listing are integrated with a registered Alternative Trading System ("**ATS**"), an initial public offering ("**IPO**") will be conducted.

Investors may use USDC to directly acquire Offered Shares at the offering price under the automatically control and execution of our smart contracts. Upon closing, new shares will be automatically issued to investors and the consideration paid in USDC will be received and held by the Company directly. During the entire process of the IPO, no underwriters, brokers, dealers or other intermediaries will be involved.

We are offering our Class B Shares on a best efforts basis directly to the public without the involvement of underwriters, placement agents, or broker-dealers. No party has committed to purchase or sell any quantity of securities, and there can be no assurance that all or any portion of the offered securities will be sold. This offering will terminate on the earlier of (i) the date on which the maximum offering amount is sold or (ii) the date that is 360 days following the commencement of this offering, unless earlier terminated by us in our sole discretion. There is no minimum aggregate offering amount and no minimum purchase requirement applicable to investors. Subscriptions will be accepted on a rolling basis, and subscribed funds will be delivered directly to us upon acceptance.

We have not established an escrow, trust, or similar account for investor funds. Accordingly, investors will not have the protection of a contingency or escrow arrangement, and subscribed funds will be immediately available for our use regardless of the amount raised. As a result, investors bear the risk that we may raise only limited proceeds and may be unable to execute our broader business development plans.

**&nbsp;&nbsp;&nbsp;&nbsp; We are an "emerging growth company", as that term is used in the Jumpstart Our Business Startups Act of 2012, and, as such, we are subject to reduced public company reporting requirements. We have not generated any incomes or profits.** 

**&nbsp;&nbsp;&nbsp;&nbsp; These securities are highly speculative and involve a high degree of risk. You should purchase these securities only if you can afford a complete loss of your investment. See "Risk Factors" beginning on page 6 to read about factors you should consider before buying our Shares.** 

iii

---

| | | |
|:---|:---|:---|
|  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Per Share**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Value**  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Initial Public Offering Price  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $3760000.00  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Underwriting Discounts and Commissions:  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.00  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Proceeds to the Company, before expenses:  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $3760000.00  |

---

***&nbsp;&nbsp;&nbsp;&nbsp; NEITHER THE SECURITIES AND EXCHANGE COMMISSION NOR ANY STATE SECURITIES COMMISSION HAS APPROVED OR DISAPPROVED OF THESE SECURITIES OR PASSED UPON THE ADEQUACY OR ACCURACY OF THIS PROSPECTUS. ANY REPRESENTATION TO THE CONTRARY IS A CRIMINAL OFFENSE.***

&nbsp;&nbsp;&nbsp;&nbsp; The date of this Prospectus is October ____, 2025.

iv

 **TABLE OF CONTENTS**

---

| | |
|:---|:---|
|  | **Page** |
| [1 GLOSSARY OF TERMS](#GLOSSARY OF TERMS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2  |
| [2 TRADEMARKS AND COPYRIGHTS](#TRADEMARKS AND COPYRIGHTS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8  |
| [3 CAUTIONARY STATEMENT REGARDING FORWARD-LOOKING STATEMENTS](#CAUTIONARY STATEMENT)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8  |
| [4 PROSPECTUS SUMMARY](#PROSPECTUS SUMMARY)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10  |
| [5 RISK FACTORS](#RISK FACTORS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21  |
| [6 USE OF PROCEEDS](#USE OF PROCEEDS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 29  |
| [7 DETERMINATION OF OFFERING PRICE](#DETERMINATION OF OFFERING PRICE)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 31  |
| [8 PLAN OF DISTRIBUTION AND TERMS OF THE OFFERING](#PLAN OF DISTRIBUTION AND TERMS OF THE OFFERING)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 31  |
| [9 DILUTION](#DILUTION)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 38  |
| [10 THE COMPANY'S BUSINESS](#THE COMPANY'S BUSINESS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 41  |
| [11 PLAN OF DISTRIBUTION AND SELLING SECURITYHOLDERS](#PLAN OF DISTRIBUTION AND SELLING SECURITYHOLDERS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 58  |
| [12 MANAGEMENT'S DISCUSSION AND ANALYSIS OF FINANCIAL CONDITION AND RESULTS OF OPERATIONS](#MANAGEMENT'S DISCUSSION AND ANALYSIS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 58  |
| [13 DIRECTORS, EXECUTIVE OFFICERS AND SIGNIFICANT EMPLOYEES](#DIRECTORS, EXECUTIVE OFFICERS AND SIGNIFICANT EMPLOYEES)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 61  |
| [14 COMPENSATION OF MANAGERS](#COMPENSATION OF MANAGERS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 62  |
| [15 CERTAIN RELATIONSHIPS AND RELATED TRANSACTIONS](#CERTAIN RELATIONSHIPS AND RELATED TRANSACTIONS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 62  |
| [16 SECURITY OWNERSHIP OF CERTAIN BENEFICIAL OWNERS AND MANAGEMENT](#SECURITY OWNERSHIP OF CERTAIN BENEFICIAL OWNERS AND MANAGEMENT)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 63  |
| [17 DESCRIPTION OF SECURITIES](#DESCRIPTION OF SECURITIES)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64  |
| [18 SHARES ELIGIBLE FOR FUTURE SALE](#SHARES ELIGIBLE FOR FUTURE SALE)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 67  |
| [19 WHERE YOU CAN FIND MORE INFORMATION](#WHERE YOU CAN FIND MORE INFORMATION)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 68  |
| [INDEX TO FINANCIAL STATEMENTS](#INDEX TO FINANCIAL STATEMENTS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-1  |
| [PART II - INFORMATION NOT REQUIRED IN PROSPECTUS](#INFORMATION NOT REQUIRED IN PROSPECTUS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; II-1  |

---

v

**Please read this prospectus carefully. It describes our business, our financial condition and our results of operations. We have prepared this prospectus so that you will have the information necessary to make an informed investment decision.** 

 **We have not authorized anyone to provide you with any information other than that contained in this prospectus. We do not take responsibility for, and can provide no assurance as to the reliability of, any other information that others may give you. We are offering to sell, and seeking offers to buy, Offered Shares only in jurisdictions where offers and sales are permitted. The information in this prospectus is complete and accurate only as of date on the cover hereof regardless of the time of delivery of this prospectus or any sale of Offered Shares. Our business, financial condition, results of operations and prospects may have changed since that date. We are not making an offer of these securities in any jurisdiction where the offer thereof is not permitted.** 

 **For investors outside the United States: We have not taken any action that would permit this Offering or possession or distribution of this prospectus in any jurisdiction where action for that purpose is required, other than the United States. You are required to inform yourselves about and to observe any restrictions relating to the Offering and the distribution of this prospectus.** 

---

| |
|:---|
| 1 |
| *[**Table of Contents**](#Toc)* |

---

#### 1 GLOSSARY OF TERMS
We provide this glossary to help those reading this prospectus understand the industry and other technical terms that are used in this prospectus. For many of these terms, there is no generally accepted definition. In this glossary, we present our definition of such terms as used in this prospectus.

(1) "**Act**" means The Wyoming Limited Liability Company Act, as amended from time to time.

(2) "**Arbitrum One**" means the Ethereum layer-2 public blockchain network operating under the name "Arbitrum One", which is connected to the main net of Ethereum and uses a technology called "Optimistic Rollups" to improve the scalability and efficiency of Ethereum.

(3) "**AML**" means Anti-Money Laundering.

(4) "**ATS**" means Alternative Trading System.

(5) "**Backup Key**" means the other account address added by a user into its ComBoox user account, which may also be recognized by Registration Center to retrieve the User Number for identification purpose.

(6) "**Buy Orders**" means the limit buy orders and market buy orders created and placed on the List of Orders by the Verified Investors, together with sufficient ETH or USDC paid as consideration or margin, to purchase the offered Shares in Initial Offers or Sell Orders at a specific bid price or market price (Price of Paid) with a specific amount (Paid Value), in accordance with the relevant Listing Rule.

(7) "**Cashier**" means the Smart Contract adopted by the Company to hold USDC on its behalf and to automatically record, maintain and publicly document payment and receipt transactions in USDC.

(8) "**CBP**" or "**ComBoox Points**" means the ERC-20 token booked in Registration Center, the primary function of which is to act as the ComBoox Community's utility token to automatically calculate, collect and transfer royalties from user of Templates to the relevant intellectual properties' holder.

(9) "**Closed Deals**" means the deals established and settled automatically via List of Orders upon placement of a Buy Order by matching and closing the Buy Order with the available Initial Offers and Sell Orders with equal or lower offer price. They will be automatically recorded as events in List of Orders.

(10) "**ComBoox**" or "**ComBoox Platform**" means the company book-entry platform consisting of a core smart contract called "Registration Center" and a set of Template Contracts deployed on Arbitrum One, which is designed for share registration and corporate statutory books-keeping, and aims to assist users to quickly establish a legal, secure, transparent and reliable smart contract system to enable the company's stakeholders to perform legal acts related to share transactions or corporate governance in a self-service mode.

---

| |
|:---|
| 2 |
| *[**Table of Contents**](#Toc)* |

---

(11) "**ComBoox Community**" means the open, unincorporated, loose organization of CBP holders, whose primary function is to decide, through discussion forums and public voting, which new template smart contracts is suitable to be included into the ComBoox Platform, so as to improve or expand the functionality thereof.

(12) "**Company**" means ComBoox DAO LLC.

(13) "**Contractual Transfer**" means the transfer mode of Shares which shall be carried out in accordance with an Investment Agreement that the seller and the buyer entered into previously, in which the basic transaction elements shall be set out clearly such as Paid Price, Paid Value, Class of Share, payment method, and closing deadline etc.

(14) "**CTF**" means Counter-Terrorist Financing.

(15) "**DAO**" means on-chain decentralized autonomous organization.

(16) "**Days**" means natural days, each consisting of 24 hours.

(17) "**Dollar**", "**USD**" or "**$**" means the legal currency of the United States.

(18) "**DVP**" means Delivery-versus payment.

(19) "**ETH**" means the native utility token of the Arbitrum One network, issued 1:1 against Ether locked on the Ethereum mainnet bridge, used for paying transaction fees and transferable among accounts on Arbitrum One.

(20) "**ExRate**"means the fixed exchange rate, predefined and adjusted by the Company.

(21) "**Founding Member**" means the member who set up the Company and invested Royalty Interests as his initial capital contribution in exchange for his Shares.

(22) "**Fuel Tank**" means a smart contract deployed on Arbitrum One that serves as an exchange pool, enabling users to buy CBP at a fixed rate set by the company, while also allowing the company to manage supply and collect revenue in ETH.

(23) "**General Meeting**" means the ONLY decision -making authority of the Company which consists of all member. All legal acts conducted on behalf of the Company shall be subject to a prior approval by the General Meeting, either through an Ordinary Resolution or a Special Resolution, and any off-chain legal documents shall only become legally effective and binding on the Company upon such approval.

(24) "**General Meeting Minutes**" means the Smart Contract adopted by the Company to automatically book and maintain the public record of the proposals and voting results at General Meetings. Each proposal, proxy, vote and resolution shall only be effective and legally binding on the Company and the member upon its registration in General Meeting Minutes.

---

| |
|:---|
| 3 |
| *[**Table of Contents**](#Toc)* |

---

(25)"**General Keeper**" means the core Smart Contract that represents the legal entity of the Company to hold crypto assets, to receive revenue incurred from Royalty Interests, to elect or impeach any managers, to make payments, and to conduct any legal acts on behalf of the Company on Arbitrum One. Therefore, contract address of General Keeper shall be specified as and can be retrieved from, directly or indirectly, the "public available identifier" in the Articles in accordance with Section 17-31-106(b) of the Supplement.

(26) "**Initial Offers**" means the limit sell orders created and placed on the List of Orders by the authorized issuer on behalf of the Company to issue new Shares of the relevant Class at a specific offer price (Price of Paid) with a specific amount (Par Value and Paid Value) and the available hours thereof, in accordance with the relevant Listing Rule, which shall also set forth other necessary elements of a capital increase deal, such as Voting Weight and Distribution Weight.

(27) "**Initial Public Offering**" or "**IPO**" refers to a company's first public sale of equity securities on a registered stock exchange.

(28) "**IPR**" means intellectual property rights.

(29) "**Hague Service Convention**" means the Convention on the Service Abroad of Judicial and Extrajudicial Documents in Civil or Commercial Matters, concluded at The Hague on 15 November 1965.

(30) "**KYC**" means Know Your Customer.

(31) "**List of ETH Orders**" means the Smart Contract adopted by the Company to book and maintain the public records of Listing Trade in ETH, which will automatically record the Initial Offers, Sell Orders, Buy Orders, as well as the Closed Deals concerned.

(32) "**List of USD Orders**" means the Smart Contract adopted by the Company to book and maintain the public records of Listing Trade in USDC, which will automatically record the Initial Offers, Sell Orders, Buy Orders, as well as the Closed Deals concerned.

(33) "**List of Orders**" is the collective term for the List of ETH Orders and the List of USD Orders.

(34) "**Listing Rule**" means the rule governing the Listing Transfer of specific Class of Shares with respect to the title of issuer, Class of Shares, maximum Par Value, title of verifier, maximum quantity of Investors, ceiling price, floor price, lockup days, off listing price, Voting Weight, Distribution Weight and other attributes concerned, which shall be incorporated by a Shareholders Agreement and approved by Special Resolution.

---

| |
|:---|
| 4 |
| *[**Table of Contents**](#Toc)* |

---

(35) "**Listing Transfer**" means that the transfer of Shares that is arranged by listing, i.e. the seller may place Sell Orders on the List of Orders with its acceptable offer price and sell amount, thereafter, the buyer may accordingly place Buy Orders on the List of Orders with its acceptable bid price and buy amount, and the system will automatically match and settle the Sell Orders against each Buy Order on the basis of their price and amount.

(36) "**Managers**" means the administrative officer elected by Ordinary Resolution, who have NO decision-making powers but may execute any administrative, commercial or technical matters authorized by this Agreement or approved by Ordinary Resolution.

(37) "**Members**" means the equity owners of the Company, who may enjoy and exercise the distribution rights to the profits and residual assets in proportion to the aggregate Distribution Points of each member and may enjoy and exercise the voting rights in proportion to the aggregate Voting Points of each member. For the purposes of the Operating Agreement and in most contexts relating to the Company, the term "member" may usually be used interchangeably with the term "shareholder".

(38) "**Offered Shares**" means the 37,600,000,000 Class B shares being offered by the company at an offering price of $0.0001 per share, representing the specific class of securities available for subscription by investors in this issuance.

(39) "**Operating Agreement**" means the decentralized autonomous organization operating agreement of the Company, which may be approved, adopted, and/or amended pursuant to the Agreement, as well as the Company's Articles of Organization.

(40) "**Ordinary Resolution**" means a resolution passed at a General Meeting by a special majority of the members voting in person or by proxy on the relevant motion, where the total number of Voting Points represented by the votes in favor of the motion exceeds three times the number of votes cast against it.

(41) "**OTC**" means Over-the-Counter.

(42) "**Prime Key**" means the external account address or smart contract address used to register a user's account with ComBoox that can be recognised by Registration Center to retrieve the relevant User Number for identity verification purposes.

(43) "**Registration Center**" means the core smart contract of ComBoox deployed on Arbitrum One at the address as publicly disclosed on ComBoox's website and its white paper, which has the following primary functions:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a) User Registration: to register users of ComBoox against their Prime Key;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b) CBP book keeping: to record balance amount of CBP for each account holder;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c) Document Registration: to register Template Contracts and their clone copies according to the contract address; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d) Royalty Collecting: to automatically transfer certain amount of CBP from the user to the author as royalty when the user calls certain write function of the smart contract created based on the specific Template Contract developed by the author.

---

| |
|:---|
| 5 |
| *[**Table of Contents**](#Toc)* |

---

(44) "**Register of Investors**" means the Smart Contract adopted by the Company to book and maintain the public records of Verified Investors. Any application, approval, or revocation of any Verified Investors shall only be effective and legally binding on the Company and members upon its entry into Register of Investors.

(45) "**Register of Members**" means the Smart Contract adopted by the Company to book and maintain the public records of members and their shareholding situation. Any admission, alteration or revocation of any member can only be effective and legally binding to the Company and members upon its book-entry on Register of Members.

(46) "**Register of Shares**" means the Smart Contract adopted by the Company to book and maintain the public record of Shares, i.e. the Certificate of Contribution concerned. Any creation, alteration or revocation of any Share can only be effective and legally binding to the Company and members upon its book-entry on Register of Shares.

(47) "**Royalty Interests**" means a type of passive (non-operational) interest contributed by the Founding Member that provides the right to revenues generated from the use of ComBoox's Templates, consisting of: (1) royalties collected automatically, as the intellectual property right holder, from the user who invokes the corresponding write function of the smart contracts cloned based on the Templates; and (2) commissions collected automatically, as the owner of ComBoox Platform, by splitting the fore mentioned royalty revenues.

(48) "**SEC**" means the United States Securities and Exchange Commission.

(49) "**Sell Orders**" means the limit sell orders and market sell orders created and placed on the List of Orders by the shareholders to transfer their Shares at a specific offer price or market price (Price of Paid) with a specific amount (Par Value and Paid Value) and available hours thereof, in accordance with the relevant Listing Rule.

(50) "**Shares**" means a member's ownership interests and rights in the Company, which will be booked automatically on Register of Shares in form of a digital object named "Certificate of Contribution".

(51) "**Shareholder**" has the same meaning with "member", which means the equity owners of the Company, who may enjoy and exercise the distribution rights to the profits and residual assets in proportion to the aggregate Distribution Points of each member and may enjoy and exercise the voting rights in proportion to the aggregate Voting Points of each member.

(52) "**Shareholders Agreement**" means the Smart Contract adopted by the Company to record and maintain the public records of the Operating Agreement, its amendments and any restated new edition thereof. In case there is any discrepancies between the Operating Agreement and the effective Shareholders Agreement, the Shareholders Agreement shall prevail.

---

| |
|:---|
| 6 |
| *[**Table of Contents**](#Toc)* |

---

(53) "**Smart Contracts**" means the smart contracts adopted by the Company, pursuant to Section 17-31-106 of the Supplement, to govern the operations of the Company which shall be the fundamental basis for verifying the legal documents of the Company. In the event of any conflict between the Articles and the Smart Contracts, the Smart Contracts shall prevail. In the event of any conflict between the Articles and the Operating Agreement, the Articles shall prevail. In the event of any conflict between the Operating Agreement and the Smart Contracts, the Smart Contracts shall prevail. Any time the Smart Contracts are changed, the members shall cause the Articles and the Operating Agreement to be amended accordingly. The information of Smart Contracts can be queried through the specific Smart Contract representing the legal entity of the Company named "General Keeper".

(54) "**Special Resolution**" means a resolution passed at a General Meeting by a special majority of the members voting in person or by proxy on the relevant motion, where the total number of Voting Points represented by the votes in favor of the motion exceeds four times the number of votes cast against it.

(55) "**Supplement**" means The Wyoming Decentralized Autonomous Organization Supplement, as amended and in effect from time to time.

(56) "**Template Smart Contracts**" or "**Templates**" means the smart contracts adopted by the ComBoox Community and registered in Registration Center as templates to create clone copies for its users to deploy and use on ComBoox.

(57) "**Transfer Agent**" or "**TA**" means the service provider responsible for managing and maintaining records of securities ownership on behalf of a company.

(58) "**USDC**" or "**USD Coin**" means a United States dollar-pegged stable coin issued and managed by Circle Internet Financial, LLC, recorded on Arbitrum One at the address "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", and designed to maintain a stable value of $1.00 per USDC.

(59) "**Users**" means the external account holder or the smart contract that has registered as a user with ComBoox by calling the specific function of Registration Center, each of whom is assigned a User Number that represents their unique identity against their Prime Key or Backup Key.

(60) "**User Number**" means a user's identity number in ComBoox, which is automatically assigned by Registration Center during the registration process. Both the Prime Key and the Backup Key can be recognized by Registration Center to automatically return the corresponding User Number, which can be further used for identity verification, access control or confirmation of legal rights.

---

| |
|:---|
| 7 |
| *[**Table of Contents**](#Toc)* |

---

(61) "**Verified Investor**" means the user that already has his or her identity and other relevant materials verified: (1) by the relevant service provider engaged by the Company; or (2) by the manager in person. Only Verified Investor can participate in Listing Transfer, or acquire Shares of the Company to become a member, and the manager may revoke the qualification of Verified Investor, according to the suggestion of the relevant service provider, or pursuant to any applicable laws or regulations.

#### &nbsp;&nbsp;&nbsp;&nbsp; 2 TRADEMARKS AND COPYRIGHTS
Founding Member owns or plans to apply for rights to trademarks or trade names that we use or intend to use in connection with the operation of our business, including our names, logos and website names. In addition, Founding Member owns or has the rights to patent applications, copyrights, trade secrets and other proprietary rights that protect the intellectual property used in our business, including the ComBoox Platform. In addition to the exclusive intellectual properties of ComBoox invested by Founding Member as his initial capital contribution, we also have the rights to use trademarks and trade names under royalty free, non-exclusive licenses granted by Founding Member. Our use or display of such trademarks, service marks, trade names or products in this prospectus is not intended to, and should not be read to, imply a relationship with or endorsement or sponsorship of us. Solely for convenience, some of the copyrights, trade names and trademarks referred to in this prospectus are listed without their copyright and trade mark symbols, but we will assert, to the fullest extent under applicable law, our rights to our copyrights, trade names and trademarks. All other trademarks are the property of their respective owners.

#### 3 CAUTIONARY STATEMENT REGARDING FORWARD-LOOKING STATEMENTS
This prospectus contains certain forward-looking statements that are subject to various risks and uncertainties. Forward-looking statements convey our current expectations or forecasts of future events and are not guarantees of future performance. They are based on numerous assumptions that we believe are reasonable, but they are open to a wide range of uncertainties and business risks. Our ability to predict results or the actual effect of future plans or strategies is inherently uncertain.

Any statements contained in the prospectus that are not statements of historical fact may be forward-looking statements, which are generally identifiable by use of terminology such as "may," "will," "should," "potential," "plan," "intend," "expect," "outlook," "seek," "anticipate," "estimate," "approximately," "believe," "could," "project," "predict," or other similar words or expressions.

Although we believe that the expectations reflected in our forward-looking statements are based on reasonable assumptions, actual outcomes could differ materially from those set forth or anticipated in our forward-looking statements. Factors that could cause our forward-looking statements to differ from actual outcomes include, but are not limited to, those described under the heading "Risk Factors". Readers are cautioned not to place undue reliance on any of these forward-looking statements, which reflect our views as of the date of this prospectus.

---

| |
|:---|
| 8 |
| *[**Table of Contents**](#Toc)* |

---

Furthermore, except as required by law, we are under no duty to, and do not intend to, update any of our forward-looking statements after the date of this prospectus, whether as a result of new information, future events or otherwise.

---

| |
|:---|
| 9 |
| *[**Table of Contents**](#Toc)* |

---

#### 4 PROSPECTUS SUMMARY
*This summary highlights certain information appearing elsewhere in this prospectus. Because this is only a summary, it does not contain all of the information you should consider before investing in our securities and it is qualified in its entirety by, and should be read in conjunction with, the more detailed information included elsewhere in this prospectus. Before you make an investment decision, you should read this entire prospectus carefully, including the risks of investing in our securities discussed under the section of this prospectus entitled "**Risk Factors**" and similar headings. You should also carefully read our financial statements, and the exhibits to the registration statement of which this prospectus is a part.*

**The Company's Business**

The Company is a Wyoming limited liability company electing to be a DAO pursuant to the Act and the Supplement, formed on November 8, 2023. We are engaged in the business of acquiring, holding, and commercializing the IPR related to the ComBoox Platform-a block chain-based infrastructure for automating corporate record keeping and governance through smart contracts.

**ComBoox Platform**

Human civilization has entered the 21st century. Most wealth exists in the form of book-entry interests. To regulate these wealth and their trading activities, various laws, charters and contracts are established, and different centralized intermediaries are involved. However, in case these laws, charters or contracts are violated, people can only rely on judicial remedies, which are proven to be costly and time-consuming.

The emergence of block chain technology offers a new solution. That is, to define the rules and terms in smart contracts, and use the distributed systems to automatically keep the book-entry records. By implementing the basic concepts of "Code Is Law" and "Decentralization", the terms and conditions defined by legal documents can be implemented by rigid code, and the human management of centralized intermediaries can be replaced by consensus protocols and smart contracts with automated operation.

This establishes an automated mode of asset bookkeeping and transaction management in which owners can directly manage and dispose their assets without relying on any intermediaries or counter parties.

Among the book-entry interests, except for deposit currency, company equity is probably the most important and critical category. The company is the carrier of various assets and also the investment target of capital. Its external legal acts are the main components of modern commercial activities, while its internal governance involves the rights and interests of many investors. Therefore, company equity is the critical joint linking the capital and assets, commercial activities and corporate governance.

---

| |
|:---|
| 10 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) right holders may directly exercise their rights;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) obligors have no chance to default or violate; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) real time full disclosure of each legal acts.

**CBP and its Function**

ComBoox Points (the "**CBP**") is an ERC-20 non-redeemable token registered in Registration Center, which is used as a utility token of ComBoox to measure and collect royalties for using the Templates. Each time when a user calls specific function of the clone copies of Templates, an amount of CBP will be automatically transferred from the user to the account of the Template owner. The royalty rate is predefined by the original author in the respective Template, and the beneficiary rights can be transferred on-chain to any other party.

ComBoox is an open platform. Any developer may deploy smart contracts and apply to incorporate them by the platform. As long as the application is approved by the General Meeting, the relevant smart contracts may be adopted by ComBoox as a Template. The developer can then collect royalties in CBP.

Users may acquire CBP through the following methods: (1) automatic rewards granted upon registration on ComBoox; (2) purchase using USDC from a smart contract named Fuel Tank; or (3) receipt from third parties via ERC-20 token transfers.

CBP is minted by the Company through the Registration Center and deposited into the Fuel Tank smart contract for user acquisition. The Company can decide the total supply of CBP and can throw significant influence on the market price thereof.

CBP is freely transferable between wallets and is not subject to any contractual or technical transfer restrictions. Users may sell, gift, or burn CBP at their discretion. CBP is divisible to 18 decimal places (i.e., the smallest unit is 10<sup>-18</sup> CBP), consistent with the ERC-20 standard, allowing for fractional use.

CBP confers no voting rights, ownership interest, equity participation, or residual claims against the Company. Holders are not entitled to any proceeds in the event of liquidation, merger, or sale of the Company. Because the operation and royalty rates of each Template are permanently encoded upon deployment to the blockchain, and remain functional in a decentralized and immutable manner, the rights of CBP holders are unaffected by changes in Company control or corporate structure.

---

| |
|:---|
| 11 |
| *[**Table of Contents**](#Toc)* |

---

The Company, as the owner of the Registration Center, holds the exclusive right to mint CBP and is entitled to receive a share of commission income derived from third-party royalty payments. While, the Company does not commit to redeem CBP for fiat currency, digital assets, or services. All Templates are provided on an "As Is" basis and do not include any commitment by the Company for upgrades, maintenance, or support.

**Principal Products and Services**

The Company is a Wyoming limited liability company electing to be a DAO. It engaged in the business of acquiring, holding and commercializing the IPR to collect royalties of Templates and commission of ComBoox Platform within the territory of Arbitrum One.

The Founding Member, currently as the sole developer of ComBoox, has invested the following rights and interests into the Company as capital contribution:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the beneficiary right to collect royalties of the Templates within the territory of Arbitrum One;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the beneficial right to collect up to 20% commission from royalties paid to third-party developers whose Templates are adopted by the ComBoox Platform; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) the exclusive right to mint CBP.

Therefore, the Company has the right to collect the following passive income in CBP as revenue: (1) royalties for the use of Templates; and (2) commission splitting from the payment of royalties.

The Company's business model is designed to generate passive, on-chain income through rights associated with the ComBoox Platform. The Company has no employees, does not actively provide operational services; rather, it passively earns income through smart contract-defined mechanisms embedded in the platform, and will use its best efforts to avoid incurring any liabilities.

**No Bank Accounts and Payment Mechanism**

To mitigate the risk of insider misuse of the Company's assets and ensure transparent, member-approved governance, the Company has adopted a strict on-chain asset policy. All Company assets must be held and managed through smart contracts, and all payments must be made exclusively in ETH or USDC via the General Keeper, subject to prior approval by members through an Ordinary Resolution. The Company does not maintain any off-chain bank accounts and will not make fiat currency payments, even for government fees, registered agent services, or professional service providers.

---

| |
|:---|
| 12 |
| *[**Table of Contents**](#Toc)* |

---

The Company believes that with the growing acceptance and regulatory recognition of stablecoins such as USDC, an increasing number of service providers will accept on-chain assets as payment. However, in situations where fiat payments remain necessary, the Company utilizes a prepay-and-reimburse mechanism. Under this process, a member or the manager may advance the fiat payment following General Meeting approval, and then seek reimbursement in USDC through a member vote and smart contract execution.

**Transparency, Automation, and On-Chain Corporate Governance**

In accordance with Section 17-31-109 of the Supplement, which vests DAO management in its members or in a combination of members and smart contracts, the Company has structured its governance model to ensure full compliance with the statutory framework. Under the Company's Operating Agreement (the "**OA**"), the General Meeting, composed of all members, serves as the sole decision-making authority (OA §9.1.1). Managers do not possess independent authority and are limited to executing administrative, commercial, or technical functions as expressly authorized by the OA or approved by the General Meeting (OA §10.4.1). Managerial appointments and removals require approval by public vote (OA §10.4.3), and all legal acts and off-chain legal documents binding the Company require prior member approval through on-chain voting (OA §9.1.1). Company assets are strictly limited to on-chain digital assets held or controlled through smart contracts designated as the General Keeper or Cashier (OA §6.5).

To support the practical implementation of these governance principles, the Company has adopted several commercial and technical measures. These include a passive revenue model based on the automatic collection of intellectual property royalties, the absence of traditional bank accounts with all transactions executed in ETH or USDC, and the exclusive use of smart contracts for member voting, resolution validation, manager elections, asset transfers, and legal act execution. All actions require the retrieval of a "passed" resolution from the General Meeting Minutes smart contract to be validly executed.

For transparency and accountability, the Company publicly discloses all smart contract source code and testing scripts on GitHub and has verified its deployed bytecode on Arbiscan.io to ensure alignment with the published code. All material actions-including governance decisions, asset movements, and managerial changes-are conducted on-chain and subject to approval by DAO members through blockchain-based voting.

The Company's governance framework includes clear rules on proposal submission and voting thresholds. Members holding over 10% of Voting Points may submit proposals to the General Meeting. A quorum is established when over 25% of Voting Points are cast. Resolutions are categorized as Ordinary or Special, with Ordinary Resolutions requiring 75% approval of the votes cast, and Special Resolutions-applicable to critical matters such as amending governance rules or replacing key smart contracts-requiring at least four times as many votes in favor as against. Managers act solely to carry out the will of the members as expressed through approved Resolutions and have no discretionary authority.

---

| |
|:---|
| 13 |
| *[**Table of Contents**](#Toc)* |

---

**Development Stage and Technical Deployment**

The ComBoox Platform is fully operational and open-source. All smart contracts, testing scripts, and users interfaces have been published on GitHub. The Company's own equity records, governance framework, and financial systems are implemented exclusively through these smart contracts, demonstrating live usage.

No additional technical milestones are required for commercialization. However, the Company expects to develop community contributions, and potentially acquire new Templates subject to members approval and funding.

**Competitive Position and Differentiation**

To our knowledge, ComBoox is the first public platform offering fully on-chain smart contracts for equity and corporate governance management. While various software as a service tools and blockchain registries exist, no direct competitor currently offers the same degree of automation, decentralization, and legal integration through autonomous smart contracts. We expect to compete on the basis of technological innovation, transparency, automation, and cost-efficiency rather than through traditional customer relationships or service models.

**Intellectual Property and Royalties**

The Company holds exclusive royalty and commission interests in a defined set of Templates as well as minting and pricing rights to CBP within Arbitrum One blockchain network. These interests and rights were developed and contributed by the Founding Member. However, he retains the right to deploy ComBoox on other blockchains. The Company does not currently own any patents or registered trademarks but may acquire additional IPR from external developers if approved by members vote. The source code for all Templates is publicly available, but the royalty logic embedded in smart contracts ensures enforceable monetization.

**Regulatory Environment and Legal Compliance**

The ComBoox Platform is a set of smart contract tools. It can be used by listed companies or private entities, subject to the discretion and compliance responsibilities of each user. The Company does not provide legal advice, governance services, or regulatory compliance on behalf of any platform user.

As the IPR holder and a passive royalty recipient, the Company is not responsible for how users adopt or apply the Templates. Our own regulatory obligations are limited to securities compliance as a public issuer and our pending registration as a transfer agent for our own shares. We maintain automated on-chain recordkeeping and voting to ensure transparency and support for federal disclosure requirements.

---

| |
|:---|
| 14 |
| *[**Table of Contents**](#Toc)* |

---

**Feasibility of Bring Legal Action Against Foreign Managers** The Company has adopted a unique smart contract-based governance and legal architecture designed to minimize risks typically associated with managerial misconduct, insider control, misrepresentation, and insider trading. All Company assets are fully controlled by smart contracts on public blockchain, and managers lack discretionary authority, access to assets, or the ability to bind the Company to off-chain contracts without member approval. All decisions and legal acts are executed and disclosed on-chain in real time, eliminating opportunities for information asymmetry or misuse. Managers are unpaid and function solely in a technical or administrative capacity, further reducing the risk of liability or misconduct.

In response to concerns about the feasibility of bringing legal actions against managers residing in foreign jurisdictions such as China, the Company notes that while service of process is permissible under the Hague Service Convention, enforcement of U.S. court judgments in China remains uncertain. Chinese courts apply a reciprocity standard and assess judgments for alignment with public policy, often rejecting those involving regulatory penalties or extraterritorial application of public laws. Furthermore, original actions based on U.S. securities laws are generally not permitted in Chinese courts due to sovereignty concerns and the classification of such laws as non-civil regulatory statutes. As such, civil liability against foreign managers under U.S. securities laws may be practically limited, though the Company's governance structure is designed to mitigate these risks at the outset.

**Summary Risk Factors**

Our business and Class B Shares are subject to many risks, as more fully described in the "Risk factors" section immediately following this "Prospectus Summary" section. These risks include, among others:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Evolving regulatory environment may bring negative impact on ComBoox and the Company's revenue.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) As a newly established entity, the Company may face revenue uncertainty due to lack of track record, and no current customers, impacting investment value and profitability potential.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Market acceptance and CBP-based royalty model may impact revenue stability.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Because we lack the name recognition, customer base and resources of other companies in the internet software market, we may be unable to compete successfully which would reduce our revenue and the value of your investment.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) DAO Management Structures may impose investment risks.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Different legal requirements on statutory books may bring risks of uncertainty for the Company's revenue.

---

| |
|:---|
| 15 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) Different regulatory rules for public block chain and crypto assets may bring uncertainty risks for the Company's revenue.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) There are no established trading markets for the Company's Share, which will bring risks of uncertainty in the Company's value.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) Volatility in crypto-asset prices may bring uncertain impacts on the value of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) Security vulnerabilities in Template Smart Contracts may pose an uncertainty risk to the Company's revenues.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (11) The open-source nature of smart contracts makes Template Contracts susceptible to illegal copying or imitation, which in turn will negatively impact the Company's revenue.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (12) Cyberattacks and security vulnerabilities could lead to reduced revenue, increased costs, liability claims, or harm to our reputation or competitive position.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (13) ComBoox may be deployed on other blockchains, which in turn will negatively impact the Company's revenue.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (14) Legal changes, our evolving business model, piracy, and other factors may decrease the value of our intellectual property.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (15) Third parties may claim we infringe their intellectual property rights.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (16) The Company does not set specific decision-making mechanisms for related transactions, which may bring the related transaction risks to the investors.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (17) Our Founding Member will maintain substantial voting control following the offering, which may limit your ability to influence corporate decisions.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (18) Although our governance structure minimizes managerial discretion, investors may face significant challenges in pursuing legal actions against our foreign-based managers.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (19) If no member or manager is willing to advance fiat currency payments, the Company may face operational delays or service disruptions.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (20) We are conducting this offering on a best efforts basis without a minimum offering amount, which may limit our ability to execute our business plan and increase risks to investors.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (21) Our reliance on the Arbitrum One layer-2 network and the Ethereum blockchain exposes us to risks of outages, protocol changes, security vulnerabilities, and other disruptions that could materially and adversely affect our operations and financial condition.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (22) Our exclusive forum provision requiring most disputes to be litigated in Wyoming courts may increase costs, limit preferred venues, discourage claims, and faces uncertainty regarding enforceability, though it does not apply to claims under the Securities Act or Exchange Act.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (23) Our strategy to avoid incurring liabilities by relying on prepaid arrangements and a passive business model may fail, resulting in unexpected obligations that could adversely affect our business and securities.

---

| |
|:---|
| 16 |
| *[**Table of Contents**](#Toc)* |

---

**Plan of Distribution and Terms of the Offering**

**Conditions Precedent of Public Offering**

The Company has developed a smart contract-based trading system, known as the List of Orders, which may eventually facilitate compliant secondary trading of its Shares using USDC or ETH with automated delivery-versus-payment ("**DVP**") settlement. However, no such trading is currently permitted, and no public market for the Company's Shares presently exists or is anticipated in the near term. The commencement of the public offering is expressly conditioned upon the satisfaction of three regulatory requirements: (1) qualification of the registration statement by the SEC; (2) registration of the Company as a transfer agent with the SEC, or alternatively, integration with a registered third-party transfer agent; and (3) integration of the List of Orders system with a registered ATS and broker-dealer in full compliance with applicable laws and regulations.

Until these conditions are fully satisfied, the Company will not accept any subscriptions, payments, or investor funds in connection with the public offering, nor will any Shares be deemed sold or closings occur under the registration statement. Consequently, offering proceeds will not be placed into escrow or held conditionally, as no investor funds will be received prior to the offering's formal commencement. If the Company elects not to serve as its own transfer agent, it may instead engage a duly registered third-party transfer agent, whose system will be technically integrated with the Company's smart contract-based registers. This approach will enable regulatory compliance while maintaining the use of on-chain records as the Company's final and authoritative source of ownership and membership data.

**Legal and Technical Characteristics of ComBoox**

ComBoox introduces several legal and technical innovations that distinguish it from traditional securities market infrastructures:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **On-Chain Recordkeeping**: All equity ownership, governance actions, and financial data are automatically recorded directly on the blockchain through the Company's smart contracts. These on-chain records serve as the legally authoritative source, while any off-chain records maintained by a transfer agent are treated as non-binding backups.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Direct Asset Custody**: Shareholders maintain direct custody of their Shares via blockchain wallet addresses. Upon trade execution, smart contracts automatically update the shareholder registry, eliminating the need for intermediaries or traditional post-trade settlement procedures.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Automated DVP Settlement**: The List of Orders system facilitates real-time, atomic DVP settlement. Both asset transfer and payment (in USDC or ETH) occur simultaneously within a single blockchain transaction, fully executed through user-controlled digital wallets without reliance on centralized exchanges.

---

| |
|:---|
| 17 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Smart Contract-Based Governance and Disclosure**: Governance actions, equity transactions, and corporate financial records are executed and recorded through smart contracts. This automated process significantly reduces the need for manual post-transaction disclosures, as material information is immediately and transparently available on-chain.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Regulatory Compliance via Identity Mapping APIs**: To satisfy KYC, AML, and CTF requirements, ComBoox includes dedicated APIs that link real-world identities to blockchain wallet addresses through off-chain verification. Additional smart contract-based APIs enforce compliance functions such as investor accreditation and sanctions screening, though integration with registered ATS or exchange platforms remains necessary to meet full regulatory standards.

**Trading Mechanism of the List of Orders**

The List of Orders smart contract implements a trading system that incorporates features analogous to a central counterparty structure. It supports both market and limit orders for buying and selling, with orders prioritized based on price and then time-buy orders are arranged in descending bid price order, and sell orders in ascending ask price order. Market orders are matched against the best available counter-orders until fully executed or no further matches are available.

Order execution requires pre-funding: buyers must deposit USDC or ETH as collateral, while sellers initiate a reduction in the "Clean Paid" amount of the Shares they offer. Orders include expiration periods and are automatically removed from the order book upon expiry. Trades are matched when the bid price equals or exceeds the ask price, and settlement occurs atomically within the same blockchain transaction through a DVP mechanism. All transactions follow a strict price-time priority model to promote fairness and transparency.

**Legal Compliance Considerations**

The List of Orders system has been developed to reflect key principles of U.S. federal securities law through its smart contract-based architecture. It ensures accurate and tamper-resistant recordkeeping by maintaining immutable ownership and transaction data directly on-chain. Order execution follows publicly accessible and pre-defined rules, promoting fair access and full transparency. Trades are executed based on price-time priority, supporting best execution practices and efficient order handling.

Investor protection is addressed through API-enforced identity verification and real-time on-chain data availability, with future integration options for automated disclosures. The system facilitates instantaneous and atomic DVP settlement, reducing traditional clearing delays and counterparty risks. Moreover, the transparent nature of on-chain transactions, when combined with wallet-to-identity mapping, may enable effective oversight and enforcement against insider trading and other forms of market abuse.

---

| |
|:---|
| 18 |
| *[**Table of Contents**](#Toc)* |

---

**Public Offering and Distribution Plan**

Subject to the satisfaction of the regulatory conditions outlined above, the Company intends to conduct its IPO exclusively through an automated, smart contract-based mechanism known as the List of USD Orders on Arbitrum One. The offering will be conducted at a fixed price of $0.0001 per Share on a first-come, first-served basis, without involvement from underwriters, brokers, or intermediaries. Investors must submit USDC-deemed to have a constant value of $1.00-as collateral along with their Buy Orders. Orders are automatically matched and settled using a price-time priority protocol. Upon matching, Shares are issued and USDC is transferred to the Company's on-chain treasury (i.e. the smart contract Cashier) through an atomic DVP process. Excess or unmatched collateral is either refunded immediately or held in a smart contract-governed escrow, inaccessible by any human actor.

The offering is designed for full automation and transparency, with all transactions and order book data recorded and accessible on-chain. Unmatched Buy Orders may be canceled at any time, triggering an automatic refund of USDC. Additionally, the List of USD Orders supports secondary trading, allowing Sell Orders from members to be automatically matched with Buy Orders from investors without brokers or market-makers. These trades are executed through smart contracts that manage share issuance and payment distribution directly to the seller's on-chain wallet, ensuring that the entire process remains decentralized and trustless.

**Best Efforts Offering**

The Company confirms that its offering will be conducted on a best efforts basis without the involvement of underwriters, placement agents, or broker-dealers, and there is no guarantee that the full offering amount will be sold. The offering is made directly to the public under an effective registration statement, with no minimum aggregate subscription requirement. It will remain open until the earlier of the sale of the maximum number of Shares or 360 days from the commencement date, unless terminated earlier by the Company. Investor funds will not be placed in escrow, as there are no conditions precedent to closing; instead, funds will be delivered directly to the Company upon subscription acceptance.

This offering structure aligns with the Company's capital-light, royalty-based business model. Operating as a passive IPR holding entity with no employees or fixed overhead, the Company generates revenue through pre-deployed smart contracts that function independently of future development. The Company has adopted a flexible, capital-responsive strategy, adjusting the scale and scope of operations based on the total proceeds raised. While greater proceeds may support broader initiatives, a lower raise may necessitate phased or scaled-back development. Investors should be aware that the level of business activity-and associated returns-may vary depending on actual offering results.

---

| |
|:---|
| 19 |
| *[**Table of Contents**](#Toc)* |

---

**The Offering**

We are offering up to 37,600,000,000 Class B Shares at a price of $0.0001 per share. If all the Offered Shares are sold, the Company will receive $3,760,000 in gross proceeds, but there can be no assurance that all or any of the shares will be sold.

**Classes of Shares and Voting Power**

The Company has issued two Classes of Shares: Class A Shares and Class B Shares. Comparing with Class B Shares, Class A Shares have 40 times Voting Weight. All the Shares can be issued or traded in fractions with a minimum unit of a Share.

The Company has issued 2.5 billion Class A Shares and 500 million Class B Shares to the Founding Member at the price of $0.0001 per Share. All such Shares are subject to a lock-up period until June 30, 2027, during which time they may not be transferred, pledged, or otherwise disposed of except as permitted by a Special Resolution of the General Meeting.

**Deferred Evaluation of Royalty Interests**

In addition to the capital contributions made in ETH and USDC totaling $7,500 for the subscription of 75 million Class B Shares, the Founding Member also invested the Royalty Interests as a part of his capital contribution, however, the value of which is subject to a deferred valuation, recognition and adjustment as further discussed hereunder. Due to: (i) there are no similar DApps available in the market; (ii) ComBoox was developed solely by the Founding Member; and (iii) it has not generated material revenue, it is difficult to recognize the Royalty Interests value when the Founding Member contributed it to exchange for the Initial Shares. Thus, the value of Royalty Interests will be deferred recognition until a reliable valuation report is created based on the actual revenue of the Company after it has legally publicly issued its equity Shares and CBP, and received material revenue for more than one year.

If the appraised value of the Royalty Interests exceeds the outstanding balance of the subscription price payable by the Founding Member, the Founding Member shall have the right to either subscribe for Class B Shares at a price of $0.0001 per share or receive an equivalent value in ETH or USDC from the Company. In such a case, the Company shall be obligated to issue additional Class B shares or make an equivalent payment in ETH or USDC to the Founding Member, as requested.

If the appraised value of the Royalty Interests is lower than the outstanding balance of the subscription price payable by the Founding Member, the Founding Member may choose to pay the difference in ETH or USDC or opt to reduce excess amount of Initial Shares in the order of Class B to Class A.

To safeguard the interests of investors, the Company shall not make any distribution until the Royalty Interests valuation has been completed and the paid-in capital amount of the Founding Member's Class A Shares has been duly confirmed.

---

| |
|:---|
| 20 |
| *[**Table of Contents**](#Toc)* |

---

**Use of Proceeds**

The Company estimates that it will receive approximately $3,760,000 in net proceeds if all Offering Shares are sold. The principal purposes of this offering are multifaceted: (1) to comply with the SEC's legal requirements for the public issuance of security tokens; (2) to promote broader industry recognition-among both decentralized and traditional financial sectors-of the potential for smart contracts to automate legal processes, thereby advancing the concepts of "Code is Law" and "Decentralization"; (3) to establish a public market for both the Company's Shares and its platform utility token, CBP; (4) to enable future access to public equity markets; (5) to enhance public awareness and adoption of the ComBoox Platform; and (6) to raise additional capital for business development.

The Company intends to use the net proceeds primarily to support the development and promotion of the ComBoox Platform. This includes the procurement of advertising and promotion services (online and offline), blockchain infrastructure services (such as web application hosting, public storage, and cloud computation), and essential professional services (such as legal, accounting, audit, and registration services) to ensure lawful and sustainable operations. Additionally, a portion of the proceeds may be used to acquire IPR from developers of new Templates, subject to the developers' willingness to sell.

Importantly, in accordance with the provisions of the Operating Agreement and the algorithms embedded in the Company's smart contracts, all material decisions-including the allocation or adjustment of offering proceeds-must be approved by the General Meeting of members, the sole governing authority of the Company. As such, any modification to the intended use of proceeds will require a resolution adopted by the members, including those newly admitted through this offering.

#### 5 RISK FACTORS
5.1 Evolving regulatory environment may bring negative impact on ComBoox and the Company's revenue.

The novelty of ComBoox means that existing laws and regulations may not fully encompass or compatible the unique aspects of the business model. This can lead to ambiguities that affect how we conduct business. Automatic bookkeeping equity and corporate governance records means the company concerned will act as a transfer agent for its own shares, especially for public offered shares. Given the international nature of many blockchain and capital markets, ComBoox may face a complex web of global regulations. Navigating these varying legal requirements is a substantial challenge that could impact the acceptance to ComBoox solution, circulation of CBP, as well as the revenue of us. The Company actually is an on-chain passive income entity fully managed by members through public voting. Although the Company is incorporated in Wyoming, however, the jurisdiction in which the Shares and CBP is traded can lead to conflicts and ambiguities in regulatory compliance.

---

| |
|:---|
| 21 |
| *[**Table of Contents**](#Toc)* |

---

**&nbsp;&nbsp;&nbsp;&nbsp; 5.2 As a newly established entity, the Company may face revenue uncertainty due to lack of track record, and no current customers, impacting investment value and profitability potential.** 

As a newly established entity, we face significant revenue risks inherent to our early stage of operations. Our success is contingent upon the business mode of ComBoox to attract and retain users, which is uncertain given the innovation nature of the mode. Without a proven track record or existing user base, we may encounter challenges in convincing potential users to adopt concepts or Template Contracts of ComBoox. Furthermore, the absence of immediate revenue streams subjects us to financial pressures that can impact our ability to acquire new IPR, marketing, and other growth initiatives. Our survival and growth are heavily dependent on achieving market acceptance and generating sales, which are inherently uncertain processes. Investors should be aware that our lack of revenue to date increases the risk of not achieving profitability in the short term, or potentially at all, which could have a material adverse effect on our business and the value of their investment.

5.3 Market acceptance and CBP-based royalty model may impact revenue stability

The success of our operations is critically contingent upon the sustained market acceptance of ComBoox across both existing and emerging markets. Any decline in market acceptance could significantly impair our revenue and profitability.

Our business model is based on the collection of royalties for each Templates adopted by ComBoox Platform, and the commission splitting from the royalties paid to IPR holders other than the Company. Although the licensing rate is predefined by the original author of the Templates, all royalties and commission will be collected in CBP. The exchange price of CBP against USDC, the total supply of CBP, and the commission rate based on which to split the royalties from other copyright holders will be determined by the Company through Ordinary Resolution. We may be unsuccessful in changing these sales policies of ComBoox. Any increase in the portion of revenue attributable to commission or royalties will depend on our successful anticipation of users' willingness to use Templates of ComBoox.

5.4 Because we lack the name recognition, customer base and resources of other companies in the internet software market, we may be unable to compete successfully which would reduce our revenue and the value of your investment.

If we fail to promote ComBoox successfully or if we incur significant expenses promoting and maintaining ComBoox, we may experience a material adverse effect on our business, financial condition and operating results. Due in part to the still emerging nature of the market for block chain application and the substantial resources available to many of our competitors, we may have a time-limited opportunity to achieve and maintain market share.

We believe that developing and maintaining awareness of the ComBoox will be critical to achieving widespread acceptance of our concepts. We believe that brand recognition will become increasingly important as competition in the market for our revenue increases. Successfully promoting and positioning ComBoox will depend largely on the effectiveness of our marketing efforts. As a result, we may need to expand our financial commitment to creating and maintaining brand awareness among potential customers.

---

| |
|:---|
| 22 |
| *[**Table of Contents**](#Toc)* |

---

5.5 DAO Management Structures may impose investment risks.

As a DAO, our management structure inherently carries certain risks that are distinct from traditional corporate models. The decentralized nature of a DAO means that decision-making is typically governed by consensus among its members, which can sometimes lead to slower response times and less centralized control over strategic direction. This can result in a lack of clear leadership and accountability, potentially impacting the efficiency and effectiveness of operations. Although we have implemented a DAO governance framework featuring differentiated voting rights and managerial oversight to counteract the potential inefficiencies of decentralized management, the innovative and non-traditional aspects of this organizational model may continue to present risks to the interests of our shareholders.

5.6 Different legal requirements on statutory books may bring risks of uncertainty for the Company's revenue.

As an innovative application, ComBoox utilizes smart contracts to automatically maintain companies' book-entry records of equity transaction and corporate governance such as Register of Shares, Register of Shareholders, Register of Directors, General Meeting Minutes, and so on. Therefore, the different legal requirements for the said statutory books of companies in various jurisdictions will directly affect the market space and development speed of ComBoox platform, which in turn will affect the Company's revenue and its growth.

5.7 Different regulatory rules for public block chain and crypto assets may bring uncertainty risks for the Company's revenue.

The operation of the ComBoox Platform relies on the proper functioning of and free access to the Arbitrum One and Ethereum block chains, and the Company's primary assets are in form of crypto assets such as ETH and USDC. Therefore, if a jurisdiction restricts or prohibits the operation of the public blockchain network or prohibits the trading and circulation of the relevant native token assets, it will result in the ComBoox platform not being available to companies in that jurisdiction. As a result, different regulatory rules for public blockchain and crypto assets in jurisdictions around the world may bring risks of uncertainty for the Company's revenue.

5.8 There are no established trading markets for the Company's Share, which will bring risks of uncertainty in the Company's value.

As an on-chain book-entry certificate, the Company's equity currently has no legal trading exchange and it is likely that no such legal trading exchange may be established in a predictable future. The Company has already built its own automated listing and trading system on Arbitrum One with smart contracts to facilitate investors to trade the Company's shares by public bidding, but it needs to pass the SEC's filing and registration procedures regarding Transfer Agents in order to operate legally. The ability to trade the Company's shares under this model in the future will significantly impact the liquidity of the Company's Shares and, in turn, the value of the Company.

---

| |
|:---|
| 23 |
| *[**Table of Contents**](#Toc)* |

---

5.9 Volatility in crypto-asset prices may bring uncertain impacts on the value of the Company.

The Company will take ETH as one of its primary assets and payment instruments. Therefore, price volatility of crypto-assets, especially ETH, will bring an uncertain impact on the Company's value and revenue expectations.

5.10 Security vulnerabilities in Template Smart Contracts may pose an uncertainty risk to the Company's revenues

Smart contracts and blockchain protocols may have security vulnerabilities or logical flaws in business logic, data security, etc., may be subject to hacking or unexpected system crashes, and may fail to realize desired transaction results or asset disposition arrangements. In the event of such an incident, ComBoox's reputation and market prospects would be negatively impacted, which in turn may negatively impact the Company's revenue.

5.11 The open-source nature of smart contracts makes Template Contracts susceptible to illegal copying or imitation, which in turn will negatively impact the Company's revenue.

The reasons that smart contracts can gain trust and build credibility lye in making the source code publicly available. Stakeholders can clearly understand the logic and algorithms of the code and expect certainty in the outcome of the disposition of rights and interests through the automated execution of the code, thus building trust in the smart contracts. The attributes of open source code makes it easy for smart contracts to be illegally copied or imitated. Once illegally copied or imitated, the Company's royalty and commission income from the ComBoox platform will be negatively impacted. No company would accept to base its book-entry records on a platform with legally flawed intellectual property, so the Company is not so concerned about third parties competing in an infringing manner. However, this will inevitably have a negative impact on the Company's revenue any way.

5.12 Cyberattacks and security vulnerabilities could lead to reduced revenue, increased costs, liability claims, or harm to our reputation or competitive position.

Threats to IT security can take a variety of forms. Individual and groups of hackers and sophisticated organizations, including state-sponsored organizations or nation-states, continuously undertake attacks that pose threats to ComBoox and Smart Contracts adopted by the Company. These actors may use a wide variety of methods, which may include developing malicious smart contracts or exploiting vulnerabilities in hardware, software, or other infrastructure in order to attack smart contracts deployed based on Template Contracts of ComBoox or gain access to special write functions thereof, using social engineering techniques to induce users to disclose passwords or other sensitive information or take other actions to gain access to users' private key, or acting in a coordinated manner to launch distributed denial of service or other coordinated attacks. Nation state and state sponsored actors can deploy significant resources to plan and carry out exploits.

---

| |
|:---|
| 24 |
| *[**Table of Contents**](#Toc)* |

---

Cyberthreats are constantly evolving and becoming increasingly sophisticated and complex, increasing the difficulty of detecting and successfully defending against them. We may have no current capability to detect certain vulnerabilities, which may allow them to persist in the environment over long periods of time. Cyberthreats can have cascading impacts that unfold with increasing speed across Arbitrum One networks and systems and those of shareholders, managers, or users of Comboox. Breaches of our facilities and network, could disrupt the security of block chain systems and ComBoox Platform, impair ability of ComBoox to serve to users and protect the privacy of their private keys, result in harming our reputation or competitive position, result in theft or misuse of our intellectual property or other assets, adversely affect our business and income.

5.13 ComBoox may be deployed on other blockchains, which in turn will negatively impact the Company's revenue

Since collecting CBP across chains would add unnecessary technical difficulties, Founding Member only invested the beneficial rights to royalties and commission for Template Smart Contracts within the territory of Arbitrum One as a capital contribution to the company. In other words, Founding Member retained the rights to deploy and operate ComBoox Platform on other blockchains. Therefore, in the event that Founding Member deploys and operates ComBoox on other blockchains, there will be a competitive negative impact on the Company's revenue.

5.14 Legal changes, our evolving business model, piracy, and other factors may decrease the value of our intellectual property.

Protecting our intellectual property rights and combating unlicensed copying and use of Template Contracts of ComBoox and other intellectual property on a global basis is difficult. Reductions in the legal protection for software intellectual property rights could adversely affect revenue. Changes in the law may continue to weaken our ability to prevent the use of Template Contracts or collect revenue. These include legislative changes and regulatory actions that make it more difficult to obtain injunctions, and the increasing use of legal process to challenge illegal piracy. The royalties we can obtain to monetize our intellectual property may decline because of the evolution of technology, or the difficulty of discovering infringements.

5.15 Third parties may claim we infringe their intellectual property rights.

From time to time, others may claim we infringe their intellectual property rights. The number of these claims may grow because of constant technological change in the markets in which we compete, the extensive patent or copyright coverage of existing technologies, the rapid rate of deployment of smart contracts and issuance of new patents. To resolve these claims, we may have to defend these challenges. These outcomes may cause operating margins to decline. Besides money damages, in some jurisdictions plaintiffs can seek injunctive relief that may limit or prevent importing, marketing, and selling Template Contracts that have infringing technologies.

Although Founding Member is very confident of the cleanliness of the intellectual property of the Template Smart Contracts, as an inalienable right of action, any third party may still claim that we are infringing on their intellectual property rights, which in turn could have an uncertain impact on the value of the Royalties Interests and the Company's revenue.

---

| |
|:---|
| 25 |
| *[**Table of Contents**](#Toc)* |

---

5.16 The Company does not set specific decision-making mechanisms for related transactions, which may bring the related transaction risks to the investors.

The Company has not established any special withhold voting or similar procedures for related transactions and relies solely on the dispersion of shareholdings and the openness of voting to ensure the fairness of the price and terms of the transactions, which may expose investors to some degree of related transaction risks.

**5.17. Our Founding Member will maintain substantial voting control following the offering, which may limit your ability to influence corporate decisions.**

Upon completion of this offering, our Founding Member, Mr. Li Li, is expected to beneficially own and control approximately 72.77% of our total voting rights, while continuing to hold 100% of our Class A Shares. As a result, he will retain decisive influence over all matters requiring member approval, including the appointment or removal of managers, approval of operating policies, amendments to governing agreements, and other significant corporate actions.

Under our Shareholders Agreement, the approval of an Ordinary Resolution requires at least 75% of the voting power and the approval of a Special Resolution requires at least 80% of the voting power. Accordingly, no Ordinary Resolution or Special Resolution can be passed without the affirmative support of Mr. Li Li. This concentration of voting power will effectively give him a veto over all shareholder decisions, thereby limiting your ability as an investor to influence the governance or direction of the Company.

Our Operating Agreement is designed to safeguard minority investors by requiring supermajority approvals for key corporate actions. Specifically, an Ordinary Resolution requires at least 75% of the votes cast, meaning that proposals supported by Mr. Li Li can be blocked if other members act collectively. For even more significant matters-such as amendments to the Shareholders Agreement, capital increases, or replacement of our smart contract systems-a Special Resolution requiring over 80% approval is mandated. These high approval thresholds serve to enhance investor protection and ensure that major corporate decisions reflect broad consensus among members.

**5.18. Although our governance structure minimizes managerial discretion, investors may face significant challenges in pursuing legal actions against our foreign-based managers.**

Our governance system is built around transparent, automated, and tamper-resistant smart contracts that control all corporate acts, including financial transactions, asset transfers, and governance decisions. Managers are structurally limited to performing purely technical or administrative functions in accordance with member-approved on-chain resolutions. They hold no unilateral authority, possess no access to Company assets, and receive no remuneration. These safeguards are designed to reduce traditional legal risks associated with insider control, managerial abuse, or fiduciary breaches.

---

| |
|:---|
| 26 |
| *[**Table of Contents**](#Toc)* |

---

However, all of our managers, including the Founding Member, currently reside outside the United States. As a result, investors may encounter substantial difficulties in serving legal process, enforcing U.S. court judgments, or initiating legal proceedings based on U.S. federal securities laws. While service of process in China is permitted under the Hague Service Convention, enforcement of U.S. judgments in China is rare, and subject to reciprocity, procedural validity, and public policy review. Chinese courts have historically declined to enforce U.S. securities law judgments, particularly those involving regulatory penalties or punitive damages.

In addition, Chinese courts do not generally recognize the extraterritorial application of U.S. securities laws and are unlikely to permit original actions under such statutes. These jurisdictional and legal limitations may substantially impair investors' ability to assert claims, recover damages, or obtain injunctive relief against managers residing in foreign countries like China.

**5.19. If no member or manager is willing to advance fiat currency payments, the Company may face operational delays or service disruptions.**

Because the Company does not maintain any off-chain bank accounts and operates under an on-chain-only asset policy, it does not directly make payments in fiat currency. Instead, fiat-based obligations-such as state filing fees, registered agent services, or legal retainers-must be prepaid by a designated member or manager and subsequently reimbursed in USDC through smart contracts, subject to approval by the General Meeting.

If, at any time, no member or manager is willing or able to advance fiat funds for these purposes, the Company may be unable to pay required administrative fees, retain necessary professional services, or satisfy legal obligations. This could result in delays in regulatory compliance, legal filings, or the maintenance of good standing in its jurisdiction of formation.

To mitigate this risk, the Founding Member, Mr. Li Li-who holds a substantial equity interest in the Company-has expressed a willingness to enter into a written commitment (see. Exhibit-32.3) to use best efforts to advance fiat payments in accordance with legal agreements or budgets that have been formally approved by the General Meeting. While this commitment does not guarantee coverage of all fiat obligations, it reflects the Founding Member's alignment of interest with the Company and its investors. Nevertheless, there can be no assurance that such prepayments will always be timely, sufficient, or feasible under all circumstances.

**5.20. We are conducting this offering on a best efforts basis without a minimum offering amount, which may limit our ability to execute our business plan and increase risks to investors.**

This offering is being conducted on a best efforts basis, and there is no minimum offering amount that must be sold for the offering to proceed. No underwriter, placement agent, or broker-dealer has agreed to purchase or distribute any specific quantity of our securities. As a result, the Company may raise only a limited amount of proceeds, or none at all, and there is no assurance that we will raise sufficient capital to achieve our business objectives.

Because we do not have a pre-defined minimum amount to be raised, and because we operate a capital-light business model based on passive royalty collection from deployed smart contracts, we do not depend on specific capital thresholds to maintain our going concern status. However, our ability to implement strategic initiatives-including product expansion, licensing partnerships, marketing campaigns, and third-party integrations-will depend on the amount of proceeds ultimately raised.

If we raise substantially less than the maximum offering amount, we may need to defer or scale back some of our proposed business activities, which could delay execution, reduce competitiveness, and adversely affect potential returns for investors.

---

| |
|:---|
| 27 |
| *[**Table of Contents**](#Toc)* |

---

**5.21. Risks Related to Our Technology and Reliance on Third-Party Blockchain Networks (Arbitrum One and Ethereum)**

Our operations rely on the proper functioning and continued development of Arbitrum One, a public layer-2 scaling network that records transaction data and state roots on the Ethereum blockchain. If Arbitrum One or Ethereum were to experience disruptions, degradation in performance, delays, forks, vulnerabilities, or other adverse events, our systems could be impaired. For example, outages of the Arbitrum sequencer, congestion in block production or settlement, or failures in data availability could delay or prevent on-chain recordkeeping, governance actions, or settlement of transactions.

In addition, because Arbitrum One depends on Ethereum for finality and security, any disruption, material change, or vulnerability in Ethereum could adversely affect the integrity and reliability of Arbitrum One. The governance of both Arbitrum One and Ethereum is decentralized and outside our control, and protocol-level changes or upgrades could impose additional requirements, necessitate significant modifications to our smart contracts, or introduce unforeseen risks.

Moreover, vulnerabilities in cross-chain bridges, rollup infrastructure, or within our own smart contracts could lead to security incidents, loss of assets, or interruption of services. If Arbitrum One or Ethereum do not perform as expected, become unavailable, or otherwise experience adverse changes, our business, financial condition, and results of operations could be materially and adversely affected.

 **5.22. Risks Related to the Dispute Resolution Provision in Our Amended and Restated Operating Agreement** 

Our Amended and Restated Operating Agreement contains a dispute resolution provision that designates the United States District Court for the District of Wyoming or the state courts located in Wyoming as the exclusive forums for substantially all disputes arising out of or relating to the agreement, and members irrevocably waive, to the fullest extent permitted by law, any objection to venue in such courts. We adopted this forum selection clause in light of our formation under the Supplement, which provides a unique statutory framework tailored to blockchain-based and decentralized entities and expressly recognizes the prevailing effect of smart contracts. By designating Wyoming courts, we sought to ensure that disputes are adjudicated in a jurisdiction most familiar with the Supplement.

Nevertheless, this exclusive forum provision may increase the cost or difficulty of bringing a claim, particularly for investors located outside of Wyoming, and may discourage lawsuits or limit investors' ability to bring claims in judicial forums that they consider more convenient or favorable. In addition, there is uncertainty as to whether a court would enforce this type of exclusive forum provision in all contexts.

This dispute resolution provision does not apply to claims arising under the Securities Act of 1933, as amended, or the Securities Exchange Act of 1934, as amended. Section 22 of the Securities Act provides for concurrent jurisdiction of federal and state courts over claims under the Securities Act, while Section 27 of the Exchange Act provides for exclusive federal jurisdiction over claims under the Exchange Act. To the extent that the exclusive forum provision is ever interpreted to apply to claims under the Securities Act or the Exchange Act, there is uncertainty as to whether a court would enforce such provision, and investors cannot waive compliance with the federal securities laws and the rules and regulations promulgated thereunder.

 **5.23. Our strategy to avoid incurring liabilities by relying on prepaid arrangements and a passive business model may fail, resulting in unexpected obligations that could adversely affect our business and securities.** 

We intend to minimize our assumption of liabilities by not borrowing funds, not hiring employees, and contracting for services only on a prepaid basis. There can be no assurance, however, that these measures will be effective in all circumstances. Unexpected claims, regulatory requirements, or unforeseen expenses may arise that cannot be addressed solely through prepayments. If we are required to assume liabilities that we have not anticipated, we may not have the resources to satisfy them, and our financial condition and the value of our securities could be materially and adversely affected.

Our reliance on prepaid arrangements with service providers may also create risks. Because we pay in advance for services such as marketing or advisory work, we are unable to defer or renegotiate payment obligations if services are not performed as expected. If a counterparty fails to deliver services for which we have prepaid, we may be unable to recover the funds, which could result in financial losses and operational disruptions.

In addition, our business model depends on the assumption that our smart contracts, which generate licensing revenues, will not require ongoing maintenance or support. These smart contracts are licensed on an "AS IS" basis, without any representation or warranty as to defects, security, or future upgrades. Nonetheless, defects, vulnerabilities, or disputes may arise that could expose us to claims or remediation costs. Any such liabilities could negatively affect our operations, financial condition, and the value of our securities.

---

| |
|:---|
| 28 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp; 6 USE OF PROCEEDS
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We estimate that our net proceeds from the offering will be approximately $3,760,000 if all the Offering Shares are sold. We intend to use the net proceeds from the offering as follows:

The principal purposes of this offering are to: (1) comply with the SEC's legal requirements for the public issuance of security tokens;(2) encourage both the crypto and traditional financial industries to seriously consider the broader implications of using smart contracts to automate legal actions-thereby advancing the concepts of "Code is Law" and "Decentralization"; (3) create a public market for our Shares and CBP;(4) facilitate future access to public equity markets; (5) increase awareness of ComBoox Platform among potential customers and end-users; and (6) raise additional capital.

We intend to use the net proceeds for the following purpose:

&nbsp;&nbsp;&nbsp;&nbsp; (1) to purchase online or offline advertising services, promotion services, code audit services or other services to promote ComBoox Platform;

&nbsp;&nbsp;&nbsp;&nbsp; (2) to purchase the web application platform services, block chain access services, public storage services, cloud storage and calculation services, and other necessary services for ComBoox Platform to operate legally, smoothly and healthily;

&nbsp;&nbsp;&nbsp;&nbsp; (3) to purchase necessary accounting services, financial auditing services, legal services, registration agent services or other necessary professional services to make the Company, as well as ComBoox Platform, be able to operate and develop in compliance with the governing laws and regulations; and

&nbsp;&nbsp;&nbsp;&nbsp; (4) to purchase the IPR derived from any new Templates that may be adopted by ComBoox in the future, provided that the relevant developers are willing to sell.

&nbsp;&nbsp;&nbsp;&nbsp; This expected use of the net proceeds from the offering represents our intentions based upon our current plans and business conditions. As of the date of this prospectus, we cannot predict with certainty all of the particular uses for the net proceeds to be received upon the completion of the offering or the amounts that we will actually spend on the uses set forth above.

The amounts and timing of our actual expenditures may vary significantly depending on numerous factors, including the number of potential IPR we intend to acquire, the status of negotiations for such IPR, and any unforeseen needs.

However, as per the provisions of the OA, as well as the algorithm predefined in the smart contracts, unlike many traditional listed companies, all material decisions of the Company, including the use of offering proceeds, are subject to the authority of the General Meeting, the ONLY decision-making authority of the Company which consists of all members. Accordingly, any allocation or adjustment to the use of proceeds will require prior approval through resolutions adopted by the members, including any new investors admitted through this offering.

---

| |
|:---|
| 29 |
| *[**Table of Contents**](#Toc)* |

---

Notwithstanding the foregoing, for illustrative purposes and to assist investors in understanding the Company's intended capital allocation, the Company has provided below a projected budget breakdown and a table illustrating the planned use of proceeds in scenarios where 25%, 50%, 75%, and 100% of the maximum offering is sold.

&nbsp;&nbsp;&nbsp;&nbsp; **Preliminary Budget Estimates**

---

| | | |
|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S.No.**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Use of Proceeds**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Estimated Budget Range(USD)**  |
| (a) | KYC/AML Service (5 yrs) | $100000 - $200000 |
| (b) | ATS Collaboration (5 yrs) | $150000 - $300000 |
| (c) | Blockchain Network Access (5 yrs) | $50000 - $100000 |
| (d) | Dapp Vercel Server (5 yrs) | $50000 - $100000 |
| (e) | Dapp Database (5 yrs) | $50000 - $100000 |
| (f) | Smart Contract Codes Audit | $25000 - $30000 |
| (g) | Cybersecurity Audit | $25000 - $30000 |
| (h) | Financial Audit (5 yrs) | $50000 - $100000 |
| (i) | Legal & Administrative Fees (5 yrs) | $100000 - $200000 |
| (j) | Dapp UI Design and Upgrades | $100000 - $200000 |
| (k) | Marketing and Advertisement | $200000 - $500000 |
| (l) | Reserve for New Templates | $200000 - $500000 |
|  | **Residual Proceeds** | **$2660000 - $1400000** |
|  | **Total Estimated Range** | **$1100000 - $2360000** |

---

&nbsp;&nbsp;&nbsp;&nbsp; **Allocation Principles**

&nbsp;&nbsp;&nbsp;&nbsp; • **Type i (Scalable)**: Items (a) through (e) are flexible and may scale according to user volume and network activity.

&nbsp;&nbsp;&nbsp;&nbsp; • **Type ii (Optional/Contingent)**: Item (g) may depend on the nature of collaboration with an ATS.

&nbsp;&nbsp;&nbsp;&nbsp; • **Type iii (Annualized)**: Items (h) and (i) are recurring yearly costs.

&nbsp;&nbsp;&nbsp;&nbsp; • **Type iv (Discretionary)**: Items (f), (j) and (l) are discretionary enhancements and will be initiated only if 75% or more of the maximum offering is achieved.

&nbsp;&nbsp;&nbsp;&nbsp; • **Type v (Adjustable)**: Item (k) is scalable based on available funding.

&nbsp;&nbsp;&nbsp;&nbsp; • **Type vi (Working Capital)**: Any residual proceeds not allocated above will be used as general working capital.

---

| |
|:---|
| 30 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Use of Proceeds Table (Illustrative) (Thousand USD)**

---

| | | | | |
|:---|:---|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Category**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25% Proceeds**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50% Proceeds**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 75% Proceeds**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100% Proceeds**  |
| Type i (a-e) | 100 - 200 | 200 - 400 | 300 - 600 | 400 - 800 |
| Type ii (g) |  |  | 15 - 18 | 25 - 30 |
| Type iii (h,i) | 37.5 - 75 | 75 - 150 | 112.5 - 225 | 150 - 300 |
| Type iv (f, j, l) |  |  | 165 - 368 | 325 - 730 |
| Type v (k) | 50 - 125 | 100 - 250 | 150 - 375 | 200 - 500 |
| **Residual Proceeds** | 540 - 752.5 | 1080 - 1505 | 1234 - 2027.5 | 1400 - 2660 |
| **Total Proceeds** | 940 | 1880 | 2820 | 3760 |

---

&nbsp;&nbsp;&nbsp;&nbsp; *Note: Figures above are approximations and subject to modification based on final General Meeting resolutions and actual proceeds received.* 

#### &nbsp;&nbsp;&nbsp;&nbsp; 7 DETERMINATION OF OFFERING PRICE
&nbsp;&nbsp;&nbsp;&nbsp; The offering price of the Offering Shares is determined by us considering our capital structure, prevailing market conditions, and overall assessment of our business.

#### 8 PLAN OF DISTRIBUTION AND TERMS OF THE OFFERING
8.1 Offering

We are offering up to 37,600,000,000 Class B Shares at a price of $0.0001 per share. There is no minimum number of shares we are required to sell nor is there a minimum amount of money we are required to raise from this offering. If we sell all the shares offered, we will receive $3,760,000 in gross proceeds, but there can be no assurance that all or any of the shares will be sold.

---

| |
|:---|
| 31 |
| *[**Table of Contents**](#Toc)* |

---

8.2 Conditions Precedent of Public Offering

Although a public market for the Company's Shares does not currently exist, and no such legal market is anticipated in the near term, the Company has developed a smart contract-based trading system that may eventually support compliant secondary trading. This system, known as the smart contracts List of Orders, enables trading of Shares in USDC or ETH with automated DVP settlement. However, no such trading is currently permitted until appropriate regulatory requirements are satisfied.

The Company confirms that the commencement of the public offering is contingent upon the satisfaction of three regulatory conditions:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) The registration statement, of which this prospectus forms a part, is qualified by the SEC;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) The registration of the Company as a transfer agent with the SEC, or alternatively, the establishment of formal cooperation and technical integration with a registered third-party transfer agent; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) The integration of List of Orders system with a registered ATS and broker-dealer, in a manner compliant with applicable regulations.

No subscriptions, payments, or investor funds will be accepted under the public offering unless and until all of the above conditions are fully satisfied. The Company confirms that no shares will be deemed sold under the registration statement, and no closings will occur, unless and until all specified conditions precedent to the offering are satisfied. No investor funds (including USDC) related to the public offering will be received or accessed by the Company until the offering is formally commenced. Accordingly, the offering proceeds will not be placed into escrow or otherwise conditionally held, as no subscriptions will be accepted until the offering becomes active.

The Company also clarifies that, should it determine not to act as its own registered transfer agent, it may instead enter into a service agreement with a duly registered third-party transfer agent, whose system will be integrated with the Company's smart contract-based registers (e.g., Register of Shares, Register of Members). This arrangement would allow the Company to comply with applicable transfer agent rules, while preserving the use of on-chain records as the final and legally conclusive record keeping system.

Importantly, the Company confirms that this restriction on the commencement of the public offering does not preclude the Company from engaging in a private placement of securities prior to the IPO, in reliance on applicable exemptions from registration under the Securities Act, such as Regulation D. Any such private placements would be conducted separately, with distinct investor communications, documentation, and processes, and would be targeted solely to qualified investors as permitted by law. The Company will take appropriate measures to ensure that any private placement is not integrated with the registered offering, including maintaining a clear separation in timing, offering terms, and investor base.

---

| |
|:---|
| 32 |
| *[**Table of Contents**](#Toc)* |

---

8.3. Legal and Technical Characteristics of ComBoox

ComBoox incorporates several legal and technical distinctions from traditional securities markets, as outlined below.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **On-Chain Recordkeeping**: Equity ownership, governance acts, and financial records are recorded directly on-chain through the Company's smart contracts. These on-chain records are deemed the legally authoritative source of truth. Any off-chain records maintained by a transfer agent serve solely as non-binding backups.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Direct Asset Custody by Investors**: In contrast to traditional custodial models, shareholders hold Shares directly through blockchain-based wallet addresses. Upon execution of a trade, the relevant smart contracts automatically update the shareholder registry to reflect the new owner, eliminating the need for intermediary custodians and post-trade settlement layers.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Automated DVP Settlement**: The List of Orders system enables atomic, real-time DVP settlement, meaning that the delivery of Shares and payment (in USDC or ETH) occur simultaneously within a single blockchain transaction. All trades are executed directly through user-controlled digital wallets, with no reliance on centralized accounts or exchange infrastructure.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Smart Contract-Based Governance and Disclosure**: Corporate governance actions, equity transactions and financial records are initiated and recorded automatically via smart contracts. This reduces or eliminates the need for post hoc manual disclosures, as relevant material information is transparently and instantly available on-chain.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Real Name Authentication and Regulatory APIs**: In compliance with KYC, AML and CTF obligations, the system sets out special APIs to map real-world identities to wallet addresses via off-chain verification processes. Smart contract APIs are implemented to enforce investor verification, accreditation, and sanction list screening, although integration with regulated exchange or ATS platforms is still required for full compliance.

8.4. Trading Mechanism of the List of Orders

The List of Orders implements a central counterparty-like structure with the following features:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**(1) Order Types and Matching**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A. Buy and Sell Orders may be either market or limit orders.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B. Orders are sorted by price and time: Buy Orders in descending bid order; and sell orders in ascending ask order.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C. Market orders match against all available counter-orders until fully executed or until no further matches exist.

---

| |
|:---|
| 33 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(2) Order Execution and Margin Requirements**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A. Buy Orders require pre-funded ETH or USDC as collateral.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B. Sell Orders trigger a decrease in the Clean Paid amount of the subject Shares.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C. Orders include a defined expiration period and are automatically removed from the order book upon expiry.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D. Matching occurs when the bid price equals or exceeds the ask price, and transactions are executed at the seller's price.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(3) Settlement and Order Handling**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A. Settlement occurs atomically via DVP in the same blockchain transaction as order execution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B. All trades follow "price-time priority" to ensure fairness and transparency.

8.5. Legal Compliance Considerations

The List of Orders system is designed to align with key principles of U.S. federal securities law, as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Books and Records**: Immutable smart contracts ensure accurate and tamper-proof recordkeeping for ownership and transaction history.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Fair Access and Transparency**: Orders are executed according to transparent, pre-coded rules that are publicly auditable on-chain.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Best Execution and Order Handling**: The system ensures that orders are filled at the best available prices, according to price-time priority logic.

---

| |
|:---|
| 34 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Investor Protection and Disclosure**: Smart contract APIs enforce identity verification, and real-time on-chain data ensures transparency. Future integrations may support automated AI driven investor verification.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Clearing and Settlement**: DVP settlement occurs instantly and atomically, eliminating traditional clearing delays and reducing counterparty risk.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) **Insider Trading and Market Abuse Prevention**: The transparency of on-chain transactions, combined with wallet-based identity mapping, creates the potential for effective monitoring and enforcement against unlawful trading practices.

8.6. Public Offering and Distribution Plan

Subject to satisfaction of the conditions precedent discussed in Section 8.2, the Company intends to conduct its initial public offering exclusively through an on-chain mechanism known as the "List of USD Orders," implemented via smart contracts deployed on the Arbitrum One blockchain network.

The initial offering price has been fixed at $0.0001 per Share. The offering will not involve a book-building process, underwriter syndication, or allocation procedures. All Shares will be sold at this fixed price on a first-come, first-served basis through the automated smart contract system. For purposes of the offering, USDC will be deemed to maintain a constant value of 1.00 U.S. dollar.

When submitting a Buy Order, an investor must transmit a sufficient amount of USDC, included with the transaction call, as collateral to cover the full subscription price for the desired number of Shares. The offering smart contracts will verify the adequacy of the submitted collateral in real time and will automatically reject any Buy Order that is undercollateralized.

Upon successful placement, the Buy Order will be automatically matched against Initial Offers (as defined in Section 1(26)) using a price-time priority protocol encoded in the List of USD Orders smart contract. All matched transactions will be executed at the fixed offering price of $0.0001 per Share.

Each matched transaction will be settled through an atomic DVP mechanism, whereby:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the subscribed Shares are simultaneously issued to the Verified Investor's on-chain account; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the corresponding USDC consideration is transferred directly to the Company's on-chain treasury smart contract, the "Cashier".

Any USDC collateral in excess of the amount required for a matched Buy Order will be automatically refunded to the investor's designated wallet address.

---

| |
|:---|
| 35 |
| *[**Table of Contents**](#Toc)* |

---

If a Buy Order is not fully matched at the time of placement, the unmatched portion will be recorded on the open order book, and the full amount of USDC collateral will be transferred into a dedicated, on-chain escrow account governed entirely by the offering smart contracts system.

Critically, no members or managers of the Company have access to or control over escrowed USDC. The escrow account is implemented through immutable smart contract logic, and the funds held in escrow cannot be accessed or redirected by any human actor or private key holder.

The smart contract permits only two possible outcomes for escrowed funds:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Transfer to the Company's Cashier upon successful matching of the Buy Order with an Initial Offer; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Refund to the investor's wallet upon full or partial cancellation of the Buy Order.

These outcomes are executed automatically and without manual intervention.

Investors may cancel any unmatched Buy Order at any time prior to execution. Upon cancellation, the full amount of the associated USDC collateral will be immediately refunded.

To avoid pricing volatility risks for both the Company and investors, the Company has elected not to accept ETH or other volatile digital assets for payment in the offering. By limiting payment methods to USDC-a stablecoin pegged 1:1 to the U.S. dollar-the offering ensures that the value of consideration is stable, transparent, and not subject to intra-transaction fluctuation.

The offering will not involve underwriters, brokers, dealers, or other financial intermediaries. The entire offering process-including order submission, matching, settlement, share issuance, and payment-will be executed automatically and transparently via on-chain smart contracts deployed on the Arbitrum One network. No post-trade clearing, reconciliation, or manual processing will be required.

All offering-related transactions and order book data will be visible on-chain and accessible to investors. Any proposed material changes to the offering mechanics, smart contract architecture, or accepted forms of consideration will be communicated publicly and, where required, filed with the Commission as an amendment to this registration statement.

The offering will commence within 90 days after the conditions precedent specified in Section 8.2 have been fully met, and will remain open for up to 360 days thereafter, unless extended or terminated in accordance with applicable law.

Furthermore, the List of USD Orders also can list all Sell Orders placed by members and automatically match and close deals against the Buy Orders placed by investors. During the listing trade, no brokers, dealers or market-makers will involve. Shares will be created, adjusted or revoked under the automatic control of smart contracts, and consideration in USDC will be booked under the name of seller with his or her exclusive control.

---

| |
|:---|
| 36 |
| *[**Table of Contents**](#Toc)* |

---

8.7. Best Efforts Offering

The Company confirms that the offering will be conducted on a best efforts basis. No underwriter, placement agent, or broker-dealer has committed to purchase or sell any specific quantity of securities, and there is no assurance that the full amount of the offering will be sold. The securities are being offered directly by the Company to the general public, including both accredited and non-accredited investors, pursuant to an effective registration statement under the Securities Act of 1933.

The Company has not established any minimum aggregate offering amount and this offering will remain open until the earlier of (i) the date on which the maximum offering amount is sold or (ii) the date that is 360 days following the commencement of the offering, unless earlier terminated by the Company in its sole discretion.

This approach is consistent with the Company's business model and capital structure. As previously disclosed, the Company operates as a passive IPR holding entity, with no employees, executive compensation, or fixed operating overhead. Its revenue is intended to be generated through the automated collection of royalties from its deployed and functional blockchain-based smart contract templates. These smart contracts have already been developed, tested, and deployed, and are capable of generating licensing income without reliance on future operational milestones.

Because the Company is capital-light and not dependent on external development, staffing, or infrastructure buildout, it is capable of continuing as a going concern regardless of the total amount of proceeds raised. Accordingly, the Company has not arranged for investor funds to be placed in an escrow, trust, or similar account, as there are no conditions precedent to closing that would warrant a contingency or escrow arrangement. Subscribed funds will be delivered directly to the Company upon acceptance of each investor's subscription.

Importantly, the Company does not maintain a pre-determined or fixed business plan. Instead, the Company has adopted a flexible, capital-responsive development approach, whereby the scope, timing, and scale of any prospective business development or partnership strategies will be determined based on the actual amount of capital raised in the offering. Should the capital raised be substantial, the Company may pursue more expansive initiatives; if proceeds are modest, it will implement a correspondingly smaller or phased strategy. This proportional planning model allows the Company to maintain operational integrity and fiscal discipline under varying capital scenarios.

Investors are accordingly advised that the Company's ability to pursue business development activities-such as licensing arrangements, marketing outreach, or partnership programs-will depend on the final offering proceeds. While the Company intends to deploy funds prudently to maximize long-term value, there can be no assurance that the amount raised will be sufficient to fund all envisioned initiatives. A smaller-than-expected raise may result in the deferral, modification, or reduction of certain strategic plans, which could affect the timing and magnitude of potential returns.

---

| |
|:---|
| 37 |
| *[**Table of Contents**](#Toc)* |

---

#### 9 DILUTION
&nbsp;&nbsp;&nbsp;&nbsp; As per the Operating Agreement, members shall enjoy their voting rights based on the aggregate Voting Points of their Shares and may claim profits distribution or residual assets of the Company based on the aggregate Distribution Points of their Shares as well.

To date, the Company has issued the following Class A Shares and Class B Shares to the Founding Member. In addition to the Royalty Interests, the Founding Member has made a capital contribution in ETH and USDC equivalent to $7,500.00:

---

| | | | |
|:---|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Certificate No.**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number of Shares**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3000000000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Par Value per Share**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Par Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $250000.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $50000.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $300000.00  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Paid Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $7500.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $7500.00  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voting Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4,000 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Voting Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100000000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100500000000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Distribution Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3000000000  |

---

Due to: (i) there are no similar DApps available in the market; (ii) ComBoox was developed solely by the Founding Member; and (iii) it has not generated material revenue, it is difficult to recognize the Royalty Interests value when the Founding Member contributed it to exchange for the Initial Shares. Thus, the value of Royalty Interests will be deferred recognition until a reliable valuation report is created based on the actual revenue of the Company after it has legally publicly issued its equity Shares and CBP, and received material revenue for more than one year.

Once the value of the Royalty Interests is recognized, it shall be booked in the account of "Intangible Assets" on the debit side, and in the account of "Paid In Capital" on the credit side, as paid in capital contributed by the Founding Member. If it is greater than the unpaid subscription amount of the Initial Shares, the Company shall further issue such number of new Class B Shares whose Paid Value and Par Value are all equal to the excess amount; or, if it is less than the unpaid subscription amount of the Initial Shares, the Founding Member may, at its discretion: (i) pay the outstanding amount in ETH or USDC; or (ii) cause the Company to decrease the excess amount of Initial Shares in the order of Class B to Class A.

---

| |
|:---|
| 38 |
| *[**Table of Contents**](#Toc)* |

---

Prior to the recognition of the Royalty Interests value, the Company shall NOT distribute any profits or assets to members and the Voting Points and Distribution Points of all Shares shall be calculated on the basis of their Par Value, whether or not the Shares are paid up.

If you purchase Class B Shares in the Offering, your interest will be diluted to the extent of the difference between the initial public offering price and the pro forma as adjusted Equity Entitlement per Share of Class B immediately after the Offering.

Equity Entitlement per Share of Class B is determined by allocating our total Paid In Capital in proportion to the Distribution Points of Class B Shares outstanding.

Dilution per Dollar Par Value of Class B Shares to investors participating in the Offering represents the difference between the per Dollar Par Value price paid by purchasers in the Offering and the pro forma as adjusted Equity Entitlement per Dollar Par Value of Class B immediately after completion of the Offering.

If all the Offered Shares are sold in the offering at an initial public offering price of $0.0001 per share, our pro forma as adjusted Equity Entitlement as of June 20, 2025 would have been $278,386.70. This represents an immediate increase in Equity Entitlement to Founding Member and immediate dilution in Equity Entitlement to purchasers of shares in the Offering. The following table illustrates the foregoing calculations.

---

| | |
|:---|:---|
|  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Per Dollar Par Value of Class B**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IPO price**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $1.0000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Equity Entitlement before IPO**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Equity Entitlement after IPO**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.9280  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dilution to Investors of IPO**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0720  |

---

---

| |
|:---|
| 39 |
| *[**Table of Contents**](#Toc)* |

---

---

| | | | | | |
|:---|:---|:---|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Shareholder**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Founding Member**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Founding Member**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Founding Member**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Investors Of IPO**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; All Members**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sub-Total  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number of Shares**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3000000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37600000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 40600000000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Par Value per Share**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0001  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Par Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $250000.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $50000.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $300000.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $3760000.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $4060000.00  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voting Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4000 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Voting Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100000000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37600000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 138100000000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voting Points Ratio**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 72.41%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.36%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 72.77%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 27.23%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100%  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Distribution Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3000000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37600000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 40600000000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution Points Ratio**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.16%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.23%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.39%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 92.61%  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100%  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Paid In ETH/USDC**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $7500.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $7500.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $3760000.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $3767500.00  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Equity Entitlement before IPO**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $6250.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $1250.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $7500.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.00  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $7500.00  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Equity Entitlement before IPO <br> per Dollar Par Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0250  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.0250  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Equity Entitlement after IPO**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $231988.92  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $46397.78  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $278386.70  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $3489113.30  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $3767500.00  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Equity Entitlement after IPO<br> per Dollar Par Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.9280  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.9280  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.9280  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.9280  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0.9280  |

---

---

| |
|:---|
| 40 |
| *[**Table of Contents**](#Toc)* |

---

#### 10 THE COMPANY'S BUSINESS
The Company is a Wyoming limited liability company electing to be a DAO pursuant to the Act and the Supplement, formed on November 8, 2023. We are engaged in the business of acquiring, holding, and commercializing the IPR related to the ComBoox Platform-a block chain-based infrastructure for automating corporate record keeping and governance through smart contracts.

**10.1. ComBoox Platform**

Human civilization has entered the 21st century. Most wealth exists in the form of book-entry interests. To regulate these wealth and their trading activities, various laws, charters and contracts are established, and different centralized intermediaries are involved. However, in case these laws, charters or contracts are violated, people can only rely on judicial remedies, which are proven to be costly and time-consuming.

The emergence of block chain technology offers a new solution. That is, to define the rules and terms in smart contracts, and use the distributed systems to automatically keep the book-entry records. By implementing the basic concepts of "Code Is Law" and "Decentralization", the terms and conditions defined by legal documents can be implemented by rigid code, and the human management of centralized intermediaries can be replaced by consensus protocols and smart contracts with automated operation.

This establishes an automated mode of asset bookkeeping and transaction management in which owners can directly manage and dispose their assets without relying on any intermediaries or counter parties.

Among the book-entry interests, except for deposit currency, company equity is probably the most important and critical category. The company is the carrier of various assets and also the investment target of capital. Its external legal acts are the main components of modern commercial activities, while its internal governance involves the rights and interests of many investors. Therefore, company equity is the critical joint linking the capital and assets, commercial activities and corporate governance.

---

| |
|:---|
| 41 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) right holders may directly exercise their rights;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) obligors have no chance to default or violate; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) real time full disclosure of each legal acts.

From a legal and technical perspective, the ComBoox Platform replaces ex post judicial remedies with ex ante consensus on smart contracts. By embedding legal logic into smart contracts-aligned with the principles of "Code is Law" and "Decentralization"-ComBoox reduces reliance on human intermediaries and judicial enforcement. Every digital act leaves a verifiable, immutable record, thereby enabling real-time compliance and disclosure.

Among the book-entry interests, except for currency, company equity is probably the most important and critical category. A company is both the carrier of various assets and also the investment target of capital. Its external legal behaviour is the core component of modern commercial activities, while its internal governance activities involve the rights and interests of many investors. Therefore, company equity is the critical node linking the capital and assets, commercial activities and corporate governance. ComBoox enables these relationships to be governed transparently and consistently, while reducing the risks of insider control, misrepresentation, and transactional disputes that have historically challenged capital markets.

All source code for the ComBoox Templates and user interface scripts is publicly available on GitHub, and all deployed smart contracts can be verified via Arbiscan. Testing scripts are also published on GitHub, enabling any user to reproduce, audit, and independently verify the behavior and legal logic of the system. This commitment to transparency ensures that users can fully understand the functionality and compliance characteristics of the smart contracts they rely on.

**10.2. CBP and its Function**

CBP is an ERC-20 non-redeemable utility token issued by the Company and recorded in Registration Center. It is not intended to represent equity, voting, or ownership interest in the Company, nor does it entitle holders to share in profits, participate in governance, or receive distributions upon the liquidation, sale, or merger of the Company.

CBP serves a singular functional purpose: it is used to measure and collect royalties for using the Templates. Each time when a user calls specific function of the clone copies of Templates, an amount of CBP will be automatically transferred from the user to the account of the Template owner. The royalty rate is predefined by the original author in the respective Template, and the beneficiary rights can be transferred on-chain to any other party.

Users may acquire CBP through the following methods:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Automated Rewards**: New users are awarded a small quantity of CBP as part of the registration process.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Purchase with USDC**: Users may acquire CBP by calling the Fuel Tank smart contract, which internally triggers the Cashier to collect the accompanying USDC payment. The exchange rate between CBP and USDC is determined and may be adjusted by the Company pursuant to an Ordinary Resolution adopted by the General Meeting through a public vote.

---

| |
|:---|
| 42 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Transfers or Gifts**: Users may also receive CBP from third parties via standard ERC-20 wallet transfers.

![](comboox_s1img2.jpg)

CBP operates within the platform as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Minting**: CBP is minted by the Company through the Registration Center smart contract.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Deployment**: Minted CBP is deposited into the Fuel Tank smart contract for sale to users.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Acquisition**: Users obtain CBP via purchase, reward, or third-party transfers.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Usage**: CBP is automatically deducted and transferred to Template owners when users call clone contracts.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Burning**: CBP may be burned voluntarily by users or by the Company pursuant to an ordinary resolution.

---

| |
|:---|
| 43 |
| *[**Table of Contents**](#Toc)* |

---

The Company does not commit to redeem CBP for fiat currency, digital assets, or services. All Templates are provided on an "As Is" basis and do not include any commitment by the Company for upgrades, maintenance, or support.

CBP is freely transferable between wallets and is not subject to any contractual or technical transfer restrictions. Users may sell, gift, or burn CBP at their discretion. CBP is divisible to 18 decimal places (i.e., the smallest unit is 10<sup>-18</sup> CBP), consistent with the ERC-20 standard, allowing for fractional use.

While CBP currently functions solely as a royalty payment mechanism, the Company may in the future consider using CBP holders' non-binding voting results-collected through off-chain governance tools-as a reference when determining whether to include a proposed smart contract into the ComBoox Template library. However, such votes will carry no legal effect and shall not bind the Company in any respect.

CBP confers no voting rights, ownership interest, equity participation, or residual claims against the Company. Holders are not entitled to any proceeds in the event of liquidation, merger, or sale of the Company. Because the operation and royalty rates of each Template are permanently encoded upon deployment to the blockchain, and remain functional in a decentralized and immutable manner, the rights of CBP holders are unaffected by changes in Company control or corporate structure.

 **10.3. Principal Products and Services** 

The Founding Member, currently as the sole developer of ComBoox, has invested the following rights and interests into the Company as capital contribution:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the beneficiary right to collect royalties of the Templates within the territory of Arbitrum One;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the beneficial right to collect commission of ComBoox Platform; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) the exclusive right to mint CBP.

Therefore, the Company has the right to collect the following passive income in CBP as revenue: (1) royalties for the use of Templates; and (2) commission splitting from the payment of royalties.

The Company's business model is designed to generate passive, on-chain income through rights associated with the ComBoox Platform. The Company has no employees, does not actively provide operational services; rather, it passively earns income through smart contract-defined mechanisms embedded in the platform.

**10.4. Owner's rights to Registration Center**

In exchange of the Initial Shares, the Founding Member transferred to the Company the owner's rights to Registration Center as part of his capital contribution. From both legal and technical perspectives, the "owner's right to the Registration Center" encompasses two exclusive rights:

---

| |
|:---|
| 44 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) The minting right of CBP; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) The beneficial right to receive a share of commission derived from third-party royalty income.

The term "minting right of CBP" refers specifically to the exclusive authority to invoke a designated function within the Registration Center smart contract that creates and assigns a specified quantity of CBP to a recipient's blockchain address.

In the Arbitrum One blockchain network, both externally owned accounts ("**EOAs**") and contract accounts ("**CAs**") are uniquely identified by their respective Ethereum addresses. These addresses are essential for identity verification and access control within smart contracts. To enforce the exclusivity of the owner's rights, the Registration Center includes a dedicated variable to store the owner's address. Each time a protected function (such as minting CBP or transferring ownership) is called, the smart contract first checks whether the message sender's address matches the stored owner address. If the verification succeeds, the function proceeds; otherwise, execution is halted.

At deployment, the Registration Center was initialized with the EOA address of the Founding Member as the owner. Upon completion of the Company's book-entry system-including the deployment of the General Keeper smart contract (which represents the Company as a legal entity on the ComBoox system)-the Founding Member exercised his authority to transfer ownership. He did so by invoking the ownership transfer function, thereby updating the stored owner address to that of the General Keeper's contract address.

Importantly, all dynamic actions initiated by the General Keeper must be based on a prior resolution duly adopted by the General Meeting. As the General Keeper does not contain a predefined function for the subsequent transfer of ownership of the Registration Center, any such future transfer would require the General Meeting to adopt a resolution expressly authorizing the full transaction payload. This ensures that any future change in ownership can only be executed pursuant to a formal, member-approved resolution via public vote.

In summary, ownership of the Registration Center was transferred from the Founding Member to the Company during the initial configuration of the book-entry system. Given that the CBP minting right and the right to receive commission are core corporate rights and assets, the Company does not anticipate transferring these rights to any third party.

**10.5. Liabilities**

We will take all measures possible to keep the Company away from assuming or incurring any liabilities. Therefore, the Company will not borrow any loan or enter into any contracts that may incur payable liabilities. No employees will be hired, and no managers or members will be paid for remuneration either. In case the Company intends to hire any experts or to buy any services, it shall be arranged in a prepaid mode. The Company will not redeem any Shares it issued, and has no obligation to redeem any CBP it minted or sold.

---

| |
|:---|
| 45 |
| *[**Table of Contents**](#Toc)* |

---

**10.6. No Bank Accounts and Payment Mechanism**

All payments of the Company will be made in ETH or USDC though General Keeper subject to a prior approval of members by Ordinary Resolution.

To mitigate the risk of insider misuse of the Company's assets and to ensure that all expenditures are subject to transparent, member-approved governance, the Company has adopted a strict on-chain asset policy as set forth in the Operating Agreement. Specifically, the Operating Agreement provides that all assets of the Company must be held on-chain, meaning they must be directly or indirectly controlled by smart contracts.

As a result, the Company does not maintain any off-chain bank accounts and will not make payments in fiat currency. All payments by the Company must be made in ETH or USDC through smart contracts. This policy applies universally, including to payments for government fees (such as annual Wyoming LLC fees), services rendered by the Company's registered agent, and legal, accounting, or other professional services.

The Company believes that with the increasing acceptance and regulatory recognition of stable coins, such as USDC, more service providers will accept on-chain assets as payment. However, recognizing that this transition is still ongoing, the Company has implemented a prepay-and-reimburse workaround to address circumstances where fiat payments are required.

To handle fiat obligations while maintaining its on-chain-only asset policy, the Company has established the following process:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Approval**: The underlying agreement requiring payment (e.g., for legal fees, state filing fees) is first submitted to the General Meeting and must be approved by a vote of the members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Advance Payment**: A designated member or the manager is authorized to make the fiat payment directly to the service provider or third party.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Reimbursement Proposal**: The member or manager then submits a reimbursement proposal to the General Meeting, specifying the fiat amount paid and requesting reimbursement in USDC.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Reimbursement Approval**: The proposal is subject to member approval by public vote.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Execution**: Upon approval, the authorized member or manager inputs the specific motion ID into the smart contract system to request reimbursement.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) **Smart Contract Settlement**: The smart contract verifies the approved motion and automatically transfers the specified amount of USDC from the Company's treasury (i.e. the smart contract Cashier) to the designated wallet address of the payor. This process ensures that no fiat currency is held by the Company itself, and that all financial activity is conducted transparently on-chain, subject to members' governance. However, if no member or manager is willing to advance fiat currency payments, the Company may face operational delays or service disruptions.

---

| |
|:---|
| 46 |
| *[**Table of Contents**](#Toc)* |

---

**10.7. Transparency, Automation, and On-Chain Corporate Governance**

In accordance with Section 17-31-109 of the Supplement, management of a DAO "shall be vested in its members or the members and any applicable smart contracts". To comply with this statutory framework, the Company's Operating Agreement includes the following governance provisions:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Decision-Making Authority**: The General Meeting, comprising all members, is the sole decision-making body of the Company (OA §9.1.1).

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Managerial Powers**: Managers do not hold decision-making authority. They are limited to executing administrative, commercial, or technical functions as explicitly authorized by the OA or approved by the General Meeting (OA §10.4.1).

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Officer Appointments**: The inauguration or impeachment of any manager shall become effective only upon approval by the General Meeting through a public vote (OA §10.4.3).

&nbsp;&nbsp;&nbsp;&nbsp; (4) **Legal Acts**: All legal acts undertaken on behalf of the Company shall require prior approval by the General Meeting through a public vote (OA §9.1.1).

&nbsp;&nbsp;&nbsp;&nbsp; (5) **Legal Documents**: all off-chain legal documents become legally binding on the Company only upon the approval by the General Meeting though a public vote (OA §9.1.1);

&nbsp;&nbsp;&nbsp;&nbsp; (6) **Assets**: The Company's assets are limited to the on-chain assets that capable of being held, controlled, and disposed, directly or indirectly, by the smart contracts General Keeper or Cashier (OA §6.5).

To ensure practical implementation of the above provisions, the following commercial and technical measures have been adopted:

&nbsp;&nbsp;&nbsp;&nbsp; (1) **Passive Revenue Model**: The Company's revenue is derived from the automatic collection of intellectual property royalties for using the Templates of ComBoox. This passive model requires no active management;

&nbsp;&nbsp;&nbsp;&nbsp; (2) **No Traditional Banking**: The Company does not maintain a traditional bank account. It uses only USDC and ETH to procure services or reimburse expenses, eliminating the need for off-chain human intervention;

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Smart Contract - Based Resolutions**: All voting of members is conducted through a smart contract named "General Meeting Minutes," which automatically calculates outcomes and generates resolutions;

&nbsp;&nbsp;&nbsp;&nbsp; (4) **Manager Elections**: An individual may assume the role of manager (i.e. whose user number is recorded in the smart contract named "Register of Directors") only if the resolution quoted in the calling command can be retrieved from the General Meeting Minutes with the voting status as "passed";

---

| |
|:---|
| 47 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; (5) **Asset Transfers**: Transfers of ETH or USDC from the Company (i.e. from the smart contracts of General Keeper or Cashier) are permitted and feasible only if the resolution quoted in the calling command can be retrieved from the General Meeting Minutes with the voting status as "passed";

&nbsp;&nbsp;&nbsp;&nbsp; (6) **Legal Acts Execution**: any on-chain legal acts on behalf of the Company (i.e. calling commands sent from the smart contract of General Keeper) can be triggered only if the relevant resolution quoted can be retrieved from the General Meeting Minutes with the voting status as "passed".

For transparency and public accountability, the Company has implemented the following disclosure measures:

&nbsp;&nbsp;&nbsp;&nbsp; (1) **Source Code Publication**: All ComBoox platform smart contract source code is publicly accessible on GitHub;

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Testing Script Disclosure**: Complete test scripts for various scenarios are also disclosed on GitHub, enabling independent verification;

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Deployment Verification**: All deployed bytecode on the Arbitrum One blockchain is verified on the public explorer Arbiscan.io to confirm that it matches the disclosed source code.

In light of the above, the Company asserts its status as an "on-chain" company. Its governance and operations are executed exclusively via blockchain-based smart contracts, as specified in the OA. All material actions-including asset transfers, expenditures, managerial election, and operational changes-are subject to approval by members through on-chain voting.

Members holding more than 10% of the outstanding Voting Points may submit proposals to a General Meeting. A quorum is achieved when over 25% of Voting Points are cast on a motion.

Resolutions are classified as either Ordinary or Special. An Ordinary Resolution passes only if at least 75% of the Voting Points cast are in favor. A Special Resolution-required for significant matters such as amending governance provisions or replacing core smart contracts-requires at least four times as many votes in favor as against to be approved.

---

| |
|:---|
| 48 |
| *[**Table of Contents**](#Toc)* |

---

Managers act solely to implement decisions and manage operations as delegated by Resolutions and have no autonomous decision-making power.

**10.8. Markets and Distribution Model**

ComBoox is designed as a permissionless, blockchain-native platform intended to serve public companies, private entities, startups, and DAOs. It offers modular Templates for corporate registries, governance automation, and shareholder services via smart contracts deployed on the Arbitrum One network. Access is entirely decentralized-users interact directly with ComBoox smart contracts to create, manage, and operate their legal and financial structures.

The Company does not directly engage in marketing or sales of services. Instead, revenue is generated automatically via the use of ComBoox Templates, with smart contracts collecting CBP from users and directing those proceeds to the Royalty Interest holders of the relevant Templates.

**10.9. Development Stage and Technical Deployment**

The ComBoox Platform is fully operational and open-source. All smart Templates, testing scripts, and users interfaces have been published on GitHub. The Company's own equity records, governance framework, and financial systems are implemented exclusively through these smart contracts, demonstrating live usage.

No additional technical milestones are required for commercialization. However, the Company expects to develop community contributions, and potentially acquire new Templates subject to members approval and funding.

**10.10. Competitive Position and Differentiation**

To our knowledge, ComBoox is the first public platform offering fully on-chain smart contracts for equity and corporate governance management. While various software as a service tools and blockchain registries exist, no direct competitor currently offers the same degree of automation, decentralization, and legal integration through autonomous smart contracts. We expect to compete on the basis of technological innovation, transparency, automation, and cost-efficiency rather than through traditional customer relationships or service models.

**10.11. Customer Base and Revenue Sources**

The Company does not rely on any major customers. All revenues are derived from anonymous, permissionless use of the ComBoox Platform and collected via automated smart contracts. The nature of the system allows for a highly diversified and scalable user base. Accordingly, there is no customer concentration risk at this time.

**10.12. Intellectual Property and Royalties**

The Company holds exclusive royalty and commission interests in a defined set of Templates as well as minting and pricing rights to CBP within Arbitrum One blockchain network. These interests and rights were developed and contributed by the Founding Member. However, he retains the right to deploy ComBoox on other blockchains. The Company does not currently own any patents or registered trademarks but may acquire additional IPR from external developers if approved by members vote. The source code for all Templates is publicly available, but the royalty logic embedded in smart contracts ensures enforceable monetization.

---

| |
|:---|
| 49 |
| *[**Table of Contents**](#Toc)* |

---

**10.13. Regulatory Environment and Legal Compliance**

The ComBoox Platform is a set of smart contract tools. It can be used by listed companies or private entities, subject to the discretion and compliance responsibilities of each user. The Company does not provide legal advice, governance services, or regulatory compliance on behalf of any platform user.

As the IPR holder and a passive royalty recipient, the Company is not responsible for how users adopt or apply the Templates. Our own regulatory obligations are limited to securities compliance as a public issuer and our pending registration as a transfer agent for our own shares. We maintain automated on-chain recordkeeping and voting to ensure transparency and support for federal disclosure requirements.

We acknowledge that blockchain-based business models exist within a developing legal framework and will continue to monitor and comply with applicable U.S. securities regulations, including the Securities Exchange Act of 1934.

**10.14. Government Approvals**

There are no government licenses or approvals currently required for operation of the ComBoox Platform. However, our offering and any secondary market trading will be subject to SEC registration. The Company intends to pursue SEC registration as its own transfer agent in connection with its on-chain share issuance and trading mechanisms.

**10.15. Employees**

To date, the Company had no employees. We do not intend to hire employees and seek to operate, to the extent permitted by applicable law, as a passive intellectual property holding entity with no active business operations. All material business decisions are made collectively by the Company's members through smart contract-enabled voting processes in accordance with the Operating Agreement.

Any execution of approved resolutions will be carried out by an authorized member or designated manager acting without remuneration. In the event that legal, accounting, audit, tax, or similar administrative functions are required to maintain the Company's legal status or regulatory compliance, the General Meeting of members may consider and approve specific motions authorizing the necessary budget and prepayment for such services.

---

| |
|:---|
| 50 |
| *[**Table of Contents**](#Toc)* |

---

**10.16. Facilities**

As an on-chain company, we do not have and have no intents to acquire or lease any facilities for the Company.

**10.17. Legal Proceeding**

We are not currently a party to any material legal proceedings.

**10.18. Feasibility of Bring Legal Action Against Foreign Managers**

The Company believes that its unique smart contract-based governance architecture and legal-operational model may essentially minimize risks commonly associated with managerial misconduct, insider control, misrepresentation or insider trading. In response to the concerns on feasibility of bring legal actions against foreign managers, the Company respectfully provides the following disclosure regarding the enforceability of civil liabilities under U.S. Federal securities laws against managers residing in foreign jurisdictions, particularly China. This section also discusses investors' ability to effect service of process and enforce judgments or initiate original actions based on U.S. law in foreign jurisdictions.

Key points are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) The Company's managers have no discretionary power or direct access to assets, preventing exposure to conventional liability;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Service of process on managers located in China is permitted under the Hague Service Convention;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Enforcement of U.S. judgments in China is not assured and depends on reciprocity and public policy review; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Chinese courts generally do not apply U.S. securities laws in original actions due to sovereignty and legal doctrine.

 **10.18.1. Overview of Governance and Legal Architecture**

The core concept of ComBoox is to utilize transparent, tamper-resistant blockchain to maintain book-entry records of equity, rights, interests, financial data, and governance documents, and to employ smart contracts to automatically control and execute legal acts. This approach empowers right holders to exercise their entitlements directly, eliminates opportunities for obligors to default, and ultimately exclude moral hazard arising from human intervention. In doing so, it aims to replace the inefficient and costly reliance on ex-post judicial remedies with ex-ante consensus on predefined smart contracts.

---

| |
|:---|
| 51 |
| *[**Table of Contents**](#Toc)* |

---

The Company's governance and legal architecture is specifically designed to eliminate risks associated with insider control, including unauthorized asset transfers, decision-making abuse, or manipulation of financial or governance disclosures. By embedding decision-making processes in transparent, automated, and immutable smart contracts, the Company excludes the potential for discretionary misuse of authority and enhances investor protection.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(1) Company Assets are Fully On-Chain and Technically Restricted**

Company assets are held solely through smart contracts deployed on public blockchain networks. No manager holds keys or has technical capacity to unilaterally transfer or dispose of assets. All asset dispositions require a public vote of the General Meeting, transparently recorded and executed on-chain.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(2) Off-Chain Legal Acts Require On-Chain Member Approval**

The Operating Agreement explicitly bars managers from binding the Company to any off-chain contracts unless approved by a public member vote. This precondition eliminates unauthorized corporate representations and significantly limits exposure to liability for misstatements or fiduciary breaches.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(3) Governance and Legal Acts are Fully Disclosed On-Chain in Real Time**

Legal acts and corporate decisions are executed and disclosed simultaneously via smart contracts. There is no lag between decision-making and public disclosure, preventing claims related to delayed filings, omissions, or misrepresentations.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(4) Insider Information Misuse is Technically Prevented**

All proposals must undergo a public review period before voting and execution. This precludes managers from accessing or using material non-public information for personal gain, structurally mitigating insider trading risks.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(5) Managers Have No Discretionary Authority**

Managers perform only technical and administrative functions in accordance with member-approved instructions. This absence of discretionary authority precludes liability from independent decision-making or misconduct.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(6) Managers has NO Remuneration**

Under the Operating Agreement, managers receive no remuneration from the Company. There is no opportunity for excessive compensation claims.

---

| |
|:---|
| 52 |
| *[**Table of Contents**](#Toc)* |

---

 **10.18.2. Service of Process in the United States** 

Service of process on Company managers located in China may be effected under *the Convention on the Service Abroad of Judicial and Extrajudicial Documents in Civil or Commercial Matters* ("**Hague Service Convention**"). Both China and the United States are contracting states. Service procedure are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) U.S. court prepares judicial documents in English and provides certified Chinese translations.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Documents are submitted to the Chinese Central Authority: Department of Judicial Assistance and Foreign Affairs, Ministry of Justice of China (the "**Ministry**").

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) The Ministry reviews compliance and forwards to the competent Intermediate People's Court (the "**Local Court**").

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) The Local Court executes service and returns proof via official channels.

This process complies with Chinese domestic law and ensures the enforceability of the service within China.

 **10.18.3. Enforcement of U.S. Judgments in China**

Chinese law does not automatically recognize U.S. court judgments. Enforcement is governed by the Civil Procedure Law of China and is subject to:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Reciprocity**: Chinese courts require evidence that U.S. courts recognize Chinese judgments. To date, this reciprocity remains limited and uncertain.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Public Policy Compliance**: Judgments must not contravene Chinese legal principles or harm national interests.

Enforcement process are generally as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Application to Intermediate People's Court in the jurisdiction of the manager's residence or assets.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Submission of notarized judgment, certificate of finality, certified translations, and evidence of reciprocity.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Court reviews for procedural validity, jurisdictional conflicts, and public policy violations.

Chinese courts have historically been reluctant to enforce U.S. judgments, particularly those involving punitive damages, class actions, or regulatory penalties. Thus, enforceability of U.S. securities law judgments in China remains highly limited.

---

| |
|:---|
| 53 |
| *[**Table of Contents**](#Toc)* |

---

**10.18.4. Bringing Original Actions in Chinese Courts Based on U.S. Securities Laws**

Chinese courts generally do not allow the extraterritorial application of foreign public laws, including U.S. securities laws. According to Supreme People's Court guidance, foreign regulatory statutes are not enforceable in Chinese judicial proceedings.

Factors preventing such actions include:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Public Law Classification**: U.S. securities laws are deemed regulatory/punitive and not suitable for private enforcement under Chinese civil procedure.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Sovereignty Concerns**: Allowing enforcement of foreign securities laws may undermine Chinese jurisdiction over domestic financial regulation.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Public Policy Barriers**: Chinese courts apply strict scrutiny to foreign claims to avoid conflict with domestic legal and political interests.

Accordingly, investors are unlikely to succeed in bringing original actions in China based on U.S. securities laws. This limitation reflects China's broader policy of judicial non-recognition of extraterritorial regulatory enforcement.

 **10.19. Implications of Being an Emerging Growth Company**

We are and we will remain an "emerging growth company" as defined under The Jumpstart Our Business Startups Act, or the JOBS Act, until the earliest to occur of (i) the last day of the fiscal year during which our total annual revenues equal or exceed $1.07 billion, (ii) the last day of the fiscal year following the fifth anniversary of our initial public offering, (iii) the date on which we have, during the previous three-year period, issued more than $1 billion in non-convertible debt securities, or (iv) the date on which we are deemed a "large accelerated filer" (with at least $700 million in public float) under the Exchange Act.

As an "emerging growth company", we may take advantage of specified reduced disclosure and other requirements that are otherwise applicable generally to public companies. These provisions include:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) preliminary omission financial information relates to a historical period that we reasonably believe will not be required to be included in this Form at the time of the contemplated offering;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) only two years of audited financial statements in addition to any required unaudited interim financial statements with correspondingly reduced "Management's Discussion and Analysis" disclosure;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) reduced disclosure about our executive compensation arrangements;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) no requirement that we hold non-binding advisory votes on executive compensation or golden parachute arrangements; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) exemption from the auditor attestation requirement in the assessment of our internal control over financial reporting.

We have taken advantage of some of these reduced burdens, and thus the information we provide you may be different from what you might receive from other public companies in which you hold securities.

---

| |
|:---|
| 54 |
| *[**Table of Contents**](#Toc)* |

---

In addition, Section 107 of the JOBS Act also provides that an emerging growth company can take advantage of the extended transition period provided in Section 7(a)(2)(B) of the Securities Act for complying with new or revised accounting standards. In other words, an emerging growth company can delay the adoption of certain accounting standards until those standards would otherwise apply to private companies.

Notwithstanding the above, we are also currently a "smaller reporting company," meaning that we are not an investment company, an asset-backed issuer, or a majority-owned subsidiary of a parent company that is not a smaller reporting company and that had a public float of less than $250 million or annual revenues of less than $100 million during the most recently completed fiscal year. In the event that we are still considered a smaller reporting company, at such time as we cease being an emerging growth company, the disclosure we will be required to provide in our SEC filings will increase, but it will still be less than it would be if we were not considered either an emerging growth company or a smaller reporting company. Specifically, similar to emerging growth companies, smaller reporting companies are able to provide simplified executive compensation disclosures in their filings; are exempt from the provisions of Section 404(b) of the Sarbanes-Oxley Act requiring that independent registered public accounting firms provide an attestation report on the effectiveness of internal control over financial reporting; and have certain other decreased disclosure obligations in their SEC filings, including, among other things, only being required to provide two years of audited financial statements in annual reports.

 **10.20. Information Required by Item 101(h)(5) of Regulation S-K** 

The following information is required by Item 101(h)(5) of Regulation S-K, and is recommended to be read together with the more detailed disclosure in the section "10 THE COMPANY'S BUSINESS" of this prospectus.

&nbsp;&nbsp;&nbsp;&nbsp; (1) Principal Products and Services

The Company's principal product is the IPR related to the ComBoox Platform, a blockchain-based system for corporate recordkeeping and governance through smart contracts. The Company also issues CBP, a utility token used solely as a royalty payment mechanism for Template smart contracts. Therefore, the Company has the right to collect the following passive income in CBP as revenue: (1) royalties for the use of Templates; and (2) commission splitting from the payment of royalties.

See Section 10.1 - ComBoox Platform, Section 10.2 - CBP and its Function, and Section 10.3 - Principal Products and Services.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Methods of Distribution

The ComBoox Platform is distributed in a decentralized, permissionless manner through deployment on the Arbitrum One blockchain. Users access Templates directly by interacting with smart contracts. The Company does not operate sales or marketing channels; all usage and royalty payments are collected automatically on-chain.

See Section 10.8 - Markets and Distribution Model

---

| |
|:---|
| 55 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Status of Publicly Announced New Products or Services

The ComBoox Platform is fully deployed, operational, and open-source. No new products or services have been publicly announced that remain in development. Future Templates may be proposed by community developers and adopted through member approval, but no such proposals are pending at this time.

See Section 10.9 - Development Stage and Technical Deployment.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Competitive Business Conditions and Position

To the Company's knowledge, ComBoox is the first publicly available on-chain smart contract system that integrates equity recordkeeping and governance automation. Competition includes centralized SaaS platforms and other blockchain governance tools. The Company competes primarily on automation, decentralization, transparency, and cost efficiency.

See Section 10.10 - Competitive Position and Differentiation.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Sources and Availability of Raw Materials

The Company does not rely on physical raw materials. Its operations depend on blockchain infrastructure (primarily the Arbitrum One network), which is publicly available and maintained by independent third parties.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Importance of Patents, Trademarks, Licenses, Franchises, and Concessions

The Company does not currently own patents or trademarks. Its intellectual property rights consist of smart contract royalty and commission interests and exclusive CBP minting rights within Arbitrum One. These rights were contributed by the Founding Member.

See Section 10.12 - Intellectual Property and Royalties.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) Seasonality of the Business

The Company's business is not seasonal. Usage of the ComBoox Platform and associated royalty income may fluctuate with overall blockchain activity and corporate governance trends, but no material seasonal effects are expected.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) Practices Regarding Working Capital

The Company does not maintain conventional working capital accounts. We will take all measures possible to keep the Company away from assuming or incurring any liabilities. All assets are held on-chain in ETH or USDC and disbursed only pursuant to member-approved resolutions. The Company's revenue is collected automatically in CBP, which may be converted to USDC through smart contracts. All payments by the Company must be made in ETH or USDC through smart contracts.

See Section 10.5 - Liabilities, and Section 10.6 - No Bank Accounts and Payment Mechanism.

---

| |
|:---|
| 56 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) Dependence on Major Customers

The Company does not depend on any single customer or small group of customers. All revenues are generated automatically from permissionless usage of ComBoox Templates by a diversified, anonymous user base.

See Section 10.11 - Customer Base and Revenue Sources.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) Backlog of Orders

The Company has no backlog orders. Revenue is earned automatically and immediately upon the use of ComBoox Templates.

See Section 10.11 - Customer Base and Revenue Sources.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (11) Government Contracts

The Company is not a party to any government contracts.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (12) Number of Employees

The Company currently has no employees and does not intend to hire employees. All governance, operational, and technical functions are executed automatically through smart contracts or pursuant to member-approved resolutions.

See Section 10.15 - Employees.

---

| |
|:---|
| 57 |
| *[**Table of Contents**](#Toc)* |

---

11. PRINCIPAL AND SELLING SECURITYHOLDERS

&nbsp;&nbsp;&nbsp;&nbsp; As long as permitted by law, we will not engage any underwriter or dealer for the Offering. Moreover, as the only shareholder, the Founding Member will not sell any of his Shares in the Offering. On the contrary, the Founding Member voluntarily locks up the Initial Shares till June 30, 2027. Therefore, all proceeds of issuance will be received by the Company.

#### &nbsp;&nbsp;&nbsp;&nbsp; 12 MANAGEMENT'S DISCUSSION AND ANALYSIS OF FINANCIAL CONDITION AND RESULTS OF OPERATIONS
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *You should read the following discussion and analysis of our financial condition and results of operations together with our financial statements included elsewhere in this prospectus. This discussion and other parts of this prospectus contain forward-looking statements that involve risk and uncertainties, such as statements of our plans, objectives, expectations and intentions. See "Cautionary Statement Regarding Forward-Looking Statements". Our actual results could differ materially from those discussed in these forward-looking statements. Factors that could cause or contribute to such differences include, but are not limited to, those discussed in the section of this prospectus entitled "Risk Factors."* 

---

| |
|:---|
| 58 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp; 12.1 Overview
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We are engaged in the business of acquiring, holding, and commercializing the IPR related to the ComBoox Platform-a block chain-based infrastructure for automating corporate record keeping and governance through smart contracts. We are founded as a Wyoming limited liability company electing to be a DAO on November 8, 2023.

We are not responsible for developing, testing, auditing, or maintenance of any of the Template Smart Contracts of ComBoox. Users are licensed to use the Template Smart Contracts as well as ComBoox on an "AS IS" basis.

#### &nbsp;&nbsp;&nbsp;&nbsp; 12.2. Result of Operations
&nbsp;&nbsp;&nbsp;&nbsp; Our operations to date have been limited. We were incorporated in November, 2023. Other than the Royalty Interests invested by Founding Member as contribution, and the deferred revenue incurred during the configuration process of the Platform and the book-entry system of the Company, we have no other assets or liabilities. We have no employees and do not intend to hire any employees.

#### &nbsp;&nbsp;&nbsp;&nbsp; 12.3 Liquidity and Capital Resources
&nbsp;&nbsp;&nbsp;&nbsp; To date, we have no resources for liquidity or working capital. We are not committed to any capital expenditures. We expect that, after the closing of the offering, the net proceeds from the offering will be sufficient to cover our operating expenses, including compliance and other administrative functions.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current versions of the Template Smart Contracts have fully covered the anticipated functions that a company may need to book their equity shares or corporate governance records. Therefore, even if the offering proceeds are not so sufficient as expected, our business will still be able to operate and develop independently. Therefore, at present, we do not have further financing plan after the Offering.

&nbsp;&nbsp;&nbsp;&nbsp; As an alternative solution, we may issue new Shares to exchange for new Template Smart Contracts, promotion services or professional services. It will result in dilution of our existing shareholders. However, as per the Operating Agreement of the Company, any capital increase shall be subject to a prior approval of members by Special Resolution.

#### &nbsp;&nbsp;&nbsp;&nbsp; 12.4 Significant Accounting Policies
&nbsp;&nbsp;&nbsp;&nbsp; The Company is engaged in the business of acquiring, holding the IPR and collecting royalties generating therefrom. In regard of accounting records and accounting policies, we have the following special character:

---

| |
|:---|
| 59 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; (1) **No Cash or Off-Chain Assets:**

As the first company registered on ComBoox and a true DAO, the Company will not open traditional bank accounts or hold off-chain assets. This ensures that all economic interests are directly controlled and disposed of by the Company in accordance with the voting decisions of its members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **ETH and USDC as General Equivalence:**

The Company adopts ETH and USDC as its primary payment instruments and value carrier. In other words, the Company treats ETH and USDC as special "general equivalents" for exchanging value with other entities or members. Therefore, the Company has prepared an Cryptos Flow Statement to describe the inflow and outflow of economic interest.

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Utility Token:**

&nbsp;&nbsp;&nbsp;&nbsp; (4) **Deferred Revenue:** 

The Company sells CBP to users in exchange for ETH via Fuel Tank at a ExRate. As a promotional measure, a certain amount of CBP is minted and granted to newly registered users as "prepaid vouchers." All CBP minted or transferred to other entities is booked as "deferred revenue" of the Company and is subsequently written off against the royalty income collected.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Deferred Recognition Value of Royalty Interests**:

Due to the following factors: (i) there are no similar decentralized applications (DApps) available on the market; (ii) ComBoox was solely developed by the sole Founding Member; and (iii) it has not yet generated material revenue, it is difficult to recognize the value of Royalty Interests when the Founding Member contributes it in exchange for the initial capital. Therefore, the value of the Royalty Interests will be recognized and amortized only after the Company has legally and publicly issued its equity shares and CBP and has generated material revenue for more than one year.

&nbsp;&nbsp;&nbsp;&nbsp; (6) **Unpaid Subscription of Initial Shares:**

&nbsp;&nbsp;&nbsp;&nbsp; Corresponding to the deferred recognition of the Royalty Interests value, when the Initial Shares is issued to the Founding Member, it will be booked with the same amount ($300,000.00) simultaneously in Cr. Subscribed Capital and Dr. Unpaid Subscription. And, the latter will also be used to record and track the payable amount of the Initial Shares under the general account of "Owners Equity".

&nbsp;&nbsp;&nbsp;&nbsp; (7) **Smart Contract Events:**

All economic interests flowing into or out of the Company are automatically recorded in the relevant smart contracts as "events", which are publicly, immutably and permanently stored on block chain. These events can be accessed by client applications globally and in real time. The Company has developed specialized modules in the ComBoox web application to facilitate users in retrieving these events and converting them into human-readable financial reports. Additionally, other client applications can freely access these records.

---

| |
|:---|
| 60 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) **Real Time Reports**:

Stakeholders can access the above financial reports and accounting records by visiting the ComBoox website (https://comboox.vercel.app/app). The accounting records are updated at the same frequency as the blockchain itself, currently every second. This means that the balance sheet date and the financial reporting period can be set to the smallest possible time unit of one second.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) **ETH Price:**

The exchange rate between ETH and USD is provided on-chain by the ChainLink Price Feed service and off-chain by CoinGecko, both of which are automatically updated in seconds. This ensures that all on-chain transactions are executed at accurate ETH prices and that off-chain accounting records can be properly maintained in USD. Any currency exchange gains or losses are calculated based on the USD value difference between the ETH price at the transaction time and the ETH price at the reporting time.

#### &nbsp;&nbsp;&nbsp;&nbsp; 12.5.10 Off-Balance Sheet Arrangement
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; During the periods presented and as of the current date, we have not engaged in any off-balance sheet arrangements, as defined in the rules and regulations of the SEC.

#### &nbsp;&nbsp;&nbsp;&nbsp; 13 DIRECTORS, EXECUTIVE OFFICERS AND SIGNIFICANT EMPLOYEES
&nbsp;&nbsp;&nbsp;&nbsp; As per the Operating Agreement, the day-to-day operation of the Company will be managed by members though public on-chain voting. Some important issues need to be approved by Special Resolution, while, most of the daily affairs only need to be approved by Ordinary Resolution. The manager has no decision making power and will only be responsible for duties set out by the Operating Agreement, or executing resolutions of General Meeting.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Due to the facts that the Founding Member: (1) is the developer of ComBoox; (2) holds substantial ratio of Shares of the Company; and (3) has nomination right for the position of manager, he may be deemed has and will keep having significant influences to the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mr. Li Li is the Founding Member of the Company, who is 48 years old and a corporate, securitization & data compliance lawyer of China with 18+ years experiences. He earned his bachelor of economics in Nankai University and Juris Master in Peking University. He is a senior expert of Beijing FinTech Industry Alliance, holding two blockchain patent applications registered and granted by China Intellectual Property Office, and two blockchain patent applications registered with WIPO pursuant to the Patent Cooperation Treaty. He won the first prize in "2021 China Merchants Bank Blockchain Application Innovation Competition" for his "ABS Cash Flow Tracking System" developed on Hyperledger Fabric 2.0, and was awarded as "Best Contributor to the Smart Contract Library" by FISCO BCOS Community for his "Equity Shares Book-Entry System" developed in Solidity

---

| | | | | |
|:---|:---|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Position**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Age**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Term of Office (Start Date)**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Term of Office (End Date)**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Li Li <sup>\*</sup>**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Manager**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 48**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; June 11, 2024**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; December 31, 2026**  |

---

*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \* Domicile of Mr. Li Li: 34/F, 3rd Building, No. 77 Jianguo Road, Beijing, China* 

---

| |
|:---|
| 61 |
| *[**Table of Contents**](#Toc)* |

---

#### 14 COMPENSATION OF MANAGERS
&nbsp;&nbsp;&nbsp;&nbsp; In order for the Company to operate under the concept of DAO and to remain as a passive income entity, no remuneration will be paid to managers or members.

#### 15 CERTAIN RELATIONSHIPS AND RELATED TRANSACTIONS
On May 18, 2024, we entered into a Capital Contribution Agreement with our Founding Member, Mr. Li Li. Pursuant to this agreement, Mr. Li contributed all intellectual property rights related to the ComBoox Platform to the Company. In exchange, the Company issued to Mr. Li 2,500,000,000 Class A Shares and 500,000,000 Class B Shares. As a result, Mr. Li currently owns 100% of the Company's outstanding equity prior to this offering.

&nbsp;&nbsp;&nbsp;&nbsp; Mr. Li is our Founding Member and therefore a related party. The Capital Contribution Agreement is filed as Exhibit 10.1 to this Registration Statement.

---

| |
|:---|
| 62 |
| *[**Table of Contents**](#Toc)* |

---

#### 16 SECURITY OWNERSHIP OF CERTAIN BENEFICIAL OWNERS AND MANAGEMENT
&nbsp;&nbsp;&nbsp;&nbsp; In exchange of the Royalty Interests and CBP's Minting Right on Arbitrum One, the Company has issued 2,500,000,000 Class A Shares and 500,000,000 Class B Shares to Founding Member.

The following table sets forth the number, percentage and voting points of each class of shares beneficially owned as of September 30, 2025 and upon completion of this offering, by:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) each person known to us to beneficially own more than 5% of any of the shares; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) each of our managers.

As the sole Member and the only Manager, the Founding Member holds all the Shares before this offering.

---

| | | | | | | | | | | | | |
|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|
| **Name of Beneficial Owner** | **Prior to this offering** | **Prior to this offering** | **Prior to this offering** | **Prior to this offering** | **Prior to this offering** | **Prior to this offering** | **After to this offering** | **After to this offering** | **After to this offering** | **After to this offering** | **After to this offering** | **After to this offering** |
| **Name of Beneficial Owner** | **Class A** | **Class A** | **Class B** | **Class B** | **Voting Points** | **Voting Points** | **Class A** | **Class A** | **Class B** | **Class B** | **Voting Points** | **Voting Points** |
| **Name of Beneficial Owner** | **Shares** | **%** | **Shares** | **%** | **Number** | **%** | **Shares** | **%** | **Shares** | **%** | **Number** | **%** |
| **5% or Greater Shareholder:** | | | | | | | | | | | | |
| Li Li<sup>\*</sup> | 2500000000 | 100 | 500000000 | 100 | 100500000000 | 100 | 2500000000 | 100 | 500000000 | 1.31 | 100500000000 | 72.77 |
| **Managers:** |  |  |  |  |  |  |  |  |  |  |  |  |
| Li Li | 2500000000 | 100 | 500000000 | 100 | 100500000000 | 100 | 2500000000 | 100 | 500000000 | 1.31 | 100500000000 | 72.77 |

---

*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \* Domicile of Mr. Li Li: 34/F, 3rd Building, No. 77 Jianguo Road, Beijing, China* 

---

| |
|:---|
| 63 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp; 17 DESCRIPTION OF SECURITIES
**17.1. Attributes of Shares**

"**Share**" means a member's minimum unit of ownership interests and rights in the Company, par value of which is $0.0001. Shares will be booked automatically on Register of Shares in form of a digital object named "**Certificate of Contribution**" with the following key attributes:

&nbsp;&nbsp;&nbsp;&nbsp; (1) "**Shareholder**" means the ownership title holder of the subject Shares (i.e. a member of the Company), who will be booked and indicated in form of its User Number;

&nbsp;&nbsp;&nbsp;&nbsp; (2) "**Par Value**" represents the subscribed contribution amount of the subject Shares, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp; (3) "**Paid Value**" represents the paid-in contribution amount of the subject Shares that actually received by the Company, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) "**Clean Paid**" represents the paid-in contribution amount of the subject Shares that has no encumbrances attached and can be freely disposed by the Shareholder, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) "**Price of Par**" refers to the per share acquiring price for the unpaid Par Value of the subject Shares, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) "**Price of Paid**" means the per share acquiring price for the Paid Value of the subject Shares, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp; (7) "**Total Value**" means the total acquiring value of the subject Shares indicated in USD, which shall be calculated as following:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Value = Price of Paid \* Paid Value + Price of Par \* (Par Value - Paid Value)

&nbsp;&nbsp;&nbsp;&nbsp; (8) "**Voting Weight**" means percentage weight of each Share when calculating the voting rights of the subject Shares, and the calculation result shall be called as "**Voting Points**" which shall be the basis to calculate the aggregate voting rights of a member. The minimum unit of Voting Weight is one percent. Therefore, the total Voting Points of the subject Shares shall be calculated as:

&nbsp;&nbsp;&nbsp;&nbsp; Voting Points = Voting Weight \* Par Value / 100

&nbsp;&nbsp;&nbsp;&nbsp; (9) "**Distribution Weight**" means percentage weight of each Share when calculating the distribution rights of the subject Shares, and the calculation result shall be called as "**Distribution Points**", which shall be the basis to calculate the aggregate distribution rights of a member for distributing profits or residual assets, or assuming loss or liabilities of the Company. The minimum unit of Distribution Weight shall be one percent. Therefore, the total Distribution Points of the Shares shall be calculated as:

&nbsp;&nbsp;&nbsp;&nbsp; Distribution Points = Distribution Weight \* Par Value / 100

---

| |
|:---|
| 64 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; **17.2. Automatic Adjustment of Amount Attributes**

The smart contracts may automatically adjust certain amount attributes of the Shares under specified conditions. For example, the smart contracts is designed to dynamically modify the Par Value, Paid Value, and Clean Paid status of Shares during transactions, based on predefined logic embedded in the smart contracts. These automatic adjustments ensure accurate and transparent share accounting and are further explained below, and will not result in any unintended modification to the total number of shares outstanding.

&nbsp;&nbsp;&nbsp;&nbsp; (1) When a shareholder completes a capital payment for subscribed Shares, both the Paid Value and Clean Paid attributes of the relevant Certificate of Contribution are increased accordingly.

&nbsp;&nbsp;&nbsp;&nbsp; (2) When a shareholder enters into a binding share transfer agreement, the Clean Paid is reduced by the transfer amount to prevent multiple commitments over the same interest.

&nbsp;&nbsp;&nbsp;&nbsp; (3) Upon full payment by the transferee, a portion of the Par Value and Paid Value in the transferor's Certificate of Contribution is reduced, and a new one is created for the transferee, reflecting the transferred amount in all three attributes.

&nbsp;&nbsp;&nbsp;&nbsp; (4) If the original Certificate of Contribution's balance in Par Value and Paid Value reaches zero, that Certificate of Contribution is revoked and removed from the Register of Shares.

These operations are executed automatically through smart contracts and represent mechanical adjustments to existing digital records. They do not result in any change to the total number of issued shares, do not alter the type or class of securities concerned and do not affect voting rights, dividend rights, liquidation rights, or conversion privileges thereof. Such adjustments are intended solely to maintain accurate share accounting and do not constitute a new issuance of securities under the Securities Act of 1933. Section 3(a)(9) is therefore not applicable.

Please refer to Exhibit 32.1 for the flowchart and description of the relevant APIs, and to Exhibit 32.2 for the corresponding source code. In particular, the transferShare() function of the Register of Shares smart contract, together with the regShare() and subAmtFromShare() functions of the Shares Repo smart contract, set forth the detailed algorithms governing share transfer transactions.

As of the date hereof, 2,500,000,000 Class A shares and 500,000,000 Class B shares have been issued to the Founding Member. In addition, up to 37,600,000,000 Class B shares may be issued through listing in accordance with Listing Rule (No.1024 Rule) of the Shareholders' Agreement. Any amendment to such Listing Rule would require a corresponding amendment to the Shareholders' Agreement, which may only be effected by a Special Resolution approved by holders representing at least 80% of the voting rights.

To the extent a transfer of securities occurs and results in a new Share record being created in the name of a new holder, such transfer is made exclusively in exchange for existing securities from the same issuer and on terms not involving any consideration other than the securities themselves, along with the performance of obligations arising under pre-existing agreements (e.g., capital contributions or payments).

---

| |
|:---|
| 65 |
| *[**Table of Contents**](#Toc)* |

---

**17.3. Classes of Shares**

The Company has issued two Classes of Shares: Class A Shares and Class B Shares. Comparing with Class B Shares, Class A Shares have 40 times Voting Weight. All the Shares can be issued or traded in fractions with a minimum unit of a Share.

The Company has issued 2.5 billion Class A Shares and 500 million Class B Shares to the Founding Member in exchange for the Royalty Interests and minting rights to CBP. All such Shares are subject to a lock-up period until June 30, 2027, during which time they may not be transferred, pledged, or otherwise disposed of except as permitted by a Special Resolution of the General Meeting.

Please see "**Dilution**" Section of this prospectus for detailed information in this regard.

**17.3.1. Key Terms of Class A Shares**

&nbsp;&nbsp;&nbsp;&nbsp; (1) **Voting Rights**: Each Class A Share carries forty (40) Voting Points, used for governance purposes within the ComBoox smart contract system. Voting Points are allocated in proportion to the Par Value of subscribed (but not necessarily paid-in) capital.

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Distribution Rights**: Each Class A Share carries one (1) Distribution Point. Class A shareholders are entitled to receive distributions declared by the Company in accordance with their Distribution Points, which are also calculated based on the Par Value of subscribed capital.

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Liquidation Rights**: Upon any liquidation or winding up of the Company, Class A shareholders are entitled to receive liquidation proceeds pro rata in accordance with their Distribution Points, after payment of all liabilities.

&nbsp;&nbsp;&nbsp;&nbsp; (4) **Conversion Rights**: Class A Shares are not convertible into other classes of equity.

**17.3.2. Key Terms of Class B Shares**

&nbsp;&nbsp;&nbsp;&nbsp; (1) **Voting Rights**: Each Class B Share carries one (1) Voting Points, used for governance purposes within the ComBoox smart contract system. Voting Points are allocated in proportion to the Par Value of subscribed (but not necessarily paid-in) capital.

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Distribution Rights**: Each Class B Share carries one (1) Distribution Point. Class B shareholders are entitled to receive distributions declared by the Company in accordance with their Distribution Points, which are also calculated based on the Par Value of subscribed capital, at the same sequence with Class A Shares.

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Liquidation Rights**: Upon any liquidation or winding up of the Company, Class B shareholders are entitled to receive liquidation proceeds pro rata in accordance with their Distribution Points, after payment of all liabilities, and at the same sequence with Class A Shares.

&nbsp;&nbsp;&nbsp;&nbsp; (4) **Conversion Rights**: Class B Shares are not convertible into other classes of equity.

---

| |
|:---|
| 66 |
| *[**Table of Contents**](#Toc)* |

---

**17.4. Deferred Evaluation and Profits Distribution Restriction**

Following a qualified appraisal of the Royalty Interests contributed by the Founding Member as part of its capital, if the evaluated Royalty Interests value exceeds the payable amount of the subscribed Initial Capital (i.e., the 2.5 billion Class A and 500 million Class B Shares minus the $7,500 paid in capital), the Founding Member may apply the excess value to purchase additional Class B Shares at a price of $0.0001 per share.

If the Royalty Interests appraisal is less than the payable amount of the subscribed Initial Capital, the Founding Member may either (i) contribute the shortfall in USDC, or (ii) request a proportionate reduction in equity, with Class B Shares reduced before Class A Shares.

No distributions of profit shall be made until:

&nbsp;&nbsp;&nbsp;&nbsp; (1) the Company has legally publicly offered its Shares and CBP for more than one year,

&nbsp;&nbsp;&nbsp;&nbsp; (2) the Royalty Interests contributed by the Founding Member has been duly appraised based on the actual income of the Company by a qualified third-party evaluation institution, and

&nbsp;&nbsp;&nbsp;&nbsp; (3) An Ordinary Resolution has been approved by the General Meeting.

#### 18 SHARES ELIGIBLE FOR FUTURE SALE
Prior to the Offering, there has been no public market for our Shares, and a liquid trading market for our Shares may not develop or be sustained after the offering. Future sales of our Shares in the public markets, or the availability of such Shares for sale in the public markets, could adversely affect market prices prevailing from time to time.

On condition that the Company successfully completed all registration or exemption procedures with SEC pursuant to the relevant laws and regulations, all of the Shares sold in this Offering will be freely tradable on-chain, by means of Trade Mode as defined in the Operating Agreement and implemented in Smart Contracts, without restriction or further registration under the Securities Act, unless such shares are held by any of our "affiliates" as such term is defined in Rule 144 under the Securities Act.

On condition that the offering statement, of which this prospectus is a part, and the Form TA submitted by the Company for acting as the transfer agent of its own Shares, are both qualified by the SEC, an initial public offering will be organized on our List of Orders, the specific smart contract adopted by the Company to facilitate Verified Investors to trade Shares on Arbitrum One.

Verified Investors may use USDC to directly acquire Offered Shares at the offering price on the List of USD Orders. Upon closing, new Shares will be automatically issued to the buyer and the consideration paid in form of USDC will be received and held by the Company directly. During the entire process of the initial offering, no underwriters, brokers, dealers or other intermediaries will be involved.

---

| |
|:---|
| 67 |
| *[**Table of Contents**](#Toc)* |

---

Furthermore, the List of Orders also can list all Sell Orders placed by shareholders and automatically match and close deals against the Buy Orders placed by Verified Investors. During the listing trade, no brokers, dealers or market-makers will involve. Shares will be created, altered or revoked under the automatic control of Smart Contracts, and consideration in ETH or USDC will be booked under the name of seller with his or her exclusive control.

Founding Member voluntarily locks up all Class A Shares from resale till the date of June 30, 2027, which has already been implemented and set up in the effective Shareholders Agreement.

#### 19 WHERE YOU CAN FIND MORE INFORMATION
We have filed with the SEC a Registration Statement on Form S-1 under the Securities Act with respect to the Offered Shares. This prospectus, which constitutes a part of the offering statement, does not contain all of the information set forth in the offering statement or the exhibits and schedules filed therewith.

For further information about us and the Offered Shares, we refer you to the offering statement and the exhibits and schedules filed therewith. Statements contained in this prospectus regarding the contents of any contract or other document that is filed as an exhibit to the offering statement are not necessarily complete, and each such statement is qualified in all respects by reference to the full text of such contract or other document filed as an exhibit to the offering statement.

You may read and copy the said information at the SEC's Public Reference Room, 100 F Street, N.E., Room 1580, Washington, D.C. 20549. You may obtain information on the operation of the Public Reference Room by calling the SEC at 1-800-SEC-0330. The SEC also maintains an Internet website that contains reports, proxy statements and other information about issuers, including us, that file electronically with the SEC. The domain name of this site is (https://www.sec.gov).

&nbsp;&nbsp;&nbsp;&nbsp; Additional information about ComBoox, may be found on the project's website at (https://comboox.vercel.app). However, the information on such website is not part of this prospectus and should not be relied upon in making an investment decision.

---

| |
|:---|
| 68 |
| *[**Table of Contents**](#Toc)* |

---

#### INDEX TO FINANCIAL STATEMENTS

---

| | |
|:---|:---|
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Audited Financial Statements for the year ended December 31, 2024**  |  |
| [1 Report of Independent Registered Public Accounting Firm (PCAOB #6445)](#Report of Independent Registered Public Accounting Firm)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-2  |
| [2 Balance Sheet](#Audited Balance Sheet)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-3  |
| [3 Statements of Operations](#Audited Statements of Operations)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-4  |
| [4 Statement of Changes in Members' Equity](#Audited Statement of Changes in Members' Equity)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-5  |
| [5 Statements of Cash Flows](#Audited Statements of Cash Flows)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-6  |
| [6 Notes To The Audited Financial Statements](#Audited Notes To The Audited Financial Statements)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-7  |

---

---

| | |
|:---|:---|
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Unaudited Financial Statements for the Six Months ended June 30, 2025**  |  |
| [1 Balance Sheet of June 30, 2025](#Unaudited Balance Sheet of June 30, 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-42  |
| [2 Statements of Operations for the First Six Months of 2025](#Unaudited Statements of Operations for the First Six Months of 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-43  |
| [3 Statement of Changes in Members' Equity for the First Six Months of 2025](#Unaudited Statement of Changes in Members' Equity for the First Six Months of 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-44  |
| [4 Statements of Cash Flows for the First Six Months of 2025](#Unaudited Statements of Cash Flows for the First Six Months of 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-45  |
| [5 Condensed Notes to the Unaudited Financial Statements For the six months ended June 30, 2025](#Condensed Notes to the Unaudited Financial Statements For the six months ended June 30, 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-46  |

---

---

| | |
|:---|:---|
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Unaudited Financial Statements as of September 30, 2025**  |  |
| [1 Balance Sheet of September 30, 2025](#Balance Sheet of September 30, 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-49  |
| [2 Statements of Operations for the Third Quarter of 2025](#Statements of Operations for the Third Quarter of 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-50  |
| [3 Statement of Changes in Members' Equity for the Third Quarter of 2025](#Statement of Changes in Members' Equity for the Third Quarter of 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-51  |
| [4 Statements of Cash Flows for the Third Quarter of 2025](#Statements of Cash Flows for the Third Quarter of 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-52  |
| [5 Condensed Notes to the Unaudited Financial Statements For the Quarter ended September 30, 2025](#Condensed Notes to the Unaudited Financial Statements For the Quarter ended September 30, 2025)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F-53  |

---

---

| |
|:---|
| F-1 |
| *[**Table of Contents**](#Toc)* |

---

 **REPORT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To the Members of

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ComBoox DAO LLC

**Opinion on the financial statements** 

We have audited the accompanying balance sheets of ComBoox DAO LLC (the "**Company**") as of December 31, 2024, the related statements of operations, changes in members' equity and cash flow, for the period ended December 31, 2024, and the related notes to the financial statements. In our opinion, the financial statements present fairly, in all material respects, the financial position of the Company as of December 31, 2024, and the results of its operations and its cash flows for the period ended December 31, 2024, in conformity with U.S. generally accepted accounting principles (GAAP).

**Basis for opinion** 

These financial statements are the responsibility of the Company's management. Our responsibility is to express an opinion on the Company's financial statements based on our audits. We are a public accounting firm registered with the Public Company Accounting Oversight Board (United States) ("**PCAOB**") and are required to be independent with respect to the Company in accordance with the U.S. federal securities laws and the applicable rules and regulations of the Securities and Exchange Commission and the PCAOB.

We conducted our audits in accordance with the standards of the PCAOB. Those standards require that we plan and perform the audit to obtain reasonable assurance about whether the financial statements are free of material misstatement, whether due to error or fraud. Our audits included performing procedures to assess the risks of material misstatement of the financial statements, whether due to error or fraud, and performing procedures that respond to those risks. Such procedures included examining, on a test basis, evidence regarding the amounts and disclosures in the financial statements. Our audits also included evaluating the accounting principles used and significant estimates made by management, as well as evaluating the overall presentation of the financial statements. We believe that our audits provide a reasonable basis for our opinion.

**Critical Audit Matters**

We determined that there are no critical audit matters. <br>

*/s/ Kustov & Associates, Inc.*

San Francisco, California

March 12, 2025 <br>

We have served as the Company's auditor since 2024.<br>

---

| |
|:---|
| F-2 |
| *[**Table of Contents**](#Toc)* |

---

 **Balance Sheets**

---

| | | |
|:---|:---|:---|
| | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** |
| | **2024** | **2023** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Intangible Assets - IPR  | $0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Intangible Assets - ETH | 0.00 | 0.00 |
| **Total Assets** | $**0.00** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deferred Revenue  | 53420.55 | 0.00 |
| **Total Liabilities** | $**53420.55** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Subscribed Capital  | 300000.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Less: Unpaid Subscription  | (300000.00) | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Retained Earnings  | (53420.55) | 0.00 |
| **Total Equity** | $**(53420.55)** | **0.00** |
| **Total Liabilities and Equity** | $**0** | **0** |

---

&nbsp;&nbsp;&nbsp;&nbsp; *The accompanying notes are an integral part of the financial statements.* <br> *See Report of Independent Registered Public Accounting Firm.*

---

| |
|:---|
| F-3 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Operations**

---

| | | |
|:---|:---|:---|
| | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2023** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Royalty Income  | $112.90 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Gross profit** | **112.90** | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selling, General, and Administrative | **37561.12** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gain and Loss on Digital Assets  | 15972.33 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Total Operating Expenses** | **53533.45** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Income Before Taxes**  | **(53420.55)** | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Income Tax Expense  | 0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Net Income (Loss)**  | $**(53420.55)** | 0.00 |

---

 *The accompanying notes are an integral part of the financial statements.* <br> *See Report of Independent Registered Public Accounting Firm.*

---

| |
|:---|
| F-4 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Changes in Members' Equity**

---

| | | | | | |
|:---|:---|:---|:---|:---|:---|
| | **Class A <br> Paid-In Capital** | **Class B <br> Paid-In Capital** | **Additional <br> Paid-In Capital** | **Retained Earnings** | **Total Equity** |
| **Balance at November 8, 2023** | $**0** | **0** | **0** | **0** | **0** |
| Net Income |  |  |  |  |  |
| **Balance at December 31, 2023** | 0 | 0 | 0 | 0 | 0 |
| Net Income | **-** | **-** | **-** | (53420.55) | (53420.55) |
| **Balance at December 31, 2024** | $0 | 0 | 0 | (53420.55) | (53420.55) |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *The period from November 8, 2023, to December 31, 2023, is a short reporting period as the Company was incorporated on November 8, 2023. For further details, refer to 3.7. The accompanying notes are an integral part of these audited financial statements.* <br> *See Report of Independent Registered Public Accounting Firm.*

---

| |
|:---|
| F-5 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Cash Flows**

---

| | | |
|:---|:---|:---|
| | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2023** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Increase Deferred Revenue  | $0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Other Income | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sales, General & Administrative | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Net Inflow from Operating Activities**  | **0** | **0** |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Purchase of IPR | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Net Outflow for Investing Activities**  | **0** | **0** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Proceeds From Share Issuance  | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution  | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Net Inflow from Financing Activities**  | **0** | **0** |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Net Inflow**  | $**0** | **0** |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *The Company operates exclusively with digital assets and does not maintain traditional cash or bank accounts. All transactions, including those related to the minting, exchange, and transfer of assets, are conducted using on-chain digital assets. As a result, the Statement of Cash Flows reflects a zero balance, as there are no cash inflows or outflows in the conventional sense.*<br> *The accompanying notes are an integral part of these audited financial statements.*<br> *See Report of Independent Registered Public Accounting Firm.*

---

| |
|:---|
| F-6 |
| *[**Table of Contents**](#Toc)* |

---

# Notes to the Audited Financial Statements
As of December 31, 2024

**1. Description of Business**

Comboox DAO LLC (the **"Company"**) is a Wyoming limited liability company that has elected to be a decentralized autonomous organization pursuant to the Wyoming Limited Liability Company Act and the Wyoming Decentralized Autonomous Organization Supplement. The Company was formed on November 8, 2023.

ComBoox (**"ComBoox"** or the **"Platform"**) is a corporate book-entry platform consisting of a core smart contract called the "Registration Centre" and a set of template smart contracts (the **"Templates"**) deployed on the public blockchain network, Arbitrum One. It is designed to automatically record share transactions and corporate governance activities of companies, enabling stakeholders to exercise their legal rights in a self-service manner.

The Company is engaged in the business of acquiring and holding the beneficiary rights to Templates within Arbitrum One (the **"IPR"**) and collecting royalties generated therefrom. Additionally, the Company is entitled to collect up to a 20% commission on each royalty payment collected by future authors on ComBoox. The Company is categorized as a passive income entity that holds IPR of Templates and collects relevant royalties and commissions derived therefrom.

Under the automatic control of predefined smart contracts, companies registered on ComBoox can have their share transactions and corporate governance activities fully managed, monitored, and recorded by smart contracts. No agents or intermediaries are required; rights holders can directly exercise their rights, obligors have no opportunity to default, and a full range of information can be disclosed in real-time along with the relevant legal acts.

The Company has the following special characteristics regarding the accounting records and policies:

&nbsp;&nbsp;&nbsp;&nbsp; (1) **No Cash or Off-Chain Assets:** As the first company registered on ComBoox and a true DAO, the Company will not open traditional bank accounts or hold off-chain assets. This ensures that all economic interests are directly controlled and disposed of by the Company in accordance with the voting decisions of its Members.

&nbsp;&nbsp;&nbsp;&nbsp; (2) **ETH as General Equivalence:** The Company adopts ETH as its primary payment instrument and value carrier. In other words, the Company treats ETH as a special "general equivalent" for exchanging value with other entities or Members. Therefore, the Company has prepared an ETH Flow Statement to describe the inflow and outflow of economic interests to and from itself.

*[**Table of Contents**](#Toc)*

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(4) **Deferred Revenue:** The Company sells CBP to users in exchange for ETH via a smart contract called "fuel tank" (the **"Fuel Tank"**) at a predetermined exchange rate set by the Company (the **"ExRate"**), which is currently 1:1 (ETH/CBP). As a promotional measure, a certain amount of CBP is minted and granted to newly registered users as "prepaid vouchers." All CBP minted or transferred to other entities is booked as "deferred revenue" of the Company and is subsequently written off against the royalty income collected.

&nbsp;&nbsp;&nbsp;&nbsp; (5) **Deferred Recognition Value of IPR:** Due to the following factors: (i) there are no similar decentralized applications (DApps) available on the market; (ii) ComBoox was solely developed by the sole founding member (the **"Founding Member"**); and (iii) it has not yet generated material revenue, it is difficult to recognize the value of IPR when the Founding Member contributes it in exchange for the initial capital. Therefore, the value of the IPR will be recognized and amortized only after the Company has legally and publicly issued its equity shares and CBP and has generated material revenue for more than one year.

&nbsp;&nbsp;&nbsp;&nbsp; (6) **Unpaid Subscription of Initial Capital:** Corresponding to the deferred recognition of IPR, when the Initial Capital is issued to the Founding Member, it will be recorded as $300,000.00 in Cr. Subscribed Initial Capital and Dr. Unpaid Subscription of Initial Capital. The latter will also be used to record and track the payable amount of the Initial Capital under the general account of "Owner's Equity."

&nbsp;&nbsp;&nbsp;&nbsp; (7) **Smart Contract Events:** All economic interests flowing into or out of the Company are automatically recorded in the relevant smart contracts as "events," which are publicly, immutably, and permanently stored on the blockchain. These events can be accessed by client applications globally and in real time. The Company has developed specialized modules in the ComBoox web application to facilitate users in retrieving these events and converting them into human-readable financial reports. Additionally, other client applications can freely access these records.

*[**Table of Contents**](#Toc)*

&nbsp;&nbsp;&nbsp;&nbsp; (8) **Real Time Reports:** Stakeholders can access the above financial reports and accounting records by visiting the ComBoox website (https://comboox.vercel.app/app). The accounting records are updated at the same frequency as the blockchain itself, currently every second. This means that the balance sheet date and the financial reporting period can be set to the smallest possible time unit of one second.

&nbsp;&nbsp;&nbsp;&nbsp; (9) **ETH Price:** The exchange rate between ETH and USD is provided on-chain by the Chainlink Price Feed service and off-chain by CoinGecko, both of which are updated automatically in seconds. This ensures that all on-chain transactions are executed at accurate ETH prices and that off-chain accounting records can be properly maintained in USD. To calculate the value of CBP transactions, the ExRate is used to first convert CBP into ETH and then into USD. Any currency exchange gains or losses are calculated based on the USD value difference between the ETH price at the transaction time and the ETH price at the reporting time.

This report, along with the accounting records of the Company, is prepared based on the principles outlined above.

**2. Summary of Significant Accounting Policies**

**2.1. Estimates and Assumptions**

The preparation of financial statements in conformity with U.S. GAAP requires management to make estimates based on assumptions about current economic and market conditions, as well as, for some estimates, future conditions. These estimates affect the reported amounts and related disclosures in the financial statements. The Company bases its estimates and judgments on historical experience and various other assumptions and information that it believes to be reasonable under the circumstances.

Although the Company's estimates consider current and expected future conditions, actual conditions could differ from expectations, which could materially affect the Company's results of operations, financial position, and cash flows.

Estimates are used for, but are not limited to, determining the valuation of intangible assets and the useful lives applied in amortization.

---

| |
|:---|
| F-9 |
| *[**Table of Contents**](#Toc)* |

---

**2.2. Revenue Recognition**

The Company's revenue primarily consists of royalties from IPR licensing and commissions derived therefrom. It uses a utility token called "ComBoox Points" (**"CBP"**) to measure and collect royalties. Users of ComBoox can establish a comprehensive bookkeeping system for their company on the platform using smart contracts cloned from Templates. Thereafter, stakeholders may conduct various legal acts related to equity rights and corporate governance on the blockchain in a self-service mode.

**2.2.1. Revenue Recognition Policy**

The Company recognizes revenue in accordance with ASC 606, "Revenue from Contracts with Customers," which follows a five-step model:

&nbsp;&nbsp;&nbsp;&nbsp; (1) **Identify the contract with a customer:** The Company's customers enter into a contract upon utilizing itssmart contract system, which requires the transfer of CBP as royalty payments. These transactions are executed automatically via the ComBoox Platform and the blockchain infrastructure.

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Identify the performance obligations in the contract:** The Company's performance obligation is to provide access to its intellectual property (**"IP"**) and smart contract services. When a customer executes their legal rights via smart contract APIs, the corresponding royalty fees (CBP) are transferred as compensation for the license granted.

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Determine the transaction price:** The transaction price is determined based on the quantity of CBP transferred, multiplied by the predefined CBP/ETH exchange rate of 1:1 set by the Company. The equivalent ETH amount is then converted to USD using the latest available CoinGecko ETH/USD exchange rate, which represents the fair value of the transaction.

---

| |
|:---|
| F-10 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; (4) **Allocate the transaction price to the performance obligations:** The entire transaction price is allocated to the licensing of the Company's intellectual property and smart contract services, as this constitutes the sole deliverable in the transaction.

&nbsp;&nbsp;&nbsp;&nbsp; (5) **Recognize revenue when (or as) the performance obligation is satisfied:** The performance obligation is satisfied when CBP is transferred from the user to the Company's address in the Registration Center. Revenue is recognized at that point, as the Company has provided the customer with access to its smart contract system.Simultaneously, an equivalent amount is written off from Deferred Revenue, ensuring proper revenue recognition.

**2.2.2. Disaggregation of Revenue**

The Company's revenue is derived from royalty revenue, which is recognized at the point in time when the CBP is transferred to the Company address and recorded on the blockchain. Since the smart contract executes transactions automatically, revenue recognition occurs in real-time upon each transfer event.

---

| | | |
|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31, 2024** | **For the year ended 23:59:59 December 31, 2024** |
| | **CBP** | **USD** |
| **Revenue by Timing of revenue recognition** | 0.04218 | 112.9 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Revenue at a Point in Time | 0.04218 | 112.9 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Revenue Over Time | 0 | 0 |

---

**2.2.3. Breakdown of Revenue Sources**

The Company's revenue consists of two primary sources:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Royalty Revenue:** Payments collected from users executing their legal rights through smart contracts, transferred to the Company's address in CBP and converted to USD.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Commission Revenue:** A 20% commission on royalty payments collected by future authors of Templates on ComBoox.

Revenue is recognized at the point in time when the CBP is transferred to the Company address and recorded on the blockchain. Since the smart contract executes transactions automatically, revenue recognition occurs in real-time upon each transfer event.

---

| |
|:---|
| F-11 |
| *[**Table of Contents**](#Toc)* |

---

**2.2.4. Revenue Calculation Process**

The revenue calculation process is automated and follows these steps:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Retrieve CBP transfer data from the "Transfer" event in the Registration Center.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Convert CBP to ETH using the predefined 1:1 ExRate.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Convert ETH to USD using the latest available CoinGecko ETH/USD price, which represents a volume-weighted average price across multiple digital assets exchanges.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Recognize revenue and write off the corresponding amount from Deferred Revenue.

This methodology ensures accurate, consistent, and real-time revenue recognition in compliance with ASC 606. The Company continuously monitors and updates its pricing methodology to reflect fair market values for accurate financial reporting.

**2.3. Deferred Revenue**

Deferred Revenue is the only type of liability of the Company, representing the value of CBP held by entities other than the Company. In other words, it quantifies the rights to use the smart contracts cloned from the Templates.

The Company may mint or transfer CBP as a utility token to external entities through the following methods:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(1) Transfer CBP to buyers automatically through the Fuel Tank at the exchange rate predefined by the Company when they call the "refuel" function of the Fuel Tank and pay an equivalent amount in ETH.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(2) Automatically mint CBP to new users as "New User Awards" in an amount predefined or adjusted from time to time by the Company when they sign up with the Registration Center.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(3) Transfer a specified amount of CBP to a designated address pursuant to a relevant Simple Majority Resolution of the General Meeting of Members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(4) Mint CBP to the Founding Member to enable him to set up and configure the book-entry system for the Platform and the Company.

Deferred Revenue is recognized when CBP is minted or transferred and recorded under the recipient's address in the Registration Center. When CBP is held by the Company, it is considered a special voucher with no intrinsic value. However, the Company will still calculate and publicly disclose the balance of CBP held by the Company as well as its total supply amount on ComBoox.

---

| |
|:---|
| F-12 |
| *[**Table of Contents**](#Toc)* |

---

**2.4. Fair value measurements**

The Company measures and reports certain financial and digital assets at fair value in accordance with ASC 820 and ASU 2023-04 - Fair Value Measurements and Disclosures. Fair value is determined based on market participant assumptions and categorized into the following levels within the fair value hierarchy:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(1) Level 1: Inputs are quoted prices in active markets for identical assets, such as the publicly available market price of ETH on digital asset exchanges. The Company uses the ETH/USD exchange rate provided by Chainlink Price Feeds (on-chain) and CoinGecko (off-chain) to determine the fair value of ETH.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(2) Level 2: Inputs are observable market data other than quoted prices included in Level 1. The Company does not currently utilize Level 2 inputs for valuation purposes.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(3) Level 3: Inputs are unobservable data for the asset or liability, typically used for complex or illiquid valuations. The Company does not use Level 3 inputs for digital asset valuation.

**2.4.1. Valuation Methodology**

The fair value of ETH is determined based on the latest available price from Chainlink Price Feeds (for smart contract-based transactions) and CoinGecko (for off-chain reporting). ETH is primarily used by the Company as a payment instrument and value carrier, and its fair value is recorded in USD at the reporting date based on the ETH/USD exchange rate at that time.

The fair value of CBP is determined using the ExRate of CBP to ETH, as predefined by the Company in the Fuel Tank, and then converted to USD using the ETH/USD price from CoinGecko at the transaction date. CBP is not actively traded on an open market; therefore, it does not fall under Level 1 valuation and is instead measured based on the Company's predefined ExRate, which serves as an observable input.

---

| |
|:---|
| F-13 |
| *[**Table of Contents**](#Toc)* |

---

**2.4.2. Unrealized Gains and Losses**

Unrealized gains and losses on digital assets arise from fluctuations in ETH/USD exchange rates. The Company calculates the Gain and Loss on Digital Assets based on the difference between the ETH price at the reporting date and the ETH price at the transaction date. Any appreciation in CBP held by third parties is measured using the same methodology, with valuation based on the ETH/USD price at the reporting date.

However, any gains or losses resulting from Additional Paid-In Capital transactions are excluded from operational costs or expenses and are instead recognized directly in Owners' Equity.

The Company ensures that all transactions are accounted for at the correct and accurate fair value by using real-time on-chain price feeds for ETH and structured off-chain data from reputable sources such as CoinGecko.

**2.5. Income tax treatment**

The Company is organized as a Wyoming Limited Liability Company (LLC) and has elected to be treated as a pass-through entity for U.S. federal income tax purposes under Section 701 of the Internal Revenue Code. As a result, the Company is not subject to federal income tax; instead, taxable income, deductions, credits, and other tax attributes are passed through to its members, who report them on their individual tax returns.

Wyoming state law does not impose state income tax on LLCs or individuals. Therefore, no state income tax liability arises at the Company level. Members are solely responsible for reporting and paying any applicable federal or other jurisdictional income taxes based on their share of the Company's income.

Under ASC 740 - Income Taxes, the Company does not recognize a Deferred Tax Asset (DTA) because it does not directly incur income tax liabilities. Any potential tax benefits or obligations associated with net operating losses or tax credits are allocated to the individual members rather than retained by the Company.

---

| |
|:---|
| F-14 |
| *[**Table of Contents**](#Toc)* |

---

**2.6. Expense classification**

The Company's primary current expenses are SG&A, which specifically include New User Awards, Startup Costs, and General Meeting Approved Payments.

**2.6.1. New User Awards**

As a marketing promotion, the Company automatically mints CBP for new users of the ComBoox platform as a "New User Award". When they sign up with the Registration Centre, a predefined amount of CBP is automatically minted to the user's address. Such transactions are recorded as "Deferred Revenue" on the credit side and as "SG&A" on the debit side.

**2.6.2. Startup Cost**

To facilitate the Founding Member in setting up and configuring the Platform, the Company minted a sum of CBP to the Founding Member. Such transactions are recorded as "Deferred Revenue" on the credit side and as "SG&A" on the debit side.

**2.6.3. General Meeting Approved Payment**

The Company may pay ETH or CBP to other parties with the approval of the General Meeting of members. Such transactions will be recorded as "ETH" or "Deferred Revenue" on the credit side and as "SG&A" on the debit side.

**3. Details of Significant Balance Sheet and Income Statement Items**

**3.1. Cash and Cash Equivalentss**

As per the Operating Agreement, the Company is not permitted to open traditional bank accounts or hold any off-chain assets. The Company intends to use ETH as a payment instrument and value carrier to pay for services or the IPR of Templates, or to distribute as profits or assets to members. Therefore, cash and cash equivalents as of the Report Time were $0.

---

| |
|:---|
| F-15 |
| *[**Table of Contents**](#Toc)* |

---

**3.2. Receivables**

The Company has no trade receivables or any other types of receivables. The Company does not extend credit to customers and operates on a prepayment basis for all services rendered. Therefore, receivables as of the Report Time were $0.

**3.3. Revenue**

**3.3.1. Royalty Revenue**

Revenue is recognized when the royalties collected in CBP are booked under the address of the Company in the Registration Center (i.e., the record-keeping smart contract of CBP). Such transactions will be recorded as "Royalty Revenue" on the credit side and as "Deferred Revenue" on the debit side.

The Royalty Revenue is recognized entirely at a point in time, with no revenue recognized over time.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **CBP** | **USD** | **CBP** | **USD** |
| **Royalty Revenue** | 0.04218 | 112.9 | 0 | 0 |

---

Royalty Revenue is recorded by the Transfer event in the Registration Center with the following filter conditions.

(a) CBP is transferred to the address of the Company (i.e., the address of the General Keeper, representing the legal entity of the Company); and

(b)The sender's address is not the "zero" address (otherwise, it would be a mint transaction).

&nbsp;&nbsp;&nbsp;&nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Registration Center: 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91<br> event Transfer(address indexed from, address indexed to, uint256 indexed value);<br> The Company: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d<br>

---

| |
|:---|
| F-16 |
| *[**Table of Contents**](#Toc)* |

---

**3.3.2. CBP Sales Income**

To supply CBP to the users of the ComBoox Platform, the Company will sell CBP in exchange for ETH via the Fuel Tank. Buyers may call the "refuel" function of the Fuel Tank and pay their consideration in ETH. The Fuel Tank will then automatically transfer CBP to the buyers at a predefined ExRate. This will be the Company's primary source of ETH inflow.

Such transactions will be recorded with "ETH" on the debit side and "Deferred Revenue" on the credit side. During the Report Period, no CBP was sold via the Fuel Tank.

The Sales Income will be also recognized entirely at a point in time.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **CBP** | **USD** | **CBP** | **USD** |
| **CBP Sales Income - ETH** | 0 | 0 | 0 | 0 |

---

CBP Sales Income is recorded through the "Refuel" event in the smart contract of the Fuel Tank. The address of the Fuel Tank and the interface of the Refuel event are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Address of Fuel Tank: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0<br> event Refuel (address indexed buyer, uint indexed amtOfEth, uint indexed amtOfEth); <br>

 **3.3.3. Other Income**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Other Income is recognized when ETH is received without calling a specific function of the General Keeper. Such transactions will be recorded as "Other Income" on the credit side and as "ETH" on the debit side. The Income will be also recognized entirely at a point in time.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| **Other Income** | 0 | 0 | 0 | 0 |

---

---

| |
|:---|
| F-17 |
| *[**Table of Contents**](#Toc)* |

---

Other Income is recorded by the "ReceivedCash" event in the General Keeper, with the condition that the ETH is not paid from the Fuel Tank (otherwise, it will be recorded as CBP Sales Income).

&nbsp;&nbsp;&nbsp;&nbsp;<br> General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d<br> event ReceivedCash(address indexed from, unit indexed amt);<br>

**3.4. Deferred Revenue**

At the Report Time, the Company's Deferred Revenue is <u>16.04782 CBP</u> or <u>53,420.55 USD</u>. To convert the value of CBP into USD, the Company adopts the ExRate of 1:1 ETH/CBP and applies the ETH price at the Report Time.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **CBP** | **USD** | **CBP** | **USD** |
| **Deferred Revenue** | 16.04782 | 53420.55 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; CBP Total Supply | 104.09 | 346498.45 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; - CBP of General Keeper | 0.04218 | 140.41 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; - CBP of Fuel Tank | 88 | 292937.49 | 0 | 0 |
| **Total Deferred Revenue** | **16.04782** | **53420.55** | 0 | 0 |

---

As an ERC-20 token, CBP's total supply and the balance of a specific holder can be retrieved by calling the "totalSupply" and "balanceOf" functions of its registration smart contract, i.e., the Registration Center.

&nbsp;&nbsp;&nbsp;&nbsp; (1) **CBP Total Supply:** can be retrieved by calling the "totalSupply" function of the Registration Center with a filter condition for the block number whose timestamp is the latest but still precedes the Report Time.

---

| |
|:---|
| F-18 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Registration Center: 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91 <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function totalSupply() external view returns(uint256) <br> blockNumber: 290687173n <br>

&nbsp;&nbsp;&nbsp;&nbsp; (2) **CBP held by the General Keeper:** can be retrieved by calling the "balanceOf" function of the Registration Center with the following filter conditions: (a) the target account must be the address of the General Keeper, and (b) the checkpoint must be at block number 290687173n, i.e., the block number whose timestamp is the latest but still precedes the Report Time.

&nbsp;&nbsp;&nbsp;&nbsp; <br> Registration Center: 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91 <br> function balanceOf (address account) external view returns (uint256); <br> General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> blockNumber: 290687173n <br>

&nbsp;&nbsp;&nbsp;&nbsp; (3) **CBP held by the Fuel Tank:** can be retrieved by calling the "balanceOf" function of the Registration Center with the following filter conditions: (a) the target account must be the address of the Fuel Tank, and (b) the checkpoint must be at block numbered 290687173n, i.e. the block number whose timestamp is the latest but still precedes the Report Time.

---

| | | |
|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31, 2024** | **For the year ended 23:59:59 December 31, 2024** |
| | **CBP** | **USD** |
| **CBP Flow of Fuel Tank** | **0** | **0** |
| &nbsp;&nbsp;&nbsp;&nbsp; Add CBP | 176 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; - Withdraw CBP | 88 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; - Refuel CBP | 0 | 0 |
| **Sub Total of CBP Flow of Fuel Tank** | **88** | **0** |

---

---

| |
|:---|
| F-19 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> Registration Center: 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91 <br> function balanceOf (address account) external view returns (uint256); <br> Fuel Tank: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0 <br> blockNumber: 290687173n <br>

**3.5. Intangible Assets**

**3.5.1 IPR of ComBoox**

In exchange for the initial capital, the Founding Member invested the following IPR into the Company as a capital contribution:

&nbsp;&nbsp;&nbsp;&nbsp; (1)The partial beneficiary right to the Templates to collect royalties within the territory of Arbitrum One;

&nbsp;&nbsp;&nbsp;&nbsp; (2) The owner's right to the Platform to collect commissions;

&nbsp;&nbsp;&nbsp;&nbsp; (3) The owner's right to the Registration Center for minting CBP.

The Company may mint and transfer a certain amount of CBP to the Fuel Tank as per prior approvals of an Ordinary Resolution, through which the Company may sell CBP to the market and receive sales income in ETH. The Company has no obligation to redeem any CBP.

Under US GAAP, when the Founding Member contributed the above IPR to the Company, it was difficult to recognize the value concerned for the following reasons:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) There are no similar software or business models available in the market, making it impossible to identify comparable fair value measurement targets;

&nbsp;&nbsp;&nbsp;&nbsp;(2) ComBoox has not generated material revenue, so there is no reasonable basis for valuation under the revenue method;

&nbsp;&nbsp;&nbsp;&nbsp; (3) ComBoox was developed solely by the Founding Member, meaning that there are no arm's-length transactions or third-party payment records to support the development costs;

---

| |
|:---|
| F-20 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; (4) The cost method alone is unlikely to be accepted as a sound basis for valuing the IPR.

For the above reasons, the value of the IPR will be deferred for recognition and amortization until the Company has legally publicly issued its equity shares and CBP, and received material revenue for more than one year. At the Report Time, the recognized value of IPR is zero.

---

| | | |
|:---|:---|:---|
|  | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** |
| | **2024** | **2023** |
|  | **USD** | **USD** |
| Beginning Value of IPR | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Amortization | 0 | 0 |
| Net Value of IPR | 0 | 0 |

---

**3.5.2. ETH of the Company**

In exchange for the initial capital, the Founding Member invested the following IPR into the Company as a capital contribution:

ETH is adopted by the Company to act as a paying instrument and value carrier. In other words, the Company takes ETH as a special "general equivalence" to exchange value with other entities or members.

The Company's ETH mainly comes from its CBP sales income via Fuel Tank, which will be booked as "Deferred Revenue" on the credit side and as "Intangible Assets - ETH" on the debit side.

The Company may hold ETH through two smart contracts: (a) General Keeper, representing the legal entity of the Company; or (b) Fuel Tank, the special vehicle to supply CBP to users of ComBoox. Therefore, the total ETH of the Company shall be the sum of the ETH held by the said two smart contracts.

The exchange rate between ETH and USD is provided on-chain by the ChainLink Price Feed service and off-chain by CoinGecko, both of which are automatically updated in seconds. In this way, the Company can ensure that all on-chain transactions are closed at the correct and accurate ETH price, and that off-chain accounting records can be prepared in USD. A gain or loss of digital assets is calculated based on the USD value difference derived from the ETH price at the reporting time and the ETH price at the transaction time.

To convert ETH into USD and calculate the Gain and Loss of Digital Assets, the Company adopted the most recent ETH price at the Report Time, provided by CoinGecko, which is **<u>3,328.8351 USD/ETH</u>** (the **"ETH Price of Report Time"**).

---

| |
|:---|
| F-21 |
| *[**Table of Contents**](#Toc)* |

---

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| ETH of Company | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; ETH in General Keeper | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Less: ETH as Deposits | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; ETH in Fuel Tank | 0 | 0 | 0 | 0 |
| **Total ETH of Company** | **0** | **0** | **0** | **0** |

---

The ETH of the Company can be retrieved by querying the Registration Center for the ETH balance of a specific address at a particular block or by calling the relevant smart contracts with the respective parameters.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1)**ETH in General Keeper:** can be retrieved by querying the ETH balance of the General Keeper address at the block number with a timestamp that is earlier, but closest to, the Report Time.

&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> import { usePublicClient } from "wagmi" ; <br> const client = usePublicClient (); <br> const balaOfGK = await client . getBalance ({ <br> address: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d , <br> blockNumber: 290687173n , <br> }); <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2)**ETH as Deposits:** can be retrieved by calling the "totalDeposits" function of the General Keeper with the block number whose timestamp is earlier, but closest to, the Report Time.

&nbsp;&nbsp;&nbsp;&nbsp; <br>General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> function totalDeposits () external view returns (uint); <br> blockNumber: 290687173n <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3)**ETH in Fuel Tank:** can be retrieved by querying the ETH balance of the Fuel Tank address with the block number whose timestamp is earlier, but closest to, the Report Time.

---

| |
|:---|
| F-22 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> import { usePublicClient } from "wagmi" ; <br>const client = usePublicClient (); <br> const balaOfFT = await client . getBalance ({ <br> address: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0 , <br> blockNumber: 290687173n , <br> });<br>

**3.6. Selling, General and Administrative**

**3.6.1. New User Awards**

To date, all five new users that received this "New User Award" are accounts controlled by the Founding Member, making these transactions related party transactions under ASC 850.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **CBP** | **USD** | **CBP** | **USD** |
| **New User Awards** | 0.09 | 210.10 | 0 | 0 |

---

"New User Awards" are recorded by the "Transfer" event in the Registration Center with the following filter conditions: (a) CBP is transferred from the zero address, and (b) the receiver is not the address of the Company.

&nbsp;&nbsp;&nbsp;&nbsp; <br> Registration Center: 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91 <br> event Transfer (address indexed from , address indexed to , uint256 indexed value); <br> Address of Zero: 0x00 <br> Address of Company : 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br>

---

| |
|:---|
| F-23 |
| *[**Table of Contents**](#Toc)* |

---

**3.6.2. Startup Cost**

To facilitate the Founding Member in setting up and configuring the Platform, the Company minted 16 CBP to the Founding Member.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **CBP** | **USD** | **CBP** | **USD** |
| **Startup Cost** | 16 | 37351.02 | 0 | 0 |

---

"Startup Cost" is recorded by the event "Transfer" in the Registration Center under the following conditions: (a) CBP is transferred from the address of the Company, and (b) the recipient is either User No. 1 or User No. 2, both of whom are controlled by the Founding Member.

&nbsp;&nbsp;&nbsp;&nbsp; <br> Registration Center: 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91 <br> event Transfer (address indexed from , address indexed to , uint256 indexed value); <br> Company: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> User No.1 : 0xc12c20fd7B50DA0909500dc9bb6758376398F8a8 <br> User No.2 : 0x4399b515FdF8E050CAd4282CE94BA99fe3c844bc <br>

**3.6.3. General Meeting of Members Approved Payment**

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH/CBP** | **USD** | **ETH/CBP** | **USD** |
| GMM Approved Payment | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GMM Approved Payment - ETH | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GMM Approved Payment - CBP | 0 | 0 | 0 | 0 |
| **Sub Total of GMM Approved Payment** | **0** | **0** | **0** | **0** |

---

A GMM-approved payment is recorded by the 'TransferFund' event in the smart contract of 'GMMKeeper.' If the payment is made in ETH, the 'isCBP' argument will be recorded as 'false'; otherwise, it will be recorded as 'true' for payments made in CBP.

---

| |
|:---|
| F-24 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> GMMKeeper: 0x7256b47ff39997355ecEC2deFB7C7B332FcFDd42 <br> event TransferFund (address indexed to , bool indexed isCBP , uint indexed amt , uint seqOfMotion , uint caller); <br>

**3.7. Equity accounts and ownership structure**

The Company was established on November 8, 2023 and the period from November 8, 2023, to December 31, 2023, represents a short reporting period.

The Company commenced operational activities on May 18, 2024. In exchange for the IPR of ComBoox contributed by the Founding Member, the Company issued to him the Initial Capital with a par value amounting to $300,000.00, which consists of $250,000.00 in Class A Shares and $50,000.00 in Class B Shares. Class A shares have 40 times the voting weight compared to Class B shares.

Subject to successful registration with the SEC and other governing authorities, the Company may publicly issue new equity shares to investors for subscription by ETH, with or without a premium. These transactions will be recorded in the "ETH" account on the debit side and in the "Paid-In Capital" account (for the par value) and "Additional Paid-In Capital" account (for the premium amount) on the credit side. During the Report Period, no new shares were issued.

---

| | | |
|:---|:---|:---|
|  | **As of 23:59:59 December 31** | **As of 23:59:59 December 31** |
| | **2024** | **2023** |
|  | **USD** | **USD** |
| Subscribed Capital | 300,000.00 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Less: Unpaid Subscription of Capital | (300,000.00) | 0 |
| Paid In Capital | 0 | 0 |
| Additional Paid In Capital | 0 | 0 |

---

The amount of Subscribed Capital and Paid-In Capital can be retrieved by calling the "capAtDate" function of the smart contract of the Register of Members, with a filter condition based on the timestamp of the Report Time.

---

| |
|:---|
| F-25 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> Register of Members: 0x9dc52b48454b0ab4bf493343eb1d20a2002e3c6a <br> function capAtDate (uint date) external view returns (Checkpoints.Checkpoint memory); <br> date: 290687173n <br>

The ETH consideration paid for subscribing to the issued shares will be recorded by four specific events for different scenarios.

&nbsp;&nbsp;&nbsp;&nbsp; (1) **Paid-In Capital:** Indicates that a member has paid a certain amount of ETH to fulfill the obligation of previously acquired shares, which is recorded by the "PayInCapital" event in the smart contract of ROMKeeper.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROMKeeper: 0xEC20588b8d51C66c2BFaD4FB9A79673d92F6A5b0 <br> event PayInCapital (unit indexed seqOfShare, unit indexed amt, unit indexed valueOfDeal); <br>

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Pay Off Capital Increase Deal:** indicates that an Investor has paid the Company a certain amount of ETH to close a capital increase deal as per an investment agreement, which is recorded by the "PayOffCIDeal" event in the smart contract of "ROAKeeper".

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROAKeeper: 0x22914D23fA2cdBB78FBDBbaA46cc991873bD4A80 <br>event PayOffCIDeal(uint indexed caller event uint indexed valueOfDeal) <br>

&nbsp;&nbsp;&nbsp;&nbsp; (3)**Close Bid Against Initial Offer:** indicates that an Investor has paid the Company a certain amount of ETH to close a listed initial offer for issuing new equity shares, which is recorded by the "CloseBidAgainstInitOffer" event in the smart contract of "LOOKeeper".

---

| |
|:---|
| F-26 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> LOOKeeper 0xCAa4bda0fb0b2c6E50Cbf5F3C89c1C56C1820921 <br> event CloseBidAgainstInitOffer (unit indexed buyer, unit indexed amt) <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Close Initial Offer Against Bid:**indicates that a listed buy order has been closed by matching it with a newly placed initial offer for issuing new equity shares, resulting in the corresponding amount of ETH being released from the custody account to the Company.This transaction is recorded by the "ReleaseCustody" event in the General Keeper, with the specific reason "CloseInitOfferAgainstBid" codified in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event ReleaseCustody (unit indexed from, unit indexed to, unit indexed amt, bytes32 reason); <br> reason: //bytes32 format for string "CloseInitOfferAgainstBid" 0x436c6f7365496e69744f66666572416761696e73744269640000000000000000 <br>

**3.8. Distribution**

Subject to the resolution of the General Meeting of members, the Company may distribute ETH to members.Such transactions will be recorded with "ETH" on the credit side and "Distribution" on the debit side. During the reporting period, the Company made no distributions. <br>

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| Distribution | 0 | 0 | 0 | 0 |

---

---

| |
|:---|
| F-27 |
| *[**Table of Contents**](#Toc)* |

---

Distributions are recorded by the "SaveToCoffer" event in the General Keeper, with the filter condition that the reason is "DistributeProfits" (in Bytes32 format).

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event SaveToCoffer (unit indexed acct, unit indexed value, bytes32 indexed reason); <br> reason: ethers. encodeBytes32String ("DistributeProfits") <br>

**3.9.Deposits and Custody**

&nbsp;&nbsp;&nbsp;&nbsp; To facilitate equity trading and profit distribution, the Company has set up special deposit accounts in the General Keeper. These accounts are exclusively controlled by their respective holders. No other entities, including the Company, may transfer, withdraw, or freeze ETH stored in these accounts. Therefore, these deposits are not recognized as assets of the Company.

When a limit buy order is listed on the smart contract of "List of Orders", the corresponding ETH paid by the buyer will also be stored in deposit accounts as "custody". As long as the limit buy order remains listed, the ETH in custody will be frozen as a special guarantee for transfer to the seller as consideration. It can only be released from custody if the buy order is withdrawn or expires.

During the reporting period, no deposit inflows or outflows occurred.

**3.9.1 Deposits Inflow**

The seller's consideration, the buyer's refunded over payments, and distributions to members will all be paid into deposit accounts.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| **Deposits Inflow** | **0** | **0** | **0** | **0** |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Consideration | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Refund Over Payment | 0 | 0 | 0 | 0 |
| **Sub Total of Deposits Inflow** | **0** | **0** | **0** | **0** |

---

---

| |
|:---|
| F-28 |
| *[**Table of Contents**](#Toc)* |

---

Deposit inflows are recorded by the "SaveToCoffer" event in the General Keeper, with their respective reasons.

&nbsp;&nbsp;&nbsp;&nbsp; (1) **Distribution:** the reason for which is recorded as "DistributeProfits" in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GeneralKeeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event SaveToCoffer (unit indexed acct, unit indexed value bytes32 indexed reason); <br> reason: ethers. encodeBytes32String ("DistributeProfits") <br>

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Consideration:** the reasons for which are recorded as "DepositConsiderationOfSTDeal", "CloseBidAgainstOffer", "DepositConsiderationOfSwap", "DepositConsiderationOfRejectedDeal", or "CloseOfferAgainstBid" in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GeneralKeeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event SaveToCoffer (unit indexed acct, unit indexed value bytes32 indexed reason); <br> reason:<br> [ ethers. encodeBytes32String ("DepositConsiderationOfSTDeal") <br> ethers. encodeBytes32String ("CloseBidAgainstOffer") <br> ethers. encodeBytes32String ("DepositConsiderationOfSwap") <br> ethers. encodeBytes32String ("DepositConsiderOfRejectedDeal") <br> ethers. encodeBytes32String ("CloseOfferAgainstBid") ] <br>

---

| |
|:---|
| F-29 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3)**Refund Over Payment:**reasons of which are recorded as "DepositBalanceOfOTCDeal", "DepositBalanceOfPayInCap", "DepositBalanceOfSwap", "DepositBalanceOfBidOrder", "DepositBalanceOfRejectedDeal", or "RefundValueOfBidOrder" in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GeneralKeeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event SaveToCoffer (unit indexed acct, unit indexed value bytes32 indexed reason); <br> reason:<br> [ ethers. encodeBytes32String ("DepositBalanceOfOTCDeal"), <br> ethers. encodeBytes32String ("DepositBalanceOfPayInCap"), <br> ethers. encodeBytes32String ("DepositConsiderationOfSwap"), <br> ethers. encodeBytes32String ("DepositBalanceOfBidOrder"), <br> ethers. encodeBytes32String ("DepositBalanceOfRejectedDea"), <br> ethers. encodeBytes32String ("RefundValueOfBidOrde") ] <br>

**3.9.2. Deposits Outflow**

Deposits can be withdrawn by the relevant account holder, constituting an outflow of deposits.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| Deposits Outflow | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pickup Deposits | 0 | 0 | 0 | 0 |
| **Sub Total of Deposits Outflow** | **0** | **0** | **0** | **0** |

---

Deposit outflows are recorded by the "PickupDeposit" event in the General Keeper.

---

| |
|:---|
| F-30 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event PickupDeposit (address indexed to, unit indexed caller, unit indexed amt); <br>

**3.9.3. Custody Inflow**

The Custody Value of a Bid Order is the only inflow of custody. When a limit buy order is placed on the "List of Orders" smart contract, an equivalent amount of ETH must be paid along with the call command. The ETH will be stored in the deposit account as custody. <br>

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| Custody Inflow | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Custody Value of Bid Order | 0 | 0 | 0 | 0 |
| **Sub Total of Custody Inflow** | **0** | **0** | **0** | **0** |

---

The Custody Value of a Bid Order is recorded by the "SaveToCoffer" event in the General Keeper, with the reason specified as "CustodyValueOfBidOrder" in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event SaveToCoffer (unit indexed acct, unit indexed value, bytes32 reason); <br> reason: ethers. encodeBytes32String ("CustodyValueOfBidOrder") <br>

---

| |
|:---|
| F-31 |
| *[**Table of Contents**](#Toc)* |

---

**3.9.4. Custody Outflow**

There are three scenarios that may cause an outflow of custody: (a) Released to the seller as consideration; (b) Refunded to the buyer as an overpaid balance; or (c) Released to the Company as capital contribution.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| Custody Outflow | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pay Consideration | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Refund Balance | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Close Initial Offer | 0 | 0 | 0 | 0 |
| **Sub Total of Custody Outflow** | **0** | **0** | **0** | **0** |

---

These three scenarios of custody outflow are recorded by the "ReleaseCustody" event in the General Keeper smart contract, with different reasons in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; (1)**Pay Consideration:** the reason for which is recorded as "CloseOfferAgainstBid" in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event ReleaseCustody (unit indexed from, unit indexed to, bytes32 reason); <br> reason: ethers. encodeBytes32String ("CloseOfferAgainstBid") <br>

&nbsp;&nbsp;&nbsp;&nbsp; (2) **Refund Balance:** the reason for which is recorded as "RefundValueOfBidOrder" in Bytes32 format.

---

| |
|:---|
| F-32 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event ReleaseCustody (unit indexed from, unit indexed to, bytes32 reason); <br> reason: ethers. encodeBytes32String ("RefundValueOfBidOrder") <br>

&nbsp;&nbsp;&nbsp;&nbsp; (3) **Close Initial Offer:** the reason for which is recorded as "CloseInitOfferAgainstBid" in Bytes32 format.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> event ReleaseCustody (unit indexed from, unit indexed to, bytes32 reason); <br> reason: ethers. encodeBytes32String ("CloseInitOfferAgainstBid") <br>

 **4. Income Taxes**

As a pass-through entity, The Company has evaluated its tax positions in accordance with ASC 740-10 (Accounting for Uncertainty in Income Taxes) and has determined that it has no uncertain tax positions requiring disclosure. The Company's tax returns remain subject to examination by the Internal Revenue Service (IRS) and other tax authorities for the statutory period of limitations applicable to each jurisdiction.

No provision for income taxes is reflected in the accompanying financial statements, and the Statement of Income does not include income tax expense or benefit.

 **5. Digital Assets**

**5.1. CBP and ETH** <br>

---

| |
|:---|
| F-33 |
| *[**Table of Contents**](#Toc)* |

---

The Company uses CBP to measure and collect royalties and receives ETH as consideration for selling CBP. For Sales, General, and Administrative ("SG&A") expenses or template purchase consideration, the Company may pay either CBP or ETH as consideration to the counterparty. Moreover, the Company also accepts ETH as capital contributions from members or as transfer consideration to be settled against listing offers or contractual share transfer deals.

Chainlink Data Feeds were introduced in ComBoox so that the exchange rate of ETH/USD can be retrieved in real-time. As for the exchange rate between CBP and ETH, the Company uses the refuel rate in Fuel Tank (i.e. the ExRate), as this rate serves as the anchor price for supplying CBP to the market.

The Company supplies CBP through the Fuel Tank. Therefore, the Fuel Tank regularly holds an inventory of CBP and ETH. These inventories are recorded as the Company's assets.

**5.1.1. CBP Flow of Fuel Tank**

CBP can be added to or withdrawn from the Fuel Tank. Together with refuel transactions, these activities form the CBP flows of Fuel Tank.

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **CBP** | **USD** | **CBP** | **USD** |
| **CBP Flow of Fuel Tank** | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Add CBP | 176 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Withdraw CBP | 88 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Refuel CBP | 0 | 0 | 0 | 0 |
| **Sub Total of Custody Outflow** | **88** | **0** | **0** | **0** |

---

&nbsp;&nbsp;&nbsp;&nbsp; Adding CBP is recorded by the "Transfer" event in the Registration Center, with the following conditions: (a) The sender is the General Keeper; and (b) The recipient is the Fuel Tank.

---

| |
|:---|
| F-34 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Registration Center: 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91 <br> event Transfer (address indexed from, address indexed to, uint256 indexed value); <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; General Keeper: 0x68233e877575e8c7e057e83ef0d16ffa7f98984d <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fuel Tank: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0 <br>

Withdrawing CBP is recorded by the "WithdrawFuel" event in the Fuel Tank.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fuel Tank: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0 <br> event WithdrawFuel (address indexed owner, unit indexed amt); <br>

Refueling CBP is recorded by the "Refuel" event in the Fuel Tank.

&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fuel Tank: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0 <br> event Refuel (address indexed buyer, unit indexed amtOfEth unit indexed amtOfCbp); <br>

**5.1.2. ETH Flow of Fuel Tank**

The ETH flows of the Fuel Tank include: (a) Collecting ETH as consideration for CBP sales; and (b) Withdrawing ETH from Fuel Tank to General Keeper.

During the Reporting Period, no ETH inflows or outflows occurred.

---

| |
|:---|
| F-35 |
| *[**Table of Contents**](#Toc)* |

---

---

| | | | | |
|:---|:---|:---|:---|:---|
|  | **For the year ended 23:59:59** | **For the year ended 23:59:59** | **For the year ended 23:59:59** | **For the year ended 23:59:59** |
| | **2024** | **2024** | **2023** | **2023** |
|  | **ETH** | **USD** | **ETH** | **USD** |
| **ETH Flow of Fuel Tank** | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Refuel ETH | 0 | 0 | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Withdraw ETH | 0 | 0 | 0 | 0 |
| **Sub Total of ETH Flow of Fuel Tank** | **0** | **0** | **0** | **0** |

---

Refueling ETH is recorded by the "Refuel" event in the Fuel Tank smart contract.

&nbsp;&nbsp;&nbsp;&nbsp; <br> Fuel Tank: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0 <br> event Refuel (address indexed buyer , uint indexed amtOfEth , uint indexed amtOfCbp); <br>

Withdrawing ETH back to the General Keeper is recorded by the "WithdrawIncome" event in the Fuel Tank.

&nbsp;&nbsp;&nbsp;&nbsp; <br> Fuel Tank: 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0 <br> event WithdrawIncome (address indexed owner , uint indexed amt); <br>

**5.2. Gain and Loss on Digital Assets**

The Company records the USD value of ETH/CBP transactions based on the ETH price at the earliest and latest timestamps of the transactions. The Gain or Loss of Digital Assets is calculated using the ETH price at the Report Time. However, any Gain or Loss of Digital Assets resulting from Paid-In Capital transactions will not be included in operational costs or expenses; instead, they will be recognized solely in Owners' Equity.

---

| |
|:---|
| F-36 |
| *[**Table of Contents**](#Toc)* |

---

---

| | | |
|:---|:---|:---|
|  | **For the year ended 23:59:59 December 31** | **For the year ended 23:59:59 December 31** |
| | **2024** | **2023** |
|  | **USD** | **USD** |
| Gain (Loss) on Digital Assets | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ETH Other Income - G/L | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - ETH GMM Payment - G/L | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CBP Royalty Revenue - G/L | 27.51 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- CBP New User Awards - G/L | (89.50) | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - CBP Startup Cost - G/L | (15910.34) | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - CBP GMM Payment - G/L | 0 | 0 |
| **Total Gain (Loss) on Digital Assets** | **(5972.33)** | **0** |

---

&nbsp;&nbsp;&nbsp;&nbsp; **6. Related Party Transactions**

&nbsp;&nbsp;&nbsp;&nbsp; The Company has engaged in the following related party transactions with the Founding Member, in accordance with ASC 850 - Related Party Disclosures:

**6.1. IPR Contribution by the Founding Member**

As part of the initial capital contribution, the Founding Member transferred certain Intellectual Property Rights (IPR) to the Company and the Company has deferred recognition and amortization of the IPR. For further details, refer to Section 3.5.1.

 **6.2. Issuance of CBP Tokens to the Founding Member**

To facilitate the configuration and setup of the Platform, the Company minted CBP tokens to the Founding Member. For further details, refer to Section 3.6.2 and 5.1.1.

**6.3. Marketing Promotions and New User Awards**

As part of a marketing strategy, the Company automatically mints CBP tokens for new users of the ComBoox platform as a "New User Award". Upon signing up with the Registration Center, users receive a predefined amount of CBP. For further details, refer to Section 3.6.1.

---

| |
|:---|
| F-37 |
| *[**Table of Contents**](#Toc)* |

---

**7. Commitments and Contingencies**

In accordance with ASC 450-20 - Loss Contingencies, the Company has evaluated its legal, contractual, and regulatory obligations and determined that:

&nbsp;&nbsp;&nbsp;&nbsp; (1) As of the reporting time, the Company has no known commitments requiring future financial obligations;

&nbsp;&nbsp;&nbsp;&nbsp; (2) There are no pending or threatened legal proceedings, regulatory investigations, or other contingencies that would require disclosure or accrual under ASC 450-20; and

&nbsp;&nbsp;&nbsp;&nbsp; (3) The Company has not entered into any contractual agreements that create material contingent liabilities.

The Company will continue to monitor and assess any potential commitments or contingencies and will disclose any material changes in subsequent reporting periods as required by US GAAP and PCAOB standards.

**8. Management's Discussion and Analysis (MD&A)**

**8.1. Business Overview**

&nbsp;&nbsp;&nbsp;&nbsp; The Company operates within the emerging Web3 and blockchain industry, leveraging smart contracts and decentralized finance (DeFi) models to facilitate legal rights execution, governance, and value transfer. The core business model is built on ComBoox, a system integrating smart contract Templates, an automated Registration Center, and a digital accounting framework. The Company's main revenue source is royalty payments in CBP, an on-chain utility token, which is recognized when recorded in the Company's Registration Center and offset against deferred revenue.

**8.2. Industry Trends and Business Outlook**

&nbsp;&nbsp;&nbsp;&nbsp; The Web3 ecosystem continues to expand into traditional industries, creating new business models for corporate governance, financial record-keeping, and decentralized organization structures. The Company is strategically positioned in this space through its decentralized legal execution framework, which may gain widespread adoption due to:

&nbsp;&nbsp;&nbsp;&nbsp; (1) Unstoppable Web3 Growth: The increasing adoption of blockchain by enterprises will drive demand for decentralized governance and automated compliance tools, aligning with the Company's core products, which address critical needs for transparency and security in corporate governance.

---

| |
|:---|
| F-38 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp; (2) Recognition of the ComBoox Model: The Turing Machine-inspired design of ComBoox leveraging Registers for state recording, Shareholder Agreements (or Code of Conduct) for state transitions, and Book Keepers for legal automation has the potential to be recognized by enterprises and regulatory bodies as an innovative compliance and governance solution.

&nbsp;&nbsp;&nbsp;&nbsp; (3) DAO and Digital Corporate Governance: The automation of corporate structures and digital securities represents a critical Web3 breakthrough. The Company's framework for handling equity registration, governance acts, and corporate transactions via smart contracts is likely to gain traction.

**8.3. Risks and Uncertainties**

**8.3.1. Liquidity Risks**

&nbsp;&nbsp;&nbsp;&nbsp; The Company operates entirely on-chain, eliminating the need for traditional bank accounts or cash reserves. Current version of the Template Smart Contracts fully supports the anticipated functions required for companies to manage equity shares and corporate governance records, which ensures that the Company can continue to operate and develop its business independently.

**8.3.2. Legal and Regulatory Uncertainty**

&nbsp;&nbsp;&nbsp;&nbsp; Regulatory clarity on blockchain-based corporate governance is evolving. The Company must continuously adapt to jurisdictional differences and update its smart contract architecture accordingly. The Wyoming DAO LLC framework provides an initial regulatory foundation, but further legal challenges and adjustments may arise as Web3 laws mature.

**8.3.3. Accounting, Tax, and Compliance Risks**

&nbsp;&nbsp;&nbsp;&nbsp; The pass-through entity structure (per ASC 740) shifts tax obligations to individual members, which requires clear disclosure and tracking of distributable earnings. The valuation of contributed IPR (per ASC 850) is deferred due to the lack of comparable market data. This presents a unique challenge for financial reporting and potential investor scrutiny. The fair value measurement of ETH and CBP (per ASC 820) introduces complexity, particularly in determining unrealized gains and losses due to digital market volatility.

---

| |
|:---|
| F-39 |
| *[**Table of Contents**](#Toc)* |

---

**8.3.4. Intellectual Property Risks**

&nbsp;&nbsp;&nbsp;&nbsp; Open-source smart contract development enables transparency but also exposes the Company's IP to unauthorized use and imitation. Although ComBoox's legal compliance focus provides a deterrent against pirated versions, the Company will need to continuously innovate to maintain its competitive edge.

**8.3.5. Operational and Market Risks**

&nbsp;&nbsp;&nbsp;&nbsp; Token price volatility affects financial performance, requiring robust risk management to stabilize revenue and expense recognition. The adoption curve for blockchain-based legal solutions is uncertain, requiring strategic partnerships and continuous market education efforts.

**8.3.6. Dependence on Future CBP Sales**

&nbsp;&nbsp;&nbsp;&nbsp; The Company's business strategy is heavily reliant on the adoption of its CBP platform to generate revenue. Key drivers for revenue growth include:

&nbsp;&nbsp;&nbsp;&nbsp; (1) SEC Recognition and Offering Proceeds: The Company expects that, following recognition by the SEC, the net proceeds from the offering will be sufficient to cover operating expenses, including compliance and administrative functions.

&nbsp;&nbsp;&nbsp;&nbsp; (2) Platform Adoption and Clients Expansion: Revenue growth is contingent on increased adoption of the CBP platform and the expansion of the Company's client base, particularly among corporations seeking to automate share transactions and governance activities.

**8.3.7. Management's Plans**

&nbsp;&nbsp;&nbsp;&nbsp; Given the current market landscape and risk considerations, the Company is committed to:

&nbsp;&nbsp;&nbsp;&nbsp; (1) Enhancing ComBoox's Regulatory Compliance: Adapting the smart contract framework to meet evolving legal requirements across jurisdictions.

&nbsp;&nbsp;&nbsp;&nbsp; (2) Strengthening Financial Reporting Mechanisms: Ensuring GAAP and PCAOB compliance, refining fair value accounting, and maintaining transparent disclosures.

&nbsp;&nbsp;&nbsp;&nbsp; (3) Securing Intellectual Property: Implementing IP protection strategies, such as license-based monetization and proprietary extensions to open-source elements.

&nbsp;&nbsp;&nbsp;&nbsp; (4) Driving Market Adoption: Expanding the user base through DAO partnerships, legal tech collaborations, and blockchain enterprise solutions.

---

| |
|:---|
| F-40 |
| *[**Table of Contents**](#Toc)* |

---

**9. Going Concern**

&nbsp;&nbsp;&nbsp;&nbsp; The management has evaluated the Company's ability to continue in the foreseeable future, including the company's business model and future plans, with the following key points:

&nbsp;&nbsp;&nbsp;&nbsp; (1) As a passive interest-holding vehicle, the Company automatically collects royalty revenues from template contracts and does not engage in any other development activities.

&nbsp;&nbsp;&nbsp;&nbsp; (2) Templates are provided to users on an "As Is" basis. The Company is not responsible for upgrades, iterations, or post-sale development. If necessary, the Company may procure templates from third-party authors, subject to approval by the members' meeting.

&nbsp;&nbsp;&nbsp;&nbsp; (3) Pursuant to the Operating Agreement, the Company will use its best efforts to avoid incurring any liabilities. No members or managers will be paid any remuneration, and the Company has no employees and has no plans to hire any employees.

&nbsp;&nbsp;&nbsp;&nbsp; (4) In the event of a successful IPO, members may decide to expand operations through the procurement of specialized services (e.g., marketing, blockchain integration). Absent an IPO, the Company's existing business model is able to support normal operations.

&nbsp;&nbsp;&nbsp;&nbsp; Therefore, management concluded that there was no substantial doubt about the entity's ability to continue as a going concern that required disclosure in such financial statements.

**10. Subsequent Event**

&nbsp;&nbsp;&nbsp;&nbsp; Additionally, subsequent to the reporting period, the Company's management has continued its efforts to file supplemental materials related to its registration statement on Form S-1 with the U.S. Securities and Exchange Commission (SEC).

&nbsp;&nbsp;&nbsp;&nbsp; The Company evaluated subsequent events through the date of this audit report. The Company did not have any subsequent events affecting the amounts reported in the financial statements for the year ended December 31, 2024.

---

| |
|:---|
| F-41 |
| *[**Table of Contents**](#Toc)* |

---

## **Unaudited Financial Statements for the Six Months ended June 30, 2025** 
**Balance Sheets of June 30, 2025<br> (Unaudited)**

---

| | | |
|:---|:---|:---|
| | **As of 23:59:59** | **As of 23:59:59** |
| | **June 30, 2025** | **December 31, 2024** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Intangible Assets - IPR  | $0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Intangible Assets - ETH | 23.14 | 0.00 |
| **Total Assets** | **23.14** | **0** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deferred Revenue  | 44916.30 | 53420.55 |
| **Total Liabilities** | **44916.30** | **53420.55** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Subscribed Capital  | 300000.00 | 300000.00 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Less: Unpaid Subscription  | (292500.00) | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Paid In Capital  | 7500.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ETH Gain/Loss In Equity  | 336.03 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Retained Earnings  | (52729.19) | (53420.55) |
| **Total Equity** | **(44893.16)** | **(53420.55)** |
| **Total Liabilities and Equity** | $**23.14** | **0.00** |

---

---

| |
|:---|
| F-42 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Operations for the First Six Months of 2025 <br> (Unaudited)**

---

| | | |
|:---|:---|:---|
| | **For the Six Months ended 23:59:59** | **For the Six Months ended 23:59:59** |
| | **June 30, 2025** | **December 31, 2024** |
| Royalty Income | $226.52 | 112.90 |
| **Gross profit** | **226.52** | **112.90** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selling, General, and Administrative  | (7589.33) | (37561.12) |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gain and Loss on Digital Assets  | (173.31) | (15972.33) |
| **Total Operating Expenses** | **(7762.64)** | **(53533.45)** |
| **Income Before Taxes** | **(7536.12)** | **(53420.55)** |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Income Tax Expense  | 0.00 | 0.00 |
| **Net Income(Loss)** | $**(7536.12)** | **(53420.55)** |

---

---

| |
|:---|
| F-43 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Changes in Members' Equity for the First Six Months of 2025<br>(Unaudited)**

---

| | | | | | | |
|:---|:---|:---|:---|:---|:---|:---|
| | **Class A <br> Paid-In Capital** | **Class B <br> Paid-In Capital** | **Additional <br> Paid-In Capital** | **ETH Gain/Loss <br> In Equity** | **Retained Earnings** | **Total Equity** |
| **Balance at July 1, 2024** | $**0** | **0** | **0** | **0** | **0** | **0** |
| Net Income |  |  |  |  | (53420.55) | (53420.55) |
| **Balance at December 31, 2024** | $**0** | **0** | **0** | **0** | **(53420.55)** | **(53420.55)** |
| Net Income |  |  |  |  | (7536.12) | (7536.12) |
| ETH Gain/Loss Adjustment |  |  |  |  | 8227.48 | 8227.48 |
| Paid In Capital Contribution |  | 7500.00 |  | 336.03 |  | 7836.03 |
| **Balance at June 30, 2025** | $**0** | **7500.00** | **0** | **366.03** | **(52729.19)** | **(44893.16)** |

---

---

| |
|:---|
| F-44 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Cash Flows for the First Six Months of 2025 <br>(Unaudited)** 

---

| | | |
|:---|:---|:---|
| | **For the Six Months ended 23:59:59** | **For the Six Months ended 23:59:59** |
| | **June 30, 2025** | **December 31, 2024** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deferred Revenue From CBP Sales  | $0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Other Income  | 0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sales, General & Administrative  | 0.00 | 0.00 |
| **Net Inflow from Operating Activities** | **0.00** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Purchase of IPR  | 0.00 | 0.00 |
| **Net Outflow for Investing Activities** | **0.00** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Proceeds From Share Issuance  | 0.00 | 0.00 |
| Distribution | 0.00 | **0.00** |
| **Net Inflow from Financing Activities** | **0.00** | **0.00** |
| **Net Inflow** | $**0.00** | **0.00** |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *The Company operates exclusively with digital assets and does not maintain traditional cash or bank accounts. All transactions including those related to the minting, exchange, and transfer of assets are conducted entirely using on-chain digital assets. As a result, the Statement of Cash Flows reflects a zero balance, as there are no cash inflows or outflows in the conventional sense.* 

---

| |
|:---|
| F-45 |
| *[**Table of Contents**](#Toc)* |

---

 **Condensed Notes to the Unaudited Financial Statements<br> For the six months ended June 30, 2025**

**Basis of presentation and disclaimer**

The accompanying condensed notes are unaudited and have been prepared by management of ComBoox DAO LLC (the "**Company**") in accordance with U.S. generally accepted accounting principles for interim financial information and pursuant to the requirements applicable to interim disclosures in registration statements filed with the U.S. Securities and Exchange Commission. They are condensed and do not include all of the information and footnote disclosures required by U.S. GAAP for complete financial statements. These condensed notes should be read in conjunction with the audited financial statements and notes included in the Company's audited financial statements as of and for the year ended December 31, 2024.

**1. Description of business (condensed)**

The Company operates the ComBoox platform, a blockchain-based book-entry and tokenization system deployed on Arbitrum One. The Company issues a utility token called ComBoox Points ("**CBP**") and historically accepted ETH as consideration for CBP sales via a smart contract commonly referred to as the "Fuel Tank."

**2. Summary of significant accounting policies (condensed)**

The accounting policies summarized below are condensed from those disclosed in the Company's audited financial statement notes as of December 31, 2024 and are applied consistently in preparing these condensed interim financial statements, except for the change in accounting policy described in Note 2.1 below.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**2.1 Change in accounting policy - Fuel Tank update and CBP pricing (highlight)**

On June 19, 2025, pursuant to a resolution adopted by the General Meeting of Members, the Company deployed an updated Fuel Tank smart contract that sells CBP for **USDC** rather than **ETH**. Concurrently, the members approved a fixed USD price of **USD 2,816.15 per CBP** (the **"CBP Fixed Price"**), determined by reference to the 20-calendar-day highest ETH-based equivalent price around the adoption date. The CBP Fixed Price became effective for accounting purposes on June 19, 2025.

---

| |
|:---|
| F-46 |
| *[**Table of Contents**](#Toc)* |

---

The accounting consequences of this policy change are summarized below and have been applied prospectively from the effective date (June 19, 2025).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**2.2 Recognition of CBP and deferred revenue (specific guidance)**

* **CBP held by the Company** is not recognized as an asset on the Company's balance sheet. The Company views CBP retained in on-chain contract addresses that are under the Company's control as a protocol token and not a separate recognized asset for purposes of the Company's financial statements.

* **Deferred revenue** is recognized only in respect of CBP that are held by entities other than the Company (for example, CBP that have been sold to customers). In such cases, deferred revenue is measured in USD using the CBP Fixed Price of USD 2,816.15 per CBP for reporting periods on or after June 19, 2025.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**2.3 Measurement of CBP-denominated expenses and exchange gain/loss mechanics**

Certain operating costs and awards to users are paid or denominated in CBP (**"CBP-denominated expenses"**) incurred before June 19, 2025, including new user awards and startup costs issued to founding members. The accounting treatment for such items is as follows:

* **Measurement at occurrence date:** At the date the CBP-denominated expense is incurred, the expense is measured in USD by reference to the CBP-to-ETH exchange rate (**"ExRate"**) and the observable ETH/USD price at that occurrence date.

* **Re-measurement at reporting date:** For reporting and presentation purposes, the Company re-measures the USD equivalent of the CBP-denominated items at the reporting date using the CBP Fixed Price of USD 2,816.15 per CBP.

* **Exchange gain or loss recognition:** The difference between (a) the USD amount initially recorded at the occurrence date (as measured using ExRate and ETH/USD price) and (b) the USD amount determined at the reporting date using the CBP Fixed Price is recognized as an **exchange gain or loss** in retained earnings. This gain or loss represents the remeasurement effect arising from fixing the reporting price at the CBP Fixed Price while the underlying expense was measured using market-based ETH exchange rates.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**2.4 Interaction between deferred revenue, royalty income and retained earnings (impact analysis)**

Because the CBP Fixed Price is used to measure deferred revenue and retained earnings is adjusted for the exchange gain or loss described above, the same CBP valuation movement will be reflected concurrently in both deferred revenue and retained earnings. In addition, **royalty income** recognized before June 19, 2025, which was previously measured based on ETH-denominated CBP pricing, will also be remeasured in retained earnings for the reporting date. Any price differences arising from the transition from ETH-based pricing to the CBP Fixed Price will therefore also be included in retained earnings.

Taken together - including new user awards, startup costs, deferred revenue, and the remeasurement of pre-June 19, 2025 royalty income - these concurrent adjustments offset within equity, and management has concluded that there will be **no material effect on the Company's balance sheet** as a result of the CBP pricing policy change from ETH-based pricing to a fixed USD price.

---

| |
|:---|
| F-47 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**2.5 Other measurement matters**

ETH that are held by the Company and not characterized as CBP are measured in USD in accordance with the Company's existing fair-value policy, which uses observable market rates (for example, Chainlink or other market price feeds) under ASC 820. Any unrealized gains or losses arising from those balances continue to be recognized in accordance with the Company's policies described in the audited financial statements.

**3. Prospective application and comparative periods**

The change described in Note 2.1 is applied prospectively from June 19, 2025. The amounts presented for the six months ended June 30, 2025 reflect the policy change only for transactions and balances effective on or after June 19, 2025. Historical amounts prior to the effective date have not been retrospectively restated.

**4. Estimated quantitative impact**

As of the issuance date of these condensed notes, management has not identified any material quantitative impact that would require separate pro forma disclosure. The Company will continue to evaluate and, if material, disclose the quantitative effect of the change in subsequent filings.

**5. Other condensed disclosures (condensed)**

Except as described above, there have been no material changes to the Company's significant accounting policies or other matters that would require disclosure in these unaudited condensed interim notes compared with the audited notes as of December 31, 2024.

Management has evaluated subsequent events through the date these condensed notes were issued and determined that no further disclosure is required beyond the matters described herein.

---

| |
|:---|
| F-48 |
| *[**Table of Contents**](#Toc)* |

---

## **Unaudited Financial Statements as of September 30, 2025** 
**Balance Sheets of September 30, 2025<br> (Unaudited)**

---

| | | |
|:---|:---|:---|
| | **As of 23:59:59** | **As of 23:59:59** |
| | **September 30, 2025** | **June 30, 2025** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Intangible Assets - IPR  | $0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Intangible Assets - ETH | 38.47 | 23.14 |
| **Total Assets** | **38.47** | **23.14** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deferred Revenue  | 44879.01 | 44916.30 |
| **Total Liabilities** | **44879.01** | **44916.30** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Subscribed Capital  | 300000.00 | 300000.00 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Less: Unpaid Subscription  | (292500.00) | (292500.00) |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Paid In Capital  | 7500.00 | 7500.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ETH Gain/Loss In Equity  | 3871.36 | 336.03 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Retained Earnings  | (56211.90) | (52729.19) |
| **Total Equity** | **(44840.54)** | **(44893.16)** |
| **Total Liabilities and Equity** | $**38.47** | **23.14** |

---

---

| |
|:---|
| F-49 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Operations for the Third Quarter of 2025 <br> (Unaudited)**

---

| | | |
|:---|:---|:---|
| | **For the Quarter ended 23:59:59** | **For the Quarter ended 23:59:59** |
| | **September 30, 2025** | **June 30, 2025** |
| Royalty Income | $37.29 | 55.75 |
| **Gross profit** | 37.29 | 55.75 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selling, General, and Administrative  | 0 | 0 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gain and Loss on Digital Assets  | 0 | (5.87) |
| **Total Operating Expenses** | **0** | **(5.87)** |
| **Income Before Taxes** | **37.29** | **61.62** |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Income Tax Expense  | 0.00 | 0.00 |
| **Net Income(Loss)** | $**37.29** | **61.62** |

---

---

| |
|:---|
| F-50 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Changes in Members' Equity for the Third Quarter of 2025<br>(Unaudited)**

---

| | | | | | | |
|:---|:---|:---|:---|:---|:---|:---|
| | **Class A <br>Paid-In Capital** | **Class B <br>Paid-In Capital** | **Additional <br>Paid-In Capital** | **ETH Gain/Loss <br>In Equity** | **Retained Earnings** | **Total Equity** |
| **Balance at March 31, 2025** | $**0** | **7500** | **0** | **(1095.00)** | **(35523.24)** | **(29118.24)** |
| Net Income |  |  |  |  | 61.62 | 61.62 |
| ETH Gain/Loss Adjustment |  |  |  | 1431.03 | (17267.57) | (15836.54) |
| **Balance at June 30, 2025** | $**0** | **7500** | **0** | **336.03** | **(52729.19)** | **(44893.16)** |
| Net Income |  |  |  |  | 37.29 | 37.29 |
| ETH Gain/Loss Adjustment |  |  |  | 3535.33 | (3520.00) | 15.33 |
| **Balance at September 30, 2025** | $**0** | **7500.00** | **0** | **3871.36** | **(56211.90)** | **(44840.54)** |

---

---

| |
|:---|
| F-51 |
| *[**Table of Contents**](#Toc)* |

---

 **Statements of Cash Flows for the Third Quarter of 2025 <br>(Unaudited)** 

---

| | | |
|:---|:---|:---|
| | **For the Quarter ended 23:59:59** | **For the Quarter ended 23:59:59** |
| | **September 30, 2025** | **June 30, 2025** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deferred Revenue From CBP Sales  | $0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Other Income  | 0.00 | 0.00 |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sales, General & Administrative  | 0.00 | 0.00 |
| **Net Inflow from Operating Activities** | **0.00** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Purchase of IPR  | 0.00 | 0.00 |
| **Net Outflow for Investing Activities** | **0.00** | **0.00** |
| &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Proceeds From Share Issuance  | 0.00 | 0.00 |
| Distribution | 0.00 | **0.00** |
| **Net Inflow from Financing Activities** | **0.00** | **0.00** |
| **Net Inflow** | $**0.00** | **0.00** |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *The Company operates exclusively with digital assets and does not maintain traditional cash or bank accounts. All transactions including those related to the minting, exchange, and transfer of assets are conducted entirely using on-chain digital assets. As a result, the Statement of Cash Flows reflects a zero balance, as there are no cash inflows or outflows in the conventional sense.* 

---

| |
|:---|
| F-52 |
| *[**Table of Contents**](#Toc)* |

---

 **Condensed Notes to the Unaudited Financial Statements<br> For the Quarter ended September 30, 2025**

**1. Basis of presentation**

The accompanying unaudited condensed financial statements have been prepared in accordance with U.S. generally accepted accounting principles for interim financial information. In the opinion of management, all adjustments considered necessary for a fair presentation have been included.

**2. Summary of significant accounting policies**

There have been no material changes to the Company's significant accounting policies as described in the notes to the unaudited financial statements for the six months ended June 30, 2025, except as previously disclosed regarding the CBP pricing policy adopted on June 19, 2025.

**3. Subsequent events**

Management has evaluated subsequent events through the date these financial statements were issued and determined that no additional disclosure is required.

---

| |
|:---|
| F-53 |
| *[**Table of Contents**](#Toc)* |

---

# COMBOOX DAO LLC

## PROSPECTUS
&nbsp;&nbsp;&nbsp;&nbsp; **________, 2025** 

 **Until _______, 2025 (90 calendar days after the date of this Prospectus) all dealers that effect transactions in these securities, whether or not participating in this offering, may be required to deliver a prospectus. This is in addition to the dealers' obligation to deliver a prospectus when acting as underwriters and with respect to their unsold allotments or subscriptions.** 

---

| |
|:---|
| vi |
| *[**Table of Contents**](#Toc)* |

---

#### Part II INFORMATION NOT REQUIRED IN PROSPECTUS

#### Item 13. Other Expenses of Issuance and Distribution
The following table sets forth all costs and expenses, payable by us in connection with the sale of the shares being registered. All amounts shown are estimates except for the SEC registration fee:

---

| | |
|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expenses**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expenses**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Legal Fees**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $________.00**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Blue Sky Qualifications**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $________.00**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Accounting Fees**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $________.00**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total\*:**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $________.00**  |

---

\*All amounts are estimates. For the interests of and on behalf of the Company, the Founding Member has already paid approximately $[•] of expenses and will pay the remaining expenses from his cash on hand. The Company may reimburse these expenses actually incurred and paid in form of ETH or USDC, provided that such costs and expenses are approved by Ordinary Resolution. If the motion is rejected by the General Meeting, all the costs and expenses will be assumed by the Founding Member.

#### Item 14. Indemnification of Directors and Officers.
The Operating Agreement provides for the indemnification of a present or former member, manager or agent who is or was serving the Company upon request and approval. Such indemnification shall include, but not necessarily be limited to, expenses, including attorney's fees actually or reasonably incurred by him or her. We may indemnify such individual against all costs, expenses, and liabilities incurred in a threatened, pending or completed action, suit, or proceeding brought because such individual is served for the Company. Such individual must have conducted himself/herself in good faith and reasonably believed that his/her conduct was in, or not opposed to, our best interests. In a criminal action, he/he must not have had a reasonable cause to believe his/her conduct was unlawful.

---

| |
|:---|
| II-1 |
| *[**Table of Contents**](#Toc)* |

---

At present, there is no litigation or proceeding involving a member or manager of ours as to which indemnification is being sought, nor are we aware of any threatened litigation that may result in claims for indemnification by any manager or member.

#### &nbsp;&nbsp;&nbsp;&nbsp; Item 15. Recent Sales of Unregistered Securities.
&nbsp;&nbsp;&nbsp;&nbsp; In exchange of Royalty Interests and CBP's Minting Right on Arbitrum One, the Company has issued 2,500,000,000 Class A Shares and 500,000,000 Class B Shares to Founding Member.

&nbsp;&nbsp;&nbsp;&nbsp; Other than the securities mentioned above, the Company has not issued or sold any securities.

#### &nbsp;&nbsp;&nbsp;&nbsp; Item 16. Exhibits Index.

---

| | |
|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Index to Exhibits <br> Exhibit No.**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> Exhibit Description**  |
| [3.1](comboox_ex31.htm)  | [Certificate of Organization](comboox_ex31.htm)  |
| [3.2](comboox_ex32.htm)  | [Articles of Organization](comboox_ex32.htm)  |
| [3.3](comboox_ex33.htm)  | [Amendment to The Articles of Organization](comboox_ex33.htm)  |
| [3.4](comboox_ex34.htm)  | [Amended and Restated Operating Agreement](comboox_ex34.htm)  |
| [10.1](comboox_ex101.htm)  | [Amended and Restated Capital Contribution Agreement by and between the Founding Member and the Company](comboox_ex101.htm)  |
| [23.1](comboox_ex231.htm)  | [Consent of Kustov & Associates, Inc](comboox_ex231.htm)  |
| [23.2\*](comboox_ex101.htm)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Consent of U.S. Counsel  |
| [32.1](comboox_ex321.htm)  | [White Paper of ComBoox](comboox_ex321.htm)  |
| [32.2](comboox_ex322.htm)  | [Source Codes of ComBoox (v0.4.2)](comboox_ex322.htm)  |
| [32.3](comboox_ex323.htm)  | [Founding Member's Undertaking to Provide Funding for Payment Obligations](comboox_ex323.htm)  |

---

\* To be filed by amendment.

---

| |
|:---|
| II-2 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp; Item 17. Undertakings.
The undersigned registrant hereby undertakes:

&nbsp;&nbsp;&nbsp;&nbsp; (1) To file, during any period in which offers or sales are being made, a post-effective amendment to this registration statement:

&nbsp;&nbsp;&nbsp;&nbsp; (i) To include any prospectus required by Section 10(a)(3) of the Securities Act of 1933;

&nbsp;&nbsp;&nbsp;&nbsp; (ii) To reflect in the prospectus any facts or events arising after the effective date of the registration statement (or the most recent post-effective amendment thereof) which, individually or in the aggregate, represent a fundamental change in the information set forth in the registration statement. Notwithstanding the foregoing, any increase or decrease in volume of securities offered (if the total dollar value of securities offered would not exceed that which was registered) and any deviation from the low or high end of the estimated maximum offering range may be reflected in the form of prospectus filed with the Commission pursuant to Rule 424(b) if, in the aggregate, the changes in volume and price represent no more than a 20 percent change in the maximum aggregate offering price set forth in the "Calculation of Registration Fee" table in the effective registration statement;

&nbsp;&nbsp;&nbsp;&nbsp; (iii) To include any material information with respect to the plan of distribution not previously disclosed in the registration statement or any material change to such information in the registration statement;

(2) That, for the purpose of determining any liability under the Securities Act of 1933, each such post-effective amendment shall be deemed to be a new registration statement relating to the securities offered therein, and the offering of such securities at that time shall be deemed to be the initial bona fide offering thereof.

(3) To remove from registration by means of a post-effective amendment any of the securities being registered which remain unsold at the termination of the offering.

(4) That, for the purpose of determining liability under the Securities Act of 1933 to any purchaser, each prospectus filed pursuant to Rule 424(b) as part of a registration statement relating to an offering, other than registration statements relying on Rule 430B or other than prospectuses filed in reliance on Rule 430A, shall be deemed to be part of and included in the registration statement as of the date it is first used after effectiveness. Provided, however, that no statement made in a registration statement or prospectus that is part of the registration statement or made in a document incorporated or deemed incorporated by reference into the registration statement or prospectus that is part of the registration statement will, as to a purchaser with a time of contract of sale prior to such first use, supersede or modify any statement that was made in the registration statement or prospectus that was part of the registration statement or made in any such document immediately prior to such date of first use.

---

| |
|:---|
| II-3 |
| *[**Table of Contents**](#Toc)* |

---

(5) That, for the purpose of determining liability of the registrant under the Securities Act of 1933 to any purchaser in the initial distribution of the securities, the undersigned registrant undertakes that in a primary offering of securities of the undersigned registrant pursuant to this registration statement, regardless of the underwriting method used to sell the securities to the purchaser, if the securities are offered or sold to such purchaser by means of any of the following communications, the undersigned registrant will be a seller to the purchaser and will be considered to offer or sell such securities to such purchaser:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (i) Any preliminary prospectus or prospectus of the undersigned registrant relating to the offering required to be filed pursuant to Rule 424;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ii) Any free writing prospectus relating to the offering prepared by or on behalf of the undersigned registrant or used or referred to by the undersigned registrant;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (iii) The portion of any other free writing prospectus relating to the offering containing material information about the undersigned registrant or its securities provided by or on behalf of the undersigned registrant; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (iv) Any other communication that is an offer in the offering made by the undersigned registrant to the purchaser.

Insofar as indemnification for liabilities arising under the Securities Act of 1933 may be permitted to directors, officers and controlling persons of the registrant pursuant to the foregoing provisions, or otherwise, the registrant has been advised that in the opinion of the Securities and Exchange Commission such indemnification is against public policy as expressed in the Act and is, therefore, unenforceable. In the event that a claim for indemnification against such liabilities (other than the payment by the registrant of expenses incurred or paid by a director, officer or controlling person of the registrant in the successful defense of any action, suit or proceeding) is asserted by such director, officer or controlling person in connection with the securities being registered, the registrant will, unless in the opinion of its counsel the matter has been settled by controlling precedent, submit to a court of appropriate jurisdiction the question whether such indemnification by it is against public policy as expressed in the Act and will be governed by the final adjudication of such issue.

---

| |
|:---|
| II-4 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp; SIGNATURES
&nbsp;&nbsp;&nbsp;&nbsp; Pursuant to the requirements of the Securities Act of 1933, the registrant has duly caused this registration statement to be signed on its behalf by the undersigned, thereunto duly authorized in the City of Beijing, China, on [ ], 2025.

 **Comboox DAO LLC** <br>By: <br> Name: Li Li <br> Title: the Founding Member and Manager

&nbsp;&nbsp;&nbsp;&nbsp; Pursuant to the requirements of the Securities Act of 1933, this offering has been signed by the following person in the capacities indicated on the date of [ ], 2025.

Name: **Li Li** <br>By: <br> Title: the Founding Member and Manager

---

| |
|:---|
| II-5 |
| *[**Table of Contents**](#Toc)* |

---

## Ex-3

![](comboox_ex31img1.jpg)

## Ex-3

![](comboox_ex32img1.jpg)

------

![](comboox_ex32img2.jpg)

------

![](comboox_ex32img3.jpg)

------

![](comboox_ex32img4.jpg)

## Ex-3

![](comboox_ex33img1.jpg)

## Ex-3

### AMENDED AND RESTATED

## OPERATING AGREEMENT

## FOR

# COMBOOX DAO LLC
![](comboox_s1img1.jpg)

## A DECENTRALIZED AUTONOMOUS ORGANIZATION
**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROSPECTIVE INVESTORS ARE NOT TO CONSTRUE THE CONTENTS OF THIS AGREEMENT OR ANY PRIOR OR SUBSEQUENT COMMUNICATIONS FROM THE COMPANY, THE MEMBER OR THEIR AFFILIATES, OR ANY PROFESSIONAL ASSOCIATED WITH THIS OFFERING, AS LEGAL, TAX OR INVESTMENT ADVICE. EACH INVESTOR SHOULD CONSULT WITH AND RELY ON HIS OR HER OWN ADVISORS AS TO THE LEGAL, TAX AND/OR ECONOMIC IMPLICATIONS OF THE INVESTMENT DESCRIBED IN THIS AGREEMENT AND ITS SUITABILITY FOR SUCH INVESTOR.** 

**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AN INVESTMENT IN THE SHARES CARRIES A HIGH DEGREE OF RISK AND IS ONLY SUITABLE FOR AN INVESTOR WHO CAN AFFORD LOSS OF HIS OR HER ENTIRE INVESTMENT IN THE SHARES. THE SHARES HAVE NOT BEEN REGISTERED UNDER THE UNITED STATES SECURITIES ACT OF 1933. AS AMENDED OR THE SECURITIES LAWS OF ANY OTHER STATE. ACCORDINGLY, SHARES MAY NOT BE TRANSFERRED SOLD, PLEDGED OR HYPOTHECATED IN THE ABSENCE OF AN EFFECTIVE REGISTRATION STATEMENT OR A VALID EXEMPTION FROM SUCH REGISTRATION.** 

 **TABLE OF CONTENTS**

---

| | |
|:---|:---|
|  | **Page** |
| [ARTICLE 1. Definition](#ARTICAL 1.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1  |
| [ARTICLE 2. Formation](#ARTICAL 2.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8  |
| [ARTICLE 3. Shares](#ARTICAL 3.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13  |
| [ARTICLE 4. Trade of Shares](#ARTICAL 4.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16  |
| [ARTICLE 5. Pledge of Shares](#ARTICAL 5.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22  |
| [ARTICLE 6. Capital Contributions, Assets, and Liabilities](#ARTICAL 6.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25  |
| [ARTICLE 7. Profits, Lossess and Distribution](#ARTICAL 7.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32  |
| [ARTICLE 8. Members](#ARTICAL 8.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34  |
| [ARTICLE 9. General Meeting](#ARTICAL 9.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37  |
| [ARTICLE 10. Management](#ARTICAL 10.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 43  |
| [ARTICLE 11. Compensation and Reimbursement](#ARTICAL 11.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 47  |
| [ARTICLE 12. Bookkeeping](#ARTICAL 12.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 49  |
| [ARTICLE 13. General Matters](#ARTICAL 13.)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 54  |
| [CERTIFICATION OF MEMBERS](#CERTIFICATION OF MEMBERS)  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 58  |

---

---

| |
|:---|
| iii |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THIS OPERATING AGREEMENT (this "**Agreement**") is made, adopted and originally entered into effective as of May 18, 2024 (the "**Effective Date**"), and is amended and restated on the date of September 30, 2025 , by the members whose signatures appear at the end of this Agreement, for governing the operating of Comboox DAO LLC (the "**Company**"), a Wyoming limited liability company electing to be a decentralized autonomous organization.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WITNESSETH

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEREAS, the Company was formed as a decentralized autonomous organization under the Wyoming Limited Liability Company Act (the "**Act**") and the Wyoming Decentralized Autonomous Organization Supplement (the "**Supplement**") pursuant to a CERTIFICATE OF ORGANIZATION filed by Wyoming Secretary of State on November 8, 2023 .

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOW THEREFORE, the OPERATING AGREEMENT of the Company is hereby stated in its entirety as follows:

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 1. Definition
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.1. "**Act**" means The Wyoming Limited Liability Company Act, as amended from time to time.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.2. "**Agreement**" means this decentralized autonomous organization operating agreement of the Company, which may be approved, adopted, and/or amended pursuant to this Agreement, as well as the Company's Articles of Organization.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3. "**ArbitrumOne**" means the Ethereum Layer-2 public blockchain network operating under the name "**ArbitrumOne**", which is connected to the main net of Ethereum and uses a technology called "**Optimistic Rollups**" to improve the scalability and efficiency of Ethereum.

---

| |
|:---|
| 1 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.4. "**Articles**" means the Articles of Organization of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.5. "**Backup Key**" means the other account address added by a User into its ComBoox User account, which may also be recognized by Registration Center to retrieve the User Number for identification purpose.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.6. "**Buy Orders**" has the meaning defined in Section 4.5.4.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.7. "**Cashier**" has the meaning defined in Section 6.5.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.8. "**CBP**" or "**ComBoox Points**" means the ERC-20 token booked in Registration Center, the primary function of which is to act as the ComBoox Community's utility token to automatically calculate, collect and transfer royalties from Users of Templates to the relevant intellectual properties' holder.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.9. "**Certificate of Contribution**" or "**Certificate**" has the meaning defined in Section 3.1.3.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.10. "**Clean Paid**" has the meaning defined in Section 3.1.2(4).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.11. "**Closed Deals**" has the meaning defined in Section 4.5.5.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.12. "**ComBoox**" or "**ComBoox Platform**" means the company book-entry platform consisting of a core smart contract called "**Registration Center**" and a set of Templates deployed on ArbitrumOne, which is designed for equity registration and corporate statutory books-keeping, and aims to assist users to quickly establish a legal, secure, transparent, reliable and automatic system to enable the company's stakeholders to perform legal acts related to share transactions or corporate governance in a self-service mode.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.13. "**ComBoox Community**" means the open, unincorporated, loose organization of CBP holders, whose primary function is to decide, through public discussion and public voting, for reference purpose only, on whether new template contracts are suitable to be included into the ComBoox Platform as Template, so as to improve or expand the functionalities thereof.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.14. "**Contractual Transfer**" has the meaning defined in Section 4.3.2.

---

| |
|:---|
| 2 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.15. "**Creditor**" has the meaning defined in Section 5.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.16. "**Days**" means natural days, each consisting of 24 hours.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.17. "**Deed of Pledge**" has the meaning defined in Section 5.2.2.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.18. "**Distribution Weight**" has the meaning defined in Section 3.1.2(9).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.19. "**Distribution Points**" has the meaning defined in Section 3.1.2(9).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.20. "**Dollar**", "**USD**" or "**$**" means the legal currency of the United States.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.21. "**Due Date**" has the meaning defined in Section 5.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.22. "**ETH**" means the native utility token of the Arbitrum One network, issued 1:1 against Ether locked on the Ethereum mainnet bridge, used for paying transaction fees and transferable among accounts on Arbitrum One.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.23. "**Expired Orders**" has the meaning defined in Section 4.5.6.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.24. "**Founding Member**" means the Member who set up the Company and invested Royalty Interests as his initial capital contribution in exchange for his Shares.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.25. "**General Meeting**" has the meaning defined in Section 9.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.26. "**General Meeting Minutes**" has the meaning defined in Section 9.6.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.27. "**General Keeper**" has the meaning defined in Section 2.8.2.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.28. "**Initial Offers**" has the meaning defined in Section 4.5.2.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.29. "**Initial Shares**" has the meaning defined in Section 6.1.3.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.30. "**List of ETH Orders**" has the meaning defined in Section 4.5.2.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.31. "**List of USD Orders**" has the meaning defined in Section 4.5.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.32. "**List of Orders**" has the meaning defined in Section 4.5.3.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.33. "**Listing Rule**" has the meaning defined in Section 4.3.5.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.34. "**Listing Transfer**" has the meaning defined in Section 4.3.3.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.35. "**Manager**" has the meaning defined in Section 10.4.1.

---

| |
|:---|
| 3 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.36. "**Members**" has the meaning defined in Section 8.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.37. "**Ordinary Resolution**" has the meaning defined in Section 10.2.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.38. "**Paid Value**" has the meaning defined in Section 3.1.2(3).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.39. "**Par Value**" has the meaning defined in Section 3.1.2(2).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.40. "**Pledge**" has the meaning defined in Section 5.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.41. "**Pledged Share**" has the meaning defined in Section 5.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.42. "**Pledgor**" has the meaning defined in Section 5.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.43. "**Price of Paid**" has the meaning defined in Section 3.1.2(6).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.44. "**Price of Par**" has the meaning defined in Section 3.1.2(5).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.45. "**Prime Key**" means the external account address or smart contract address used to register a User's account with ComBoox that can be recognized by Registration Center to automatically retrieve the relevant User Number for identification purposes.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.46. "**Registration Center**" means the core smart contract of ComBoox deployed on ArbitrumOne at the address as publicly disclosed on ComBoox's website and its white paper, which has the following primary functions:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) User Registration: to register users of ComBoox against their Prime Key;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) CBP book keeping: to record balance amount of CBP for each account holder;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Document Registration: to register Templates and their clone copies according to the contract address; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.47. "**Register of Agreements**" has the meaning defined in Section 4.4.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.48. "**Register of Constitutions**" has the meaning defined in Section 13.7.1.

---

| |
|:---|
| 4 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.49. "**Register of Directors**" has the meaning defined in Section 10.5.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.50. "**Register of Members**" has the meaning defined in Section 8.3.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.51. "**Register of Pledges**" has the meaning defined in Section 5.2.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.52. "**Register of Shares**" has the meaning defined in Section 3.2.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.53. "**Royalty Interests**" means a type of beneficial right and passive (non-operational) interest which, invested by Founding Member as its capital contribution or acquired from other developers, provides the Company with the right to revenues generated from the use of ComBoox's Template Smart Contracts, consisting of: (1) royalties collected automatically, as the partial beneficiary of Templates within the territory of ArbitrumOne, from the User who invokes the corresponding write function of the smart contracts concerned; and (2) commissions collected automatically, as the owner of ComBoox, from splitting the royalty revenues of all beneficiaries concerned.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.54. "**Sell Orders**" has the meaning defined in Section 4.5.3.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.55. "**Share**" has the meaning defined in Section 3.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.56. "**Shareholder**" has the same meaning with "**Member**" as defined in Section 1.33.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.57. "**Shareholders Agreement**" has the meaning defined in Section 2.8.4.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.58. "**Smart Contracts**" has the meaning defined in Section 2.8.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.59. "**Special Resolution**" has the meaning defined in Section 10.3.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.60. "**Subject Debt**" has the meaning defined in Section 5.1.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.61. "**Supplement**" means The Wyoming Decentralized Autonomous Organization Supplement, as amended and in effect from time to time.

---

| |
|:---|
| 5 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.62. "**Template Contracts**" or "**Templates**" means the smart contracts adopted by the ComBoox Community and further approved by Ordinary Resolution and registered in Registration Center as templates to create clone copies for its Users to deploy and use on ComBoox.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.63. "**Trading Mode**" has the meaning defined in Section 4.3.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.64. "**USDC**" or "**USD Coin**" means a United States dollar-pegged stable coin issued and managed by Circle Internet Financial, LLC, recorded on Arbitrum One at the address "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", and designed to maintain a stable value of $1.00 per USDC.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.65. "**Users**" means the external account holder or the smart contract that has registered as a User with ComBoox by calling the specific function of Registration Center, each of which will be assigned a User Number that represents their unique identity against their Prime Key.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.66. "**User Number**" means a User's identity number in ComBoox, which is automatically assigned by Registration Center during the registration process. Both the Prime Key and the Backup Key can be recognized by Registration Center to automatically return the corresponding User Number, which can be further used by other smart contracts for identity verification, access control or confirmation of legal rights.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.67. "**Verified Investor**" means the User that already has his or her identity and other relevant materials verified: (1) by the relevant service provider engaged by the Company; or (2) by the Manager in person. Only Verified Investor can participate in Listing Transfer, or acquire Shares of the Company to become a Member, and the Manager may revoke the qualification of Verified Investor, according to the suggestion of the relevant service provider, or pursuant to any applicable laws or regulations.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.68. "**Voting Weight**" has the meaning defined in Section 3.1.2(8).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.69. "**Voting Points**" has the meaning defined in Section 3.1.2(8).

---

| |
|:---|
| 6 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.70. Unless otherwise clearly indicates, words used in the singular include the plural, the plural includes the singular, and the neuter gender includes the masculine and the feminine.

---

| |
|:---|
| 7 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 2. Formation
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.1. **FORMATION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Company was formed on November 8, 2023 in the State of Wyoming by CERTIFICATE OF ORGANIZATION filed by the Wyoming Secretary of State with assigned filing number 2023-001358375 , pursuant to the Act and the Supplement. Except as expressly provided to the contrary in this Agreement, the rights, duties, liabilities and obligations of the Members and the administration, dissolution and termination of the Company shall be governed by the Act and the Supplement.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.2. **NAME.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The name of the Company shall be Comboox DAO LLC .

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.3. **REGISTERED OFFICE & AGENT.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.3.1. The name and location of the registered agent is: <br> Registered Agents Inc <br> 30 N Gould St Ste R <br> Sheridan, WY 82801 <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.3.2. The registered office and agent may be changed from time to time as the Members may see fit, by filing a change of registered agent or office form with the Wyoming Secretary of State. It will not be necessary to amend this provision of the operating agreement if and when such a change is made.

---

| |
|:---|
| 8 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.4. **TERM.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Company will continue perpetually unless:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) decided by Special Resolution for dissolution;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) an event occurs which causes the Company's business to become unlawful; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) any other event causes the Company's dissolution under either the Act or the Supplement.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.5. **CONTINUATION OF THE COMPANY.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In the event of an occurrence described in Section 2.4, if there is at least one remaining Member, the remaining Member has the right to continue the business of the Company, unless that right to continue has been terminated. The remaining Member's successor, assignee, or transferee may continue the business of the Company, provided the successor, assignee, or transferee consents to the continuation in writing and submits any necessary filings to the office of the Secretary of State.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.6. **BUSINESS PURPOSE.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.6.1.The business purpose of the Company shall include:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) to hold the Royalty Interests invested by Founding Member as its capital contribution, or copyrights of other Templates acquired by the Company from time to time;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) to collect the Templates' royalty and the platform's commission of ComBoox within the territory of ArbitrumOne in form of CBP as general income;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) to mint and/or transfer CBP directly or indirectly to potential users so as to facilitate them to use the Templates adopted by and registered in ComBoox;

---

| |
|:---|
| 9 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) to purchase the copyright of other Templates newly adopted by ComBoox for the territory of ArbitrumOne;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) to purchase online or offline advertising services, promotion services, code audit services or other services to promote ComBoox Platform; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) to purchase necessary accounting services, auditing services, legal services, registration agent services or other necessary professional services to make the Company, as well as ComBoox Platform, be able to operate and develop in compliance with the governing laws and regulations.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.6.2. In addition to the above, the Company may conduct any and all lawful business appropriate in carrying out the Company's objectives, as permitted under Section 17-29-104 of the Act and Section 17-31-105 of the Supplement.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.7. **PRINCIPAL PLACE OF BUSINESS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Company's principal place of business is: <br> 30 N Gold St Ste R <br> Sheridan, Wyoming 82801

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8. **UNDERLYING SMART CONTRACTS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8.1. "**Underlying Smart Contracts**" or "**Smart Contracts**" means the set of smart contracts adopted by the Company, from time to time, for automatically registering the equity shares of the Company and keeping records of corporate governance thereof, which shall be created and deployed by cloning Templates.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8.2. "**General Keeper**" is the core Smart Contract that represents the legal entity of the Company to hold crypto assets, to receive revenue incurred from Royalty Interests, to elect or impeach any Managers, to make payments, and to conduct any legal acts on behalf of the Company on ArbitrumOne. Therefore, contract address of General Keeper shall be specified as and can be retrieved from, directly or indirectly, the "**public available identifier**" in the Articles in accordance with Section 17-31-106(b) of the Supplement.

---

| |
|:---|
| 10 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8.3. In the event that Members intend to replace General Keeper with other smart contract deployed at different address, such address will be set out in the deprecated General Keeper's events as a special reference, so that the original General Keeper's address will still be used as the public available identifier of the Company without updating the Articles.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8.4. "**Shareholders Agreement**" is the constitutional Smart Contract that defines all rules and terms for equity registration and corporate governance of the Company, which will be queried by other Smart Contracts for retrieving specific rules or terms in runtime so as to automatically control the conditions and procedures of legal acts of the Company. It shall be deemed as and construed into an amendment to this Agreement. Detailed provisions in regard of the relationship between Shareholders Agreement and this Agreement are set forth in Section 13.6.1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8.5. The Members acknowledge and agree that, pursuant to Section 17-31-106 of the Supplement, the Underlying Smart Contracts govern the operations of the Company, even in the absence of any equivalent agreements, resolutions or any other documents in natural language. Any Underlying Smart Contracts related to the disposition of the Company's equity or assets shall be valid and effective solely upon resolutions by Members in accordance with the pre-defined on-chain voting procedures.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8.6 In the event of any conflict or discrepancies between the Articles and any of the Underlying Smart Contracts, the Smart Contract shall prevail. In the event of any conflict or discrepancies between the Articles and this Agreement, the Articles shall prevail. In the event of any conflict or discrepancies between this Agreement and any of the Underlying Smart Contracts, the Smart Contract shall prevail.

---

| |
|:---|
| 11 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.8.7. The addresses of Smart Contracts are publicly registered in and can be retrieved from General Keeper, which will be automatically updated when Members replace one or more Smart Contracts by Special Resolution. It will not be necessary to update or revise any provisions of this Agreement if and when such a change is made.

---

| |
|:---|
| 12 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 3. Shares
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.1. **SHARES.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.1.1. "**Share**" means a Member's minimum unit of ownership interests and rights in the Company, par value of which is $0.0001.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.1.2. Shares will be booked automatically in Register of Shares in form of a digital object called "**Certificate of Contribution**" with the following key attributes:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) "**Shareholder**" means the ownership title holder of the subject Shares (i.e. a Member of the Company), who will be booked and indicated in form of its User Number;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) "**Par Value**" represents the subscribed contribution amount of the subject Shares, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) "**Paid Value**" represents the paid-in contribution amount of the subject Shares that actually received by the Company, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) "**Clean Paid**" represents the paid-in contribution amount of the subject Shares that has no encumbrances attached and can be freely disposed by its Shareholder, the minimum unit of which shall be 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) "**Price of Par**" refers to the per share acquiring price for the unpaid Par Value of the subject Shares, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) "**Price of Paid**" means the per share acquiring price for the Paid Value of the subject Shares, the minimum unit of which is 0.0001 USD;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) "**Total Value**" means the total acquiring value of the subject Shares indicated in USD, which shall be calculated as following:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Value = Price of Paid \* Paid Value + Price of Par \* (Par Value - Paid Value)

---

| |
|:---|
| 13 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) "**Voting Weight**" means percentage weight of each Share when calculating the voting rights of the subject Shares, and the calculation result shall be called as "**Voting Points**" which shall be the basis to calculate the aggregate voting rights of a Member. The minimum unit of Voting Weight shall be one percent. Therefore, the total Voting Points of the subject Shares shall be calculated as:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voting Points = Voting Weight \* Par Value / 100

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) "**Distribution Weight**" means percentage weight of each Share when calculating the distribution rights of the subject Shares, and the calculation result shall be called as "**Distribution Points**", which shall be the basis to calculate the aggregate distribution rights of a Member for distributing profits or residual assets, or assuming loss or liabilities of the Company. The minimum unit of Distribution Weight shall be one percent. Therefore, the total Distribution Points of the subject Shares shall be calculated as:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution Points = Distribution Weight \* Par Value / 100

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.1.3. "**Certificate of Contribution**" or "**Certificate**" means the digital object acting as the conclusive evidence of the subject Shares booked in Register of Shares, which will be automatically created and issued to the buyer upon closing of capital increase deals or share transfer deals, and will be updated by decreasing the amount of Par Value and/or Paid Value upon closing of share transfer deals. When the subject Shares are transferred to other party with full amount, the Certificate of Contribution concerned will be removed from Register of Shares automatically.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2. **REGISTER OF SHARES.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2.1. "**Register of Shares**" means the Smart Contract adopted by the Company to automatically book and maintain the public record of Shares, i.e. the Certificate of Contribution concerned. Any creation, alteration or revocation of any Share can only be effective and legally binding to the Company and Members upon its entry into Register of Shares.

---

| |
|:---|
| 14 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2.2. Upon closing of the subject Shares transaction, no matter it is a capital increase deal or a share transfer deal, a new Certificate of Contribution will be automatically created and issued to the buyer in Register of Shares.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2.3. When a Shareholder pays in capital contribution for the called-up Par Value of the subject Shares, the Paid Value of the relevant Certificate of Contribution will be automatically increased by the same amount.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2.4. When a Shareholder transfers Shares, the relevant Certificate of Contribution will be automatically updated with its Par Value and Paid Value being reduced by the same amount.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2.5. Once the full amount of Par Value of the subject Shares is sold out, the relevant Certificate of Contribution will be automatically removed from Register of Shares.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2.6. The information stored in Register of Shares is publicly accessible to all of the world. Everybody can check and read the Certificate of Contribution booked in Register of Shares.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2.7. Register of Shares will not be deleted from ArbitrumOne even after the termination of the Company.

---

| |
|:---|
| 15 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 4. Trade of Shares
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1. **SHARE TRANSFER.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1.1. Shares can only be transferred or traded by means of Trading Mode as specified in this Agreement and implemented by Templates of ComBoox.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1.2. Shareholders may transfer their Shares among each other freely, provided that both parties concerned are Verified Investors.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1.3. Subject to the requirements on Verified Investor set out in Section 4.2, Shareholders may transfer their Shares to external Verified Investors freely.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1.4. Share transfers are not subject to any approval of other Members or General Meeting, however, in case it is arranged in the way of Contractual Transfer, the relevant Investment Agreement shall still need to be submitted to General Meeting for records purpose.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1.5. No first refusal rights, drag along, tag along, or any other similar special Shareholders' rights are set on any Shares.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2. **REQUIREMENTS ON INVESTOR.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2.1. "Register of Investors" means the Smart Contract adopted by the Company to book and maintain the public records of Verified Investors. Any application, approval, or revocation of any Verified Investors shall only be effective and legally binding on the Company and Members upon its entry into Register of Investors.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2.2. If any buyer intends to purchase Shares to become a Member of the Company, he or she shall satisfy the following requirements:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the buyer shall be a registered User of ComBoox;

---

| |
|:---|
| 16 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the buyer shall have its identity verified:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. by the identification service provider engaged by the Company as per Section 8.1.4; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. by Manager;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) the buyer shall honestly disclose the affiliation relationship with any existing Members by identifying the User Number of such Member's representative of group in the relevant attribute field:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. in the application form for Verified Investor;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. in the relevant deals in the Investment Agreement; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c. in the relevant Buy Orders to be placed on List of Orders.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2.3. If any Shareholder intends to transfer his or her Shares, by means of Contractual Transfer, to any party other than a Member, the seller shall be responsible to procure such potential buyer to satisfy the requirements stipulated in the above Section 4.2.1(2).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2.4. Manager shall exercise reasonable commercial efforts to ensure Verified Investors satisfying the requirements stipulated in the above Section 4.2.1(2).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.3. **TRADING MODE.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.3.1. "**Trading Mode**" means the permitted transaction method and mechanism for Shares with respect to price discovery, agreement conclusion and equity closing, which shall include at least Contractual Transfer and Listing Transfer as further defined in this Section.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.3.2. "**Contractual Transfer**" means the transfer mode of Shares which shall be carried out in accordance with an Investment Agreement that the seller and the buyer entered into previously, in which the basic transaction elements shall be set out clearly such as Paid Price, Paid Value, Class of Share, payment method, and closing deadline etc.

---

| |
|:---|
| 17 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.3.3. "**Listing Transfer**" means that the transfer mode of Shares which shall be arranged by listing, i.e. the seller may place Sell Orders on List of Orders with its acceptable offer price and sell amount, the buyer may place Buy Orders with its acceptable bid price and buy amount, and the system will automatically match and settle the Buy Order with the available Sell Orders according to their price and amount.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.3.4. Subject to any requirements of applicable laws and regulations, Shares approved by Members for trading by "**Listing Transfer**" may also be transferred by "**Contractual Transfer**". The Listing Transfer attributes may only be allocated to a particular Class of Shares in accordance with a Listing Rule of the effective Shareholders' Agreement.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.3.5. "**Listing Rule**" means the rule governing the Listing Transfer of specific Class of Shares with respect to the title of issuer, Class of Shares, maximum Par Value, title of verifier, maximum quantity of Investors, ceiling price, floor price, lockup days, off listing price, Voting Weight, Distribution Weight and other attributes concerned, which shall be incorporated in a Shareholders Agreement and approved by Special Resolution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.4. **REGISTER OF AGREEMENTS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.4.1. "**Register of Agreements**" means the Smart Contract adopted by the Company to automatically book and maintain the public records of Investment Agreements, which shall set forth the address, status, transaction type and detailed arrangements, parties, procedural schedules for exercising special rights, so as to enable users or smart contracts to check and retrieve, execute or terminate the relevant Investment Agreements. Any creation, modification, execution, performance or termination of any Investment Agreements shall only be effective and legally binding for the Company, Members or parties concerned upon its entry into Register of Agreements.

---

| |
|:---|
| 18 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.4.3. Upon signing by any sellers on an Investment Agreement, the subject Shares' Clean Paid will be automatically reduced by the relevant amount as per the deals concerned. In the event any of the deals concerned fails to be closed after the relevant closing dead line, the seller may request to terminate the deal so as to recover the Clean Paid of the subject Shares back to its original level.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.4.4. Upon closing of any deals of an Investment Agreement, a new Certificate of Contribution will be created and issued to the buyer in Register of Shares, and the subject Shares' Certificate of Contribution will be reduced by the relevant amount of Par Value and Paid Value or be removed entirely if no amount left.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.4.5. The information stored in Register of Agreements is publicly accessible to all of the world. Everybody can check and read the Investment Agreements booked in Register of Agreements.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.4.6. Register of Agreements will not be deleted from ArbitrumOne even after the termination of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5. **LIST OF ORDERS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.1. "**List of ETH Orders**" means the Smart Contract adopted by the Company to book and maintain the public records of Listing Trade in ETH, which will automatically record the Initial Offers, Sell Orders, Buy Orders, as well as the closed deals concerned. Any placing, withdraw, matching, closing, and revocation of any Initial Offers, Sell Orders or Buy Orders can only be effective and legally binding on the Company, Members or Verified Investors concerned upon its entry into List of Orders.

---

| |
|:---|
| 19 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.2. "**List of USD Orders**"means the Smart Contract adopted by the Company to book and maintain the public records of Listing Trade in USDC, which will automatically record the Initial Offers, Sell Orders, Buy Orders, as well as the closed deals concerned.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.3. "**List of Orders**"is the collective term for the List of ETH Orders and the List of USD Orders. Any placement, withdraw, matching, closing, and revocation of Initial Offers, Sell Orders or Buy Orders shall only be effective and legally binding upon the Company, its Members and Verified Investors concerned once entered into the respective List of Orders.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.4. "**Initial Offers**" means the limit sell orders created and placed on the List of Orders by the authorized issuer on behalf of the Company to issue new Shares of the relevant Class at a specific offer price (Price of Paid) with a specific amount (Par Value and Paid Value) and the available hours thereof, in accordance with the relevant Listing Rule, which shall also set forth other necessary elements of a capital increase deal, such as Voting Weight and Distribution Weight.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.5. "**Sell Orders**" means the limit sell orders and market sell orders created and placed on the List of Orders by the Shareholders to transfer their Shares at a specific offer price or market price (Price of Paid) with a specific amount (Par Value and Paid Value) and available hours thereof, in accordance with the relevant Listing Rule.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.6. "**Buy Orders**" means the limit buy orders and market buy orders created and placed on the List of Orders by the Verified Investors, together with sufficient ETH or USDC paid as consideration or margin, to purchase the offered Shares in Initial Offers or Sell Orders at a specific bid price or market price (Price of Paid) with a specific amount (Paid Value), in accordance with the relevant Listing Rule.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.7. "**Closed Deals**" means the deals established and settled automatically via List of Orders under the principle of "price priority and time priority", which will be automatically recorded as events in List of Orders.

---

| |
|:---|
| 20 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.8. "**Expired Orders**" means the Initial Offers or Sell Orders that has been expired when matching any Buy Orders, or the Buy Orders that has been expired when matching any Sell Orders or Initial Offers. They will be removed from List of Orders and be recorded as events thereon automatically.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.9. Any Buy Orders or Sell Orders placed on the List of Orders will be firstly matched with their counter orders under the principle of "price priority and time priority" automatically, thereafter, any balance amount left in limited orders will be listed on the List of Orders accordingly.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.10. Upon the settlement of any Closed Deals, the subject Shares will be automatically issued or transferred to the buyer. The consideration in ETH will be duly recorded in the General Keeper under the name and exclusive control of the sellers or the Company, while the consideration in USDC will be automatically transferred to the sellers or the Cashier.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.11. Any ETH margin from expired Buy Orders or ETH balance from market Buy Orders will be recorded in the General Keeper under the name and exclusive control of the respective buyer and will also be logged as events in the List of Orders. Any USDC margin from expired Buy Orders or USDC balance from market Buy Orders will be refunded directly to the buyer.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.12. Any subject Shares of expired Sell Orders or Shares balance of market Sell Orders will be released back to their shareholders with respect to their Clean Paid.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.13. The information stored in List of Orders is publicly accessible to all of the world. Everybody can check and read the Orders, Deals and events booked in List of Orders.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5.14. List of Orders will not be deleted from ArbitrumOne even after the termination of the Company.

---

| |
|:---|
| 21 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 5. Pledge of Shares
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1. **SHARE PLEDGE.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1.2. A Pledge shall only be validly created and binding on the Company and the Members if the following conditions are satisfied:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) a Deed of Pledge has been created and registered in Register of Pledge;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the Creditor has been approved as a Verified Investor;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) the Subject Share has sufficient Clean Paid to cover the Pledged Paid Value of the Pledge; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) the Subject Debt is not due when creating the Pledge.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1.3. The Creditor of a Pledge may transfer the Subject Debt together with the Pledge to other Users, provided that the buyer has already been approved as a Verified Investor.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1.4. If the Creditor confirms that the Subject Debt has been partially repaid by a certain amount, the attached Pledge will be automatically released proportionately. If the Subject Debt is confirmed by the Creditor having been fully repaid, the Pledge concerned will be automatically released in full and the relevant Deed of Pledge will be removed from Register of Pledges.

---

| |
|:---|
| 22 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1.5. Before expiration of a Pledge, the Pledgor may extend the Number Of Guarantee Days at its full discretion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1.6. The creation, transfer, alteration or extension of any Pledges are NOT subject to any approval of other Members or the Company. All relevant legal acts can be carried out on ArbitrumOne without execution any paper documents off-chain.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2. **REGISTER OF PLEDGES.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.1. "**Register of Pledges**" means the Smart Contract adopted by the Company to automatically book and maintain the public record of Pledges. Any creation, transfer, alteration or revocation of any Deed of Pledge can only be effective and legally binding to the Company and Members upon its entry into Register of Pledges.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.2. "**Deed of Pledge**" means the digital object acting as the conclusive evidence of a Pledge, which will be automatically created and registered in Register of Pledges when the Pledgor sets up a Pledge on the Pledged Share concerned. It shall set forth the following basic elements of the Pledge:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the Certificate Number of the Pledged Share;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the User Number of the Creditor, Pledgor, and Debtor;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) the Due Date, and Guaranteed Amount of the Subject Debt; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) the Sequence Number, Pledged Paid Value, Pledged Par Value, Issue Date and Number of Guarantee Days of the Pledge.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.3.When the Creditor confirms a repayment of the Subject Debt, the relevant Pledge will be automatically updated by reducing its Pledged Par Value and Pledged Paid Value proportional to the repaid ratio of the Guaranteed Amount.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.4.The Creditor may transfer the Pledge to any other Verified Investor, upon which the Creditor indicated in the Deed of Pledge will be automatically revised into the buyer.

---

| |
|:---|
| 23 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.5.Before expiration of a Pledge, the Pledgor may extend the valid period thereof by increasing the Guarantee Days concerned, upon which the Deed of Pledge will be updated automatically to reflect such extension.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.6.Once the Subject Debt is confirmed by the Creditor having been fully repaid, the relevant Deed of Pledge will be automatically removed from Register of Pledges.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.7.The information stored in Register of Pledges is publicly accessible to all of the world. Everybody can check and read the Deed of Pledge booked in Register of Pledges.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2.8.Register of Pledges will not be deleted from ArbitrumOne even after the termination of the Company.

---

| |
|:---|
| 24 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 6. Capital Contributions, Assets, and Liabilities
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1. **INITIAL CONTRIBUTIONS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.1. As of Effective Date, Founding Member has contributed to the Company the following Intellectual Property Rights (the "IPR") in exchange for the Initial Shares as set out in Section 6.1.3:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Royalty Interests of the Templates developed by Founding Member within the territory of ArbitrumOne, so that the Company may collect royalty on those Templates in form of CBP as general income;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) owner's right to Registration Center, so that the Company may collect platform commission of ComBoox in form of CBP as general income;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) mint rights of CBP within the territory of ArbirumOne, so that the Company may adjust total supply of CBP; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) owner's right to the Smart Contract named "**Fuel Tank**", so that the Company may:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. set the Fuel Tank's selling price of CBP in USD; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. receive selling revenue of CBP in USDC from Fuel Tank.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.2. Under US GAAP, when the Founding Member contributed the IPR to the Company, it is difficult to recognize its value due to the following reasons:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) there are no similar software or business models available in the market, making it impossible to identify comparable fair value measurement targets;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) ComBoox has not generated any actual revenue, so there is no reasonable basis for valuation under the revenue method;

---

| |
|:---|
| 25 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) ComBoox was developed solely by the Founding Member, meaning that there are no arm's length transactions or third-party payment records to support the development costs; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) the cost method alone is unlikely to be accepted as a sound basis for valuing a DApp like ComBoox.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.3. Due to the reasons identified in Section 6.1.2, in exchange of the IPR contributed to the Company described in Section 6.1.1, the Company has issued the following subscribed but not paid Shares (the "**Initial Shares**") to Founding Member:

---

| | | |
|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Certificate No.**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Par Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 250,000 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50,000 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Paid Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price of Par**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price of Paid**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0001 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0001 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voting Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4,000 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Voting Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100000000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Distribution Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.4. As long as the following conditions are all fulfilled, the Company shall have the IPR to be valued:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the Company has already legally issued its equity shares to the public, as well as the CBP as a utility token;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the Company has been receiving automatically collected royalties from parties other than the Founding Member for more than one year; and

---

| |
|:---|
| 26 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) a Special Resolution has been passed by the General Meeting, with the support vote of the Founding Member counted in the voting result, regarding the valuation firm to be engaged to assess the value of the IPR, as well as the valuation base date thereof.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.5. When the final valuation report is issued as per Section 6.1.4, then:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the value of the IPR shall be recognized in the account of "Intangible Assets" on the debit side, as per the arithmetic or weighed average of the upper and lower boundaries of the valuation range identified in the valuation report, whichever is higher;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the value of the IPR shall also be booked in the account of "Paid In Capital" on the credit side, as paid in capital contributed by the Founding Member, therefore:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. if the value of the IPR is greater than the unpaid subscription amount of the Initial Shares, the Company shall update the Paid Value of the Initial Shares as equal to their Par Value, and shall further issue such number of new Class B Shares whose Paid Value and Par Value are all equal to the excess amount thereof; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. if the value of the IPR is lower than the unpaid subscription amount of the Initial Shares, the Company shall update the Paid Value of the Initial Shares as equal to the recognized IPR value, and the Founding Member may elect to: (i) pay the outstanding balance amount in ETH or USDC; or (ii) cause the Company to decrease the equivalent amount of the Initial Shares in the order of Class B to Class A.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.6. Before the value of the IPR is recognized in the accounts of "Intangible Assets" and "Paid In Capital" as per Section 6.1.5:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the Company shall NOT distribute any profits or assets to the Members; and

---

| |
|:---|
| 27 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the Voting Points and Distribution Points of all Shares shall be calculated based on Par Value thereof, no matter the Shares are paid up or not.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2. **ADDITIONAL CONTRIBUTIONS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2.1. No Member is obligated to make any additional contribution to the Company beyond their initial contribution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2.2. Members may, from time to time, approve Investment Agreements containing capital increase deals, by Special Resolution, so as to decide:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the amount of the increasing capital of the Company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the Price of Paid, Voting Weight, Distribution Weight, and other classified attributes of the new Shares or new Classes to be issued; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) the subscriber, the pay in deadline, the closing deadline, and other conditions of the deals concerned.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2.3. Members may, by Special Resolution, add one or more Listing Rules to the Shareholders Agreement, so as to:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) authorize Manager to issue certain number of new Shares by way of listing in order to increase the capital of the Company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) approve the Voting Weight, Distribution Weight, and other classified attributes of the new Shares to be issued by way of listing; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) approve the ceiling and floor offering price, the off listing price, the max number of investors, the lock-up days and other conditions for offering or trading Shares by way of listing.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2.4. Members may use the following assets or services to make capital contributions to the Company:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) cryptocurrencies other than CBP (like ETH/USDC) that the Company may effectively hold, control, dispose and exchange for other assets via General Keeper directly or indirectly;

---

| |
|:---|
| 28 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) copyright of other Templates; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) professional services that is necessary for the Company, and can produce material work outcomes like audit reports or investigation reports.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2.5. All capital contributions shall be valued and denominated in USD, the amount of which shall be specified in the relevant Certificate of Contribution as Paid Value. Value of the contribution shall be determined by the following method as per their different type:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) value of cryptocurrencies shall be calculated by multiplying their amount by the USD price of the relevant currency at the time of delivery, which shall be automatically retrieved from one or more reliable price information providers such as Chainlink Price Feeds; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) value of copyrights or professional services shall be determined by a prior approval of Ordinary Resolution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2.6. The method and mechanism for determining the contribution value set out in Section 6.2.5, shall be deemed as and construed to be a conclusive process. Once the value of a capital contribution is confirmed on its Certificate of Contribution as Paid Value, it cannot and shall not be altered any more. Members agree and undertake that, the subscription or acquisition of Shares in the Company is an acknowledgement of all their historical contributions and therefore no Member shall challenge the adequacy of any paid-in contributions of any other Member.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.3. **FAILURE TO CONTRIBUTE.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; All capital contributions must be made upon or before the issue of the relevant Certificate of Contribution and therefore no called up Par Value exists for any Shares.

---

| |
|:---|
| 29 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.4. **RETURN OF CAPITAL CONTRIBUTIONS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.4.1.The Members agree that if the Company does not have sufficient assets to repay the capital contributions, the Members shall have no recourse against the Company or the other Members. As an exception to the foregoing, recourse does exist if a Member owes an outstanding debt to the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.4.2.Pursuant to Section 17-25-107 of the Supplement, Members are only entitled to demand and receive Shares of the Company in exchange for their capital contributions, regardless of the form or nature of the Member's actual capital contribution(s).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.5. **ASSETS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "**Cashier**" means the Smart Contract adopted by the Company to hold USDC on its behalf and to automatically record, maintain and publicly document payment and receipt transactions in USDC.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Members agree that the Company shall only hold by General Keeper or Cashier on ArbitrumOne the following types of on-chain assets:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) USDC and ETH;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Royalty Interests to receive CBP as royalty or commission;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Mint rights to create new CBP;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Setting right to determine the USD price of CBP in Fuel Tank; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Exclusive right to receive USDC from Fuel Tank as sales consideration of CBP.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To keep its unique role as an on-chain DAO, the Company will not open off-chain bank accounts. All assets that the Company can posses shall be limited to the extent that such assets are able to be held, controlled and disposed, directly or indirectly, by General Keeper or Cashier.

---

| |
|:---|
| 30 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.6. **LIABILITIES.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Company shall not borrow any loan or enter into any contracts that may incur payable liabilities. No employees will be hired, and no Managers or Members will be paid for remuneration either. If the Company intends to hire any experts or purchase any services, such arrangements shall be made on a prepaid basis, or by reimbursing the advanced fees paid by the authorized Member or Manager, within the budget approved by Ordinary Resolution. To the extent permitted by law, the Company has no obligation to repurchase any CBP minted or transferred to any party.

---

| |
|:---|
| 31 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 7. Profits, Losses and Distribution
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.1. **PROFITS/LOSSES.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For accounting and tax purposes, the net profits or net losses of the Company will be determined annually. Pursuant to Section 17-25-110 of the Supplement, and as provided in Section 12.3 below, profits and losses will be allocated to the Members in proportion to each Member's aggregate Distribution Points in the Company and in accordance with Treasury Regulation 1.704-1.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.2. **DISTRIBUTIONS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.2.1. Members may determine to distribute available assets annually, provided that the distribution proposal has been approved by Ordinary Resolution, and further provided that there are sufficient assets remaining to cover the total liabilities of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.2.2. Distributions shall be made proportionally to each Member's Distribution Points by depositing a specified amount of ETH into the designated account allocated to that Member in the General Keeper or by depositing a specified amount of USDC into the designated account allocated to that Member in the Cashier. Thereafter, each Member may withdraw its ETH deposits from the General Keeper or its USDC deposits from the Cashier at its discretion, without interest.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.2.3. Prior to the recognition of the IPR value, the Company shall NOT distribute any profits or assets to Members and the Voting Points and Distribution Points of all Shares shall be calculated on the basis of their Par Value, whether or not the Shares are paid up.

---

| |
|:---|
| 32 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.3 **NO INTEREST.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.3.1. Distributions made to Members will be initially stored in General Keeper under the specific account assigned to each Member.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.3.2. If a buyer intends to close a Share transfer deal by paying the consideration directly in ETH, the consideration will initially be stored in General Keeper under the specific account assigned to the seller, and the balance amount (if any) will simultaneously be stored in the account assigned to the buyer.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.3.3. No interests will be paid on ETH stored in General Keeper or USDC stored in Cashier.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.3.4.Members or sellers who have their ETH stored in General Keeper or USDC stored in Cashier may pick up their deposits at any time by triggering the specific API freely.

---

| |
|:---|
| 33 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 8. Members
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1. **MEMBERS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1.1. "**Members**" means the equity owners of the Company, who may enjoy and exercise the distribution rights to the profits and residual assets in proportion to the aggregate Distribution Points of each Member and may enjoy and exercise the voting rights in proportion to the aggregate Voting Points of each Member. For the purposes of this Agreement and in most contexts relating to the Company, the term "**Member**" may usually be used interchangeably with the term "**Shareholder**".

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1.2. Only registered Users of ComBoox may purchase Shares of the Company and thus become Members. The User Number is the only identifying information of a Member that is automatically kept and updated in Register of Members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1.3. Once a User obtained a Certificate of Contribution in exchange for a capital contribution, he or she will automatically become a Member of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1.4. In order to comply with the legal requirements of Know Your Client, Anti-Money Laundering, and other similar requirements about identity verification requirements, Members agree that the Company may engage one or more third party service providers to check, verify, validate, timely renew and store the identity information of Members and such providers may be requested to provide real time confirmation on chain or on line of the identity information against the Prime Key / Backup Key of the Member concerned. In case such service providers charge any service fees, such fees shall be borne and paid by the Members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1.5. There is no limit to the total number of Members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1.6. A Member can purchase and hold one or more Shares of one or more Classes. The Voting Points or Distribution Points of different Classes of Shares shall be calculated on an aggregate basis to determine a Member's voting weight or distribution weight.

---

| |
|:---|
| 34 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.1.7. As long as a Member loses its last Certificate of Contribution as a result of a Share transfer, he or she will automatically loose the legal identity as a Member of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.2. **MEMBERS DUTIES AND LIABILITY.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.2.1. To the extent permitted by Section 17-29-304 of the Act, no Member shall be personally liable for the obligations of the Company. Pursuant to Section 17-29-407 of the Act, Members may participate in the control, management, direction, or operation of the affairs of the Company pursuant to this Agreement and under the automatic control of Smart Contracts.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.2.2. Pursuant to Section 17-31-110 of the Supplement, no Member has any fiduciary duty to the Company or to any other Member. Unless otherwise agreed among the Members, no Member has any duty to act. Any attempt to grant special rights to one or more Members, must adhere to the underlying Smart Contracts.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.3. **REGISTER OF MEMBERS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.3.1. "**Register of Members**" means the Smart Contract adopted by the Company to automatically book and maintain the public records of Members and their shareholding. Any admission, alteration or revocation of any Member shall only be effective and legally binding on the Company and Members upon its entry into Register of Members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.3.2. Once a User obtains its first Certificate of Contribution it will be automatically included and booked into Register of Members. Once a Member loses its last Certificate of Contribution, it will be removed from Register of Members accordingly.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.3.3. When a Member pays in capital contribution for called-up Par Value of the subject Shares of a Certificate of Contribution, the records of the Member in Register of Members will be automatically updated by increasing the amount of Paid Value against the payment.

---

| |
|:---|
| 35 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.3.4. When a Member transfers its Shares, the records of the Member in Register of Members will be updated automatically by decreasing the sold out amount of Par Value and Paid Value upon closing.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.3.5. The information stored in Register of Members is publicly accessible to all of the world. Everybody can check and read the Members' User Number and their shareholding situation booked and maintained in Register of Members.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.3.6. Register of Members will not be deleted from ArbitrumOne even after the termination of the Company.

---

| |
|:---|
| 36 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 9. General Meeting
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1. **GENERAL MEETING.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.1. "**General Meeting**" means the ONLY decision-making authority of the Company which consists of all Members. All legal acts conducted on behalf of the Company shall be subject to prior approval by the General Meeting, either through an Ordinary Resolution or a Special Resolution, and any off-chain legal documents shall only become legally effective and binding on the Company upon such approval.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.2. **RECORDS.** The Company will NOT convene on-sight meeting, real time video or audio meeting. All motions will be created, proposed, voted and recorded in a Smart Contract called "**General Meeting Minutes**". A discussion or debates concerning the subject matters may be organized on public forum online, if the proposer or any Member thinks proper.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.3. **IDENTIFIER OF CONTENTS.** Each motion shall have a unique identifier appointing to its contents and be recorded in General Meeting Minutes, which could be:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the contract address of the subject Investment Agreement or Shareholders Agreement to be reviewed and approved by voting;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the sequence number of the subject position to be elected by voting;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) the hash value generated via keccat-256 with source data of on-chain actions of the Company to be made via General Keeper to:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. transfer ETH, USDC, CBP or other cryptocurrencies to other account;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. distribute certain amount of ETH or USDC held by the Company to Members in proportion to each Member's Distribution Points; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c. make other on-chain actions for other purposes, the key elements of which can be represented and consisting of target contracts' address to be called, ETH value to be carried with such call, and the payload data of the call indicating the target function's selector as well as the input parameters' value concerned.

---

| |
|:---|
| 37 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.4. **QUORUM.** A resolution can be legally effective and have binding force upon the Company and Members only if the aggregate Voting Points represented by the Members who voted on the subject motion, in person or through proxy, is equal or greater than 25% of the total Voting Points of all outstanding Shares in the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.5. When voting on a motion, Members may choose one of the following three options: "**for**", "**against**" or "**abstain**". The Voting Points of "**abstain**" shall be counted in when calculating quorum of a vote. Subject to the provisions of Section 9.1.4, if the Voting Points of "**for**" received by a motion is more than the ones of "**against**", it shall be deemed to be supported by simple majority. If the Voting Points of "**for**" received by a motion is more than four times of "**against**", it shall be deemed to be supported by a special majority.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.6. The voting result of a motion shall be calculated based on the number of Voting Points it received, i.e. the aggregate Voting Points represented by the Members who voted on the subject motion, in person or through proxy. A Member's Voting Points shall be the total number of Voting Points of all Shares owned by such Member on the specific registration date of the subject motion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.7. The registration date shall be earlier or equal to the start time of the voting period, and only Members can participate in a vote. Therefore, if a Member transferred its Share before the registration date, the Voting Points of the transferred Share will not be counted under the name of the seller, but will be counted under the name of the buyer instead. If a Member obtained any Share after the registration date, the Voting Points of such Share will not be counted under the name of such Member, but will be counted under the name of the seller (provided that the seller still holds any Shares to be qualified to cast vote), or will lose the opportunity to be counted (if the seller has no Shares in hand during the voting period concerned).

---

| |
|:---|
| 38 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1.8. For proposals to approve any Investment Agreement or Shareholders Agreement, the signing parties of the subject agreements will be deemed as consent to the proposal concerned, therefore, all Voting Points held by the parties on the registration date will be counted as vote in favor of the proposal.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.1. **DELEGATE AND PROXY.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.2.1. Any Member may appoint another Member as their proxy to cast a vote on their behalf in relation to a proposal. Within the same voting process for a motion, a Member can only appoint one proxy to represent them. In addition, a delegate representing either an individual or an organization shall be entitled to exercise the same voting power as the principal itself.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.2.2. A Member can solicit proxies from other Members so as to collect sufficient Voting Points to make a proposal. A proxy established in the proposal stage will remain effective till the vote casting stage. This means the proxy who made the proposal will continue to represent its principals and cast votes for the proposal.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.2.3. A proxy of other principals may further entrust another Member as their common proxy. In this case, the entrusted proxy will be able to represent the aggregate Voting Points of the former proxy and its principals collectively.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.3. **PROPOSAL RIGHTS OF MOTIONS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.3.1. Any Member who has entered into an Investment Agreement or Shareholders Agreement may submit the smart contract address of the relevant agreement to General Meeting as a proposal for the purpose of seeking approval or for inclusion in the records.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.3.2. The Member authorized by the Shareholders Agreement to nominate a candidate for the position of Manager may submit a nomination with the candidate's User Number to the General Meeting as a proposal for commencing an election to vote for the position of Manager. Once the inauguration has taken place, the nominating Member may also submit a motion for the removal of the Manager from their position to the General Meeting for the commencement of an impeachment vote.

---

| |
|:---|
| 39 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.3.3. In addition to the above, a motion may be proposed to General Meeting for review and voting purpose only if it is proposed by Members holding at least 10% of total Voting Points of the outstanding Shares in the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.4. **NO NOTIFICATION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As all corporate governance records of the Company are publicly available and automatically maintained on ArbitrumOne in a decentralized mode, Members shall be responsible for taking effective measures to continuously monitor the updates of General Meeting Minutes, as well as the timetable of each proposal concerning the review period, registration date, and voting period thereof. Neither the Company nor any Members have obligation or duties to notify any Member for execute legal rights or taking legal acts on any motions or proposals. Although the Company will construct a public UI of ComBoox on its main page so as to facilitate Members to conduct their legal rights, however, Members are advised not to rely solely on such UI or Web App for monitoring or executing any legal rights.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.5. **REGISTRATION DATE AND VOTING PERIOD.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.5.1. Registration date of a proposal for voting in General Meeting will be scheduled on the 15th day after the proposal date of the motion concerned. The voting period of such proposal shall be commenced on the registration date and shall be terminated 3 days thereafter.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.5.2. Notwithstanding the above stipulation, in case the Company only has sole Member when a proposal is submitted for voting, the registration date of such proposal shall be scheduled on the proposal date thereof, and the voting period of such proposal shall be commenced on the proposal date and shall be terminated one day thereafter.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.5.3.In case all Members vote for a proposal, any entity may trigger the relevant function to get the proposal to be passed so as to form a resolution before expiration of the voting period.

---

| |
|:---|
| 40 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.6. **GENERAL MEETINGS MINUTES.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.6.1. "**General Meeting Minutes**" means the Smart Contract adopted by the Company to automatically book and maintain the public record of the motions and voting results at General Meetings. Each proposal, proxy, vote and resolution shall only be legally effective and have binding forces on the Company and the Members upon its entry into General Meeting Minutes.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.6.2. Once a motion is created, it will be simultaneously included into General Meeting Minutes. Upon the motion's proposal, a specific timetable will be automatically created, in accordance with the voting rule adopted, so as to be used as a reference to monitor the time requirements for each step of the General Meeting procedure.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.6.3. Each ballot cast will be automatically recorded in General Meeting Minutes. This will include the User Number of the voter, total number of Voting Points represented, total number of Members delegated by the voter, and the specific attitude of the vote.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.6.4. The information stored in Genera Meeting Minutes is publicly accessible to all of the world. Everybody can check and read the information on motions, proposals, votes, resolutions, and the execution results of the resolutions booked and maintained in General Meeting Minutes.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.6.5. General Meeting Minutes will not be deleted from ArbitrumOne even after the termination of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.7. **SELF-DEALING.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Unless entered into in bad faith, no contract or transaction between the Company and one or more of its Members, Managers or officers, or between the Company and any other entity or organization in which one or more of its Members, Managers, or officers have a financial interest or are owners, managers, directors, officers, or employees, shall be voidable solely for this reason or solely because such Member, Managers or officer was present or participated in the authorization of such contract or transaction. No Member, Manager, or officer interested in such contract or transaction, because of such interest, shall be considered to be in breach of this Agreement or liable to the Company or any Member for any loss or expense incurred by reason of such contract or transaction or shall be accountable for any gain or profit realized from such contract or transaction. While not required, approval or ratification by a majority of the Members having no interest in the transaction constitutes circumstantial evidence that such transaction is permitted under this section.

---

| |
|:---|
| 41 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.8. **PERMITTED TRANSACTIONS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Each Member, and their respective affiliates and other related parties, shall be free to engage in any activity on their own or by the means of any entity so long as neither the Member or their respective affiliates and other related parties refrains from engaging in bad faith in dealing with the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.9. **INFORMATION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pursuant to Section 17-31-112 of the Act, due to all equity transaction records and corporate governance records are available on ArbitrumOne, Members have no right to separately inspect or copy records of the Company and the Company is not obligated to furnish any records to requesting Members.

---

| |
|:---|
| 42 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 10. Management
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.1. **MANAGEMENT OF THE BUSINESS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pursuant to Section 17-29-407 of the Act and Section 17-31-109 of the Supplement, and as stated in its Articles, the Company's day to day affairs are managed by the Members. The Members are responsible for the daily operations of the business.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.2. **ORDINARY RESOLUTION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.2.1. "**Ordinary Resolution**" means a resolution passed at a General Meeting by a special majority of the Members voting in person or by proxy on the relevant motion, where the total number of Voting Points represented by the votes in favour of the motion exceeds three times the number of votes cast against it.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.2.2. The following matters shall be determined or approved by an Ordinary Resolution of General Meeting:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) to elect, replace or impeach Manager;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) to approve any budget for purchase copyrights, services or assets for the Company;

---

| |
|:---|
| 43 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) to authorize a specific User to make payment on behalf of the Company by triggering the specific API of General Keeper to transfer certain amount of ETH, USDC or CBP from General Keeper to a specific account;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) to authorize a specific User to take actions on behalf of the Company by triggering the specific API of General Keeper to call the specific smart contracts with predefined payload and/or ETH attached; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) To grant authorization to a designated User to distribute the Company's assets by activating a specific API to allocate a designated amount of ETH to each Member's internal account maintained in the General Keeper, or a designated amount of USDC to each Member's internal account maintained in the Cashier, in proportion to each Member's Distribution Points.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.3. **SPECIAL RESOLUTION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.3.1. "**Special Resolution**" means a resolution passed at a General Meeting by a special majority of the Members voting in person or by proxy on the relevant motion, where the total number of Voting Points represented by the votes in favor of the motion exceeds four times the number of votes cast against it.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.3.2. The following matters shall be determined or approved by a Special Resolution of General Meeting:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) to increase or decrease capital of the Company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) to amend or restate Shareholders Agreement;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) to update or replace any Smart Contracts;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) to deprecate General Keeper and transfer the residual ETH and/or CBP to the new General Keeper; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) to dissolute, liquidate the Company or applying for bankruptcy for the Company or change the corporate form thereof.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.4. **MANAGERS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.4.1. "**Manager**" means the administrative officer elected by Ordinary Resolution, who have NO decision-making powers but may execute any administrative, commercial or technical matters authorized by this Agreement or approved by Ordinary Resolution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.4.2. Manager shall have the following powers:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) to approve a User as an "**Accredited Investor**" by triggering the corresponding API of List of Orders, in accordance with applicable laws and regulation, directly at its own discretion, or, indirectly as per the assessment and confirmation of other professional institutions;

---

| |
|:---|
| 44 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) to create, configure and initiate a new General Keeper, as well as all its surrounding Smart Contracts based on Templates of ComBoox, so as for the Company to move its entire corporate governance records as well as all assets to the new system, provided that the movement is subject to a prior approval of Special Resolution; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) any other executive, commercial or technical matters authorized by Shareholders Agreement, Ordinary Resolution or Special Resolution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.4.3. Candidates for the position of Manager shall be nominated by the Members authorized by the effective Shareholders Agreement through its Position Allocation Rules. The Member who nominated the Manager shall also be entitled to propose to remove it from the position. Inauguration and impeachment of Manager shall only be effective upon approval of Ordinary Resolution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.4.4. Managers shall hold office for a period of three years and are eligible for re-election.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.5. **REGISTER OF DIRECTORS.** 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.5.1. "**Register of Directors**" means the Smart Contract adopted by the Company to book and maintain the public records of Directors, Managers and other administrative officers. Any inauguration, impeachment or resignation of Directors, Managers or other officers can only be effective and legally binding on the Company and Members upon its entry into Register of Directors.

---

| |
|:---|
| 45 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.5.2. Once a User takes the relevant position, his or her User Number will be automatically booked in Register of Directors. Once a Director, Manager or other officer leaves his or her position, its User Number will be removed from Register of Directors automatically.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.5.3. The information stored in Register of Directors is publicly accessible to all of the world. Everybody can check and read the officer' User Number, title and sequence number of the position, as well as the start date and end date of the tenure concerned from Register of Directors.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.5.4. Register of Directors will not be deleted from ArbitrumOne even after the termination of the Company.

---

| |
|:---|
| 46 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 11. Compensation and Reimbursement
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11.1. **REIMBURSEMENT.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Subject to Section 10.2, the Company shall reimburse the Members or Managers for all direct out-of-pocket expenses reasonably incurred in managing the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11.2. **EXCULPATION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pursuant to Section 17-29-304 of the Act, NO Member or Manager shall be personally liable, directly or indirectly, for any debt, obligation, or liability of the Company by sole reason of a being a Member or Manager. Any debt, obligation, or liability of the Company is strictly and solely the liability of the Company.

---

| |
|:---|
| 47 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11.3. **INDEMNIFICATION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Company will indemnify any person who was or is a party defendant or is threatened to be made a party defendant, in a pending or completed action, suit or proceeding, whether civil, criminal, administrative, or investigation (other than an action by or in the right of the Company) by reason of the fact that the person is or was a Member of the Company, Manager or agent of the Company, or is or was serving at the request of the Company, for instant expenses (including attorney's fees), judgments, fines, and amounts paid in settlement actually and reasonably incurred in connection with such action, suit or proceeding if the Members determine that the person acted in good faith and in a manner he or she reasonably believed to be in or not opposed to the best interest of the Company, and with respect to any criminal action proceeding, has no reasonable cause to believe his or her conduct was unlawful. The termination of any action, suit, or proceeding by judgment, order, settlement, conviction, or upon a plea of "**no lo Contendere**" or its equivalent, does not in itself create a presumption that the person did or did not act in good faith and in a manner which he or she reasonably believed to be in the best interest of the Company, and, with respect to any criminal action or proceeding, had reasonable cause to believe that his or her conduct was lawful.

---

| |
|:---|
| 48 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 12. Bookkeeping
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.1. **ACCOUNTING.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.1.1. The Company's fiscal year is the calendar year.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.1.2. All of the Company's assets are on-chain public digital assets, which are defined, managed, recorded, and tracked through smart contracts in a transparent and automated manner. All assets of the Company will either be held in the Smart Contract of General Keeper (such as ETH of the Company), or be registered under the contract address thereof (such as CBP/USDC).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.1.3. In accordance with Section 6.6, the Company shall make every effort to avoid any liabilities.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.1.4. All income and expenditures of the Company in ETH or CBP shall be received or disbursed through the General Keeper, while income and expenditures in USDC shall be received or disbursed through the Cashier.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.1.5. The Company's accounting records are automatically maintained by relevant smart contracts, ensuring they are complete, accurate, and publicly accessible.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.2. **RECORDS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Members will keep the following public records in form of Smart Contracts at their specific contract address on ArbitrumOne:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Register of Constitutions**: records all editions of Shareholders Agreements with respect to their contract address, legal force status, procedural schedules for creation, review and voting, and other relevant information;

---

| |
|:---|
| 49 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Register of Directors**: records all information about the positions of Directors, Executive Officers, or Managers with respect to their candidate's User number, nominator, the Voting Rules applied for election, the start and end date of tenure, and other relevant information;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Register of Members**: records all information about Members or Shareholders with respect to their equity Shares, total Voting Points, total Distribution Points, as well as the aggregate amount of Par Value, Paid Value, Clean Paid, and other relevant information;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **General Meeting Minutes**: records all the motions created and submitted to the General Meeting for approval with respect to their proposer, proposal time, voting start and end time, voting results, proxy arrangements, executor, execution state, and other relevant information;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Register of Agreements**: records all the Investment Agreements with respect to their address, status, transaction type and detailed arrangements, parties, procedural schedules for exercising special rights, and other relevant information;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) **Register of Pledges**: record all Pledges with respect to their creditor, debtor, pledgor, pledged Share, pledged amount, guaranteed amount, due date of Subject Debt, guarantee period, and other relevant information;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) **Register of Shares**: record all Shares issued by the Company with respect to their Shareholders, Class, Voting Weight, issue date, paid-in deadline or actual paid-in date, Par Value, Paid Value, acquiring price, and other relevant information;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) **List of ETH Orders**: records all information related to the Listing Trade of Shares in ETH, including the subject Shares' Class, Certificate Number, Investors, Sell Orders, Buy Orders, Closed Deals, Expired Orders, and other relevant details.

---

| |
|:---|
| 50 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) **Cashier**: records all payment and receipt transactions of the Company in USDC, as well as the USDC deposit balance of each Member arising from the Company's distributions; and.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) **List of USD Orders**:records all information related to the Listing Trade of Shares in USDC, including the subject Shares' Class, Certificate Number, Investors, Sell Orders, Buy Orders, Closed Deals, Expired Orders, and other relevant details.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.3. **ELECTRONIC SIGNATURE.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.3.1. By purchasing Shares of the Company, Members consent to conducting all transactions related to Shares, as well as legal actions concerning the corporate governance of the Company, electronically. The following provisions set forth the terms and conditions governing the use of electronic signatures in connection with Shares or records within the Company:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Electronic Transactions**: By purchasing Shares of the Company, Members acknowledge and agree that all documents, agreements, disclosures, and notices related to Shares or corporate governance of the Company may be executed electronically.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Consent to Use Electronic Signatures**: Purchase of Shares in the Company constitutes the voluntary consent of such Member to the use of electronic signatures for all documents and transactions associated with the Shares or the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Legal Validity**: Members understand and agree that electronic signatures used in connection with transactions related to Shares and the Company have the same legal validity and enforceability as handwritten signatures.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Technical Requirements**: Members are responsible for ensuring that they have the necessary hardware, software, and internet connectivity to electronically sign documents related to the Shares or the Company.

---

| |
|:---|
| 51 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Authentication**: Members agree to provide accurate and complete information during the electronic signature process and to take reasonable measures by themself to protect the security of the electronic signature concerned.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) **Legal Review**: Members or Verified Investors are strongly recommend seeking professional legal advice for any questions or concerns about the use of electronic signatures or the rights and obligations under this consent.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.3.2. Purchase of Shares in the Company shall be deemed as the Members' acceptance of these terms and consent to use electronic signatures for all transactions related to Shares or corporate governance of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.4. **MEMBER'S ACCOUNT.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The aggregate amount of Distribution Points automatically booked and maintained in Register of Members for each Member shall be deemed as and construed to be such Member's capital account determined and maintained in the manner set forth in Treasury Regulation 1.704-1(b)(2)(iv), which consists of:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the Member's initial capital contribution (i.e. Paid Value of the Shares in exchange of such contribution) multiply the specific Distribution Weight of the Share concerned;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) increased by any additional capital contribution made by the Member (i.e. Paid Value of the Shares in exchange of such additional contribution) multiply the specific Distribution Weight of the Shares concerned; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) decreased by Paid Value of any Shares transferred by the Member as Shareholder multiply the specific Distribution Weight of the Shares concerned.

---

| |
|:---|
| 52 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.5. **REPORTS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Members shall look to the open records on Register of Members, Cashier and General Keeper, for the aggregate amount of Distribution Points, the balance amount of deposits in USDC, ETH and any other statements of that Member's distributive share of income and expense for income tax reporting purposes.

---

| |
|:---|
| 53 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARTICAL 13. General Matters
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.1. **DISSOLUTION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Members may dissolve the Company at any time by a Special Resolution. Per Section 17-29-701 of the Act, the Company shall be dissolved if there are no Members for a consecutive period of ninety (90) days and the underlying smart contract is unable to continue as designed.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.2. **DISTRIBUTIONS AFTER DISSOLUTION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Upon dissolution, the Company must pay its debts before distributing residual assets to Members. Members agree that any distributions occurring after the dissolution of the Company shall follow the process outlined in this Agreement and Section 17-29-708 of the Act.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.3. **MULTIPLE ORIGINALS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This Agreement may be signed in any number of counterparts, each of which will be deemed an original.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.4. **BINDING EFFECT.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Subject to the restrictions on transfer in this Agreement, this Agreement binds and inures to the benefit of the Members and to their respective successors, personal representatives, heirs, and assigns.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.5. **CONSTRUCTION OF HEADINGS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The headings contained in this Agreement are included solely for the reader's convenience and reference.

---

| |
|:---|
| 54 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.6. **AMENDING OPERATING AGREEMENT.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.6.1. "**Shareholders Agreement**" means the Smart Contract adopted by the Company to record and maintain the public records of this Agreement, its amendments and any restated new edition thereof. In case there is any discrepancies between this Agreement and the effective Shareholders Agreement, the Shareholders Agreement shall prevail.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.6.2. Any creation, alteration or revocation of any Rules or Terms of Shareholders Agreement can only be effective and legally binding to the Company and Members at the time when the restated new Shareholders Agreement is approved by Special Resolution.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.6.3. The contract address of each edition of the Shareholders Agreements will be booked and maintained in Register of Constitutions.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.6.4. A new Shareholders Agreement can only go into force upon execution by all Members or upon approval of Special Resolution. When a new Shareholders Agreement comes into force, the previous version is automatically revoked.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.7. **REGISTER OF CONSTITUTIONS.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.7.1. "**Register of Constitutions**" means the Smart Contract adopted by the Company to book and maintain the public records of Shareholders Agreements. It records all editions of Shareholders Agreements with respect to their contract address, legal force status, procedural schedules for creation, review and voting, enabling Users or smart contracts to retrieve or check the currently valid version of Shareholders Agreement, as well as all its historical revoked versions. Any creation, amendments, restatements or termination of any Shareholders Agreements can only be effective and legally binding to the Company, Members or parties concerned upon its entry into Register of Constitutions.

---

| |
|:---|
| 55 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.7.2.The information stored in Register of Constitutions is publicly accessible to all of the world. Everybody can check and read the Shareholders Agreement booked and maintained in Register of Constitutions.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.7.3.Register of Constitutions will not be deleted from ArbitrumOne even after the termination of the Company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.8. **GOVERNING LAW.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This Agreement shall be governed, construed, and administered according to the laws of the State of Wyoming, which may be amended from time to time.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.9. **COMPLIANCE WITH THE ACT.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; All matters related to the operations of the Company not specifically addressed herein must be addressed in accordance with the Act and the Supplement. The Company shall comply with all other provisions of the Act and the Supplement in order to stay compliant with the law.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.10. **SEVERABILITY.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If any provision of this Agreement is determined invalid by any court of competent jurisdiction, it is the specific intent of Members that such provisions shall be modified to the minimum extent necessary to make it or its application valid and enforceable.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.11. **DISPUTES RESOLUTION.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any disputes arising from or in connection with this Agreement shall be submitted to either the United States District Court for the State of Wyoming or in a Wyoming state court where the Company's Registered Office is located. Members irrevocably waive, to the fullest extent permitted by law, any objection the party may have to the laying of venue for any such suit, action or proceeding brought in such court. Notwithstanding the foregoing, this dispute resolution provision shall not apply to actions arising under the Securities Act of 1933, as amended, or the Securities Exchange Act of 1934, as amended, and investors shall not be deemed to have waived compliance with the federal securities laws and the rules and regulations promulgated thereunder.

---

| |
|:---|
| 56 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13.12. **ENTIRE AGREEMENT.**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This Agreement, together with the Articles of Organization (as may be amended) and all related exhibits, schedules, attachments, etc., constitute the sole and entire agreement by and among the Members. Subject to Section 2.8.5 , this Agreement supersedes all prior and contemporaneous understandings, agreements, representations, and warranties, written or oral, with respect to the subject matter.

---

| |
|:---|
| 57 |
| *[**Table of Contents**](#Toc)* |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CERTIFICATION OF MEMBERS
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The undersigned hereby agree, acknowledge, and certify that the foregoing Operating Agreement is adopted and approved by each Member. The agreement consisting of 57 pages, constitutes the Operating Agreement of Comboox DAO LLC, adopted by the Members as of September 30, 2025 .

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Members:

---

| | |
|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Signature:**  | **/s/ LI LI**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Printed Name:**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LI LI**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution Points Ratio:**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100%**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voting Points Ratio:**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100%**  |

---

---

| |
|:---|
| 58 |
| *[**Table of Contents**](#Toc)* |

---

## Ex-10

## UPDATED AND RESTATED

## CAPITAL CONTRIBUTION AGREEMENT
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This Capital Contribution Agreement (this "**Agreement**") is originally enterned into effective as of May 18, 2024, and is amended and restated on the date of December 22, 2024, by and between the following parties:

Comboox DAO LLC, a limited liability company incorporated pursuant to the Wyoming Limited Liability Company Act (the "**Act**") and the Wyoming Decentralized Autonomous Organization Supplement (the "**Supplement**"), with its entity identification number as 2023-001358375 (the "**Company**"); and

Li Li, the sole founding member of the Company and also the author who developed and deployed ComBoox Platform (the "**Contributor**").

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **RECITALS**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEREAS, the Contributor is the Founding Member of the Company and intends to invest the beneficial rights of ComBoox to collect the royalties of Templates within ArbitrumOne (the "IPR") as his capital contribution into the Company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEREAS, the Company intends to accept such capital contribution and to issue Shares in exchange;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEREAS the Contributor has already set certain configurations in the relevant smart contracts so as to transfer the beneficial and control rights of the IPR to the Company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEREAS, under US GAAP, it is difficult to recognize the value of IPR when the Founding Member contributed it to the Company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEREAS both parties agree to defer the recognition of the value of the IPR and the determination of the paid-in amount of the Shares issued in exchange until the key conditions for the valuation of the IPR have been met;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOW, THEREFORE, in consideration of the mutual covenants and agreements contained herein, the parties agree as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1. **Definition**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.1. "**ArbitrumOne**" means the Ethereum Layer-2 public blockchain network operating under the name "ArbitrumOne", which is connected to the main net of Ethereum and uses a technology called "Optimistic Rollups" to improve the scalability and efficiency of Ethereum.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.2. "**CBP**" or "**ComBoox Points**" means the ERC-20 token booked in Registration Center, the primary function of which is to act as the ComBoox Community's utility token to automatically calculate, collect and transfer royalties from Users of Template Contracts to the relevant intellectual properties' holder.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3. "**ComBoox**" or "**ComBoox Platform**" means the company book-entry platform consisting of a core smart contract called "Registration Center" and a set of Template Contracts deployed on ArbitrumOne, which is designed for equity registration and corporate statutory books-keeping, and aims to assist users to quickly establish a legal, secure, transparent, reliable and automatic system to enable the company's stakeholders to perform legal acts related to share transactions or corporate governance in a self-service mode.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.4. "**ComBoox Community**" means the open, unincorporated, loose organization of CBP holders, whose primary function is to decide, through public discussion and public voting, on whether new template contracts are suitable to be included into the ComBoox Platform as Template Contract, so as to improve or expand the functionalities thereof.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.5. "**Members** means the equity owners of the Company, who may enjoy and exercise the distribution rights to the profits and residual assets in proportion to the aggregate Distribution Points of each Member and may enjoy and exercise the voting rights in proportion to the aggregate Voting Points of each Member. For the purposes of this Agreement and in most contexts relating to the Company, the term "Member" may usually be used interchangeably with the term "Shareholder".

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.6. "**Operating Agreement**" means the Operating Agreement of the Company executed on the date of May 18, 2024, as amended and updated from time to time.

1.7. "**Par Value**" represents the subscribed contribution amount of the subject Shares, the minimum unit of which is $0.0001;

1.8. "**Paid Value**" represents the paid-in contribution amount of the subject Shares that actually received by the Company, the minimum unit of which is $0.0001;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.9. "**Registration Center**" means the core smart contract of ComBoox deployed on ArbitrumOne at the address as publicly disclosed on ComBoox's website and its white paper, which has the following primary functions:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) User Registration: to register users of ComBoox against their Prime Key;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) CBP book keeping: to record balance amount of CBP for each account holder;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Document Registration: to register Template Contracts and their clone copies according to the contract address; and

1.10."**Register of Shares**" means the Smart Contract adopted by the Company to automatically book and maintain the public record of Shares, i.e. the Certificate of Contribution concerned. Any creation, alteration or revocation of any Share can only be effective and legally binding to the Company and Members upon its entry into Register of Shares.

1.11."**Shares**" means a Member's minimum unit of ownership interests and rights in the Company, par value of which is $0.0001. Shares will be booked automatically in Register of Shares in form of a digital object called "Certificate of Contribution".

1.12."**Smart Contracts**" means the set of smart contracts adopted by the Company, from time to time, for automatically registering the equity shares of the Company and keeping records of corporate governance thereof, which shall be created and deployed by cloning Template Contracts.

1.13."**Template Contracts**"or "**Templates**" means the smart contracts adopted by the ComBoox Platform and registered in Registration Center as templates to create clone copies for its Users to deploy and use on ComBoox.

1.14."**Voting Weight**" means percentage weight of each Share when calculating the voting rights of the subject Shares, and the calculation result shall be called as "**Voting Points**" which shall be the basis to calculate the aggregate voting rights of a Member. The minimum unit of Voting Weight shall be one percent.

1.15."**Distribution Weight**" means percentage weight of each Share when calculating the distribution rights of the subject Shares, and the calculation result shall be called as "**Distribution Points**", which shall be the basis to calculate the aggregate distribution rights of a Member for distributing profits or residual assets, or assuming loss or liabilities of the Company. The minimum unit of Distribution Weight shall be one percent.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.16.Unless otherwise clearly indicates, words used in the singular include the plural, the plural includes the singular, and the neuter gender includes the masculine and the feminine.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2. **Capital Contribution**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.1. **Contribution.** The Contributor agrees to contribute, assign, and transfer to the Company the following intangible assets (the "**Contributed Assets**") as his capital contribution:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) beneficial rights of the Templates within the territory of ArbitrumOne on an "AS IS" basis, so that the Company may collect royalties on those Templates in form of CBP as general income;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) owner's right to Registration Center, so that the Company may collect platform commission of ComBoox in form of CBP as general income;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) owner's right to Registration Center, so that the Company may determine and adjust the total supply of CBP on ArbitrumOne; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) owner's right to the Smart Contract called "Fuel Tank", so that the Company may:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. set the Fuel Tank's selling price of CBP in ETH; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. pick up selling revenue of CBP in ETH from Fuel Tank.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.2. **Effective Date of Contribution.** The contribution of the Contributed Assets shall be effective as of the date of this Agreement or such earlier date on which the Contributor actually sets up the corresponding configurations in the relevant Smart Contract.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3. **Issuance of Shares**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.1. **Initial Shares.** In exchange for the Contributed Assets, the Company agrees to issue to the Contributor the following Shares (the "**Initial Shares**") as consideration:

---

| | | |
|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Certificate No.**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2**  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Par Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 250,000 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50,000 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Paid Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price of Par**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price of Paid**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.00 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.00 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Value**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00 USD  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voting Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4,000 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Voting Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100000000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distribution Weight**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 %  |
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total Distribution Points**  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2500000000  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500000000  |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.2. **Membership Interest.** The Contributor shall be admitted as a member of the Company with all the rights and obligations as set forth in the Operating Agreement.

**4. Evaluation of IPR**

4.1. **Conditions Precedent of Evaluation**. As long as the following conditions are all fulfilled, the Company shall have the IPR to be valued:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the Company has already legally issued its equity shares to the public, as well as the CBP as a utility token;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the Company has been receiving automatically collected royalties from parties other than the Founding Member for more than one year; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) a Special Resolution has been passed by the General Meeting, with the support vote of the Founding Member counted in the voting result, regarding the valuation firm to be engaged to assess the value of the IPR, as well as the valuation base date thereof.

4.2.**Paid In Capital Recognition.** When the final valuation report is issued as per Section 4.1, then:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the value of the IPR shall be recognized in the Company's account of "Intangible Assets" on the debit side, as per the arithmetic or weighed average of the upper and lower boundaries of the valuation range identified in the valuation report, whichever is higher;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the value of the IPR shall also be booked in the Company's account of "Paid In Capital" on the credit side, as paid in capital contributed by the Contributor, therefore:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A. if the value of the IPR is greater than the unpaid subscription amount of the Initial Shares, the Company shall update the Paid Value of the Initial Shares as equal to their Par Value, and shall further issue such number of new Class B Shares whose Paid Value and Par Value are all equal to the excess amount thereof; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B. if the value of the IPR is lower than the unpaid subscription amount of the Initial Shares, the Company shall update the Paid Value of the Initial Shares as equal to the recognized IPR value, and the Founding Member may elect to: (i) pay the outstanding balance amount in ETH; or (ii) cause the Company to reduce the equivalent amount of the Initial Shares in the order of Class B to Class A.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.3.**No Distribution**. Before the value of the IPR is recognized in the accounts of "Intangible Assets" and "Paid In Capital" as per Section 4.2:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the Company shall NOT distribute any profits or assets to the Members; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the Voting Points and Distribution Points of the Initial Shares shall be calculated based on the Par Value.

5. **Representations and Warranties**

5.1. **Contributor's Representations.** The Contributor represents and warrants to the Company that:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) The Contributor is the owner of the Contributed Assets and has the right to transfer them to the Company free and clear of any liens, encumbrances, or claims;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) The Contributed Assets are transferred on an "**AS IS**" basis, and the Contributor makes no representations or warranties regarding the feasibility, security, or legal compliance of the Contributed Assets;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) The Contributor has the full power and authority to enter into this Agreement and to perform its obligations hereunder.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.2. **the Company's Representations.** the Company represents and warrants to the Contributor that:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) the Company is duly organized, validly existing, and in good standing under the laws of the State of Wyoming;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) the Company has the full power and authority to enter into this Agreement and to perform its obligations hereunder.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6. **Indemnification and Defense**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1. **Defense of Claims.** In the event of any third party challenge or claim alleging that: (1) the Contributed Assets infringe the intellectual property rights of any third party; or (2) the Contributed Assets cause any loss or damage to any entity, the Company shall be responsible for and shall pay all costs and expenses incurred in connection with such claims, including attorneys' fees, and shall retain counsel to defend against such claims.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.2. **Indemnification.** The Company shall indemnify the Contributor in the event the Contributor is made a party or is threatened to be made a party to any pending or completed action, suit or proceeding, whether civil, criminal, administrative or investigative (other than an action by or in the right of the Company), by reason of the fact that the Contributor is or was an author of the Contributed Assets, is or was a member, manager or agent of the Company, or is or was serving at the request of the Company, against expenses (including attorneys' fees), judgments, fines and amounts paid in settlement actually and reasonably incurred in connection with such action, suit or proceeding. The termination of any action, suit or proceeding by judgment, order, settlement, conviction or upon a plea of "no lo contendere" or its equivalent shall not, of itself, create a presumption that the Contributor did or did not act in good faith and in a manner he or she reasonably believed to be in the best interests of the Company and, with respect to any criminal action or proceeding, had reasonable cause to believe that his or her conduct was lawful.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7. **Miscellaneous**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.1. **Governing Law.** This Agreement shall be governed by and construed in accordance with the laws of the State of Wyoming, without regard to its conflict of laws principles.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.2. **Disputes Resolution.** Any disputes arising from or in connection with this Agreement shall be submitted to either the United States District Court for the State of Wyoming or in a Wyoming state court where the Company's Registered Office is located. Parties irrevocably waive, to the fullest extent permitted by law, any objection the party may have to the laying of venue for any such suit, action or proceeding brought in such court.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.3. **Entire Agreement.** This Agreement constitutes the entire agreement between the parties with respect to the subject matter hereof and supersedes all prior agreements and understandings, whether written or oral, relating to such subject matter.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.4. **Amendments.** This Agreement may be amended or modified only by a written agreement signed by both parties.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.5. **Counterparts.** This Agreement may be executed in counterparts, each of which shall be deemed an original, but all of which together shall constitute one and the same instrument.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of the day and year first above written.

---

| | | | |
|:---|:---|:---|:---|
| **the Company:**  | **Comboox DAO LLC**  | **the Contributor:**  | **Li Li**  |
| **By: <br>**  | /s/ Li Li <br> Li Li  | **By: <br>**  | /s/ Li Li <br> Li Li  |
| **Title:** | the Sole Founding Member |  |  |

---

#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXHIBIT-I SMART CONTRACTS LIST

---

| | | | | | |
|:---|:---|:---|:---|:---|:---|
| **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S.No.**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Smart Contract**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contract Address on ArbitrumOne**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S.No.**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Smart Contract**  | **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contract Address on ArbitrumOne**  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 01  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alongs  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xf1BdBeA551E969f62aD2491979E7b49c89E22552  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OrdersRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x30EdC7C692B5673473C0e7D680D281D4274ee47F  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 02  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AntiDilution  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x22684e01f4EA7A4711522860959Ce9E64F7DB50b  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 36  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PledgesRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xc14c04BE8555492cDDABEF0f6Aa39bE3f4a77C4d  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 03  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ArrayUtils  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x32242292Fe2CE40c969ED9CB407B53678CbD4429  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PriceConsumer  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x33631310EbA9Ed6aE821c5DC099fDc4dfb167787  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 04  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BallotsBox  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xeB9cD0B8D0f2942cC87DED0C3465A25F90E733fd  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 38  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegCenter  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x18F7AE56d1e04B95A2C50AFd528aC3FCb6F23f91  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 05  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BMMKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x19Fad722DBF345292a2180ebfa48D4a7bE27b09E  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterOfAgreements  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x2c69f5C21E342D6323a431f2191532Dcbe85006B  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 06  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cashier  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xe3E7fBFC827360d7D41E051B70267C3C54d68E59  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 40  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterOfConstitution  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7DDA00b011fD3bcaE2fB794B8E8A820Bcac7D0b7  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 07  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CashLockers  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x46934158960fDDbA06DB5e27760932B920cB6877  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 41  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterOfDirectors  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xd39919AF8469c897b983E6050611DcfA5007a617  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 08  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Checkpoints  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x96DB333AF3900084E83eb00D5B293555A8172598  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 42  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterOfMembers  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x3445e233194Fc9414a971eDfb042A2159C7E1d69  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 09  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CondsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x6965595F0A1E4E39c01FD44F22E43B93113256D0  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 43  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterOfOptions  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xd7F3Da7A9446D9734A89826437a71daB5e2039Ee  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateNewComp  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7f7c6404a2Ba0d9fFDfEFF74c7A21dc3E02aEC5B  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 44  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterOfPledges  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x454770a8f33D52E8F56d32C331eFa6266721F7B5  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DealsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x1628D5AaB2835d98DB61301eC664dBB693Ab98E4  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 45  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterOfShares  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x10117A8e3B6A62035842D23414D358095db62F66  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DelegateMap  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xEF88d2C38c0ED8a2FEa9C05A0485f984f7Af3243  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 46  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROAKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x2E5691169478177923129FF7b725F12CA9b25d2f  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DocsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xf51D4cea671655df9B12674978620C1d5edB50c7  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 47  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROCKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xa1CFbfC24Af4978317EFCE3CA8bB4E0aBb095543  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DTClaims  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x244aba0296265E9e3Ae7a49C3a28c57F1283e06f  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 48  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RODKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x5b6b538BB70d661251E7F5213707f1c4b3c1B539  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FilesRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xE618359E25a029de047734a8612bCaE6801c56f1  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 49  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RolesRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x244370E5C5006551bDa3cdc00dE55eD977842020  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FRClaims  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7782D518Dd97cf9c1F1D5525DEc6D1a21C5ad598  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROMKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x600fcb0Fd56CaC2A5E4c742Af8b31Ea2C5629a64  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FuelTank  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x1ACCB0C9A87714c99Bed5Ed93e96Dc0E67cC92c0  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 51  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROOKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xAa9524f6445eCEA2312EEA439193D5435a3C45D2  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GeneralKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x649a60DB59A50155072f9Be95193eaaF3cB533fA  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 52  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROPKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xdfF8B8EF2eC7d77747190C824AF797f11409D9D1  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GMMKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x4E492C3feEBAc18b5F684Ff162ab1B515Dbb190C  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 53  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RulesParser  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x1129fE8b9D0Fe7d5912f1FA9d803a2D6FF555CAf  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GoldChain  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xDA25A596E08ba3dc0888Ef195C10beBbC5F28BC1  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 54  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHAKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x654bc219f328406dd14Bf2F5F5C3E276c14C0437  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InvestmentAgreement  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xb4a8e3B116658AE0a5890DC5a17F2975e3fCef82  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 55  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShareholdersAgreement  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xb67553E993a19d435E7cFd3e21ECA72D62ee1290  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InvestorsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x4E3ee5389E1f98650f2b8010cd4862fc95B57249  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 56  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SharesRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x324C5d9c5E944a85BDcCF81206ab07db46D56439  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 23  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LinksRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x68Fb980E70186895267D7797ef50422bE56f0230  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SigsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xf41e4b4FE7ec99C6e2E9cC70043472908c905AA7  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ListOfOrders  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xC64aDb03f7DD93DB9571AFB40132C21720fd9c33  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 58  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SwapsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xfa86fa5Ccdf07528DC4C0EcdabffDfBc636c77D5  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ListOfProjects  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x4E915C0f36cf07d8B411Beb284D1eb0487fD8D45  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TeamsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xCe8Ce7081c86db892611Cf352fe3d51939508E62  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LockersRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0Db19025d2b806ceBfACE91F671ca9606bd2eee0  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TopChain  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xFADf5af170824d76DE1C9A8B148B206467Eee400  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 27  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LockUp  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x10826CA81e5F2049c6FfC074cb1011d472805A1C  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 61  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; USDKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xB50120151b82639397ED0c75fe8346e4a30A78f7  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LOOKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x2c75B9bF64305257dcF852fe32D689ABAB29B2C5  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 62  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UsdListOfOrders  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x75Dee9520D75F196B824047D5803E7ED62a04208  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 29  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MeetingMinutes  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xc487f44b516E6B8ddE72c99B8Ae14eF388994476  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 63  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UsdLockersRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x33B01c210Fd89f1b15bB768e961E21Be7d82c585  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MembersRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xD0AAcD5878D79bD7910344Df0ac310Aa6C9422fB  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UsdLOOKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xC562f9dEf84059ad5e10fF5978e98DA88a8149d8  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 31  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MotionsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x275Ac497D00D966C92531F642489Cdd4079EE104  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 65  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UsdROAKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xD18E88a27a85F91ae2f0e9fA345498b1Ca41d47C  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OfficersRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x2ae4D963E31Bd09d40F1001318FEe8AEcc922740  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 66  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UsdROMKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x95F68D889314305Fdc13185fbF36131B1Dc8730e  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 33  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Options  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0A5D80cbC81ae8402169767d31c94cC354881d58  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 67  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UsdROOKeeper  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x59fdf4E2C4DE9880b267bd7694111340E579413e  |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OptionsRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x2fAf8bC04dd3A5872682ab728d32e17CbE154287  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 68  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UsersRepo  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x56DACf2EB1bE96eE7617B18a9e6f44598d296472  |

---

## Ex-23

&nbsp;&nbsp;&nbsp;&nbsp; **CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM**

&nbsp;&nbsp;&nbsp;&nbsp; We hereby consent to the inclusion in this Registration Statement on Form S-1 of Comboox DAO LLC (the "Company") of our report dated March 12, 2025, with respect to the financial statements of the Company and the related notes as of and for the year ended December 31, 2024, which appears in this Registration Statement.

&nbsp;&nbsp;&nbsp;&nbsp; We also consent to the reference to our firm under the heading "Experts" in such Registration Statement.

&nbsp;&nbsp;&nbsp;&nbsp; /s/ Kustov & Associates, Inc.

&nbsp;&nbsp;&nbsp;&nbsp; San Francisco, California <br> March 12, 2025

## Ex-32

![](comboox_s1img1.jpg)

# ComBoox: A Blockchain-Based Company Book-Entry Platform

### **LI LI, Founding Member of Comboox DAO LLC** 

## **System Overview** 
**ComBoox** is a blockchain-based company records-keeping platform designed for registering equity shares and corporate statutory books keeping, which is aimed to assist users to quickly establish a legal, secure, transparent and reliable smart contracts system, so as to enable investors, shareholders, executive officers, business partners to conduct legal acts around equity rights in a self-service mode, including share subscription, share transfer, share pledge, paying consideration, signing contracts, proposing, voting, nominating, inauguration and resignation etc.

**Unlike** pure share certificates tokenization, **ComBoox** does **NOT** rely on legal documents to restrict off-chain behavior. Instead, it uses smart contracts to fully control **ALL** share transactions and corporate governance activities, enabling rights holders to conduct legal actions on chain in self-service mode, completely eliminating the possibility of default or violation.

Therefore, **ComBoox** provides a brand-new concept and solution to solve the problems of "**Insiders Control**" or "**Misleading Statements**" that have plagued the capital markets for many years, and may completely realize:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) right holders may **directly exercise** rights;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) obligors have **no chance** to default or violate; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **real-time** disclosure of full information.

---

| | |
|:---|:---|
| Dapp (Arbitrum One) | https://comboox.vercel.app |
| Dapp Demo (Arbitrum Sepolia) | https://comboox-sepolia.vercel.app |
| Smart Contract Source Code | https://github.com/paul-lee-attorney/comboox |
| User Interface Source Code | https://github.com/paul-lee-attorney/comboox-client |
| Documentation | https://comboox.gitbook.io/whitepaper |

---

i

 **TABLE OF CONTENTS**

---

| | |
|:---|:---|
|  | **Page** |
| [1. System Overview](#System Overview) | 1 |
| [1.1. "Pain Points" of Corporate Governance](#Pain Points of Corporate Governance) | 3 |
| [1.2. Blockchain Solution](#Blockchain Solution) | 4 |
| [1.3. Tokenization and Company Evaluation](#Tokenization and Company Evaluation) | 6 |
| [1.4. Features and Advantages](#Features and Advantages) | 7 |
| [2. Computational Control Model](#Computational Control Model) | 8 |
| [2.1. State](#State) | 8 |
| [2.2. Transition Process](#Transition Process) | 8 |
| [2.3. Conditions and Process](#Conditions and Process) | 9 |
| [2.4. Write Operation Scripts](#Write Operation Scripts) | 9 |
| [3. System Architecture](#System Architecture) | 11 |
| [3.1. Registers](#Registers) | 12 |
| [3.2. Bookkeepers](#Bookkeepers) | 23 |
| [3.3. Shareholders Agreement](#Shareholders Agreement) | 28 |
| [3.4. Investment Agreement](#Investment Agreement) | 34 |
| [4. Identification and Access Control](#Identification and Access Control) | 38 |
| [4.1. Access Control Mechanism on smart contracts' level](#Access Control Mechanism) | 39 |
| [4.2. Commands Routing Mechanism within the company](#Commands Routing Mechanism) | 45 |
| [4.3. Users Identification Mechanism for entire platform](#Users Identification Mechanism) | 47 |
| [5. Templates and Version Control](#Templates and Version Control) | 54 |
| [5.1. Cloning Technology and Delegate Call Mechanism](#Cloning Technology and Delegate) | 54 |
| [5.2. Documents Mapping of Reg Center](#Documents Mapping of Reg Center) | 55 |
| [5.3. Types of Template Contracts](#Types of Template Contracts) | 56 |
| [6. External Write APIs](#External Write APIs) | 58 |
| [6.1. APIs routed to ROC Keeper](#APIs routed to ROC Keeper) | 58 |
| [6.2. APIs routed to ROD Keeper](#APIs routed to ROD Keeper) | 64 |
| [6.3. APIs routed to BMM Keeper](#APIs routed to BMM Keeper) | 70 |
| [6.4. APIs routed to ROM Keeper](#APIs routed to ROM Keeper) | 80 |
| [6.5. APIs routed to GMM Keeper](#APIs routed to GMM Keeper) | 86 |
| [6.6. APIs routed to ROA Keeper](#APIs routed to ROA Keeper) | 97 |
| [6.7. APIs routed to ROO Keeper](#APIs routed to ROO Keeper) | 107 |
| [6.8. APIs routed to ROP Keeper](#APIs routed to ROP Keeper) | 116 |
| [6.9. APIs routed to SHA Keeper](#APIs routed to SHA Keeper) | 125 |
| [6.10. APIs concerning ETH/CBP Transfer](#APIs concerning ETH/CBP Transfer) | 133 |
| [6.11. APIs routed to LOO Keeper](#APIs routed to LOO Keeper) | 139 |
| [6.12. APIs routed to USD LOO Keeper](#APIs routed to USD LOO Keeper) | 149 |
| [6.13. Other APIs concerning USDC payments](#Other APIs concerning USDC payments) | 157 |
| [7. Scenarios for Equity Transactions and Corporate Governance](#Scenarios for Equity Transactions and Corporate Governance) | 162 |
| [7.1. Apply for Qualified Investor Status](#Apply for Qualified Investor Status) | 164 |
| [7.2. Update Shareholders' Agreement](#Update Shareholders' Agreement) | 166 |
| [7.3. Trade Equity by Agreement](#Trade Equity by Agreement) | 169 |
| [7.4. Trade Equity by Listing (in ETH)](#Trade Equity by Listing (in ETH)) | 173 |
| [7.5. Trade Equity by Listing (in USDC)](#Trade Equity by Listing (in USDC)) | 177 |
| [7.6. Elect or Remove Directors](#Elect or Remove Directors) | 181 |
| [7.7. Elect or Remove Officers](#Elect or Remove Officers) | 184 |
| [7.8. Transfer Fund](#Transfer Fund) | 186 |
| [7.9. Distribute Profits](#Distribute Profits) | 190 |
| [7.10. Call External Smart Contracts](#Call External Smart Contracts) | 193 |
| [7.11. Pledge Shares for Debts](#Pledge Shares for Debts) | 197 |
| [7.12. Execute Special Investor Rights of SHA](#Execute Special Investor Rights of SHA) | 200 |
| [7.13. Execute Options](#Execute Options) | 204 |
| [8. CBP and Economic Model](#CBP and Economic Model) | 207 |
| [8.1. Rate of Royalty](#Rate of Royalty) | 208 |
| [8.2. Collection of License Fee](#Collection of License Fee) | 208 |
| [8.3. Commission of Platform](#Commission of Platform) | 208 |
| [8.4. Promotion Policy](#Promotion Policy) | 209 |
| [8.5. New User's Gift](#New User's Gift) | 210 |
| [8.6. Transfer of Smart Contracts' Copyright](#Transfer of Smart Contracts' Copyright) | 210 |
| [8.7. Transfer of System's Ownership](#Transfer of System's Ownership) | 211 |
| [9. Financial Records](#Financial Records) | 212 |
| [9.1. Exchange Rate](#Exchange Rate) | 212 |
| [9.2. CBP Flow Records](#CBP Flow Records) | 214 |
| [9.3. ETH Flow Records](#ETH Flow Records) | 215 |
| [9.4. USDC Flow Records](#USDC Flow Records) | 222 |
| [10. Key Legal Issues](#Key Legal Issues) | 228 |
| [10.1. Digital Identification Mechanism VS. Real-Name Requirements](#Digital Identification Mechanism) | 228 |
| [10.2. Real Time Information Disclosure VS. Trade Secret Protection](#Real Time Information Disclosure) | 230 |
| [10.3. Internal Book-Entry Records VS. Public Registration Information](#Internal Book-Entry Records) | 232 |
| [10.4. Give Legal Effects to On-Chain Books](#Give Legal Effects to On-Chain Books) | 234 |
| [11 Software License](#Software License) | 236 |

---

ii

**1. System Overview**

Since human civilization has entered the 21st century, most wealth exists in the form of book-entry interests. In order to regulate this wealth and transaction activities, various commercial legal rules, organizational by-laws and trading contracts have been established, and different centralized agents are involved in commercial activities. However, in the event that these rules, laws or contracts are violated, people can only rely on ex post facto judicial remedies to seek compensation for their losses. Such Judicial remedies have proven to be excessively expensive and time-consuming, and insufficient to fully recover for the incurred losses.

The emergence of blockchain technology provides a brand-new set of solutions for human beings, which is to define the bookkeeping rules and transaction arrangements for book-entry interests in codes, and to use distributed systems and cryptography to fix these bookkeeping records in terms of content and time sequence. In this way, the possibility of non-compliance or default can be eliminated by means of ex ante prevention.

By implementing the basic concepts of "code is law" and "decentralization", the legal logic defined by norms and contract terms can be realized by rigid code logic, and the human management of centralized organization can be replaced by automated consensus mechanisms and smart contracts. This establishes an automated asset bookkeeping and transaction management model, where rights holders can directly manage and dispose of their assets without having to rely on any intermediaries or counterparties. The only thing that needs to be considered is the logic and algorithms of the predefined smart contracts.

In all kinds of book-entry interests, apart from deposit, corporate equity is probably the most important and critical class of assets. The company is the vehicle for a variety of assets and the subject of capital investment. The external action of companies is an important part of modern business, and their internal governance involves the interests of many investors. Therefore, company equity is the key link between capital and assets, business activities and corporate governance.

---

| |
|:---|
| 1 |
| *[**Table of Contents**](#Toc)* |

---

Using blockchain and smart contract technology to automate the bookkeeping of corporate equity and governance behaviors, and replacing the legal logic of ex post facto judicial remedies with the rigid code logic of ex ante prevention, these concepts will be of great significance to the modern business in reducing disputes, eliminating irregularities, improving transparency, and enhancing efficiency.

Based on the above concepts, we developed and deployed the ComBoox platform.

**ComBoox** is a blockchain-based company records-keeping system to assist users to quickly establish a legal, secure, transparent, and reliable smart contracts system for automatically registering equity shares and keeping records of corporate governance.

---

| |
|:---|
| 2 |
| *[**Table of Contents**](#Toc)* |

---

 **1.1. "Pain Points" of Corporate Governance**

The capital markets have long been suffered from some "pain points" of corporate governance, which can be summarized into following three aspects:

**(1) Right holders can hardly exercise their rights smoothly**

No matter it is to replace executive managers, to change accounting policies, to convene an extraordinary shareholders' meeting, or to enforce a Put Option, Drag-Along, or Anti-Dilution of the shareholders agreement, when exercising their shareholders rights, investors will often inevitably need the cooperation of other parties like company secretary, actual controller, executives, registration agents and even the official registration offices. Sometimes, this could be very difficult and challenging, not only time-consuming and costly, but also may change into a protracted shareholders' disputes, even lead to a serious consequences like business shutdown.

**(2) Obligors sometimes deliberately violate their obligations**

During an equity share transaction, buyer may delay paying of the consideration, whereas, seller may maliciously retain the company's seal, license, or postpone the closing process; In a company's daily operation, managers may abuse their authority, actual controller may misappropriate operational funds... To sum up, all of such bad behaviors can be categorized as "acts of breach", either breaching a share transaction contract (such as share subscription agreement or share transfer agreement), or violating a constitutional document of the company (e.g. the articles of association, bylaws, shareholders agreement, or operational agreement).

**(3) Untimely and inaccurate information disclosure** 

Transfer of control rights, private placements, acquiring material voting shares exceeding reporting threshold ratio, such significant changes of shareholding structure of a company, as well as the company's governance records like shareholders meeting resolutions or board meeting minutes etc., all these information are crucial indicators for assessing a company's future strategy, profitability, and valuation of equity shares, and will directly influence the investment decisions of investors and the valuation of the company concerned. Untimely, inaccurate or incomplete information disclosure often becomes major reasons that caused shareholders disputes or securities transaction disputes.

---

| |
|:---|
| 3 |
| *[**Table of Contents**](#Toc)* |

---

 **1.2. Blockchain Solution**

The emergence of blockchain and smart contract technology presents a good opportunity to solve the above-mentioned problems. If using blockchain to book equity shares, and using smart contracts to define and automatically control share transactions and corporate governance activities, then, the potential human influences can be excluded to an extreme extent, so as to realize:

**(1) Rights holders directly exercise rights**

Rights holders may, by means of electronic signature technology, have their identities verified and send out their instruction calls of exercising rights, by triggering the specific API of smart contracts to call the relevant functions and methods, directly update the Register of Shares, Meeting Minutes, and other Book-Entry records in accordance with the predefined conditions and procedures, thereby achieves the desired legal consequences accordingly. Throughout this process, there is no need to seek assistance or engagement of secretary, agent, authority or any third party, to exercise rights as a representative, proxy or delegate, so that the actions of exercising rights will not be intervened or controlled by any third party.

**(2) Obligors have no chance to default**

The reason why defaults occurred is because the realization of contractual rights depends on obligors to make cooperation behaviors actively. When turning over the control rights of book-entry records like Register of Shares and Meeting Minutes to smart contracts for automatic operation, then, a lot of traditional "claim rights" requiring cooperation of obligors will be changed into "disposal rights" that can be unilaterally exercised by right holder, therefore, the possibility of defaults will be completely eliminated.

---

| |
|:---|
| 4 |
| *[**Table of Contents**](#Toc)* |

---

As for the constitutional documents like articles of association, bylaws or shareholders agreement, many defaults are actually Ultra Vires behaviors (either substantive or procedural) of the controlling shareholder or executive managers. Smart contracts have rigid and strict programming logic, and can precisely control the timeline, permissions, procedures and other conditions of business operations, which may fundamentally eliminate the said Ultra Vires challenges to corporate governance.

**(3) Real-time information disclosure**

Corporate governance behaviors can generally be categorized as signing documents, voting, paying consideration, nominating candidates, taking position, resigning and several other types, and the existing technologies are fully capable to implement all of these legal actions that takes "Expressing Intent" or "Updating Rights and Interests" as its core attributes on blockchain, i.e. using blockchain to book the digital tracks of these legal behaviors, and using smart contracts to automatically verify identity of the actors, determine the conditions precedent, and control the process and procedures.

Blockchain is a distributed system that synchronizes information in real-time among the nodes, therefore, legal behaviors conducted on blockchain will complete the information disclosure at the same time when updating the book-entry records or realizing the legal consequences concerned. Legal behavior and information disclosure are not separate activities any more, which will be integrated together and have no time lag or contents differences. Therefore, current disclosure issues like untimely delay, misrepresentation, or misleading statements etc. should become impossible to occur.

---

| |
|:---|
| 5 |
| *[**Table of Contents**](#Toc)* |

---

 **1.3. Tokenization and Company Evaluation**

Equity share is a typical kind of book-entry interests, and also an important trading object of capital markets.

**(1) IPO creates capital premium**

A company may select to list its shares on an open market, so as to facilitate public investors to buy in and sell out its equity more conveniently, which means to release the liquidity of its equity greatly, and as a direct consequence, the equity value of the company or its stock price will usually increase within a very short period of time dramatically. This is the basic principle that IPO can create capital premium.

**(2) Tokenization of Equity Shares** 

Similarly, if adopting blockchain to book companies' equity, it will become very convenient to use cryptocurrencies or Central Bank Digital Currencies to pay the equity consideration, and, under the automatic control of smart contracts, some concepts like "Delivery Versus Payment", "Payment as Settlement" and "No Clearing Transfer" etc. can be fully realized with a fairly low cost and much higher efficiency.

**(3) Web 3.0 Capital Markets**

However, tokenization of equity shares does not simply mean to define a structured digital object representing equity value or capital contribution, or to move the booking records of "Register of Shareholders" or "Register of Members" onto the blockchain. What's more important is to coordinate all facts that may influence the equity value of a company into the automatic system of blockchain, and to enable smart contracts to get full control over all activities of share transaction and corporate governance, so as to ensure all those legal behaviors can be carried out strictly in line with the internal governance rules (like the articles of association or bylaws), as well as the external governing laws and regulations (such as the Securities Act and the Securities Exchange Act). So that, the capital markets can rely on the rigid logic of smart contracts to automatically control the creation, change, exercising, and elimination of the equity rights of shareholders, i.e., by implementing the concept of "Code Is Law" to establish a decentralized and trustless "Web3.0 Capital Market" in real sense.

---

| |
|:---|
| 6 |
| *[**Table of Contents**](#Toc)* |

---

 **1.4. Features and Advantages**

To accommodate different demands, **ComBoox** adheres to the concept of "**dynamic configuration and plug-and-play**" to maintain the flexibility and scalability of its smart contract system. Specifically:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Operation Model**: is compatible to both the **members management model** of **DAO**, as well as the **managers management model** for regular companies.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Number of Owners**: the number of owners can be limited to 50 or fewer (for small-scale **limited liability companies**), or expanded to an unlimited level of public **listed companies**.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Equity Classification**: can implement ordinary equity structure of "**same shares, same rights**", and also can flexibly define **special classes of shares** so as to grant special rights or voting weights to them;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Governance Rules**: can flexible set general corporate governance rules like motion proposal rules, voting rules, (executive officials) position allocation rules, (affiliated members) grouping rules, and (equity) listing rules, and also can set out **special terms of members' right**, such as **First Refusal**, **Tag Along**, **Drag Along**, **Call Option**, **Put Option**, **Anti-Dilution**, **Lock Up**, so as to satisfy the requirements of private equity investment.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **Payment Methods**: the consideration for equity, pledge, or option can be paid on-chain with **native cryptocurrency**, or be paid off-chain or cross-chain with **fiats** or **central bank digital currencies**, by using technologies like **hash time lock**, so as to fully compatible with all kinds of payment requirements.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) **Legal Entities:** can book equities of the **direct invested companies**, and can also make further investments by controlling the first-tier companies to set up their **subsidiaries**, and to **indirectly control** the corporate governance activities of subsidiaries as well, so that forming a **complex network shareholding structure** accordingly.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) **Version Upgrades**: can create records-keeping system based on existing smart contract templates, and also allows **customization or upgrades to** new templates to satisfy special requirements.

---

| |
|:---|
| 7 |
| *[**Table of Contents**](#Toc)* |

---

**2. Computational Control Model**

**ComBoox** adopts the "**state machine model**" to simulate and control the share transactions and corporate governance activities, specifically:

 **2.1. State**

Information contents of the book-entry registers at each moment are deemed as different **states**, which will be stored in the smart contracts of **Registers** (such as **Register of Shares, Register of Members** and **Meeting Minutes** etc.).

 **2.2. Transition Process**

Share transactions, corporate governance behaviors and other relevant legal actions are considered as the **transition process** between different **states** of the book-entry **Registers**, and which will be defined and controlled by the smart contracts of **Bookkeepers** with respect to the subject's identity, action process, terms and conditions, as well as legal consequences thereof.

![](whitepaper_img1.jpg)

---

| |
|:---|
| 8 |
| *[**Table of Contents**](#Toc)* |

---

 **2.3. Conditions and Process**

The corporate governance rules (such as voting rules, nomination rules and other rules stipulated in the bylaws or other similar company constitutional documents), as well as the shareholders' special rights (such as First Refusal, Tag-Along and Drag Along, Anti-Dilution, Put Option and Call Option etc.) are deemed as **rules, conditions and procedures** to be followed in the **transition process** between the different **states**, which will be defined by the smart contract of **Shareholders Agreement** with respect to values of **attributes, duration** or **determination thresholds** for the said rules or rights. In runtime, **Shareholders Agreement** will timely answer the queries sent from **Bookkeepers** so as to provide parameters to automatically control the execution process of the legal behaviors concerned.

 **2.4. Write Operation Scripts**

**Investment Agreement** can be deemed as a special script or batch file consisting of a series of write operation commands to cause the states transition of **Register of Shares**. And, the transaction factors defined in **Investment Agreement** as attributes of object **Deal** (such as subject equity, parties concerned, quantities and price etc.) can be deemed as input parameters (or specific trigger events) of the said write operations concerned, which will be executed by the relevant **Bookkeepers** automatically.

---

| |
|:---|
| 9 |
| *[**Table of Contents**](#Toc)* |

---

---

| |
|:---|
| **Data Structure of Deal** |
| <br> struct Head{<br> uint8 typeOfDeal;<br> uint16 seqOfDeal;<br> uint16 preSeq;<br> uint16 classOfShare;<br> uint32 seqOfShare;<br> uint40 seller;<br> uint32 priceOfPaid;<br> uint32 priceOfPar;<br> uint48 closingDeadline;<br> uint16 votingWeight;<br> }<br>struct Body {<br> uint40 buyer;<br> uint40 groupOfBuyer;<br> uint64 paid;<br> uint64 par;<br> uint8 state;<br> uint16 para;<br> uint16 distrWeight;<br> bool flag;<br> }<br>struct Deal {<br> Head head;<br> Body body;<br> bytes32 hashLock;<br> }<br>|

---

---

| |
|:---|
| 10 |
| *[**Table of Contents**](#Toc)* |

---

**3. System Architecture**

**ComBoox** consists of four major types of smart contracts: **Registers**, **Bookkeepers, Shareholders Agreements** and **Investment Agreements**.

**Diagram of System Architecture**

![](whitepaper_img2.jpg)

---

| |
|:---|
| 11 |
| *[**Table of Contents**](#Toc)* |

---

 **3.1. Registers**

**Registers** defined registration books to record the various book-entry interests (such as equities, pledges, options) or corporate governance documents (such as general meeting minutes and board meeting minutes). The core functions of which are to define the attributes composition of various bookkeeping objects, and the data structure, parameter and logical verification algorithm thereof, as well as the basic methods and APIs for adding, deleting, modifying and querying these objects.

**3.1.1. Functions of Registers**

When users exercise their rights:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) in accordance with the calling commands sent or routed from **Bookkeepers**, **Registers** will retrieve and provide specific states of book-entry interests or historical records of legal behaviors;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Based on the above feedback, **Bookkeepers** will verify or determine whether the conditions for exercising certain rights are fulfilled, or calculates values of the relevant parameters concerned; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Bookkeepers** will call specific **Register** to update the states of specific book-entry interests, or store the contents, consequences or historical records of the legal behaviors concerned.

---

| |
|:---|
| 12 |
| *[**Table of Contents**](#Toc)* |

---

For example, when a director takes his/her seat, he/she needs to call the "Take Seat" API of **General Keeper,** inputting the shareholders meeting resolution's sequence number which approved him/her to be director and the position number of the director, and then:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **General Keeper** will query and obtain the user number of the message sender account, and call the "Take Seat" API of **Register of Directors Keeper ("ROD Keeper")** so as to process the subsequent actions thereof;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **ROD Keeper** will firstly call the **General Meeting Minutes ("GMM")** to verify: whether the type of motion is to elect director and whether the motion has been approved;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) If the type and approval status of the motion are all verified, **ROD Keeper** will further call the **GMM** to verify whether the user number of the message sender is equal to the candidate's number as defined in the position's description of the motion of nomination, if yes, then update the state of the motion into "executed";

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) If the message sender's identity is verified, **ROD Keeper** will call **Register of Directors ("ROD")** to record the user number, timestamp, as well as the block number concerned, so as to complete the entire process of inauguration.

---

| |
|:---|
| 13 |
| *[**Table of Contents**](#Toc)* |

---

![](whitepaper_img3.jpg)

In the above process, **GMM** and **ROD** are the two types of **Registers. GMM** provides the motion's type and its voting results by answering the query request of **ROD Keeper**, so as to determine whether the conditions for exercising the rights have been fulfilled, thereafter, verifies the caller's identity against the user number of the motion's candidate. Then, **ROD Keeper** writes the user number, date and block number of inauguration into **ROD**, so as to write down the action records of "inauguration".

---

| |
|:---|
| 14 |
| *[**Table of Contents**](#Toc)* |

---

**3.1.2. Types of Registers**

Based on the types of information recorded, **Registers** can be divided into two basic categories: **Registers** of book-entry interests and **Registers** of governance records, which includes:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Register of Constitutions ("ROC")**: records all editions of **Shareholders Agreements** with respect to their address, legal force status, procedural schedules for creation, review and voting etc., so as to enable users or smart contracts to retrieve or check the currently valid version of **Shareholders Agreement**, as well as all its historical revoked versions;

---

| |
|:---|
| **Structure of Object File** |
| <br> struct Head{<br> uint48 circulateDate;<br> uint8 signingDays;<br> uint8 closingDays;<br> uint16 seqOfVR;<br> uint8 frExecDays;<br> uint8 dtExecDays;<br> uint8 dtConfirmDays;<br> uint48 proposeDate;<br> uint8 invExitDays;<br> uint8 votePrepareDays;<br> uint8 votingDays;<br> uint8 execDaysForPutOpt;<br> uint64 seqOfMotion;<br> uint8 state;<br> }<br>struct Ref {<br> bytes32 docUrl;<br> bytes32 docHash;<br> }<br>struct File {<br> bytes32 snOfDoc;<br> Head head;<br> Ref ref;<br> }<br>struct Repo {<br> mapping(address => File) files;<br> EnumerableSet.AddressSet filesList;<br> }<br>|

---

---

| |
|:---|
| 15 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Register of Directors ("ROD")**: records all information about the positions of directors or managers with respect to their candidate's user number, nominator, the voting rules applied for election, the start and end date of tenure etc., so as to enable users or smart contracts to search or verify the identity, authorities or duties of executive officers;

---

| |
|:---|
| **Structure of Object Position** |
| <br> struct Position{<br> uint16 title;<br> uint16 seqOfPos;<br> uint40 acct;<br> uint40 nominator;<br> uint48 startDate;<br> uint48 endDate;<br> uint16 seqOfVR;<br> uint16 titleOfNominator;<br> uint16 argu;<br> }<br>|

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Board Meeting Minutes ("BMM")**: records all the motions submitted to the Board of Directors for approval with respect to their proposer, proposal date, start and end time of voting, voting results, delegate arrangements, executor, execution status, etc, so as to enable users or smart contracts to check or verify the motions of Board;

---

| |
|:---|
| **Structure of Object Motion** |
| <br> struct Head{<br> uint16 typeOfMotion;<br> uint64 seqOfMotion;<br> uint16 seqOfVR;<br> uint40 creator;<br> uint40 executor;<br> uint48 createDate;<br> uint32 data;<br> }<br>struct Body {<br> uint40 proposer;<br> uint48 proposeDate;<br> uint48 shareRegDate;<br> uint48 voteStartDate;<br> uint48 voteEndDate;<br> uint16 para;<br> uint8 state;<br> }<br>struct Motion {<br> Head head;<br> Body body;<br> RulesParser.VotingRule votingRule;<br> uint contents;<br> }<br>|

---

---

| |
|:---|
| 16 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Register of Members ("ROM")**: records all information about members or shareholders with respect to their equity shares, voting rights, amount of subscribed / paid-in capital, so as to enable users or smart contracts to check or verify the shareholding status of a member;

---

| |
|:---|
| **Structure of Object Member** |
| <br> struct Checkpoint{<br> uint48 timestamp;<br> uint16 rate;<br> uint64 paid;<br> uint64 par;<br> uint64 points;<br> }<br>struct History {<br> mapping(uint256 => Checkpoint) checkpoints;<br> }<br>struct Member {<br> Checkpoints.History votesInHand;<br> // class => seqList<br> mapping(uint => EnumerableSet.UintSet) sharesOfClass;<br> EnumerableSet.UintSet classesBelonged;<br> }<br>|

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **General Meeting Minutes ("GMM")**: records all the motions submitted to the General Meeting of Shareholders for approval with respect to their proposer, proposal time, voting start and end time, voting results, delegate arrangements, executor, execution state, etc, so as to enable users or smart contracts to check or verify the relevant information of the motion submitted to General Meeting of Members;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) **Register of Agreements ("ROA")**: records all the **Investment Agreements** with respect to their address, status, transaction type and detailed arrangements, parties, procedural schedules for exercising special rights, so as to enable users or smart contracts to check and retrieve the relevant **Investment Agreements**, and, to enable the parties concerned to execute the deals under these **Investment Agreements**. Moreover, **ROA** also can mock the transaction results and calculate the ultimate controller of the company after closing of the deals concerned, so as to anticipate whether the conditions of drag-along or tag-along will be triggered (i.e. change of controlling power);

---

| |
|:---|
| 17 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) **Register of Options ("ROO")**: record all information of (call / put) options with respect to their right holders, obligors, execution period, closing period, trigger conditions, exercise price, class and amount of the subject equity, etc;

---

| |
|:---|
| **Structure of Object Option** |
| <br> struct Cond{<br> uint32 seqOfCond;<br> uint8 logicOpr;<br> uint8 compOpr1;<br> uint64 para1;<br> uint8 compOpr2;<br> uint64 para2;<br> uint8 compOpr3;<br> uint64 para3;<br> }<br>struct Head {<br> uint32 seqOfOpt;<br> uint8 typeOfOpt;<br> uint16 classOfShare;<br> uint32 rate;<br> uint48 issueDate;<br> uint48 triggerDate;<br> uint16 execDays;<br> uint16 closingDays;<br> uint40 obligor;<br> }<br>struct Body {<br> uint48 closingDeadline;<br> uint40 rightholder;<br> uint64 paid;<br> uint64 par;<br> uint8 state;<br> uint16 para;<br> uint16 argu;<br> }<br>struct Option {<br> Head head;<br> Cond cond;<br> Body body;<br> }<br>|

---

---

| |
|:---|
| 18 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) **Register of Pledges ("ROP"):** record all pledges attached to the equity shares with respect to their creditor, debtor, pledgor, pledged amount, guaranteed amount, debt expiration date, guarantee period etc.;

---

| |
|:---|
| **Structure of Object Pledge** |
| <br> struct Head{<br> uint32 seqOfShare;<br> uint16 seqOfPld;<br> uint48 createDate;<br> uint16 daysToMaturity;<br> uint16 guaranteeDays;<br> uint40 creditor;<br> uint40 debtor;<br> uint40 pledgor;<br> uint8 state;<br> }<br>struct Body {<br> uint64 paid;<br> uint64 par;<br> uint64 guaranteedAmt;<br> uint16 preSeq;<br> uint16 execDays;<br> uint16 para;<br> uint16 argu;<br> }<br>struct Pledge {<br> Head head;<br> Body body;<br> bytes32 hashLock;<br> }<br>|

---

---

| |
|:---|
| 19 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) **Register of Shares ("ROS")**: record all equity shares issued by the company with respect to their shareholders, class, voting weight, distribution weight, issue date, paid-in deadline / date, par value, paid-in amount, issue price and so on;

---

| |
|:---|
| **Structure of Share** |
| <br> struct Head{<br> uint16 class;<br> uint32 seqOfShare;<br> uint32 preSeq;<br> uint48 issueDate;<br> uint40 shareholder;<br> uint32 priceOfPaid;<br> uint32 priceOfPar;<br> uint16 votingWeight;<br> uint8 argu;<br> }<br>struct Body {<br> uint48 payInDeadline;<br> uint64 paid;<br> uint64 par;<br> uint64 cleanPaid;<br> uint16 distrWeight;<br> }<br>struct Share {<br> Head head;<br> Body body;<br> }<br>|

---

---

| |
|:---|
| 20 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) **List of ETH Orders ("LOE"** or **"LOO")**: record all information about listing trade of shares in ETH with respect to the subject shares class, sequence number, investors, limited sell orders, limited buy orders, and deals closed etc.

---

| |
|:---|
| **Structure of Order** |
| <br> struct Node{<br> uint32 prev;<br> uint32 next;<br> uint40 issuer;<br> uint64 paid;<br> uint32 price;<br> uint48 expireDate;<br> uint16 votingWeight;<br> bool isOffer;<br> }<br>struct Data{<br> uint16 classOfShare;<br> uint32 seqOfShare;<br> uint40 groupRep;<br> uint16 votingWeight;<br> uint16 distrWeight;<br> uint128 margin;<br> bool inETH;<br> address pubKey;<br> uint48 date;<br> uint48 issueDate;<br> }<br>struct Order{<br> Node node;<br> Data data;<br> }<br>|

---

---

| |
|:---|
| 21 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (11) **Cashier:** record all USDC payment transactions related to the Company, including details of the payer, payee, purpose of payment, authorization for USDC collection, and other relevant information.

---

| |
|:---|
| **Structure of Transfer Authorization** |
| <br> struct TransferAuth{<br> address from;<br> address to;<br> uint256 value;<br> uint256 validAfter;<br> uint256 validBefore;<br> bytes32 nonce;<br> uint8 v;<br> bytes32 r;<br> bytes32 s;<br> }<br>|

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (12) **List of USD Orders ("Usd LOO" or "LOU")**: record all information about listing trade of shares in USDC with respect to the subject shares class, sequence number, investors, limited sell orders, limited buy orders, and deals closed etc.

---

| |
|:---|
| 22 |
| *[**Table of Contents**](#Toc)* |

---

 **3.2. Bookkeepers**

**Bookkeepers** defined dozens of APIs of legal behaviors regarding corporate governance and share transactions, so as to manage and control the identification of actors, conditions, procedures and legal consequences of the relevant legal behaviors.

**3.2.1. Functions of Bookkeepers**

When users exercise their rights, **Bookkeepers** will call **Shareholders Agreement** and the relevant **Registers** as per legal logic, so as to check what conditions need to be satisfied to conduct the relevant legal behaviors (or what parameters need to be relied on for the subsequent calculations), and, together with the input parameters obtained from the API, **Bookkeepers** will make decisions on whether the conditions are fulfilled or calculate the specific values of the intermediate parameters. If all conditions are fulfilled, **Bookkeepers** will call the relevant **Registers** to update the states of book-entry interests or record the contents of the legal behaviors, such as expression of intention, or action tracks of the behaviors.

For example, when a shareholder votes on a motion, it needs to call the "Cast Vote" API of **General Keeper**, input the subject motion number and express its attitude as support, against or abstain, thereafter, **General Keeper** will call **Reg Center** to retrieve the user number of shareholder and further call the "Cast Vote" API of **General Meeting Minutes Keeper** ("**GMM Keeper**") so as to hand over the control rights on the subsequent processing steps, and then, **GMM Keeper** will:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) retrieve the motion object from **General Meeting Minutes**;

---

| |
|:---|
| 23 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) retrieve the voting rule from **Shareholders Agreement** as per the voting rule number specified in the motion object, and deduce the voting period accordingly;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) determine whether it is in the voting period as per the current timestamp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) if within the voting period, call the **Register of Members** to verify whether the voter is a shareholder of the company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) If it is a shareholder, then check the entrust arrangements from the **Delegate Map** of the motion, and then call the **Register of Members** again to retrieve and calculate the total voting rights entrusted from the principals as well as represented by the voter;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Finally, store the voting information (user number, voting attitude, total voting rights, voting time, etc.) in the **General Meeting Minutes**.

From the above example, it can be deduced that **Bookkeeper** acts as the control center of verifying the conditions precedent and monitoring the logical flows of the legal behaviors.

In order to satisfy the size requirements of EIP-170, **ComBoox** defines two types of smart contracts, namely, **General Keeper** and several **Sub-Bookkeepers**.

---

| |
|:---|
| 24 |
| *[**Table of Contents**](#Toc)* |

---

**3.2.2. General Keeper**

**General Keeper** sits at the uppermost layer of the company book-entry system and has the following functions:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Acts as the only entry of the company's book-entry system for write operation commands and is responsible for routing write commands to specific **Sub-Bookkeeper**;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Acts as the address registration center for **Registers**, and responses the address of specific **Register** as per its sequence number;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Represents the legal entity of the company and conducts legal behaviors on behalf the company on-chain, e.g. signing or executing smart contracts, making payments in tokens, exercising voting rights, etc;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Represents the company to hold cryptocurrencies such as ETH and CBP etc., and makes payments in accordance with the resolutions of General Meeting of Members or Board of Directors;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Temporarily keeps ETH income (or balance) incurred from share transfer transactions or asset distributions, which can be picked up by the seller or shareholder to its public key account thereafter.

---

| |
|:---|
| 25 |
| *[**Table of Contents**](#Toc)* |

---

**3.2.3. Sub-Bookkeepers**

**Sub-Bookkeepers** are the core computation layer controlling the identity verification, conditions, procedures and legal consequences of legal behaviors, which includes:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Register of Constitutions Keeper** ("**ROC Keeper**"): has write permissions to **Register of Agreements**, and controls the legal behaviors of creating, circulating, signing, activating, and accepting Shareholders**Agreements**;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Register of Directors Keeper** ("**ROD Keeper**"): has write permissions to **Register of Directors**, and controls the legal behaviors of inauguration, dismissal, and resignation of directors or executive officers;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Board Meeting Minutes Keeper ("BMM Keeper")**: has write permissions to **Board Meeting Minutes**, and controls the legal behaviors of creating and proposing board motions, appointing voting delegate, casting vote, counting of vote results, and executing actions. The motions concerned include the appointing and removing managers, reviewing contracts, paying tokens, and calling on-chain smart contracts;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **Register of Members Keeper ("ROM Keeper")**: has write permissions to **Register of Shares** and **Register of Members**, and controls the legal behaviors of setting the maximum number of shareholders, setting hash locks on paid-in shares, releasing and withdrawing paid-in shares, and decreasing registered capital;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **General Meeting Minutes Keeper ("GMM Keeper")**: has write permissions to **General Meeting Minutes**, and controls the legal behaviors of creating and proposing motions, appointing voting delegate, casting votes, counting vote results, and executing resolutions. The motions include nominating and removing directors, reviewing contracts, paying tokens and calling smart contracts;

---

| |
|:---|
| 26 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) **Register of Agreements Keeper ("ROA Keeper")**: has write permissions to **Register of Agreements** and **Register of Shares**, and controls the legal behaviors of creation, circulation, and signing of **Investment Agreements**, as well as locking the subject equity, releasing and withdrawing the subject equity, issuing new shares, transferring share, terminating transaction, and paying consideration;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) **Register of Options Keeper ("ROO Keeper")**: has write permissions to **Register of Options** and **Register of Shares**, and controls the legal behaviors of inputting trigger events, exercising options, setting option's pledge, paying off option, executing option's pledge, requesting the against member to buy, paying consideration for the rejected deal's equity shares, and executing the against member's pledge;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) **Register of Pledges Keeper ("ROP Keeper"):** has write permissions to **Register of Pledges, Register of Shares**, and **Register of Agreements**, and controls the legal behaviors of refunding debts, extending secured period, creating, transferring, executing, locking, releasing, withdrawing and revoking pledges;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) **Shareholders Agreement Keeper ("SHA Keeper")**: has write permissions to **Register of Shares** and **Register of Agreements**, and controls the legal behaviors of exercising and accepting special shareholders' rights like Drag-Along, Tag-Along, Anti-Dilution and First Refusal;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) **List of ETH Orders Keeper ("LOE Keeper"** or **"UsdLOO Keeper")**: has write permissions to **List of ETH Orders**, **Register of Shares**, and **Register of Members**, and controls legal behaviors of registering, approving and revoking investors, listing and withdrawing initial offers, sell orders, and placing buy orders to be settled in ETH;

---

| |
|:---|
| 27 |
| *[**Table of Contents**](#Toc)* |

---

**3.2.4. USDC concerned Sub-Bookkeepers**

To facilitate user payments in USDC for equity consideration, margin deposits, and related expenses, the system introduces a set of specialized Sub-Bookkeepers, including:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **USD Keeper:** has write permissions to **Cashier**, and generally controls legal acts of collecting, forwarding, transferring, holding and releasing USDC to or from **Cashier**.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **UsdROM Keeper**: has write permissions to **Register of Shares**, and controls legal behaviors of pay in capital in USDC;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **UsdROA Keeper**: has write permissions to **ROAKeeper**, and controls legal behaviors of pay off approved deal in USDC;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) **LOU Keeper**: has write permissions to **LOU**, **Register of Shares**, and **Register of Members**, and controls legal behaviors of listing and withdrawing initial offers, sell orders, and buy orders to be settled in **USDC**;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) **UsdROO Keeper**: has write permissions to **ROO Keeper**, and controls legal behaviors of pay off swap and pay off rejected deal;

 **3.3. Shareholders Agreement**

**Shareholders Agreement** is to dynamically define rules and conditions relating to share transaction and corporate governance, which can be deemed as a constitutional document of the company.

---

| |
|:---|
| 28 |
| *[**Table of Contents**](#Toc)* |

---

When users exercise their rights, **Shareholders Agreement** will, as per the query request of **Bookkeepers,** search and obtain specific rules or terms, based on which a specific threshold value, parameter, or testing result will be parsed and reverted, so as for **Bookkeepers** to conduct further calculation or processing.

For example, when a shareholder casts vote for a motion, the relevant **Bookkeeper** will call **Shareholders Agreement** to query the voting period of certain governing voting rule, and then, based on the number of voting days obtained, the motion's proposal date, as well as the current block timestamp, **Bookkeeper** will determine whether it is in the voting period.

The detailed terms and rules of **Shareholders Agreement** are abstractly defined as different data objects and methods according to the legal logic of corporate governance. During the drafting process, different values can be dynamically set to the different attributes, so as to define the different rules of the legal behavior concerned. A draft **Shareholders Agreement** will become effective upon approval of the general meeting of shareholders.

For example, when setting voting rules for different types of share transaction, a 30-days' review period and a two-thirds voting threshold can be set for capital increase deals, while, a 15-days' review period and a one-half voting threshold can be set for share transfer deals. Thereafter, during the process when a transaction is submitted to the shareholders' meeting for reviewing and voting, **Bookkeeper** will calculate and determine the time period and voting results as per the transaction type accordingly.

In the **Shareholders Agreement**, the rules of corporate governance and share transaction can be categorized into "**Rules**" and "**Terms**" according to their respective complexity and governing matters.

---

| |
|:---|
| 29 |
| *[**Table of Contents**](#Toc)* |

---

**3.3.1. Rules**

"**Rules**" are defined in bytes32, which depend on the public library of **Rules Parser** to parse their key attributes, length of period or key threshold of conditions, so as to transform into structured objects.

---

| |
|:---|
| **Structure of Voting Rule** |
| <br> // Object of VotingRule<br> struct VotingRule{<br> uint16 seqOfRule;<br> uint8 qtyOfSubRule;<br> uint8 seqOfSubRule;<br> uint8 authority;<br> uint16 headRatio;<br> uint16 amountRatio;<br> bool onlyAttendance;<br> bool impliedConsent;<br> bool partyAsConsent;<br> bool againstShallBuy;<br> uint8 frExecDays;<br> uint8 dtExecDays;<br> uint8 dtConfirmDays;<br> uint8 invExitDays;<br> uint8 votePrepareDays;<br> uint8 votingDays;<br> uint8 execDaysForPutOpt;<br> uint40[2] vetoers;<br> uint16 para;<br> }<br>|

---

---

| |
|:---|
| 30 |
| *[**Table of Contents**](#Toc)* |

---

---

| |
|:---|
| **Function of Voting Rule Parser** |
| <br> function votingRuleParser(bytes32 sn) public pure returns (VotingRule memory rule) {<br> uint _sn = uint(sn);<br> rule = VotingRule({<br> seqOfRule: uint16(_sn >> 240),<br> qtyOfSubRule: uint8(_sn >> 232),<br> seqOfSubRule: uint8(_sn >> 224),<br> authority: uint8(_sn >> 216),<br> headRatio: uint16(_sn >> 200),<br> amountRatio: uint16(_sn >> 184),<br> onlyAttendance: uint8(_sn >> 176) == 1,<br> impliedConsent: uint8(_sn >> 168) == 1,<br> partyAsConsent: uint8(_sn >> 160) == 1,<br> againstShallBuy: uint8(_sn >> 152) == 1,<br> frExecDays: uint8(_sn >> 144),<br> dtExecDays: uint8(_sn >> 136),<br> dtConfirmDays: uint8(_sn >> 128),<br> invExitDays: uint8(_sn >> 120),<br> votePrepareDays: uint8(_sn >> 112),<br> votingDays: uint8(_sn >> 104),<br> execDaysForPutOpt: uint8(_sn >> 96),<br> vetoers: [uint40(_sn >> 56), uint40(_sn >> 16)],<br> para: uint16(_sn) <br> });<br> }<br>|

---

Each rule has its own sequence number, so it's quite easy to set up a mapping from "sequence number" to the bytes32 "rule".

---

| |
|:---|
| **Rules Mapping** |
| <br> // seq => rule<br> mapping(uint256 => bytes32) rules;<br>|

---

Currently the rules include following types: **General Governance Rules**, **Voting Rules**, **Position Allocate Rules**, **First Refusal Rules**, **Grouping Update Orders**, and **Listing Rules**.

---

| |
|:---|
| 31 |
| *[**Table of Contents**](#Toc)* |

---

**3.3.2. Terms**

"**Terms**" are defined in form of independent smart contracts, and are relied on structured data objects and their methods to define specific pre-conditions of rights and intermediate parameters algorithm.

Each term has its own sequence number, so it's quite easy to set up a mapping from "title number" to the "address of term".

---

| |
|:---|
| **Term Mapping** |
| <br> // title => body<br> mapping(uint256 => address) terms;<br>|

---

Currently the terms include the following types: **Anti Dilution**, **Lock Up**, **Drag Along**, **Tag Along**, **Put Option** and **Call Option**.

Therefore, **Shareholders Agreement** can be deemed as a data base comprises of "rules mapping" and "terms mapping", which is to dynamically define the parameters and attributes of different rules so as to retrieve them in runtime. As for the functions of **Rules Parser** and **Terms**, they are to set up models for the rules and terms in line with legal logic, and to abstractly define their core attributes and methods, thereafter, expose certain APIs so as for users to dynamically define various attributes or parameters of those rules and terms accordingly. So that, during runtime, in accordance with user's commands, specific **Bookkeeper** may search **Shareholders Agreement** as per the predefined logic of specific legal behavior, to get specific attribute or parameter of certain rule, and then, to further determine certain condition or to further control certain process.

---

| |
|:---|
| 32 |
| *[**Table of Contents**](#Toc)* |

---

---

| |
|:---|
| **Interface of Lock-Up** |
| <br> interface ILockUp {<br>struct Locker{<br> uint48 dueDate;<br> EnumerableSet.UintSet keyHolders;<br> }<br>function setLocker(uint256 seqOfShare, uint dueDate) external;<br>function delLocker(uint256 seqOfShare) external;<br>function addKeyholder(uint256 seqOfShare, uint256 keyholder) external;<br>function removeKeyholder(uint256 seqOfShare, uint256 keyholder) external;<br>function isLocked(uint256 seqOfShare) external view returns (bool);<br>function getLocker(uint256 seqOfShare) external view returns (uint48 dueDate, uint256[] memory keyHolders);<br>function lockedShares() external view returns (uint256[] memory);<br>function isTriggered(DealsRepo.Deal memory deal) external view returns (bool);<br>function isExempted(address ia, DealsRepo.Deal memory deal) external view returns (bool);<br>}<br>|

---

---

| |
|:---|
| 33 |
| *[**Table of Contents**](#Toc)* |

---

 **3.4. Investment Agreement**

**Investment Agreement** dynamically defines all necessary elements of deals for issuing or transferring shares, such as the subject equity shares, price, amounts, buyer's identity, signing deadline, closing deadline, contractual parties and so on.

After an **Investment Agreement** is properly signed on-chain, the parties can call the relevant API of **Bookkeepers** to push forward the rest procedures concerning the deals' execution, like **General Meeting**'s reviewing and approving, paying consideration and closing etc. The relevant **Bookkeepers** will, strictly in line with the rules and terms set out in **Shareholders Agreement**, automatically verify the caller's identy, check the fulfillment of pre-conditions, and control the transaction's procedure, until realizing the final business purpose ---- updates the **Register of Shares**.

The nature of **Investment Agreement** is actually a special script (or, a batch file) consisting of a series of write operation commands to update the book-entry states of the equity shares (i.e. update the **Register of Shares**), which will be automatically executed in an orderly manner, under the control of the relevant **Bookkeepers** in line with predefined conditions and procedures set out in the **Shareholders Agreement**, and will eventually realize the business objectives of updating book-entry states of equity shares, i.e. to realize the legal consequences of issue new shares or transfer existing shares.

If there are any special arrangements stipulated in **Shareholders Agreement**, such as "First Refusal", "Drag-Along", "Tag-Along", or "Anti-Dilution" etc., the right holders can call the relevant API of **Bookkeeper** to exercise their rights during the specific exercising period, then, **Bookkeeper** will automatically change the counter party (for first refusal), add free transaction for gift shares (for anti-dilution), or add new transactions with the same price and conditions (for drag-along or tag-along), in accordance with the algorithm and methods defined in **Shareholders Agreement**, so as to realize the business purpose thereof.

---

| |
|:---|
| 34 |
| *[**Table of Contents**](#Toc)* |

---

Inside **Investment Agreement**, the substantive elements of a share transaction (subject equity, buyer, amount, price, closing deadline, etc.) are defined by a type of structured object, called "**Deal**"; while, the procedural elements (such as contract parties, signing deadline, closing deadline, etc.) are defined by a reusable and inheritable smart contract component, called "**Signature Page**".

---

| |
|:---|
| 35 |
| *[**Table of Contents**](#Toc)* |

---

3.4.1. Deal

The object of **Deal** defines all necessary factors to issue new shares or transfer existing shares in **Register of Shares**, which also defines a hash lock in form of bytes32 for parties to arrange off-chain or cross-chain payment for equity consideration.

---

| |
|:---|
| **Structure of Deal** |
| <br> struct Head{<br> uint8 typeOfDeal;<br> uint16 seqOfDeal;<br> uint16 preSeq;<br> uint16 classOfShare;<br> uint32 seqOfShare;<br> uint40 seller;<br> uint32 priceOfPaid;<br> uint32 priceOfPar;<br> uint48 closingDeadline;<br> uint16 votingWeight;<br> }<br>struct Body{<br> uint40 buyer;<br> uint40 groupOfBuyer;<br> uint64 paid;<br> uint64 par;<br> uint8 state;<br> uint16 para;<br> uint16 distrWeight;<br> bool flag;<br> }<br>struct Deal{<br> Head head;<br> Body body;<br> bytes32 hashLock;<br> }<br>|

---

The share transactions can be categorized into three basic types: "capital increase", "external transfer", and "internal transfer" as per the different types of buyer, and, by combinations of these 3 basic types, it can be further deduced into 7 types of deals in total. In **Shareholders Agreement**, different voting rules can be tailored for each of the said 7 types, so as to satisfy the customized requirements of investors.

---

| |
|:---|
| 36 |
| *[**Table of Contents**](#Toc)* |

---

3.4.2. Signature Page

**Signature page** is an independent, reusable and inheritable component smart contract that defines several key attributes of contract's execution, including contractual parties, signature fields, signing deadline and closing deadline etc..

**Investment Agreement** defines an initial **Signature Page** and a supplemental **Signature Page**, the former is to be signed by the contracting parties during the contract's formation, while the latter will be automatically filled up by **Bookkeeper** when the relevant right holders exercise their special rights (such as "First Refusal", "Tag-along, "Drag-along", and "Anti-Dilution" etc.)

When a party calls the API of **Bookkeeper** to sign an **Investment Agreement**, **Bookkeeper** will record the block number and timestamp of the signing action in the signature field, moreover, the signature field also can store a special hash value generated by hashing handwriting signatures or scanned copy of company seal, which can be used to verify digital documents in future.

---

| |
|:---|
| **Structure of Signature, Blank and Page** |
| <br> struct Signature{<br> uint40 signer;<br> uint48 sigDate;<br> uint64 blocknumber;<br> bool flag;<br> uint16 para;<br> uint16 arg;<br> uint16 seq;<br> uint16 attr;<br> uint32 data;<br> }<br>struct Blank{<br> EnumerableSet.UintSet seqOfDeals;<br> Signature sig;<br> bytes32 sigHash;<br> }<br>struct Page {<br> // party => Blank<br> mapping(uint256 => Blank) blanks;<br> EnumerableSet.UintSet buyers;<br> EnumerableSet.UintSet sellers;<br> }<br>|

---

---

| |
|:---|
| 37 |
| *[**Table of Contents**](#Toc)* |

---

**4. Identification and Access Control**

The smooth and safe operation of the **system** heavily relies on users' access control and routing control of write commands. In other words, for the calling commands which can change the world states ("**write commands**"), it is vital important to review and verify the identity and authority of the message sender (i.e. the calling account that send out the commands), and at the same time, the smart contract that received the write commands also needs to strictly control their further routing path, i.e. the target contract's address as well as its API to be further called. In brief, by strict controlling the write commands' routing path from two directions of "receiving" and "sending", the information of the whole system can be updated as per the predefined commercial and legal logic.

The write commands in the system can be divided into three categories:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **System Configuration**: refers to the contracts drafting and system configuration actions triggered by external accounts, which will NOT lead to legal consequences;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Legal Acts**: refers to the share transaction and corporate governance activities triggered by external accounts, which WILL directly lead to legal consequences; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Algorithmic Control**: refers to the write commands sent by **Bookkeeper**, upon receiving the previous two types of write commands, in accordance with the predefined algorithms of system, in an orderly manner and be able to change the states of other smart contracts like **Registers, Shareholders Agreement**, or **Investment Agreement**.

For the above write commands, the system adopts three verification methods as per their different nature of behaviors and scopes of influence.

---

| |
|:---|
| 38 |
| *[**Table of Contents**](#Toc)* |

---

 **4.1. Access Control Mechanism on smart contracts' level**

For **System Configuration** and **Algorithmic Control**, these two types of write commands do not dispose any book-entry interests of the system, and usually only take effects within the scope of the company, therefore, belong to the category of technique activities like system configuration, algorithmic control, and operation maintenance. Therefore, **ComBoox** adopts special smart contracts of **Ownable**, **Access Control** and **Draft Control**, which are inheritable and with component attributes, to verify identity of message sender by means of checking their address at the level of each smart contract.

4.1.1. Ownable

**Ownable** is a reusable, inheritable, component-based smart contract, which specialized in defining address accounts of "**Owner**" and "**Reg Center**". Clone contracts created through **Reg Center** are descendant contracts of the **Ownership** contract. The address of **Reg Center** cannot be changed once it is set, while the **Owner** can transfer his/her role to other accounts.

---

| |
|:---|
| **Interface of Ownable** |
| <br> struct Admin{<br> address addr;<br> uint8 state;<br> }<br>event SetNewOwner(address indexed owner);<br>function init(address owner, address regCenter) external;<br>function setNewOwner(address acct) external;<br>function getOwner() external view returns (address);<br>function getRegCenter() external view returns (address);<br>|

---

---

| |
|:---|
| 39 |
| *[**Table of Contents**](#Toc)* |

---

4.1.2 Access Control

**Access Control** is a reusable, inheritable, component-based smart contract. Each and every smart contracts of the system are all descendant contracts of **Access Control**, so they all can use the methods and attributes inherited from **Access Control** to define roles with different write permissions and to verify them accordingly. **Access Control** defines two special roles "**Direct Keeper**" and "**General Keeper**".

---

| |
|:---|
| **Variables and Interface of Access Control** |
| <br> Admin internal _dk;<br>IGeneralKeeper internal _gk;<br>event SetDirectKeeper(address indexed keeper);<br>event SetNewGK(address indexed gk);<br>function initKeepers(address dk, address gk) external;<br>function setNewGK(address gk) external;<br>function setDirectKeeper(address keeper) external;<br>function takeBackKeys(address target) external;<br>function getDK() external view returns (address);<br>|

---

**4.1.3. Draft Control**

**Draft Control** is a reusable, inheritable, component-based smart contract designed to define role groupings and their verification logic at the smart contract level. It is a descendant contract of **Access Control** and introduces a specialized role group known as **Attorneys**, whose administrative authority is assigned to a role referred to as the **General Counsel**. Only the EOA having **Attorney** role may edit or configure the terms of **Investment Agreement** or **Shareholders Agreement**.

Therefore, **Investment Agreement**, **Shareholders Agreement**,**Alongs**,**AntiDilution**,**LockUp**, and **Options** are all descendant contracts of **Draft Control**.

---

| |
|:---|
| 40 |
| *[**Table of Contents**](#Toc)* |

---

---

| |
|:---|
| **Structure of Role and Roles Repo** |
| <br> struct Role{<br> address admin;<br> mapping(address => bool) isMember;<br> }<br>struct Repo{<br> mapping(bytes32 => Role) roles;<br> }<br>|

---

---

| |
|:---|
| **Variables and Interfaces of Draft Control** |
| <br> bytes32 private constant _ATTORNEYS = bytes32("Attorneys");<br>RolesRepo.Repo private _roles;<br>event SetRoleAdmin(bytes32 indexed role, address indexed acct); <br>event LockContents();<br>function setRoleAdmin(bytes32 role, address acct) external;<br>function grantRole(bytes32 role, address acct) external;<br>function revokeRole(bytes32 role, address acct) external;<br>function renounceRole(bytes32 role) external;<br>function abandonRole(bytes32 role) external;<br>function lockContents() external;<br>function isFinalized() external view returns (bool);<br>function getRoleAdmin(bytes32 role) external view returns (address);<br>function hasRole(bytes32 role, address acct) external view returns (bool);<br>|

---

---

| |
|:---|
| 41 |
| *[**Table of Contents**](#Toc)* |

---

**4.1.4. Owner**

**Owner** can be initially set by the account deploying the smart contract, which has the authority to create new group of roles and to appoint admin of the group. From commercial and legal view, **Owner** maps the role of "shareholder" of a company who has the rights to create, propose, review, and voting on approval of the legal documents like contracts, bylaws as well as motions of the General Meeting.

**Owner** can transfer its role to other accounts, and, will lose its role as **Owner** thereafter. **Direct Keeper** is the special role that cannot be influenced by **Owner**, which ensures its relative independence with respect to the roles appointment and control rights assignment, so as to check and balance the power of **Owner** from the perspective of system maintenance or duties independence.

**4.1.5. Direct Keeper**

**Direct Keeper** can be initially set by the account deploying of the smart contract, which has special authority to configure system, mapping the role of "Company Secretary" or "Accountants" from the commercial and legal view, the authority design of which reflects the characteristics of "Company Secretary" or "Accountants" who are relatively independent from shareholders and senior executives in system maintenance and assuming independent responsibilities.

**Direct Keeper** can transfer its role to other accounts, and will lose the role of **Direct Keeper** thereafter.

All write APIs of **SubKeepers** are set as only accessible for their **Direct Keepers** or other **SubKeepers**. In this way, all the write authorities will be collectively authorized to **General Keeper** or other **SubKeepers**, thus excluding any external accounts or external contracts out of the system interfering with the company's governance activities, and ensuring that the company's book-entry records can operate securely and automatically, without any human interference involved.

---

| |
|:---|
| 42 |
| *[**Table of Contents**](#Toc)* |

---

The "**Direct Keeper**" of **General Keeper** has the following special authorities:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Set and update the registration address for each **SubKeeper** and **Register**;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Appoint or remove the "**Direct Keeper**" for each of the **SubKeeper** and **Register**;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Input off-chain "oracle" data (e.g. financial data such as revenue, net profit, etc.) into the system as trigger conditions for exercising certain shareholders rights; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Set up hash lock for pay-in capital, so as for new share subscribers can automatically obtain their **Certificates of Contribution** upon paying their capital contribution.

Therefore, the characters of its authority are quite similar to "**Company Secretary**" or "**Chief Accountant**".

If **Direct Keeper** of **General Keeper** transfers its role to "zero address", then it means the possibility of human interference with the company's book-entry system is completely abandoned, and the system will automatically operate by smart contracts. As a cost, such auto-running system cannot be upgraded with new contract templates, neither can use off-chain data as trigger conditions for special rights (like call option or put option) any more.

---

| |
|:---|
| 43 |
| *[**Table of Contents**](#Toc)* |

---

**4.1.6. General Counsel and Attorneys**

**General Counsel** is the admin of the roles group of **Attorneys** and has authorities to grant **Attorney** role to any account addresses.

**Attorneys** can quit their role as **Attorney** by calling the "Renouce Role" API, and **General Counsel** can call the "Abandon Role" API to fire all **Attorneys** at once.

For two types of smart contracts, **Shareholders Agreement** and **Investment Agreement**, only **Attorney** can call their write APIs to "draft" the contents of the contracts (such as rules and terms of **Shareholders Agreement**), or the deal's elements for trading shares (such as the subject share, price, amount), as well as the procedural conditions concerned (such as the contractual parties, signing deadline, and closing deadline etc.).

Therefore, after creating a smart contract of **Shareholders Agreement** or **Investment Agreement**, the creating shareholder as the "**Owner**" needs to appoint a "**General Counsel**" (which can further appoint one or more **Attorneys**) to "draft" the rest terms of the contents. After drafting, **Owner** can review and confirm the contract contents and then calls "**Lock Contents**" API to revoke the appointment for all attorneys at once, and to transfer the role of **Owner** to "zero address", so that, the contents can no longer be altered manually.

It should be emphasized that if **Owner** does not transfer its role to "zero address", it still can modify the contract by reappointing other address as "**General Counsel**" or "**Attorneys"**.

---

| |
|:---|
| 44 |
| *[**Table of Contents**](#Toc)* |

---

 **4.2. Commands Routing Mechanism within the company**

A **Register** usually allows several **SubKeepers** to call its write APIs, therefore, it is not economic to rely on **Access Control** solution to control write permissions among different roles for each of the contracts. Therefore, **ComBoox** sets up two registration mappings of address in **General Keeper** to satisfy the routing requirements for **Algorithmic Control** commands among the book-entry **Registers** of a company.

There are two special registration mappings of address in the **General Keeper**, which are used to track and record the addresses of "**SubKeepers**" and "**Registers**", and adopt a structure of "sequence number => address" so as to ensure a timely search of the smart contract's address as per its corresponding sequence number.

---

| |
|:---|
| **Address Mappings in General Keeper** |
| <br> mapping(uint256 => address) private _books;<br>mapping(uint256 => address) private _keepers;<br>|

---

When deploying the system, the contract addresses of each **SubKeeper** and **Register** will be input into the registration mappings accordingly, thereafter, in runtime, the relevant write API of **Register** will, before processing the write command received, firstly call **General Keeper** to query and verify whether the message sender's address equals to the address of the specific contract registered in the mappings, so as to complete the identity verification for the **Algorithmic Control Commands**.

---

| |
|:---|
| 45 |
| *[**Table of Contents**](#Toc)* |

---

For example, the share transfer API of **Register of Shares** will be called by **ROA Keeper** when closing a share transfer transaction, and will also be called by **SHA Keeper** when implementing an Anti-Dilution right. Therefore, **Register of Shares** cannot rely on the unique role of "**Direct Keeper**" defined by **Access Control** to control its write permission, instead, it will query the address mapping of **General Keeper** or **USD Keeper** to check and verify message sender's identity, i.e. as long as the account address of the caller can match any one of the two contracts mentioned above, the verification will be passed.

---

| |
|:---|
| **Identity Verification Function of General Keeper for Sub-Keepers** |
| function isKeeper(address caller) external view returns(bool) {<br> uint len = 10;<br> while (len > 0) {<br> if (caller == _keepers[len]) {<br> return true;<br> }<br> len--;<br> }<br> return false;<br> } |

---

---

| |
|:---|
| **Identity Verification Function of USD Keeper for Sub-Keepers** |
| function isKeeper(address msgSender) external view returns(bool) {<br> if (msgSender == address(_gk)) {<br> return true;<br> }<br> uint i = 1;<br> address keeper = _gk.getKeeper(i);<br> while(keeper != address(0)) {<br> if (keeper == msgSender) {<br> return true;<br> }<br> i ++;<br> keeper = _gk.getKeeper(i);<br> }<br> return false;<br> } |

---

---

| |
|:---|
| 46 |
| *[**Table of Contents**](#Toc)* |

---

 **4.3. Users Identification Mechanism for Entire Platform**

**Legal Acts** directly govern the disposal of book-entry interests, carrying significant commercial and legal implications. They may also give rise to relationships with other companies registered within the **ComBoox** system. Accordingly, the platform incorporates a dedicated smart contract, known as the **Reg Center**, along with a suite of methods designed for user identification. These mechanisms ensure robust identity verification across the entire system.

"**Users**" in the platform of **ComBoox**:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) can be shareholders, directors, managers within the Company, or the creditors, delegates, or agents outside of the Company;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) can establish a contractual relationship with one company, or establish legal relationships with multiple companies simultaneously;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) can be a natural person who controls on-chain behaviors through an external account, or a legal person who exercises its corporate legal rights through a contract account.

Therefore, **ComBoox** adopts a special smart contract **Reg Center** to manage all the digital identities of users of the entire platform.

**ComBoox** only takes the account address as the sole label to identify a user, and does not touch the name, nationality, residence or any other social characters of a natural person or a legal person. Therefore, strictly speaking, it is only the "**digital identity**" that the system actually manages or verifies.

This "**de-identified**" identity management model is shaped, on the one hand, by the inherent technical characteristics of public blockchain, and on the other, by its effectiveness in safeguarding users' personal privacy.

---

| |
|:---|
| 47 |
| *[**Table of Contents**](#Toc)* |

---

 **Nevertheless, almost all countries have real-name requirements like KYC or Anti-Money Laundering for commercial activities such as investment, financing, lending, payment, and foreign exchange etc. So please consult with legal experts of the relevant jurisdictions to seek professional advice on securities laws, anti-money laundering laws and other relevant legal issues so as to ensure all the arrangements and activities can be designed and carried out in a legal way.** 

With the concept of distributed digital identity, **Reg Center** uses a special user number mapping to register and manage users' identities, and at the same time, it also provides a query API for all smart contracts of the system to query and verify the users' identity in runtime.

**4.3.1. User Number Mapping**

User Number Mapping takes a structure as "address => uint(40)", which can be queried via special APIs for a specific account's user number with the corresponding address.

---

| |
|:---|
| **User Number Mapping** |
| <br> // key => userNo<br> mapping(address => uint) userNo; <br>|

---

When users exercise their rights, the **SubKeepers** of the relevant company invoke, through a dedicated middleware smart contract known as **Royalty Charge**, the query API of the **Reg Center**. This **Royalty Charge**, which the **SubKeepers** have inherited, enables them to retrieve the user number of the message sender. The system then verifies the user's identity and access rights based on the records maintained in the corresponding **Register**.

---

| |
|:---|
| 48 |
| *[**Table of Contents**](#Toc)* |

---

---

| |
|:---|
| **Royalty Charge** |
| event ChargeRoyalty(<br> uint indexed typeOfDoc, uint version, uint indexed rate, <br> uint indexed user, uint author);<br>function _msgSender(address msgSender,uint rate) internal returns(uint40 usr) {<br>DocsRepo.Head head = _rc.getHeadByBody(address(this));<br>head.author = _rc.getAuthorByBody(address(this));<br>usr = _rc.getUserNo(<br> msgSender, rate \* (10 \*\*10), head.author);<br>emit ChargeRoyalty(<br> head.typeOfDoc, head.version, rate, usr, head.author);<br>} |

---

---

| |
|:---|
| **Get UserNo Function in Users Repo** |
| function getUserNo(Repo storage repo, address msgSender) public view returns(uint40) {<br>uint40 user = uint40(repo.userNo[msgSender]);<br>if (user > 0) return user;<br> else revert ("UR.getUserNo: not registered");<br>} |

---

For example, when shareholders exercise voting rights, **GMM Keeper** of the company will firstly call **Reg Center** to query the user number of the message sender, upon receiving the response, **GMM Keeper** will further call **Register of Members** to check whether the user is a member of the company. If the answer is yes, **GMM Keeper** will continue to execute the rest codes accordingly, otherwise, it will terminate the process and return an error message instead.

---

| |
|:---|
| 49 |
| *[**Table of Contents**](#Toc)* |

---

**4.3.2. User Registration** 

Before using any write functions of **ComBoox**, users need to apply for a registration number first (only checking, query or conduct other read operations on the platform of **ComBoox** does not require registration). **Reg Center** will assign a unique user number to the applicant as per its account address automatically.

---

| |
|:---|
| **Object User and Reg-User Function** |
| struct Key {<br> address pubKey;<br> uint16 discount;<br> uint40 gift; <br> uint40 coupon;<br> }<br>struct User {<br> Key primeKey;<br> Key backupKey;<br> }<br>struct Repo {<br> // userNo => User<br> mapping(uint256 => User) users;<br> // key => userNo<br> mapping(address => uint) userNo;<br> LockersRepo.Repo lockers; <br> }<br>function regUser(Repo storage repo, address msgSender) public returns(User memory) {<br>require(!isKey(repo, msgSender), "UserRepo.RegUser: used key");<br>uint seqOfUser = _increaseCounterOfUsers(repo);<br>repo.userNo[msgSender] = seqOfUser;<br>User memory user;<br>user.primeKey.pubKey = msgSender;<br>Rule memory rule = getPlatformRule(repo);<br>if (_isContract(msgSender)) {<br>user.primeKey.discount = 1;<br>user.primeKey.gift = rule.coaRewards;<br>} else user.primeKey.gift = rule.eoaRewards;<br>repo.users[seqOfUser] = user;<br>return user;<br>} |

---

---

| |
|:---|
| 50 |
| *[**Table of Contents**](#Toc)* |

---

After creating new book-entry system for a company, the creator may call "Create Corp Seal" API of **General Keeper** to register a specific user number for the company with **Reg Center. Reg Center** will then assign a user number to the address of the **General Keeper**, which represents the legal person of the company in **ComBoox** and can be used to send write commands to exercise rights on behalf of the company concerned. (If creating a new book-entry system by calling the "Create Comp" API of **Reg Center**, predefined scripts will automatically register a user number for the new company.)

---

| |
|:---|
| 51 |
| *[**Table of Contents**](#Toc)* |

---

**4.3.3. Backup Key**

To avoid losing control of user account only because losing private key, **ComBoox** allows the registered users to set **ONE** additional account address as "**Backup Key**" (the account address used in registration process is deemed as "**Prime Key**"). However, to prevent the circumvention of some contractual obligations like "Lock-Up" or "First Refusal", the system does **NOT** allow to change the **Backup Key** or add more keys. Therefore, a user can only have maximum two keys, the "**Prime Key**" and "**Backup Key**". The address of "**Backup key**" can also be recognized by **Reg Center** as having the same user number as the "**Prime Key**". Any used account address cannot be used again to register user number or to be set as backup key.

---

| |
|:---|
| **Function of Set Backup Key** |
| function setBackupKey(<br> Repo storage repo, <br> address bKey, <br> address msgSender) public onlyPrimeKey(repo, msgSender) {<br>require (!isKey(repo, bKey), "UR.SBK: used key");<br> uint caller = getUserNo(repo, msgSender);<br>User storage user = repo.users[caller];<br>require(user.backupKey.pubKey == address(0), <br>"UR.SBK: already set backupKey");<br>user.backupKey.pubKey = bKey;<br>repo.userNo[bKey] = caller;<br>} |

---

---

| |
|:---|
| 52 |
| *[**Table of Contents**](#Toc)* |

---

**4.3.4. Permission for Query User Number**

The query API of **Reg Center** for retrieving user number is only accessibly for the contract accounts already registered in **ComBoox** and the user's own account. If the query sender is not the relevant user's account, a sum of royalty will be charged from the target user's account to pay to the author account when responding the user's number. To prevent malicious consuming the user's royalty, external smart contracts not registered with **ComBoox** will be blocked in the front end.

---

| |
|:---|
| **Function of Get User Number** |
| function getUserNo(address targetAddr, uint fee, uint author) external returns (uint40) {<br>uint40 target = _getUserNo(targetAddr);<br>require(docExist(msg.sender), <br> "RC.getUserNo: not registered ");<br>UsersRepo.Key memory rr = getRoyaltyRule(author);<br>address authorAddr = _getUserByNo(author).primeKey.pubKey; <br>_chargeFee(targetAddr, fee, authorAddr, rr);<br>return target;<br>}<br>function _getUserNo(address targetAddr) internal view returns (uint40) {<br>return _users.getUserNo(targetAddr);<br>}<br>function getRoyaltyRule(uint author)public view returns (UsersRepo.Key memory) {<br>return _users.getRoyaltyRule(author);<br>}<br>function _getUserByNo(uint acct) internal view returns (UsersRepo.User memory){<br>require(acct>0, "BOU: zero userNo");<br>return _users.users[acct];<br>} |

---

---

| |
|:---|
| 53 |
| *[**Table of Contents**](#Toc)* |

---

 **5. Templates and Version Control**

 **5.1. Cloning Technology and Delegate Call Mechanism**

**ComBoox** extensively adopts **cloning** technology of smart contracts, i.e. using the data structures, functions and algorithms defined in the template contract to compute the variables of cloned contracts via **delegate call mechanism**. Comparing with copy contracts, this technology can greatly reduce the bytecode size and gas fees consumption of deploying contracts.

---

| |
|:---|
| **Function of Create Clone** |
| /\*<br>The MIT License (MIT)<br>Copyright (c) 2018 Murray Software, LLC.<br>Permission is hereby granted, free of charge, to any person obtaining<br>a copy of this software and associated documentation files (the<br>"Software"), to deal in the Software without restriction, including<br>without limitation the rights to use, copy, modify, merge, publish,<br>distribute, sublicense, and/or sell copies of the Software, and to<br>permit persons to whom the Software is furnished to do so, subject to<br>the following conditions:<br>The above copyright notice and this permission notice shall be included<br>in all copies or substantial portions of the Software.<br>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS<br>OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.<br>IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY<br>CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,<br>TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE<br>SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br>\*/<br>//solhint-disable max-line-length<br>//solhint-disable no-inline-assembly<br>function _createClone(address temp) private returns (address result) {<br> bytes20 tempBytes = bytes20(temp);<br> assembly {<br> let clone := mload(0x40)<br> mstore(<br> clone,<br> 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)<br> mstore(add(clone, 0x14), tempBytes)<br> mstore(<br> add(clone, 0x28),<br> 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)<br> result := create(0, clone, 0x37)<br> }<br>} |

---

In addition, **contract templates** also adopts a lot of **delegate call mechanism**, i.e.leaving the definitions of data objects, methods and algorithms thereof in public libraries, which further reduced the size of the template contracts, as well as their deploying cost.

---

| |
|:---|
| 54 |
| *[**Table of Contents**](#Toc)* |

---

 **5.2. Documents Mapping of Reg Center**

Another important function of **Reg Center** is to register and manage the template contracts and their clones, for which **Reg Center** adopts two mappings. Users can query a document's type, version, author, creator and creation date by its contract address, or, query a document's address by its sequence number.

---

| |
|:---|
| **Documents Mapping Structure** |
| struct Head {<br> uint32 typeOfDoc;<br> uint32 version;<br> uint64 seqOfDoc;<br> uint40 author;<br> uint40 creator;<br> uint48 createDate;<br>}<br>struct Body {<br> uint64 seq;<br> address addr;<br>}<br>struct Repo {<br> // typeOfDoc => version => seqOfDoc => Body<br> mapping(uint256 => mapping(uint256 => mapping(uint256 => Body))) bodies;<br> mapping(address => Head) heads;<br>} |

---

---

| |
|:---|
| 55 |
| *[**Table of Contents**](#Toc)* |

---

 **5.3. Types of Template Contracts**

Currently, there are totally 34 template contracts registered in **Reg Center**. When creating a new book-entry system for a company, or creating a new **Shareholders Agreement** or **Investment Agreement**, actually is deploying one or more clone contracts based on the templates.

---

| | | | | | |
|:---|:---|:---|:---|:---|:---|
| **Template Contracts** | **Template Contracts** | **Template Contracts** | **Template Contracts** | **Template Contracts** | **Template Contracts** |
| **No.** | **Name** | **No.** | **Name** | **No.** | **Name** |
| 1 | ROCKeeper | 13 | Meeting Minutes | 25 | Drag-Along & Tag-Along |
| 2 | RODKeeper | 14 | Register of Members | 26 | (Call / Put) Options |
| 3 | BMMKeeper | 15 | Register of Agreements | 27 | List of Projects |
| 4 | ROMKeeper | 16 | Register of Options | 28 | Cashier |
| 5 | GMMKeeper | 17 | Register of Pledge | 29 | UsdLOO |
| 6 | ROAKeeper | 18 | Register of Shares | 30 | USDKeeper |
| 7 | ROOKeeper | 19 | List of Orders | 31 | UsdROMKeeper |
| 8 | ROPKeeper | 20 | General Keeper | 32 | UsdROAKeeper |
| 9 | SHAKeeper | 21 | Investment Agreement | 33 | UsdLOOKeeper |
| 10 | LOOKeeper | 22 | Shareholders Agreement | 34 | UsdROOKeeper |
| 11 | Register of Constitution | 23 | Anti-Dilution |  |  |
| 12 | Register of Directors | 24 | Lock-Up |  |  |

---

In **ComBoox**, the design model for setting corporate governance rules is very flexible. Changing the definition of a specific "rule" and its parsing function, the attributes' composition of the rule will be changed; changing an API's algorithm of a **Bookkeeper**, the conditions, procedures and consequences of a legal behavior will be revised. And, all these changing methods on the corporate governing rules and terms, can be implemented by means of developing and incorporating new contract templates into the system.

---

| |
|:---|
| 56 |
| *[**Table of Contents**](#Toc)* |

---

Any developer can develop **contract templates**. These templates can be incorporated into the system upon approval and will become new foundations for cloning contracts. When users call to clone contracts, **Reg Center** will deduct a certain amount of CBP from the caller's account and pay to the template author's account as license fees. The rate of such license fee, together with its promotion policies, can be set and adjusted by the template's author at full discretion.

For detailed arrangements concerning the copyright and license fee, as well as **CBP** tokens and the economic model of the system, please see the relevant sections of this paper.

---

| |
|:---|
| 57 |
| *[**Table of Contents**](#Toc)* |

---

 **6. External Write APIs** 

There are totally 91 external write APIs exposed by the system, which collectively encompass nearly all legal acts relating to corporate governance, share transactions, the payment and receipt of ETH and/or USDC. These APIs are routed to various Sub-Keepers for further processing and execution, thereby effectuating the corresponding legal consequences of each act.

 **6.1. APIs Routed To ROC Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 1 | function createSHA(<br> uint version) external | (Any Member) Create a new shareholders agreement by cloning the Template of the specific version. |
| 2 | function circulateSHA(<br> address body, <br> bytes32 docUrl, <br> bytes32 docHash) external | (The Owner of the draft) Circulate the finalized draft of shareholders agreement deployed at the address of body to the contractual parties for signing, with the URL infomation of docUrl, and hash value of docHash. |
| 3 | function signSHA(<br> address sha, <br> bytes32 sigHash) external | (Parties to the draft) Sign the finalized draft of shareholders agreement deployed at the address of sha, with the hash value of signature as sigHash. |
| 4 | function activateSHA(<br> address body) external | (Any user) Activate the draft of shareholders agreement deployed at the address of body. |
| 5 | function acceptSHA(<br> bytes32 sigHash) external | (Any user) Accept the terms and conditons of SHA in force, with the hash value as sigHash. |

---

---

| |
|:---|
| 58 |
| *[**Table of Contents**](#Toc)* |

---

![](rockeeper-01.jpg)

---

| |
|:---|
| 59 |
| *[**Table of Contents**](#Toc)* |

---

![](rockeeper-02.jpg)

---

| |
|:---|
| 60 |
| *[**Table of Contents**](#Toc)* |

---

![](rockeeper-03.jpg)

---

| |
|:---|
| 61 |
| *[**Table of Contents**](#Toc)* |

---

![](rockeeper-04.jpg)

---

| |
|:---|
| 62 |
| *[**Table of Contents**](#Toc)* |

---

![](rockeeper-05.jpg)

---

| |
|:---|
| 63 |
| *[**Table of Contents**](#Toc)* |

---

 **6.2. APIs Routed to ROD Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 6 | function takeSeat(<br> uint256 seqOfMotion, <br> uint256 seqOfPos) external | (The elected Director) Assume the director's seat identified by seqOfPos pursuant to the authorization granted under the Motion identified by seqOfMotion. |
| 7 | function removeDirector (<br> uint256 seqOfMotion, <br> uint256 seqOfPos) external | (The Member having the nomination right) Remove the director on the position numbered as seqOfPos as per the removal Motion numbered as seqOfMotion. |
| 8 | function takePosition(<br> uint256 seqOfMotion, <br> uint256 seqOfPos) external | (The elected officer) Take the officer position identified as seqOfPos pursuant to the authorization granted under the Motion identified as seqOfMotion. |
| 9 | function removeOfficer (<br> uint256 seqOfMotion, <br> uint256 seqOfPos) external | (The executor) Remove the executive officer on the position numbered as seqOfPos as per the removal Motion numbered as seqOfMotion. |
| 10 | function quitPosition(<br> uint256 seqOfPos) external | (The Director or officer) Quit the position identified as seqOfPos voluntarily. |

---

---

| |
|:---|
| 64 |
| *[**Table of Contents**](#Toc)* |

---

![](rodkeeper-06.jpg)

---

| |
|:---|
| 65 |
| *[**Table of Contents**](#Toc)* |

---

![](rodkeeper-07.jpg)

---

| |
|:---|
| 66 |
| *[**Table of Contents**](#Toc)* |

---

![](rodkeeper-08.jpg)

---

| |
|:---|
| 67 |
| *[**Table of Contents**](#Toc)* |

---

![](rodkeeper-09.jpg)

---

| |
|:---|
| 68 |
| *[**Table of Contents**](#Toc)* |

---

![](rodkeeper-10.jpg)

---

| |
|:---|
| 69 |
| *[**Table of Contents**](#Toc)* |

---

 **6.3. APIs Routed To BMM Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 11 | function nominateOfficer(<br> uint256 seqOfPos, <br> uint256 candidate) external | (The Director having the nomination right) Nominate the user identified by its user number as candidate for the officer's position numbered as seqOfPos. |
| 12 | function createMotionToRemoveOfficer(<br> uint256 seqOfPos) external | (The Director having the nomination right) Create a draft Motion to remove the officer on the position numbered as seqOfPos. |
| 13 | function createMotionToApproveDoc(<br> uint256 doc, <br> uint256 seqOfVR, <br> uint256 executor) external | (Any Director) Creates a draft Motion for the Board to approve the document deployed at the address of doc as per the voting rule numbered as seqOfVR with the user numbered as executor to invoke it. |
| 14 | function createAction(<br> uint256 seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 executor) external | Create a draft Motion for the Board to invoke a series of calls, as per the voting rule numbered as seqOfVR, to the contracts deployed at their respective addresses of targets, with paying ETH amount to values, and inputting parameters of params, attached with the hash value of the description message as desHash, with the user numbered as executor to invoke it. |
| 15 | function entrustDelegaterForBoardMeeting(<br> uint256 seqOfMotion, <br> uint256 delegate) external; | (Any Directors) Entrust the user numbered as delegate to cast vote in Board meeting for the Motion identified as seqOfMotion. |
| 16 | function proposeMotionToBoard (<br> uint256 seqOfMotion) external | (Any Director) Propose the draft Motion numbered as seqOfMotion to the Board meeting. |
| 17 | function castVote(<br> uint256 seqOfMotion, <br> uint256 attitude, <br> bytes32 sigHash) external | (Any Director) Casts vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash. |
| 18 | function voteCounting(<br> uint256 seqOfMotion) external | (Any user) Count the vote result for the Motion numbered as seqOfMotion. |
| 19 | function execAction(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion) external | (The designated executor) Executes the Motion numbered as seqOfMotion, categorized as typeOfAction, to invoke the series of calls to the contracts deployed at addresses of targets, with paying the respective ETH amount to values, inputting parameters as params, attached with description message's hash value as desHash. |

---

---

| |
|:---|
| 70 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-11.jpg)

---

| |
|:---|
| 71 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-12.jpg)

---

| |
|:---|
| 72 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-13.jpg)

---

| |
|:---|
| 73 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-14.jpg)

---

| |
|:---|
| 74 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-15.jpg)

---

| |
|:---|
| 75 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-16.jpg)

---

| |
|:---|
| 76 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-17.jpg)

---

| |
|:---|
| 77 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-18.jpg)

---

| |
|:---|
| 78 |
| *[**Table of Contents**](#Toc)* |

---

![](bmmkeeper-19.jpg)

---

| |
|:---|
| 79 |
| *[**Table of Contents**](#Toc)* |

---

 **6.4. APIs Routed To ROM Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 20 | function setMaxQtyOfMembers(<br> uint256 max) external | (The sectary of company, i.e. the Direct Keeper of General Keeper) Set the max quantity of Members as max. |
| 21 | function setPayInAmt(<br> uint256 seqOfShare, <br> uint256 amt, <br> uint256 expireDate, <br> bytes32 hashLock) external | (The sectary of company, i.e. the Direct Keeper of General Keeper) Set the intended pay in amount of amt for the share numbered as seqOfShare, before the date of expireDate, with the hash lock whose hash value is hashLock. |
| 22 | function requestPaidInCapital(<br> bytes32 hashLock, <br> string memory hashKey) external | (The Member, after paying the paid in the relevant price off-chain) Request the specific paid in amount for the target share by inputting the hash key string hashKey to unlock the hash lock whose hash value is hashLock. |
| 23 | function withdrawPayInAmt(<br> bytes32 hashLock, <br> uint256 seqOfShare) external | (The secrtary of the company, i.e. the Direct Keeper of General Keeper, after the expiration date of the relevant hash lock) Withdraw the setting for granting the pay in amount for the specific share numbered as seqOfShare, by inputting the hash lock value hashLock. |
| 24 | function payInCapital(<br> uint256 seqOfShare, <br> uint256 amt) external payable | (The shareholder) Pay in capital for the share numbered as seqOfShare to gain the paid-in amount of amt by paying ETH with the equivalent value to the General Keeper. |

---

---

| |
|:---|
| 80 |
| *[**Table of Contents**](#Toc)* |

---

![](romkeeper-20.jpg)

---

| |
|:---|
| 81 |
| *[**Table of Contents**](#Toc)* |

---

![](romkeeper-21.jpg)

---

| |
|:---|
| 82 |
| *[**Table of Contents**](#Toc)* |

---

![](romkeeper-22.jpg)

---

| |
|:---|
| 83 |
| *[**Table of Contents**](#Toc)* |

---

![](romkeeper-23.jpg)

---

| |
|:---|
| 84 |
| *[**Table of Contents**](#Toc)* |

---

![](romkeeper-24.jpg)

---

| |
|:---|
| 85 |
| *[**Table of Contents**](#Toc)* |

---

 **6.5. APIs Routed To GMM Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 25 | function nominateDirector(<br> uint256 seqOfPos, <br> uint256 candidate) external | (The Member who has the nomination right) Nominate the user numbered as candidate for the Director's position numbered as seqOfPos. |
| 26 | function createMotionToRemoveDirector(<br> uint256 seqOfPos) external | (The Member who has the nomination right) Create a draft motion to remove the Director on the position numbered as seqOfPos. |
| 27 | function proposeDocOfGM(<br> uint256 doc, <br> uint256 seqOfVR, <br> uint256 executor) external | (A Member) Create and propose a draft Motion for the General Meeting to approve the document deployed at the address of doc as per the voting rule numbered as seqOfVR with the user numbered as executor to invoke it. |
| 28 | function createActionOfGM(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor) external | (A Member) Create a draft Motion for the General Meeting to execute a series of calls, as per the voting rule numbered as seqOfVR, to the contracts deployed at the addresses of targets, with paying the respective ETH amount to values, and inputting parameters of params, attached a description message whose hash value is desHash, with the user numbered as executor to invoke it. |
| 29 | function entrustDelegaterForGeneralMeeting(<br> uint256 seqOfMotion, <br> uint256 delegate) external | (A Member) Entrust the user numbered as delegate to cast vote in General Meeting for the Motion numbered as seqOfMotion. |
| 30 | function proposeMotionToGeneralMeeting(<br> uint256 seqOfMotion) external | (A Member) Proposes the Motion numbered as seqOfMotion to the General Meeting. |
| 31 | function castVoteOfGM(<br> uint256 seqOfMotion,<br> uint256 attitude,<br> bytes32 sigHash) external | (A Member) Cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash. |
| 32 | function voteCountingOfGM(<br> uint256 seqOfMotion) external | (Any user) Count the vote result for the Motion on the General Meeting numbered as seqOfMotion. |
| 33 | function execActionOfGM(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion) external | (The designated executor) Execute the Motion numbered as seqOfMotion, categorized as typeOfAction, to trigger the series of calls to the contracts deployed at addresses of targets, with paying the respective ETH amount to values, inputting parameters as params, attached with hash value of the description message as desHash. |
| 34 | function deprecateGK(<br> address payable receiver, <br> uint256 seqOfMotion) external | (The designated executor) deprecate the current General Keeper, as per the Motion numbered as seqOfMotion, so as to move all archives and the balance amount of ETH and CBP to the new General Keeper deployed at the address of receiver. |

---

---

| |
|:---|
| 86 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-25.jpg)

---

| |
|:---|
| 87 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-26.jpg)

---

| |
|:---|
| 88 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-27.jpg)

---

| |
|:---|
| 89 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-28.jpg)

---

| |
|:---|
| 90 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-29.jpg)

---

| |
|:---|
| 91 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-30.jpg)

---

| |
|:---|
| 92 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-31.jpg)

---

| |
|:---|
| 93 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-32.jpg)

---

| |
|:---|
| 94 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-33.jpg)

---

| |
|:---|
| 95 |
| *[**Table of Contents**](#Toc)* |

---

![](gmmkeeper-34.jpg)

---

| |
|:---|
| 96 |
| *[**Table of Contents**](#Toc)* |

---

 **6.6. APIs Routed To ROA Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 35 | function createIA(<br> uint256 version) external | (Any Member) Create a draft Investment Agreement on the Register of Agreement, by cloning the Template of the version numbered as version. |
| 36 | function circulateIA(<br> address body, <br> bytes32 docUrl, <br> bytes32 docHash) external | (The Member who is the Owner of the draft Investment Agreement) Circulate the finalized draft deployed at the address of body to the parties for signature, attaching with the URL information of docUrl and the hash value of the draft as docHash. |
| 37 | function signIA(<br> address ia, <br> bytes32 sigHash) external | (The parties to the Investment Agreement) Sign the Investment Agreement deployed at the address of ia, with the signature message's hash value as sigHash. |
| 38 | function pushToCoffer(<br> address ia, <br> uint256 seqOfDeal, <br> bytes32 hashLock, <br> uint256 closingDeadline) external | (The seller) Confirm all conditions precedent have been satisfied and ready for closing, for the specific deal numbered as seqOfDeal, under the Investment Agreement deployed at the address of ia, by inputting a hash lock value hashLock and setting the closing deadline as closingDeadline. |
| 39 | function closeDeal(<br> address ia, <br> uint256 seqOfDeal, <br> string memory hashKey) external | (The buyer) Close the deal numbered as seqOfDeal, under the Investment Agreement deployed at the address of ia, after paying the consideration off-chain, by inputting the hash key string hashKey. |
| 40 | function issueNewShare(<br> address ia, <br> uint256 seqOfDeal) external | (The issuer) Issue new share directly to the buyer, for the capital increasing Deal numbered as seqOfDeal under the Investment Agreement deployed at the address of ia. |
| 41 | function transferTargetShare(<br> address ia, <br> uint256 seqOfDeal) external | (The seller) Transfer the subject share directly to the buyer, for the specific share transfer Deal numbered as seqOfDeal under the Investment Agreement deployed at the address of ia. |
| 42 | function terminateDeal(<br> address ia, <br> uint256 seqOfDeal) external | (The seller, after the expiration date concerned) Terminate the Deal numbered as seqOfDeal under the Investment Agreement deployed at the address of ia. |
| 43 | function payOffApprovedDeal(<br> address ia,<br> uint256 seqOfDeal) external payable | (The buyer) Close the Deal numbered as seqOfDeal, under the Investment Agreement deployed at the address of ia, by paying ETH having the equivalent value to the total consideration. |

---

---

| |
|:---|
| 97 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-35.jpg)

---

| |
|:---|
| 98 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-36.jpg)

---

| |
|:---|
| 99 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-37.jpg)

---

| |
|:---|
| 100 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-38.jpg)

---

| |
|:---|
| 101 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-39.jpg)

---

| |
|:---|
| 102 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-40.jpg)

---

| |
|:---|
| 103 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-41.jpg)

---

| |
|:---|
| 104 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-42.jpg)

---

| |
|:---|
| 105 |
| *[**Table of Contents**](#Toc)* |

---

![](roakeeper-43.jpg)

---

| |
|:---|
| 106 |
| *[**Table of Contents**](#Toc)* |

---

 **6.7. APIs Routed To ROO Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 44 | function updateOracle(<br> uint256 seqOfOpt,<br> uint256 d1,<br> uint256 d2,<br> uint256 d3) external | (The sectary of the company, i.e. the Direct Keeper of General Keeper) Update the key performance indicators of d1, d2, and d3, for the specific Option numbered as seqOfOpt. |
| 45 | function execOption(<br> uint256 seqOfOpt) external | (The right holder) Execute the Option numbered as seqOfOpt. |
| 46 | function createSwap(<br> uint256 seqOfOpt,<br> uint256 seqOfTarget,<br> uint256 paidOfTarget,<br> uint256 seqOfPledge) external | (The right holder) Create a Swap on the target share numbered as seqOfTarget, for paid value amount to paidOfTarget, with the collateral set up on the pledged share numbered as seqOfPledge, for executing the Option numbered as seqOfOpt. |
| 47 | function payOffSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap) external payable | (The pledger) pays certain amount of ETH with the equivalent value, under the Swap numbered seqOfSwap, of the Option numbered as seqOfOpt, to close the Swap. |
| 48 | function terminateSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap) external | (The target share holder) Execute the swap numbered as seqOfSwap of the Option numbered as seqOfOpt, by transferring the target share and releasing the pledged share. |
| 49 | function requestToBuy(<br> address ia, <br> uint256 seqOfDeal, <br> uint256 paidOfTarget, <br> uint256 seqOfPledge) external | (The seller) Request the veto Member, who has voted against the Deal numbered as seqOfDeal, under the Investment Agreement deployed at the address of ia, to purchase the subject share to the amount of paidOfTarget, with the guarantee of the pledged share numbered seqOfPledge. |

---

---

| |
|:---|
| 107 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-44.jpg)

---

| |
|:---|
| 108 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-45.jpg)

---

| |
|:---|
| 109 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-46.jpg)

---

| |
|:---|
| 110 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-47.jpg)

---

| |
|:---|
| 111 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-48.jpg)

---

| |
|:---|
| 112 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-49.jpg)

---

| |
|:---|
| 113 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-50.jpg)

---

| |
|:---|
| 114 |
| *[**Table of Contents**](#Toc)* |

---

![](rookeeper-51.jpg)

---

| |
|:---|
| 115 |
| *[**Table of Contents**](#Toc)* |

---

 **6.8. APIs Routed To ROP Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 52 | function createPledge(<br> bytes32 snOfPld, <br> uint256 paid, <br> uint256 par, <br> uint256 guaranteedAmt, <br> uint256 execDays) external | (Any shareholder) Create a Pledge with the codified serial number snOfPld amount to paid value of paid and par value of par to guarantee the debt amount to guarantedAmt with the guarantee period lasting for number of days of execDays. |
| 53 | function transferPledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> uint256 buyer, <br> uint256 amt) external | (The creditor) Transfer the Pledge numbered as seqOfPld setting up on the pledged share numbered seqOfShare to the user numbered as buyer with the credit amount to amt. |
| 54 | function refundDebt(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> uint256 amt) external | (The creditor) Confirm refunding of the debt, guaranteed by the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare, by the amount of amt. |
| 55 | function extendPledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> uint256 extDays) external | (The pledger) Extend the guarantee period of the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare for a such number of days as extDays. |
| 56 | function lockPledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> bytes32 hashLock) external | (The creditor) Set up a hash lock with the hash value as hashLock on the Pledge numbered as seqOfPld setting on the pledged share numbered seqOfShare. |
| 57 | function releasePledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> string memory hashKey) external | (The pledger, after paying off-chain and obtaining the hash key) Release the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare by inputting the hash key string hashKey. |
| 58 | function execPledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> uint256 buyer, <br> uint256 groupOfBuyer) external | (The creditor, after off-chain disposal and receipt of the consideration) Execute the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare to transfer the target share to the user numbered as buyer who belongs to the concert group represented by the user numbered as groupOfBuyer. |
| 59 | function revokePledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld) external | (The pledger, after the expiration of the guarantee period) Revoke the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare. |

---

---

| |
|:---|
| 116 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-52.jpg)

---

| |
|:---|
| 117 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-53.jpg)

---

| |
|:---|
| 118 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-54.jpg)

---

| |
|:---|
| 119 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-55.jpg)

---

| |
|:---|
| 120 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-56.jpg)

---

| |
|:---|
| 121 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-57.jpg)

---

| |
|:---|
| 122 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-58.jpg)

---

| |
|:---|
| 123 |
| *[**Table of Contents**](#Toc)* |

---

![](ropkeeper-59.jpg)

---

| |
|:---|
| 124 |
| *[**Table of Contents**](#Toc)* |

---

 **6.9. APIs Routed To SHA Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 60 | function execTagAlong(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint256 paid,<br> uint256 par,<br> bytes32 sigHash) external | (The right holder) Execute the Tag-Along right, for the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, to sell with the same condition of its share numbered as seqOfShare to the amount of paid value of paid and par value of par, with the signature's hash value as sigHash. |
| 61 | function execDragAlong(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint256 paid,<br> uint256 par,<br> bytes32 sigHash) external | (The right holder) Execute the Drag-Along right, for the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, to sell with the same condition of the obligor's share numbered as seqOfShare to the amount of paid value of paid and par value of par, with the signature's hash value as sigHash. |
| 62 | function acceptAlongDeal(<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 sigHash) external | (The buyer) Accepts the Tag/Drag Along requests, for the Deal numbered as seqOfDeal of the Investment Agreement deployed at the address of ia, with the signature's hash value as sigHash. |
| 63 | function execAntiDilution(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> bytes32 sigHash) external | (The right holder) Execute the Anti-Dilution right, towards the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, for its share numbered seqOfShare, with the signature hash value as sigHash. |
| 64 | function takeGiftShares(<br> address ia, <br> uint256 seqOfDeal) external | (The right holder of Anti-Dilution, after the closing) Take the gift shares, generating as per the Anti-Dilution Term of SHA, for the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia. |
| 65 | function execFirstRefusal(<br> uint256 seqOfRule,<br> uint256 seqOfRightholder,<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 sigHash) external | (The right holder) Execute its First Refusal right, as per the Rule numbered as seqOfRule, with the identified sequence number as seqOfRightholder, to request to buy the subject share of the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, with the signature hash value as sigHash. |
| 66 | function computeFirstRefusal(<br> address ia,<br> uint256 seqOfDeal) external; | (Any Member) Compute the First Refusal claims result for the Deal numbered as seqOfDeal of the Investment Agreement deployed at the address of ia, so as to obtain the automatically updated Investment Agreement. |

---

---

| |
|:---|
| 125 |
| *[**Table of Contents**](#Toc)* |

---

![](shakeeper-60.jpg)

---

| |
|:---|
| 126 |
| *[**Table of Contents**](#Toc)* |

---

![](shakeeper-61.jpg)

---

| |
|:---|
| 127 |
| *[**Table of Contents**](#Toc)* |

---

![](shakeeper-62.jpg)

---

| |
|:---|
| 128 |
| *[**Table of Contents**](#Toc)* |

---

![](shakeeper-63.jpg)

---

| |
|:---|
| 129 |
| *[**Table of Contents**](#Toc)* |

---

![](shakeeper-64.jpg)

---

| |
|:---|
| 130 |
| *[**Table of Contents**](#Toc)* |

---

![](shakeeper-65.jpg)

---

| |
|:---|
| 131 |
| *[**Table of Contents**](#Toc)* |

---

![](shakeeper-66.jpg)

---

| |
|:---|
| 132 |
| *[**Table of Contents**](#Toc)* |

---

 **6.10. APIs Concerning ETH/CBP Transfer**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 67 | function pickupDeposit() external | (Any user) Pickup all ETH deposited in the General Keeper. |
| 68 | function proposeToDistributeProfits(<br> uint256 amt,<br> uint256 expireDate,<br> uint256 seqOfVR,<br> uint256 executor) external | (Any Member or Director) Propose to distribute profits of the company, to the General Meeting, pursuant to the Voting Rule numbered as seqOfVR, amount to amt, before the expiration date of expireDate, with the user numbered as executor to execute. |
| 69 | function distributeProfits(<br> uint256 amt,<br> uint256 expireDate,<br> uint256 seqOfMotion) external | (The designated executor) Distribute the profits of the company amount to amt, as per the Motion numbered as seqOfMotion, before the expiration date of expireDate. |
| 70 | function proposeToTransferFund(<br> bool toBMM,<br> address to,<br> bool isCBP,<br> uint256 amt,<br> uint256 expireDate,<br> uint256 seqOfVR,<br> uint256 executor) external | (Any Member or Director) Propose, to the Board (toBMM is true) or the General Meeting (toBMM is false), to transfer certain amount of CBP (isCBP is true) or ETH (isCBP is false), to the account address to, amount to amt, before the timestamp of expireDate, as per the Voting Rule numbered as seqOfVR, with the user numbered as executor to execute the Motion concerned. |
| 71 | function transferFund(<br> bool fromBMM,<br> address to,<br> bool isCBP,<br> uint256 amt,<br> uint256 expireDate,<br> uint256 seqOfMotion) external | (The designated executor) Transfer, CBP (isCBP is true) or ETH (isCBP is false), to the account address to, amount to amt, as per the Motion passed by, the Board (toBMM is true) or the General Meeting (toBMM is false), before the timestamp of expireDate, numbered as seqOfMotion. |

---

---

| |
|:---|
| 133 |
| *[**Table of Contents**](#Toc)* |

---

![](fundtransfer-67.jpg)

---

| |
|:---|
| 134 |
| *[**Table of Contents**](#Toc)* |

---

![](fundtransfer-68.jpg)

---

| |
|:---|
| 135 |
| *[**Table of Contents**](#Toc)* |

---

![](fundtransfer-69.jpg)

---

| |
|:---|
| 136 |
| *[**Table of Contents**](#Toc)* |

---

![](fundtransfer-70.jpg)

---

| |
|:---|
| 137 |
| *[**Table of Contents**](#Toc)* |

---

![](fundtransfer-71.jpg)

---

| |
|:---|
| 138 |
| *[**Table of Contents**](#Toc)* |

---

 **6.11. APIs Routed To LOO Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 72 | function regInvestor(<br> address bKey, <br> uint256 groupRep, <br> bytes32 idHash) external | (Any user) Register itself as an investor, by inputting its backup key as bKey, the user number of its concert group's representative as groupRep, with the hash value of its identity information as idHas. |
| 73 | function approveInvestor(<br> uint256 userNo, <br> uint256 seqOfLR) external | (The verifier) Approve the investor's application, pursuant to the Listing Rule numbered as seqOfLR, filed by the user numbered as userNo. |
| 74 | function revokeInvestor(<br> uint256 userNo, <br> uint256 seqOfLR) external | (The verifier) Revoke the investor's qualification of the user numbered as userNo, pursuant to the Listing Rule numbered as seqOfLR. |
| 75 | function placeInitialOffer(<br> uint256 classOfShare,<br> uint256 execHours,<br> uint256 paid,<br> uint256 price,<br> uint256 seqOfLR) external | (The issuer) Place an initial offer for the class of classOfShare, at the price of paid as price, to the amount of paid as paid, with the available number of hours as execHours, pursuant to the Listing Rule numbered as seqOfLR. |
| 76 | function withdrawInitialOffer(<br> uint256 classOfShare,<br> uint256 seqOfOrder,<br> uint256 seqOfLR) external; | (The issuer) Withdraw the initial offer numbered as seqOfOrder under the class of classOfShare, pursuant to the Listing Rule numbered as seqOfLR |
| 77 | function placeSellOrder(<br> uint256 seqOfClass,<br> uint256 execHours,<br> uint256 paid,<br> uint256 price,<br> uint256 seqOfLR) external | (Any qualified investor) Place a sell order under the class numbered as seqOfClass, as per the Listing Rule of seqOfLR, to the paid value amount to paid, at the selling price of price, with the available time within the number of hours as execHours. |
| 78 | function withdrawSellOrder(<br> uint256 classOfShare,<br> uint256 seqOfOrder) external | (The seller) Withdraw sell order numbered as seqOfOrder for the class of classOfShare. |
| 79 | function placeBuyOrder(<br> uint256 classOfShare, <br> uint256 paid, <br> uint256 price,<br> uint256 execHours) external payable | (Any qualified investor) Place buy order for the class of classOfShare, to the paid value amount to paid, at the buy price of price, with the available time within the number of hours as execHours, paying certain amount of ETH sufficient to cover the total value of the order. |
| 80 | function withdrawBuyOrder(<br> uint256 classOfShare,<br> uint256 seqOfOrder) external | (The buyer) Withdraw the buy order numbered as seqOfOrder for the class of classOfShare. |

---

---

| |
|:---|
| 139 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-72.jpg)

---

| |
|:---|
| 140 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-73.jpg)

---

| |
|:---|
| 141 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-74.jpg)

---

| |
|:---|
| 142 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-75.jpg)

---

| |
|:---|
| 143 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-76.jpg)

---

| |
|:---|
| 144 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-77.jpg)

---

| |
|:---|
| 145 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-78.jpg)

---

| |
|:---|
| 146 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-79.jpg)

---

| |
|:---|
| 147 |
| *[**Table of Contents**](#Toc)* |

---

![](lookeeper-80.jpg)

---

| |
|:---|
| 148 |
| *[**Table of Contents**](#Toc)* |

---

 **6.12. APIs Routed To USD LOO Keeper**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 81 | function placeInitialOffer(<br> uint256 classOfShare,<br> uint256 execHours,<br> uint256 paid,<br> uint256 price,<br> uint256 seqOfLR) external | (The issuer) Place an initial offer for the class of classOfShare, as per the authorization of the Listing Rule numbered as seqOfLR,at the price of paid as price, to the amount of paid as paid, with the available number of hours as execHours. |
| 82 | function withdrawInitialOffer(<br> uint256 classOfShare,<br> uint256 seqOfOrder,<br> uint256 seqOfLR) external; | (The issuer) Withdraw the initial offer numbered as seqOfOrder under the class of classOfShare, as per the authorization of the Listing Rule numbered as seqOfLR. |
| 83 | function placeSellOrder(<br> uint256 seqOfClass,<br> uint256 execHours,<br> uint256 paid,<br> uint256 price,<br> uint256 seqOfLR) external | (Any qualified investor) Place a sell order under the class numbered as seqOfClass, as per the Listing Rule of seqOfLR, to the paid value amount to paid, at the selling price of price, with the available time within the number of hours as execHours. |
| 84 | function withdrawSellOrder(<br> uint256 classOfShare,<br> uint256 seqOfOrder) external | (The seller) Withdraw the sell order placed by itself numbered as seqOfOrder for the class of classOfShare. |
| 85 | function placeBuyOrder(<br> ICashier.TransferAuth memory auth,<br> uint256 classOfShare, <br> uint256 paid, <br> uint256 price,<br> uint256 execHours) external | (Any qualified investor) Place a buy order for the class of classOfShare, to the paid value amount to paid, at the buy price of price, within the available time as number of hours of execHours, paying certain amount of USDC as per the off-chain authorization signed as auth. |
| 86 | function placeMarketBuyOrder(<br> ICashier.TransferAuth memory auth,<br> uint256 classOfShare, <br> uint256 paid, <br> uint256 execHours ) external | (Any qualified investor) Place a buy order for the class of classOfShare, to the paid value amount to paid, at the market price, with the available time within the number of hours as execHours, paying certain amount of USDC as per the off-chain authorization signed as auth. |
| 87 | function withdrawBuyOrder(<br> uint256 classOfShare,<br> uint256 seqOfOrder) external | (The buyer) Withdraw the buy order numbered as seqOfOrder for the class of classOfShare that it has placed. |

---

---

| |
|:---|
| 149 |
| *[**Table of Contents**](#Toc)* |

---

![](usdlookeeper-81.jpg)

---

| |
|:---|
| 150 |
| *[**Table of Contents**](#Toc)* |

---

![](usdlookeeper-82.jpg)

---

| |
|:---|
| 151 |
| *[**Table of Contents**](#Toc)* |

---

![](usdlookeeper-83.jpg)

---

| |
|:---|
| 152 |
| *[**Table of Contents**](#Toc)* |

---

![](usdlookeeper-84.jpg)

---

| |
|:---|
| 153 |
| *[**Table of Contents**](#Toc)* |

---

![](usdlookeeper-85.jpg)

---

| |
|:---|
| 154 |
| *[**Table of Contents**](#Toc)* |

---

![](usdlookeeper-86.jpg)

---

| |
|:---|
| 155 |
| *[**Table of Contents**](#Toc)* |

---

![](usdlookeeper-87.jpg)

---

| |
|:---|
| 156 |
| *[**Table of Contents**](#Toc)* |

---

 **6.13. Other APIs Concerning USDC Payments**

---

| | | |
|:---|:---|:---|
| **S.N.** | **API** | **Description of Functions and Input Parameters** |
| 88 | function payInCapital(<br> ICashier.TransferAuth memory auth, <br> uint256 seqOfShare, <br> uint256 paid) external | (The shareholder) Pay in capital, for its specific share numbered as seqOfShare, to the amount of paid as paid, by paying certain amount of USDC through off-chain authorization signed as auth. |
| 89 | function payOffApprovedDeal(<br> ICashier.TransferAuth memory auth, <br> address ia, <br> uint256 seqOfDeal, <br> address to) external | (The buyer) Pay off the specific Deal numbered as seqOfDeal in the Investment Agreement deployed as the address of ia, by paying to the seller/issuer address to certain amount of USDC as per the off-chain authorization signed as auth, to close the Deal. |
| 90 | function payOffSwap(<br> ICashier.TransferAuth memory auth, <br> uint256 seqOfOpt, <br> uint256 seqOfSwap, <br> address to) external | (The pledger) Pay certain amount of USDC as per the off-chain authorization signed as auth, to release the pledged share under the Swap numbered seqOfSwap of the Option numbered as seqOfOpt, to close the Swap. |

---

---

| |
|:---|
| 157 |
| *[**Table of Contents**](#Toc)* |

---

![](usdkeeper-88.jpg)

---

| |
|:---|
| 158 |
| *[**Table of Contents**](#Toc)* |

---

![](usdkeeper-89.jpg)

---

| |
|:---|
| 159 |
| *[**Table of Contents**](#Toc)* |

---

![](usdkeeper-90.jpg)

---

| |
|:---|
| 160 |
| *[**Table of Contents**](#Toc)* |

---

![](usdkeeper-91.jpg)

---

| |
|:---|
| 161 |
| *[**Table of Contents**](#Toc)* |

---

 **7. Scenarios for Equity Transactions and Corporate Governance** 

In the course of a company's daily operations and financing activities, all legal actions can generally be categorized into 13 representative scenarios. These scenarios broadly encompass the issuance of new shares, transfer of existing shares, amendment of the shareholders' agreement, equity financing, election of directors and officers, approval of legal documents by resolution, external payments, and the execution of legal agreements, among others. This section presents these scenarios through logical flowcharts (swimlane diagrams), illustrating how the company's stakeholders, acting in their respective capacities as rights holders, may utilize the external APIs provided by the ComBoox system to rigorously and systematically complete the aforementioned legal actions within the ComBoox platform. These scenarios include:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Apply for Qualified Invesotr Status;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Update Shareholders' Agreement;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Trade Equity by Agreement;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Trade Equity trough Listing (in ETH);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Trade Equity trough Listing (in USDC);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Elect or Remove Directors;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) Elect or Remove Officers;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) Transfer Fund;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) Distribute Profits;

---

| |
|:---|
| 162 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) Call External Smart Contracts;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (11) Pledge Equity for Debts;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (12) Execute SHA Rights; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (13) Execute Options.

---

| |
|:---|
| 163 |
| *[**Table of Contents**](#Toc)* |

---

 **7.1. Apply for Qualified Investor Status**

To invest in a company registered on the ComBoox platform, an individual must first apply for "Qualified Investor" status. This process entails a whitelist review and verification procedure. The "Listing Rules" under the company's Shareholders' Agreement explicitly define which user roles are vested with the authority to approve Qualified Investor applications. These approvers, referred to as "Verifiers," may include the company's shareholders, senior executives, affiliated equity trading venues, or even regulatory authorities.

Only users admitted to the whitelist are permitted to buy and sell the company's shares. Once a user's Qualified Investor status is revoked by a Verifier, all equity holdings of that user are effectively frozen and may not be transferred until the Qualified Investor status is reinstated.

The application and approval process for obtaining Qualified Investor status generally consists of the following steps:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Applicant calls the regUser() function of RegCenter to sign up with ComBoox Platform;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Applicant calls the setBackupKey() function of RegCenter to set bKey as its backup key;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Applicant calls regInvestor() (the No.72 API) of USD Keeper to register itself as an investor, by inputting its backup key as bKey, the user number of its concert group's representative as groupRep, with the hash value of its identity information as idHas.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Verifier calls approveInvestor() (the No.73 API) of General Keeper to approve the investor's application, pursuant to the Listing Rule numbered as seqOfLR, filed by the user numbered as userNo.

---

| |
|:---|
| 164 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-01.jpg)

---

| |
|:---|
| 165 |
| *[**Table of Contents**](#Toc)* |

---

7.2. Update Shareholders' Agreement

The Shareholders' Agreement or the Articles of Association serve as the company's constitutional documents. They set forth the Rules governing corporate governance (Governance Rules), voting procedures (Voting Rules), allocation of executive positions (Position Allocation Rules), pre-emptive rights (First Refusal Rules), listing requirements (Listing Rules), as well as special investor protection provisions (Terms) such as share Lock-Up, Anti-Dilution, Drag-Along and Tag-along rights, Call Options, and Put Options.

Within the ComBoox system, shareholders may, in accordance with prescribed voting rules, submit proposals, cast votes, and activate new versions of the Shareholders' Agreement in order to establish or amend the foregoing Rules and Terms. Once activated, the Shareholders' Agreement will automatically respond in real time to queries from other Sub Keeper contracts and Registry contracts, providing the relevant Rules and Terms. This ensures that all corporate legal actions are executed strictly in accordance with the conditions and procedures stipulated in the Shareholders' Agreement.

The specific process for creating, proposing, voting on, and activating the Shareholders' Agreement includes the following steps:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Shareholder calls createSHA() (the No.01 API) of General Keeper to create a new shareholders agreement by cloning the Template of the specific version.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Owner of the draft SHA calls circulateSHA() (the No.02 API) of General Keeper to circulate the finalized draft of SHA deployed at the address of body to the contractual parties for signing, with the URL infomation of docUrl, and hash value of docHash.

---

| |
|:---|
| 166 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Shareholders call signSHA() (the No.03 API) of General Keeper to sign the finalized draft of SHA deployed at the address of sha, with the hash value of signature as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Owner of the draft call proposeDocOfGM() (the No.27 API) of General Keeper to create and propose a draft Motion for the General Meeting to approve the document deployed at the address of doc as per the voting rule numbered as seqOfVR with the user numbered as executor to invoke it.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Shareholders call castVoteOfGM() (the No.31 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Any user call voteCountingOfGM() (the No.32 API) of General Keeper to count the vote result for the Motion on the General Meeting numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) Any Shareholder may call activateSHA() (the No.04 API) of General Keeper to activate the draft of shareholders agreement deployed at the address of body.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) Investor may call acceptSHA() (the No.05 API) of General Keeper to accept the terms and conditons of the SHA in force, with the hash value as sigHash.

---

| |
|:---|
| 167 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-02.jpg)

---

| |
|:---|
| 168 |
| *[**Table of Contents**](#Toc)* |

---

7.3. Trade Equity by Agreement

Equity subscription or transfer by agreement is the share trading mechanism designed by ComBoox for the vast majority of non-listed companies. Under this agreement-based approach, both new share issuances and secondary share transfers may be conducted. Settlements can be executed either through a hash time-lock using off-chain fiat currency as payment consideration, or via atomic delivery-versus-payment (DVP) transactions using ETH or USDC.

A General Meeting's resolution is an essential step in agreement-based share transactions, ensuring that special investor rights, such as Lock-Up, First Refusal, Drag Along and Tag Along, can be duly exercised. Where the Shareholders' Agreement specifies that the approval voting ratio for equity-trading-related voting rules (Voting Rules No. 1-7) is set to "0," proposals may bypass the voting stage. In such cases, the relevant share transfer or subscription agreement may be deemed approved by the shareholders' meeting directly upon triggering the calculateVoteResult() API, thereby proceeding immediately to settlement.

The process for conducting equity transactions by agreement includes the following steps:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Any Shareholder may call createIA() (the No.35 API) of General Keeper to create a draft Investment Agreement on the Register of Agreement, by cloning the Template of the version numbered as version.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Owner of the draft Investment Agreement calls circulateIA() (the No.36 API) of General Keeper to circulate the finalized draft deployed at the address of body to the parties for signature, attaching with the URL information of docUrl and the hash value of the draft as docHash.

---

| |
|:---|
| 169 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Parties to the draft IA call signIA() (the No.37 API) of Gener Keeper to sign the Investment Agreement deployed at the address of ia, with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Owner of the draft to call proposeDocOfGM() (the No.27 API) of General Keeper to create and propose a draft Motion for the General Meeting to approve the document deployed at the address of doc as per the voting rule numbered as seqOfVR with the user numbered as executor to invoke it.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Shareholders call castVoteOfGM() (the No.31 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Any user may call countVoteResultOfGM() (the No.32 API) of General Keeper to count the vote result for the Motion on the General Meeting numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) Seller may call pushToCoffer() (the No.38 API) of General Keeper to confirm all conditions precedent have been satisfied and ready for closing, for the specific deal numbered as seqOfDeal, under the Investment Agreement deployed at the address of ia, by inputting a hash lock value hashLock and setting the closing deadline as closingDeadline.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) Buyer calls closeDeal() (the No.39 API) of General Keeper to close the deal numbered as seqOfDeal, under the Investment Agreement deployed at the address of ia, after paying the consideration off-chain, by inputting the hash key string hashKey.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) Controller of the company may call issueNewShare() (the No.40 API) of General Keeper to issue new share directly to the buyer, for the capital increasing Deal numbered as seqOfDeal under the Investment Agreement deployed at the address of ia.

---

| |
|:---|
| 170 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) Seller may call transferTargetShare() (the No.41 API) of General Keeper to transfer the subject share directly to the buyer, for the specific share transfer Deal numbered as seqOfDeal under the Investment Agreement deployed at the address of ia.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (11) Buyer may call payOffApprovedDeal() (the No.43 API) of General Keeper to close the Deal numbered as seqOfDeal, under the Investment Agreement deployed at the address of ia, by paying ETH having the equivalent value to the total consideration.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (12) Buyer may call payOffApprovedDealInUsd() (the No.89 API) of USD Keeper to pay off the specific Deal numbered as seqOfDeal in the Investment Agreement deployed as the address of ia, by paying to the seller/issuer address to certain amount of USDC as per the off-chain authorization signed as auth, to close the Deal.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (13) After the expiration of the Deal, seller may call terminateDeal() (the No.42 API) of General Keeper to terminate the Deal numbered as seqOfDeal under the Investment Agreement deployed at the address of ia.

---

| |
|:---|
| 171 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-03.jpg)

---

| |
|:---|
| 172 |
| *[**Table of Contents**](#Toc)* |

---

7.4. Trade Equity by Listing (in ETH)

The listing-based trading mechanism is designed by ComBoox for companies that are publicly listed. Qualified Investors may subscribe for or transfer company shares through blockchain-based smart contracts using ETH as the settlement currency. This mechanism enables both subscriptions for newly issued shares and secondary trading of existing shares.

The smart contract system, centered on the LOO Keeper and LOO smart contracts, automatically matches and executes orders under a "time priority, price priority" principle, with settlement conducted on a delivery-versus-payment (DVP) model. The exchange rate between ETH and the company's functional currency of account is obtained directly from Chainlink's publicly available price feed contracts on the blockchain.

A company may stipulate the specific rules governing the listing and issuance of its shares through the "Listing Rules" under its Shareholders' Agreement. Such rules may include, for example, the minimum and maximum issue prices for shares, the minimum interval between share transfers, or the lowest permissible trading price.

Most importantly, the Listing Rules define the role of the Verifier, either as a designated user group or specific individual, who is vested with the authority to approve or revoke "Qualified Investor" status. This whitelist mechanism ensures that all investors participating in the company's share transactions comply with applicable KYC/AML requirements and other regulatory obligations.

A Verifier may be a company director or officer, a designated bookrunner or registrar, an exchange operator, a KYC/AML service provider, or even a competent regulatory authority within a particular jurisdiction.

The company's General Meeting may amend the Listing Rules by updating the Shareholders' Agreement, thereby ensuring that the issuance and trading of its shares remain in compliance with the requirements of specific jurisdictions or trading venues.

---

| |
|:---|
| 173 |
| *[**Table of Contents**](#Toc)* |

---

 **The public offering or trading of company shares is subject to compliance with applicable laws and regulations governing securities registration, securities trading, KYC, AML, and related requirements. Accordingly, prior to engaging in share listing or trading activities, it is strongly recommended to seek professional advice from qualified legal counsel in the relevant jurisdiction.** 

The specific procedures for trading company shares under the listing mechanism are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Controller or director may call placeInitialOffer() (the No.75 API) of General Keeper to place an initial offer for the class of classOfShare, at the price of paid as price, to the amount of paid as paid, with the available number of hours as execHours, pursuant to the Listing Rule numbered as seqOfLR.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) A shareholder may call placeSellOrder() (the No.77 API) of General Keeper to place a sell order under the class numbered as classOfShare, as per the Listing Rule of seqOfLR, to the paid value amount to paid, at the selling price of price, with the available time within the number of hours as execHours.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) A Qualified Investor may call placeBuyOrder() (the No.79 API) of General Keeper to place a buy order for the class of classOfShare, to the paid value amount to paid, at the buy price of price, with the available time within the number of hours as execHours, paying certain amount of ETH sufficient to cover the total value of the order.

---

| |
|:---|
| 174 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) The Controller or director may call withdrawInitialOffer() (the No.76 API) of General Keeper to withdraw the initial offer numbered as seqOfOrder under the class of classOfShare, pursuant to the Listing Rule numbered as seqOfLR.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) The seller may call withdrawSellOrder() (the No.78 API) of General Keeper to withdraw sell order numbered as seqOfOrder for the class of classOfShare.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) The buyer may call withdrawBuyOrder() (the No.80 API) of General Keeper to withdraw the buy order numbered as seqOfOrder for the class of classOfShare.

---

| |
|:---|
| 175 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-04.jpg)

---

| |
|:---|
| 176 |
| *[**Table of Contents**](#Toc)* |

---

7.5. Trade Equity by Listing (in USDC)

The listing-based trading mechanism is designed by ComBoox for companies that are publicly listed. Qualified Investors may subscribe for or transfer company shares through blockchain-based smart contracts using USDC as the settlement currency. This mechanism enables both subscriptions for newly issued shares and secondary trading of existing shares.

The smart contract system, centered on the USD LOO Keeper and USD LOO smart contracts, automatically matches and executes orders under a "time priority, price priority" principle, with settlement conducted on a delivery-versus-payment (DVP) model.

A company may stipulate the specific rules governing the listing and issuance of its shares through the "Listing Rules" under its Shareholders' Agreement. Such rules may include, for example, the minimum and maximum issue prices for shares, the minimum interval between share transfers, or the lowest permissible trading price.

Most importantly, the Listing Rules define the role of the Verifier, either as a designated user group or specific individual, who is vested with the authority to approve or revoke "Qualified Investor" status. This whitelist mechanism ensures that all investors participating in the company's share transactions comply with applicable KYC/AML requirements and other regulatory obligations.

A Verifier may be a company director or officer, a designated bookrunner or registrar, an exchange operator, a KYC/AML service provider, or even a competent regulatory authority within a particular jurisdiction.

The company's General Meeting may amend the Listing Rules by updating the Shareholders' Agreement, thereby ensuring that the issuance and trading of its shares remain in compliance with the requirements of specific jurisdictions or trading venues.

---

| |
|:---|
| 177 |
| *[**Table of Contents**](#Toc)* |

---

 **The public offering or trading of company shares is subject to compliance with applicable laws and regulations governing securities registration, securities trading, KYC, AML, and related requirements. Accordingly, prior to engaging in share listing or trading activities, it is strongly recommended to seek professional advice from qualified legal counsel in the relevant jurisdiction.** 

The specific procedures for trading company shares under the listing mechanism are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Controller or director may call placeInitialOffer() (the No.81 API) of USD Keeper to place an initial offer for the class of classOfShare, at the price of paid as price, to the amount of paid as paid, with the available number of hours as execHours, pursuant to the Listing Rule numbered as seqOfLR.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) A shareholder may call placeSellOrder() (the No.83 API) of USD Keeper to place a sell order under the class numbered as classOfShare, as per the Listing Rule of seqOfLR, to the paid value amount to paid, at the selling price of price, with the available time within the number of hours as execHours.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) A Qualified Investor may call placeBuyOrder() (the No.85 API) of USD Keeper to place a buy order for the class of classOfShare, to the paid value amount to paid, at the buy price of price, within the available time as number of hours of execHours, paying certain amount of USDC as per the off-chain authorization signed as auth.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) A Qualified Investor may call placeMarketBuyOrder() (the No.86 API) of USD Keeper to place a buy order for the class of classOfShare, to the paid value amount to paid, at the market price, with the available time within the number of hours as execHours, paying certain amount of USDC as per the off-chain authorization signed as auth.

---

| |
|:---|
| 178 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) The Controller or director may call withdrawInitialOffer() (the No.82 API) of USD Keeper to withdraw the initial offer numbered as seqOfOrder under the class of classOfShare, pursuant to the Listing Rule numbered as seqOfLR.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) The seller may call withdrawSellOrder() (the No.84 API) of USD Keeper to withdraw sell order numbered as seqOfOrder for the class of classOfShare.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) The buyer may call withdrawBuyOrder() (the No.87 API) of USD Keeper to withdraw the buy order numbered as seqOfOrder for the class of classOfShare that it has placed.

---

| |
|:---|
| 179 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-05.jpg)

---

| |
|:---|
| 180 |
| *[**Table of Contents**](#Toc)* |

---

7.6. Elect or Remove Directors

The power to appoint and remove directors or officers is a fundamental aspect of corporate governance. Within the ComBoox system, the Position Allocation Rules defined in the Shareholders' Agreement may specify the manner in which company executives and officers are appointed, as well as the duration of their terms of office. For example, such rules may establish shareholders' rights to nominate a certain number of board seats or specific positions such as the Chairperson, or the authority of certain directors or executives to nominate, appoint or remove other company officers.

Users vested with nomination or appointment/removal rights may exercise such powers by triggering designated APIs. The election of company officers may take place at a General Meeting or a Board Meeting. A user holding nomination rights may also initiate a motion to remove (impeach) a director or executive whom they have nominated.

Elected candidates must trigger the Appointment API in order to assume office; similarly, resignation requires activation of the Resignation API.

Shareholders may amend the Shareholders' Agreement to revise the Position Allocation Rules, thereby altering the method of appointment or the term of office for specific positions.

The procedures for the election or appointment of directors are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) The right holder calls nominateDirector() (the No.25 API) of General Keeper to nominate the user numbered as candidate for the Director's position numbered as seqOfPos.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) The right holder calls createMotionToRemoveDirector() (the No.26 API) of General Keeper to create a draft Motion to remove the officer on the position numbered as seqOfPos.

---

| |
|:---|
| 181 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) The right holder calls proposeMotionToGeneralMeeting() (the No.30 API) of General Keeper to proposes the Motion numbered as seqOfMotion to the General Meeting.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Members call castVoteOfGM() (the No.31 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Any user may call voteCountingOfGM() (the No.32 API) of General Keeper to count the vote result for the Motion on the General Meeting numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) The elected candidate calls takeSeat() (the No.06 API) of General Keeper to assume the director's seat identified by seqOfPos pursuant to the authorization granted under the Motion identified by seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) The executor calls removeDirector() (the No.07 API) of General Keeper to remove the director on the position numbered as seqOfPos as per the removal Motion numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) The director calls quitPosition() (the No.10 API) of General Keeper to quit the position identified as seqOfPos voluntarily.

---

| |
|:---|
| 182 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-06.jpg)

---

| |
|:---|
| 183 |
| *[**Table of Contents**](#Toc)* |

---

7.7. Elect or Remove Officers

The procedures for the election or appointment of officers are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) The right holder calls nominateOfficer() (the No.11 API) of General Keeper to nominate the user numbered as candidate for the Officer's position numbered as seqOfPos.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) The right holder calls createMotionToRemoveOfficer() (the No.12 API) of General Keeper to create a draft Motion to remove the officer on the position numbered as seqOfPos.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) The right holder calls proposeMotionToBoard() (the No.16 API) of General Keeper to proposes the Motion numbered as seqOfMotion to the Board Meeting.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Directors call castVote () (the No.17 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Any user may call voteCounting() (the No.18 API) of General Keeper to count the vote result for the Motion on the Board Meeting numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) The elected candidate calls takePosition() (the No.08 API) of General Keeper to assume the director's seat identified by seqOfPos pursuant to the authorization granted under the Motion identified by seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) The executor calls removeOfficer() (the No.09 API) of General Keeper to remove the director on the position numbered as seqOfPos as per the removal Motion numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) The director calls qutiPosition() (the No.10 API) of General Keeper to quit the position identified as seqOfPos voluntarily.

---

| |
|:---|
| 184 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-07.jpg)

---

| |
|:---|
| 185 |
| *[**Table of Contents**](#Toc)* |

---

7.8. Transfer Fund

External payments constitute one of the most important forms of asset disposition and corporate governance actions for a company. Within the ComBoox system, any external payment made by a company must be approved either at a General Meeting or a Board Meeting. The maximum payment amount that may be authorized by the Board can be expressly stipulated in the Governance Rule set forth in the Shareholders' Agreement. Should any Board Motion on external payments exceed such threshold, the system will automatically return an error and prohibit the Motion from proceeding to a vote.

The ComBoox system permits companies to make external payments in three types of tokens: ETH, USDC, and CBP. The first two represent company assets, while the latter, in the case of the ComBoox DAO, represents a category of long-term liabilities classified as "deferred revenue." For other companies, CBP functions as a special utility token that may be consumed when utilizing the ComBoox system.

The ComBoox system provides dedicated APIs for making payments in CBP or ETH. For USDC, however, payments must be executed by triggering the General Keeper to call the universal interface for external smart contracts, which in turn invokes the Cashier contract's transferUSD() function to complete the external payment.

The process for effecting external payments involves the following steps:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Any Member may call proposeToTransferFund() (the No.70 API) of General Keeper to propose, to the Board (toBMM is true) or the General Meeting (toBMM is false), to transfer certain amount of CBP (isCBP is true) or ETH (isCBP is false), to the account address to, amount to amt, before the timestamp of expireDate, as per the Voting Rule numbered as seqOfVR, with the user numbered as executor to execute the Motion concerned; or

---

| |
|:---|
| 186 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Any Member may call createActionOfGM() (the No.28 API) of General Keeper to create a draft Motion for the General Meeting to execute a series of calls, as per the voting rule numbered as seqOfVR, to the contracts deployed at the addresses of targets, with paying the respective ETH amount to values, and inputting parameters of params, attached a description message whose hash value is desHash, with the user numbered as executor to invoke it. To transfer certain amount of USDC to the specific recipient, the seqOfVR shall be set as per the SHA's governing Voting Rule; the targets shall be set as pointing to the address of the Cashier; the params shall be customized to configured as calling the function of transferUSD() with the recipient's address and the amount of USDC to be transferred. For accounting purpose, the desHash can be set as the reason of payment accordingly.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Members call castVoteOfGM() (the No.31 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Directors call castVote() (the No.17 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Any user calls voteCountingOfGM() (the No.32 API) of General Keeper to count the vote result for the Motion on the General Meeting numbered as seqOfMotion; or

---

| |
|:---|
| 187 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Any user may call voteCounting() (the No.18 API) of General Keeper to count the vote result for the Motion on the Board Meeting numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) The designated executor calls transferFund() (the No.71 API) of General Keeper to transfer, CBP (isCBP is true) or ETH (isCBP is false), to the account address to, amount to amt, as per the Motion passed by, the Board (toBMM is true) or the General Meeting (toBMM is false), before the timestamp of expireDate, numbered as seqOfMotion; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) The designated executor calls execActionOfGM() (the No.33 API) of General Keeper to execute the Motion numbered as seqOfMotion, categorized as typeOfAction, to trigger the series of calls to the contracts deployed at addresses of targets, with paying the respective ETH amount to values, inputting parameters as params, attached with hash value of the description message as desHash. To transfer certain amount of USDC to the specific recipient, the targets shall be set as pointing to the address of the Cashier; the params shall be customized to configured as calling the function of transferUSD() with the recipient's address and the amount of USDC to be transferred. For accounting purpose, the desHash can be set as the reason of payment accordingly.

---

| |
|:---|
| 188 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-08.jpg)

---

| |
|:---|
| 189 |
| *[**Table of Contents**](#Toc)* |

---

7.9. Distribute Profits

ComBoox enables companies to distribute profits in ETH or USDC. Any profit distribution must be approved by Resolution at the company's General Meeting. Distributions in ETH may be executed through a dedicated interface, whereas distributions in USDC require triggering the General Keeper to call the universal interface for external contracts, which in turn invokes the Cashier contract's distributeUSD() function to complete the process.

The procedure for distributing company profits includes the following steps:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Any Member may call proposeToDistributeProfits() (the No.68 API) of General Keeper to propose to distribute profits of the company in ETH, to the General Meeting, pursuant to the Voting Rule numbered as seqOfVR, amount to amt, before the expiration date of expireDate, with the user numbered as executor to execute.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Any Member may call createActionOfGM() (the No.28 API) of General Keeper to create a draft Motion for the General Meeting to execute a series of calls, as per the voting rule numbered as seqOfVR, to the contracts deployed at the addresses of targets, with paying the respective ETH amount to values, and inputting parameters of params, attached a description message whose hash value is desHash, with the user numbered as executor to invoke it. To distribute certain amount of USDC to the Members, the seqOfVR shall be set as per the SHA's governing Voting Rule; the targets shall be set as pointing to the address of the Cashier; the params shall be customized to configured as calling the function of distributeUSD() with the amount of USDC to be distributed.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Creator of the draft Motion call proposeMotionToGeneralMeeting() (the No.30 API) of General Keeper to proposes the Motion numbered as seqOfMotion to the General Meeting.

---

| |
|:---|
| 190 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Members call castVoteOfGM() (the No.31 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Any user may call voteCountingOfGM() (the No.32 API) of General Keeper to count the vote result for the Motion on the General Meeting numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) The designated executor call distributeProfits() (the No.69 API) of General Keeper to distribute the profits of the company in ETH amount to amt, as per the Motion numbered as seqOfMotion, before the expiration date of expireDate.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) The designated executor calls execActionOfGM() (the No.33 API) of General Keeper to execute the Motion numbered as seqOfMotion, categorized as typeOfAction, to trigger the series of calls to the contracts deployed at addresses of targets, with paying the respective ETH amount to values, inputting parameters as params, attached with hash value of the description message as desHash. To distribute certain amount of USDC to the Members, the seqOfVR shall be set as per the SHA's governing Voting Rule; the targets shall be set as pointing to the address of the Cashier; the params shall be customized to configured as calling the function of distributeUSD() with the amount of USDC to be distributed.

---

| |
|:---|
| 191 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-09.jpg)

---

| |
|:---|
| 192 |
| *[**Table of Contents**](#Toc)* |

---

7.10. Call External Smart Contracts

As a Turing-complete programming language, Solidity enables the development of smart contracts to implement a wide range of legal actions depending on the application scenario. Within the ComBoox system, the General Keeper contract represents the on-chain legal entity of the company. Accordingly, when the General Keeper invokes an external smart contract, this action is deemed to constitute the company, in its capacity as an independent legal person, undertaking legal acts in external civil or commercial matters.

For this purpose, two universal interfaces-execAction() and execActionOfGM()-have been specifically developed. These functions allow the company to call external smart contracts flexibly, thereby adapting to future contracts designed for various commercial purposes. By invoking such contracts, the company can perform legally binding actions and achieve its intended business objectives. The former interface corresponds to legal actions requiring Board approval, while the latter corresponds to those requiring General Meeting approval.

For example, in the case of external payments or profit distributions in USDC, the system currently does not provide a dedicated API. Instead, the General Keeper executes the execActionOfGM() function, which indirectly calls the Cashier contract's transferUSD() and distributeUSD() functions, thereby achieving the commercial and legal purposes of making external USDC payments and distributing profits in USDC, respectively.

When invoking external contract interfaces, the target contract addresses and corresponding instructions are structured in arrays. This design allows multiple smart contract functions to be called within a single instruction, enabling the execution of multiple legal actions and the realization of complex business objectives in a single operation.

---

| |
|:---|
| 193 |
| *[**Table of Contents**](#Toc)* |

---

The process for executing external smart contracts through the General Keeper includes the following steps:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Any Member may call createActionOfGM() (the No.28 API) of General Keeper to create a draft Motion for the General Meeting to execute a series of calls, as per the voting rule numbered as seqOfVR, to the contracts deployed at the addresses of targets, with paying the respective ETH amount to values, and inputting parameters of params, attached a description message whose hash value is desHash, with the user numbered as executor to invoke it; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Any director may call createAction() (the No.19 API) of General Keeper to create a draft Motion for the Board Meeting to execute a series of calls, as per the voting rule numbered as seqOfVR, to the contracts deployed at the addresses of targets, with paying the respective ETH amount to values, and inputting parameters of params, attached a description message whose hash value is desHash, with the user numbered as executor to invoke it.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Owner who created the Motion may call proposeMotionToGeneralMeeting() (the No.30 API) of General Keeper to proposes the Motion numbered as seqOfMotion to the General Meeting; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Owner who created the Motion may call proposeMotionToBoard() (the No.16 API) of General Keeper to proposes the Motion numbered as seqOfMotion to the Board Meeting.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Members may call castVoteOfGM() (the No.31 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash; or

---

| |
|:---|
| 194 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Directors may call castVote() (the No.17 API) of General Keeper to cast vote with the attitude for the Motion numbered as seqOfMotion with the signature message's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) Any user may call voteCountingOfGM() (the No.32 API) of General Keeper to count the vote result for the Motion on the General Meeting numbered as seqOfMotion; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) Any user may call voteCounting() (the No.18 API) of General Keeper to count the vote result for the Motion on the Boardl Meeting numbered as seqOfMotion.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (9) The designated executor may call execActionOfGM() (the No.33 API) of General Keeper to execute the Motion numbered as seqOfMotion, categorized as typeOfAction, to trigger the series of calls to the contracts deployed at addresses of targets, with paying the respective ETH amount to values, inputting parameters as params, attached with hash value of the description message as desHash; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (10) The designated executor may call execAction() (the No.19 API) of General Keeper to execute the Motion numbered as seqOfMotion, categorized as typeOfAction, to trigger the series of calls to the contracts deployed at addresses of targets, with paying the respective ETH amount to values, inputting parameters as params, attached with hash value of the description message as desHash.

---

| |
|:---|
| 195 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-10.jpg)

---

| |
|:---|
| 196 |
| *[**Table of Contents**](#Toc)* |

---

7.11. Pledge Shares for Debts

The system maintains a dedicated Register of Pledges smart contract to record all equity pledge arrangements. Shareholders may pledge the equity they hold as collateral for a specified guaranteed amount of debt, subject to a defined guarantee period and up to a pledged value based on the paid value of the shares. The pledgee may transfer its pledge rights together with the underlying debt obligation. The pledgee may also confirm repayment of part of the principal, in which case the system will automatically reduce the pledged equity proportionally.

A pledgee may establish a hash lock mechanism whereby, once the pledgor repays the principal off-chain, the pledge may be released upon submission of the corresponding hash key. Upon maturity of the debt, the pledgee may exercise its rights by transferring the pledged equity to a designated buyer. Conversely, once the guarantee period expires, the pledgor may revoke the pledge to release the pledged shares.

It is important to emphasize that both the pledgee and any buyer designated upon enforcement of the pledge must obtain and maintain Qualified Investor status. Otherwise, the system will return an error message and block both the creation and enforcement of the pledge.

The specific steps for establishing and managing equity pledges are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) A Shareholder may call createPledge() (the No.52 API) of General Keeper to create a Pledge with the codified serial number snOfPld amount to paid value of paid and par value of par to guarantee the debt amount to guarantedAmt with the guarantee period lasting for number of days of execDays.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Pledgee may call transferPledge() (the No.53 API) of General Keeper to transfer the Pledge numbered as seqOfPld setting up on the pledged share numbered seqOfShare to the user numbered as buyer with the credit amount to amt.

---

| |
|:---|
| 197 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Pledgee calls refundDebt() (the No.54 API) of General Keeper to confirm refunding of the debt, guaranteed by the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare, by the amount of amt.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Pledger calls extendPledge() (the No.55 API) of General Keeper to extend the guarantee period of the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare for a such number of days as extDays.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Pledgee calls lockPledge() (the No.56 API) of General Keeper to set up a hash lock with the hash value as hashLock on the Pledge numbered as seqOfPld setting on the pledged share numbered seqOfShare.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) After paying consideration off-chain and obtaining the hash key, Pledger calls releasePledge() (the No. 57 API) of General Keeper to release the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare by inputting the hash key string hashKey.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) After the debt's maturity and before expiration of the guaranteed period, Pledgee calls execPledge() (the No.58 API) of General Keeper to execute the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare to transfer the target share to the user numbered as buyer who belongs to the concert group represented by the user numbered as groupOfBuyer.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (8) After the expiration of the guaranteed period, Pledger calls revokePledge() (the No.59 API) of General Keeper to revoke the Pledge numbered as seqOfPld setting on the pledged share numbered as seqOfShare.

---

| |
|:---|
| 198 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-11.jpg)

---

| |
|:---|
| 199 |
| *[**Table of Contents**](#Toc)* |

---

7.12. Execute Special Investor Rights of SHA

First Refusal rights, Drag Along rights, Tag Along rights, and Anti Dilution rights are common features in equity investment transactions. Although it is highly unlikely that all such rights would be exercised simultaneously, the system provides a clear sequence of priority for their exercise.

Once an Investment Agreement has been signed, holders of First Refusal rights may exercise their rights first. In such case, the system will terminate the original Deal contemplated under the Investment Agreement and record the First Refusal exercise claims. Upon expiry of the first-refusal exercise period, the seller may trigger the relevant interface to calculate the outcome of the first-refusal exercise. The system will then, in accordance with the First Refusal Rule set forth in the Shareholders' Agreement, recalculate and generate new transactions reflecting the updated Deals to the agreement.

Subsequently, holders of Drag Along or Tag Along rights may exercise such rights. Upon the expiry of the applicable exercise period, the buyer under the Investment Agreement may trigger the interface to confirm acceptance of the additional transfer transactions arising from the exercise of Drag Along or Tag Along rights.

If the issue price in a capital increase Deal falls below the Anti-Dilution provisions set forth in the SHA, holders of Anti-Dilution rights may exercise their claims. In such case, the system will automatically generate transfer transactions whereby shares representing a specified paid-in value are reallocated, free of charge, from the holdings of the anti-dilution obligors to the rights holders. Upon closing of the underlying transaction, the rights holders may trigger the API concerned to receive the additional shares, thereby adjusting the subscription price of their holdings to align with the capital increase Deal's price.

---

| |
|:---|
| 200 |
| *[**Table of Contents**](#Toc)* |

---

The exercise procedures for the foregoing special investor rights are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Right holder call execFirstRefusal() (the No.65 API) of General Keeper to execute its First Refusal right, as per the Rule numbered as seqOfRule, with the identified sequence number as seqOfRightholder, to request to buy the subject share of the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, with the signature hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Any Member may call computeFirstRefusal() (the No.66 API) of General Keeper to compute the First Refusal claims result for the Deal numbered as seqOfDeal of the Investment Agreement deployed at the address of ia, so as to obtain the automatically updated Investment Agreement.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Rightholder may call execDragAlong() (the No.61 API) of General Keeper to execute the Drag-Along right, for the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, to sell with the same condition of the obligor's share numbered as seqOfShare to the amount of paid value of paid and par value of par, with the signature's hash value as sigHash; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Rightholder may call execTagAlong() (the No.60 API) of General Keeper to execute the Tag-Along right, for the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, to sell with the same condition of its share numbered as seqOfShare to the amount of paid value of paid and par value of par, with the signature's hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Buyer may call acceptAlongDeal() (the No.62 API) of General Keeper to accept the Tag/Drag Along requests, for the Deal numbered as seqOfDeal of the Investment Agreement deployed at the address of ia, with the signature's hash value as sigHash.

---

| |
|:---|
| 201 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Rightholder may call execAntiDilution() (the No.63 API) of General Keeper to execute the Anti-Dilution right, towards the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia, for its share numbered seqOfShare, with the signature hash value as sigHash.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (7) Rightholder may call takeGiftShares() (the No.64 API) of General Keeper to take the gift shares, generating as per the Anti-Dilution Term of SHA, for the Deal numbered as seqOfDeal in the Investment Agreement deployed at the address of ia.

---

| |
|:---|
| 202 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-12.jpg)

---

| |
|:---|
| 203 |
| *[**Table of Contents**](#Toc)* |

---

7.13. Execute Options

Options are a common feature in equity financing arrangements and generally take the form of Put Option or Call Option. The triggering conditions may be based simply on the passage of time or the arrival of a specified date, or they may be contingent upon financial metrics such as the company's revenue or net profit falling below or exceeding a specified threshold. For off-chain data such as company revenue, the triggering conditions should be updated either by an independent third-party auditor or through real-time data feeds provided by automated oracle service providers.

Under a Put Option, the option holder may designate shares held by the obligor as the Pledged Share and identify the shares they wish to dispose of as the Target Share, thereby creating a Swap. Conversely, under a Call Option, the option holder may designate the obligor's shares they intend to acquire as the Target Share and select their own shares as the Pledged Share, likewise creating a Swap.

In such a structure:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. The obligor under a Put Option, or the holder of a Call Option, acting as the buyer of the Target Share, may acquire the Target Share by paying USDC or ETH, thereby releasing the Pledged Share under the Swap.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. The holder of a Put Option, or the obligor under a Call Option, acting as the seller of the Target Share, may trigger the interface to execute the Swap, transferring the Target Share while simultaneously releasing the pledge imposed on the Pledged Share.

The transfer price of the Target Share in a Swap is determined in accordance with the Put / Call Option Terms set forth in the SHA. The pledged paid amount of the Pledged Share is automatically calculated by the system as the total transaction value of the Target Share transfer divided by the acquisition price of the Pledged Share.

---

| |
|:---|
| 204 |
| *[**Table of Contents**](#Toc)* |

---

The procedures for exercising options are as follows:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Direct Keeper of General Keeper calls updateOracle() (the No.44 API) of General Keeper to update the key performance indicators of d1, d2, and d3, for the specific Option numbered as seqOfOpt.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Option holder calls execOption() (the No.45 API) of General Keeper to execute the Option numbered as seqOfOpt.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Option holder calls createSwap() (the No.46 API) of General Keeper to create a Swap on the target share numbered as seqOfTarget, for paid value amount to paidOfTarget, with the collateral set up on the pledged share numbered as seqOfPledge, for executing the Option numbered as seqOfOpt.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Buyer of the Target Share calls payOffSwap() (the No.47 API) of General Keeper to pay certain amount of ETH with the equivalent value, under the Swap numbered seqOfSwap, of the Option numbered as seqOfOpt, to close the Swap.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (5) Buyer of the Target Share calls payOffSwap() (the No.90 API) of USD Keeper to pay certain amount of USDC to the recipient's address to, as per the off-chain authorization signed as auth, to release the pledged share under the Swap numbered seqOfSwap of the Option numbered as seqOfOpt, to close the Swap.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (6) Shareholder of the Target Share calls terminateSwap() (the No.48 API) of General Keeper to execute the swap numbered as seqOfSwap of the Option numbered as seqOfOpt, by transferring the Target Share and releasing the Pledged Share.

---

| |
|:---|
| 205 |
| *[**Table of Contents**](#Toc)* |

---

![](oaprocess-13.jpg)

---

| |
|:---|
| 206 |
| *[**Table of Contents**](#Toc)* |

---

 **8. CBP And Economic Model**

To measure and collect license fees for authors, the system introduced an ERC-20 token ---- "**ComBoox Points**" ("**CBP**").

**The Attributes and Specifications of CBP** Name: ComBooxPoints Symbol: CBP Standard: ERC20 Book-Entry Contract: RegCenter Unit: CBP Minimum unit: Lee Conversion formula: 1 CBP = 10^18 Lee

 **CBP** does **NOT** represent any equity share or ownership share of any entities, and does **NOT** have any beneficiary interests of equity or trust, which is only aimed to collect license fees for smart contracts in **ComBoox**. The value of **CBP** may fluctuate from time to time depending on the number of users and registered companies in **ComBoox**, which may reflect the value change of the smart contracts concerned with respect to their intellectual property rights.

---

| |
|:---|
| 207 |
| *[**Table of Contents**](#Toc)* |

---

In order to reduce the **uncertainty of CBP prices**, especially to avoid the risk of "**price increase**" brought about by the increase in user stickiness, we deliberately adopts a basic pricing model of "**Fixed Maximum Price, Adjustable Promotion Policy**".

**ComBoox's economic model** and **license fee** can be summarized as follows:

 **8.1. Rate of Royalty**

The **author** may set the rate of royalty for any write APIs of the **contract templates**. Each time a user calls the said API to exercise rights, a calculated license fee will be transferred from its account to the **author's account**. Once set, the rate will be fixed on the particular **contract template**, based on which, **clone contracts** will inherit the same **rate of royalty**.

 **8.2. Collection of License Fee**

When a **user** exercise rights by calling a contract's chargeable API, the contract will automatically call **Reg Center** to query the caller's user number. Thereafter, the **Register** will charge a specific amount of **CBP** from the caller's **Prime Key** account based on the rate of royalty set in the template, and pay to the **author**.

 **8.3. Commission of Platform**

For each license fee payment, **ComBoox** charges a commission of up to 20%, which is directly transferred to the **Owner** of **ComBoox**. From time to time, **ComBoox** may revise its promotional policies to reduce the commission rate or establish a minimum royalty rate to ensure coverage of its operational costs. As such, while the platform's maximum commission rate is fixed at 20%, the actual amount payable may vary based on applicable discount policies.

---

| |
|:---|
| 208 |
| *[**Table of Contents**](#Toc)* |

---

 **8.4. Promotion Policy**

**Author** may create or adjust its license fee at any time by providing users a certain amount of **coupon** or a certain rate of **quantity discount.** Therefore, the original royalty rate set by author when deploying template actually is the ceiling rate.

 **License Fee Payable = Royalty Rate - Total Coupon - Number of Calls \* Quantity Discount Rate** 

---

| |
|:---|
| **Function of _chargeFee** |
| function _chargeFee(<br> address targetAddr, <br> uint fee, <br> address authorAddr,<br> UsersRepo.Key memory rr ) private {<br> UsersRepo.User storage t = _getUserByNo(_getUserNo(targetAddr));<br> address ownerAddr = getOwner();<br> UsersRepo.Rule memory pr = getPlatformRule();<br> uint floorPrice = uint(pr.floor) \* 10 \*\* 9;<br> require(fee >= floorPrice, "RC.chargeFee: lower than floor");<br> uint offAmt = uint(t.primeKey.coupon) \* uint(rr.discount) <br> \* fee / 10000 + uint(rr.coupon) \* 10 \*\* 9;<br> fee = (offAmt < (fee - floorPrice)) ? (fee - offAmt) : floorPrice;<br> uint giftAmt = uint(rr.gift) \* 10 \*\* 9;<br> if (ownerAddr == authorAddr \|\| pr.rate == 2000) {<br> if (fee > giftAmt)<br> _transfer(t.primeKey.pubKey, authorAddr, fee - giftAmt);<br> } else {<br> _transfer(t.primeKey.pubKey, ownerAddr, fee \* (2000 - pr.rate) / 10000);<br> uint balaceAmt = fee \* (8000 + pr.rate) / 10000;<br> if (balaceAmt > giftAmt)<br> _transfer(t.primeKey.pubKey, authorAddr, balaceAmt - giftAmt);<br> }<br> t.primeKey.coupon++;<br> } |

---

---

| |
|:---|
| 209 |
| *[**Table of Contents**](#Toc)* |

---

 **8.5. New User's Gift**

**ComBoox** may introduce promotion policy to give a certain amount of CBP as gift to newly registered **external accounts** from time to time. For details of promotion policy, users can call "Get Platform Rule" API of **Reg Center** to check details.

 **8.6. Transfer of Smart Contracts' Copyright**

Smart contracts' **Author** can freely transfer the templates' copyright to other users. After transfer, license fee for these smart contracts will be paid to **prime key** address of the transferee. The transferee will then be entitled to further transfer the copyright to other users.

---

| |
|:---|
| **Function of TransferIPR** |
| function transferIPR(<br> Repo storage repo,<br> uint typeOfDoc,<br> uint version,<br> uint transferee,<br> uint caller ) public {<br> require (caller == getAuthor(repo, typeOfDoc, version),<br> "DR.transferIPR: not author");<br> repo.heads[repo.bodies[typeOfDoc][version][0].addr].author <br> = uint40(transferee);<br> } |

---

---

| |
|:---|
| 210 |
| *[**Table of Contents**](#Toc)* |

---

 **8.7. Transfer of System's ownership**

**ComBoox's Owner** can also transfer its ownership to other accounts, thereby transferring the creditor's right to receivables of platform commission.

---

| |
|:---|
| **Function of TransferOwnership** |
| function transferOwnership(<br> Repo storage repo, <br> address newOwner, <br> address msgSender) public onlyOwner(repo, msgSender) {<br> repo.users[1].primeKey.pubKey = newOwner;<br> } |

---

---

| |
|:---|
| 211 |
| *[**Table of Contents**](#Toc)* |

---

 **9. Financial Records**

**ComBoox** adopts ETH and USDC as special "general equivalence" to pay for new share subscription or share transfer consideration. It also allows companies booked in the system to transfer ETH / USDC respectively, or to pay ETH together with calling external smart contracts to pay for the cost or consideration of legal actions.

To facilitate automatic bookkeeping of the financial records of these activities, the system set up special events in the smart contracts of the **General Keeper**, **Sub-Keepers** and **Cashier**, so that the financial records of these payment activities can be retrieved and summarized in real time automatically.

 **9.1. Exchange Rate**

**9.1.1. ETH/Fiat Currency** 

When creating registration books in the system, the company concerned can set its book keeping currency. Currently, the following currencies are acceptable to the system: RMB, USD, JPY, EUR, GBP and some other fiat currencies of major countries. During the equity transaction, the system will automatically call the Chain Link Price Feed service to query the exchange rate between the bookkeeping currency and ETH, and then automatically calculate and deliver ETH according to the amount of the fiat currency of the transaction, delivery versus payment.

---

| |
|:---|
| 212 |
| *[**Table of Contents**](#Toc)* |

---

**9.1.2. ETH/CBP** 

The system offers **CBP** to the public through the smart contract of Fuel Tank, at the ETH/CBP exchange rate that is determined by the **Owner** of the **Platform**. Currently, the exchange rate is 1:1, which can be retrieved in real time by users.

**9.1.3. USDC**

The price of **USDC** is deemed to be always $1.00 per unit.

---

| |
|:---|
| 213 |
| *[**Table of Contents**](#Toc)* |

---

 **9.2. CBP Flow Records**

As an ERC-20 token, CBP's income and expenditure are booked in the Registration Center, which automatically records the sender, recipient and amount of each transaction Users can further distinguish the CBP payments with respect to their detailed scenarios and reasons according to the identity of the payer and payee. For example, when the payer is "zero" address, it means the Platform minted coins to the payee.

---

| |
|:---|
| **CBP Transfer Event** |
| event Transfer(address indexed from, address indexed to, uint256 indexed value); |

---

---

| |
|:---|
| 214 |
| *[**Table of Contents**](#Toc)* |

---

 **9.3. ETH Flow Records**

It is only **General Keeper** that has API for equity trading transactions to be settled in ETH. Therefore, ETH paid together with the transaction is also directly received by **General Keeper**. After that, **General Keeper** will route the relevant equity transaction command to the specific **Sub-Keeper**, and the **Sub-Keeper** will further retrieve the involving parties' user number and calculate their respective attributable amount of ETH, and return the relevant information back to **General Keeper**. Finally, **General Keeper** will allocate the ETH received to the specific users' deposit account or custody account according to the feedback information from **Sub-Keeper**.

For example, when a buyer pays the consideration of a share transfer deal in ETH, **General Keeper** will receive and store the ETH paid with the command, and then route the calling command to the **ROA Keeper**, which will calculate the total amount of the share transfer transaction, call the Chain Link Price Feed service to query the ETH exchange rate at that time, and then send the ETH records booking instruction back to **General Keeper**. Thereafter, **General Keeper** will credit the amount of ETH equivalent to the total transaction price to the seller's deposit account as consideration, and credit the amount of ETH exceeding the transaction's consideration to the buyer's deposit account as over paid balance.

---

| |
|:---|
| 215 |
| *[**Table of Contents**](#Toc)* |

---

**9.3.1. ETH Inflow**

For ETH paid to the company such as paid-in contributions and equity subscriptions, the **Sub-Keeper** will only record the reason for the payment through the event log, and the **General Keeper** will not allocate such ETH to the deposit account or the custody account.

---

| | | |
|:---|:---|:---|
| **ETH Inflow Events List** | **ETH Inflow Events List** | **ETH Inflow Events List** |
| **Scenario** | **Sub-Keeper** | **Event** |
| Pay In Contribution for Capital Increase Deal | ROA Keeper | event PayOffCIDeal(uint indexed caller, uint indexed valueOfDeal) |
| Pay In Capital Contribution | ROM Keeper | event PayInCapital (uint indexed seqOfShare, uint indexed amt, uint indexed valueOfDeal) |
| Close New Share Issue Order | LOO Keeper | event CloseBidAgainstInitOffer(uint indexed buyer, uint indexed amt); |

---

**9.3.2. ETH Outflow**

Payments of the Company are all subject to the approval of the **General Meeting of Members** or the **Board of Directors** in accordance with the corporate governance process stipulated in the **Shareholders Agreement**, which are essentially the process of implementing the resolutions of the **General Meeting of Members** or the ones of the **Board of Directors**.

---

| | | |
|:---|:---|:---|
| **ETH Outflow Events List** | **ETH Outflow Events List** | **ETH Outflow Events List** |
| **Scenario** | **Sub-Keeper** | **Events** |
| Payment approved by the General Meeting of Members | GMM Keeper | event TransferFund(address indexed to, bool indexed isCBP, uint indexed amt, uint seqOfMotion, uint caller) |
| Execute actions approved by the General Meeting of Members | GMM Keeper | event ExecAction(address indexed targets, uint indexed values, bytes indexed params, uint seqOfMotion, uint caller) |
| Distribute profits | GMM Keeper | event DistributeProfits(uint256 indexed sum, uint indexed seqOfMotion, uint indexed caller); |
| Payment approved by the Board of Directors | BMM Keeper | event TransferFund(address indexed to, bool indexed isCBP, uint indexed amt, uint seqOfMotion, uint caller) |
| Execute actions approved by the Board of Directors | BMM Keeper | event ExecAction(address indexed targets, uint indexed values, bytes indexed params, uint seqOfMotion, uint caller) |

---

---

| |
|:---|
| 216 |
| *[**Table of Contents**](#Toc)* |

---

**9.3.3. ETH Deposit**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(1) Save To Coffer Function**

The **General Keeper** manages the transfer and accounting activities of ETH payments through the function of Save To Coffer. This function only records the recipient's user number, the specific amount and the reason of payment. Among them, the reason of payment is recorded the summary description of the relevant payment reason in the format of Bytes32 in ASCII coding.

---

| |
|:---|
| **Function of SaveToCoffer** |
| function saveToCoffer(uint acct, uint value, bytes32 reason) external {<br> require(msg.sender == _keepers[4] \|\|<br> msg.sender == _keepers[5] \|\|<br> msg.sender == _keepers[6] \|\|<br> msg.sender == _keepers[7] \|\|<br> msg.sender == _keepers[10], <br> "GK.saveToCoffer: not correct Keeper");<br> require(address(this).balance >= _coffers[0] + value,<br> "GK.saveToCoffer: insufficient Eth");<br> _coffers[acct] += value;<br> _coffers[0] += value;<br> emit SaveToCoffer(acct, value, reason);<br> } |

---

ETH deposited in a user's deposit account can only be exclusively picked up by such user by calling the Pickup Deposit Function of the General Keeper, and cannot be misappropriated or withdrawn by any other account.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(2) Pickup Deposit Function**

---

| |
|:---|
| **Function of PickupDeposit** |
| function pickupDeposit() external isNormal{<br> uint caller = _msgSender(msg.sender, 18000);<br> uint value = _coffers[caller];<br> if (value > 0) {<br> _coffers[caller] = 0;<br> _coffers[0] -= value;<br> Address.sendValue(payable(msg.sender), value);<br> emit PickupDeposit(msg.sender, caller, value);<br> } else revert("GK.pickupDeposit: no balance");<br> } |

---

---

| |
|:---|
| 217 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(3) Deposit Reasons**

The ETH deposit reasons, the brief description concerned, as well as the corresponding ASCII code are listed as follows:

---

| | | | |
|:---|:---|:---|:---|
| **Deposit Reasons List** | **Deposit Reasons List** | **Deposit Reasons List** | **Deposit Reasons List** |
| **Scenario** | **Sub Keeper** | **Brief Description** | **ASCII Code (Bytes32 in Hex)** |
| Profits Distribution | GMMKeeper | DistributeProfits | 0x4469737472696275746550726f66697473000000000000000000000000000000 |
| Deposit Sell Order's Consideration | LOOKeeper | CloseBidAgainstOffer | 0x436c6f7365426964416761696e73744f66666572000000000000000000000000 |
| Deposit Buy Order's Overpaid Balance | LOOKeeper | DepositBalanceOfBidOrder | 0x4465706f73697442616c616e63654f664269644f726465720000000000000000 |
| Deposit Share Transfer Consideration | ROAKeeper | DepositConsiderationOfSTDeal | 0x4465706f736974436f6e73696465726174696f6e4f6653544465616c00000000 |
| Deposit Share Transfer Overpaid Balance | ROAKeeper | DepositBalanceOfOTCDeal | 0x4465706f73697442616c616e63654f664f54434465616c000000000000000000 |
| Deposit Paid In Contribution Balance | ROMKeeper | DepositBalanceOfPayInCap | 0x4465706f73697442616c616e63654f66506179496e4361700000000000000000 |
| Deposit Swap Deal Consideration | ROOKeeper | DepositConsiderationOfSwap | 0x4465706f736974436f6e73696465726174696f6e4f6653776170000000000000 |
| Deposit Swap Deal Over Paid Balance | ROOKeeper | DepositBalanceOfSwap | 0x4465706f73697442616c616e63654f6653776170000000000000000000000000 |
| Deposit Rejected Deal Consideration | ROOKeeper | DepositConsiderOfRejectedDeal | 0x4465706f736974436f6e73696465724f6652656a65637465644465616c000000 |
| Deposit Rejected Deal Overpaid Balance | ROOKeeper | DepositBalanceOfRejectedDeal | 0x4465706f73697442616c616e63654f6652656a65637465644465616c00000000 |

---

---

| |
|:---|
| 218 |
| *[**Table of Contents**](#Toc)* |

---

**9.3.4. ETH Escrow Records**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(1) Escrow ETH**

The system allows verified investors to trade the equity shares of the registered companies in the smart contract of **List of ETH Orders** with six types of orders: limited buy order, market buy order, limited sell order, market sell order, limited issue order, and market issue order. When listing a limited buy order, the system needs to deposit the ETH paid by the buyer into the escrow account as margin.

When depositing margin, the system still calls the function of **Save To Coffer** of the **General Keeper**, except that the buyer's user number will be duplicated twice and linked together as the account holder. This allows different users to be distinguished and prevents the margin from being taken out by the user himself or any other user.

---

| |
|:---|
| **Example of Deposit Margin Algorithm** |
| uint acct = bid.buyer;<br> acct = (acct << 40) + acct;<br> _gk.saveToCoffer(<br> acct, bid.consideration,<br> bytes32(0x437573746f647956616c75654f664269644f7264657200000000000000000000)); // CustodyValueOfBidOrder |

---

---

| |
|:---|
| 219 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(2) Release ETH**

When a sell order or issue order is listed, the system will take the lead in matching the transaction with the existing listed buy orders, and after the transaction is closed, the margin locked up with the buy order will be released to the seller's deposit account as consideration, or to the company as capital contribution.

Upon releasing the margin, the **Release Custody** function of **General Keeper** will be called, through the events of which the payer, payee, amount, and reason of the payment will automatically be recorded. Similar to **Save To Coffer**, a summary description of the reason of payment will be saved in ASCII code via a Bytes32 fixed-length array.

---

| |
|:---|
| **ReleaseCustody Function** |
| function releaseCustody(uint from, uint to, uint amt, bytes32 reason) external isNormal {<br> require (msg.sender == _keepers[10], "GK.releaseCustody: wrong Keeper");<br> uint acct = (from << 40) + from; <br> uint value = _coffers[acct];<br> require (value >= amt, "GK.releaseCusotody: insufficient");<br> _coffers[acct] -= amt;<br> if (to > 0) { _coffers[to] += amt;<br> } else { _coffers[0] -= amt;}<br> emit ReleaseCustody(from, to, amt, reason);<br> } |

---

---

| |
|:---|
| 220 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(3) Reason of ETH Escrow**

The table below provides a summary of the Sub-Keeper, reasons for custody or releasing ETH margin and their ASCII codes.

---

| | | | |
|:---|:---|:---|:---|
| **Reason of Escrow** | **Reason of Escrow** | **Reason of Escrow** | **Reason of Escrow** |
| **Scenario** | **Sub Keeper** | **Brief Description** | **ASCII Code (Bytes32 in Hex)** |
| Deposit Buy Order Margin | LOO Keeper | CustodyValueOfBidOrder | 0x437573746f647956616c75654f664269644f7264657200000000000000000000 |
| Release Margin to Company | LOO Keeper | CloseInitOfferAgainstBid | 0x436c6f7365496e69744f66666572416761696e73744269640000000000000000 |
| Release Margin to Seller | LOO Keeper | CloseOfferAgainstBid | 0x436c6f73654f66666572416761696e7374426964000000000000000000000000 |
| Refund Buy Order Margin | LOO Keeper | RefundValueOfBidOrder | 0x526566756e6456616c75654f664269644f726465720000000000000000000000 |

---

---

| |
|:---|
| 221 |
| *[**Table of Contents**](#Toc)* |

---

 **9.4. USDC Flow Records**

Only the **USD Keeper** provides API for equity trading transactions in **USDC**, and, **Cashier** holds, receives, forwards, transfers, or distributes the **USDC** paid in connection with these transactions, and is also responsible for recording all such **USDC** payment activities.

**9.4.1. USDC Inflow**

For USDC paid to the company such as paid-in contributions and equity subscriptions, the **Cashier** will only record the reason for the payment through the event log, and will not allocate such USDC to the deposit account or the escrow account.

**9.4.2. Collect USD Function**

---

| |
|:---|
| **Function of collectUsd (Cashier)** |
| function collectUsd(TransferAuth memory auth, bytes32 remark) external anyKeeper {<br> _transferWithAuthorization(auth);<br> emit ReceiveUsd(auth.from, auth.value, remark);<br> } |

---

**9.4.2. USDC Outflow**

In addition to the **USDC Distribution** scenario described in section (1), any other **USDC** payments of a company shall also be subject to the approval of the **General Meeting of Members** or the **Board of Directors** in accordance with the corporate governance process stipulated in the **Shareholders Agreement**, which are essentially the process of implementing the resolutions of the **General Meeting of Members** or the ones of the **Board of Directors**.

The authorized executor needs to call the function of **ExecAction** or **ExecActionOfGM** of **General Keeper**, so as to further invoke the function of **TransferUSD** of **Cashier** to make the payment.

---

| |
|:---|
| 222 |
| *[**Table of Contents**](#Toc)* |

---

**9.4.3. USDC Deposit Records**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(1) Distribute USD Function**

As the price of USDC is deemed to be $1.00 per unit, no balance or change will be generated for payments made in USDC. Any consideration or refund will be settled directly to the relevant user's account.

However, in the event that any USDC is distributed by a company to its Members, the corresponding amounts will be allocated under each Member's User Number in a private mapping called "_lockers". Thereafter, Members may retrieve their allocated deposits at their discretion at any time.

---

| |
|:---|
| **Mapping _lockers & Function of distributeUsd (Cashier)** |
| mapping(uint => uint) private _lockers;<br> function distributeUsd(uint amt) external {<br> require(msg.sender == address(_gk), "Cashier.DistrUsd: not GK");<br> require(balanceOfComp() >= amt, "Cashier.DistrUsd: insufficient amt");<br> IRegisterOfMembers _rom = _gk.getROM();<br> uint[ ] memory members = _rom.membersList();<br> uint len = members.length;<br> uint totalPoints = _rom.ownersPoints().points;<br> uint sum = 0;<br> while (len > 1) {<br> uint member = members[len - 1];<br> uint pointsOfMember = _rom.pointsOfMember(member).points;<br> uint value = pointsOfMember \* amt / totalPoints;<br> _lockers[member] += value;<br> _lockers[0] += value;<br> sum += value;<br> len--;<br> }<br> _lockers[members[0]] += (amt - sum);<br> _lockers[0] += (amt - sum);<br> emit DistributeUsd(amt);<br> } |

---

---

| |
|:---|
| 223 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(2) Pickup USD Function**

USDC deposited in a user's deposit account can only be exclusively picked up by such user by calling the Pickup USD Function of the Cashier, and cannot be misappropriated or withdrawn by any other account.

---

| |
|:---|
| **Function of pickupUsd (Cashier)** |
| function pickupUsd() external {<br> uint caller = _msgSender(msg.sender, 18000);<br> uint value = _lockers[caller];<br> if (value > 0) {<br> _lockers[caller] = 0;<br> _lockers[0] -= value;<br> emit PickupUsd(msg.sender, caller, value);<br> require(_usd().transfer(msg.sender, value), "Cashier.PickupUsd: transfer failed");<br> } else revert("Cashier.pickupDeposit: no balance");<br> } |

---

---

| |
|:---|
| 224 |
| *[**Table of Contents**](#Toc)* |

---

**9.4.4. USDC Escrow Records**

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(1) Escrow USDC**

The system allows verified investors to trade the equity shares of the registered companies in the smart contract of **List of USD Orders** with six types of orders: limited buy order, market buy order, limited sell order, market sell order, limited issue order, and market issue order. When listing a limited buy order, the system needs to deposit the USDC paid by the buyer into the escrow account as margin.

When depositing margin, the system will call the function of **Custody USD** of **Cashier**, and deposit the relevant amount into a private mapping called "_coffers". This allows different users to be distinguished and prevents the margin from being taken out by the user himself or any other user.

---

| |
|:---|
| **Mapping _coffers & Function of custodyUsd (Cashier)** |
| mapping(address => uint) private _coffers;<br> function _transferWithAuthorization(TransferAuth memory auth) private {<br> _usd().transferWithAuthorization(<br> auth.from, <br> address(this), <br> auth.value,<br> auth.validAfter, <br> auth.validBefore, <br> auth.nonce, <br> auth.v,<br> auth.r,<br> auth.s);<br> }<br> function custodyUsd(TransferAuth memory auth, bytes32 remark) external anyKeeper {<br> _transferWithAuthorization(auth);<br> _coffers[auth.from] += auth.value;<br> _coffers[address(0)] += auth.value;<br> emit CustodyUsd(auth.from, auth.value, remark);<br> } |

---

---

| |
|:---|
| 225 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(2) Release USDC** 

When a sell order or issue order is listed, the system will take the lead in matching the transaction with the existing listed buy orders, and after the transaction is closed, the margin locked up with the buy order will be released to the seller's deposit account as consideration, or to the company as capital contribution.

Upon releasing the margin, the **Release USD** function of **Cashier** will be called, through the events of which the payer, payee, amount, and reason of the payment will automatically be recorded. Similar to **Save To Coffer**, a summary description of the reason of payment will be saved in ASCII code via a Bytes32 fixed-length array.

---

| |
|:---|
| **Function of releaseUsd (Cashier)** |
| function releaseUsd(address from, address to, uint amt, bytes32 remark) external anyKeeper {<br> require(_coffers[from] >= amt, "Cashier.ReleaseUsd: insufficient amt");<br> _coffers[from] -= amt;<br> _coffers[address(0)] -= amt;<br> emit ReleaseUsd(from, to, amt, remark);<br> require(_usd().transfer(to, amt), "Cashier.releaseUsd: transfer failed");<br> } |

---

---

| |
|:---|
| 226 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **(3) Reason of USDC Escrow**

The table below provides a summary of the reasons for escrow or releasing USDC margin and their ASCII codes.

---

| | | |
|:---|:---|:---|
| **Reason of Escrow** | **Reason of Escrow** | **Reason of Escrow** |
| **Scenario** | **Brief Description** | **ASCII Code (Bytes32 in Hex)** |
| Deposit Buy Order Margin | CustodyValueOfBid | 0x437573746f647956616c75654f66426964000000000000000000000000000000 |
| Release Margin to Company | CloseInitOfferAgainstBid | 0x436c6f7365496e69744f66666572416761696e73744269640000000000000000 |
| Release Margin to Seller | CloseOfferAgainstBid | 0x436c6f73654f66666572416761696e7374426964000000000000000000000000 |
| Refund Buy Order Margin | RefundValueOfBidOrder | 0x526566756e6456616c75654f664269644f726465720000000000000000000000 |

---

---

| |
|:---|
| 227 |
| *[**Table of Contents**](#Toc)* |

---

 **10. Key Legal Issues**

When start using **ComBoox** to book equity shares and corporate governance records, you may consider several key legal issues as follows:

 **10.1. Digital Identification Mechanism VS. Real-Name Requirements**

There is a distance between digital identification mechanism of **ComBoox** and real-name requirements in various countries. **ComBoox** takes the EVM account address as the basis of user identification, and does not verify the user's social identity such as name, nationality, or residence etc., which has a distance to the real-name requirements of various jurisdictions with respect to finance, securities, foreign exchange, tax, investor suitability, and anti-money laundering.

Not directly managing users' social identity information is certainly related to the characteristics of blockchain technology, but more importantly, it is conducive to effectively protecting personal privacy, business secrets and other information in the open public blockchain environment.

Even though there exists a distance between digital identification and real-name requirements, while, distance does not mean impossible. Stakeholders of a company can surely cooperate together to register and maintain their social identities in accordance with the legal requirements of the relevant jurisdictions of registration, operation or transaction, and to effectively connect their on-chain digital identity with their real world social identities, so as to satisfy the mandatory real-name requirements of the relevant laws and regulations.

---

| |
|:---|
| 228 |
| *[**Table of Contents**](#Toc)* |

---

Making full use of the rigid programming logic of blockchain and smart contracts to realize the concept of "**Code is Law**", thereby effectively overcoming or even fundamentally solving the problems caused by human interference, and enhancing equity value by leveraging the great support of the massive liquidity of crypto markets. All Benefits and advantages brought by blockchain technologies can certainly outweigh costs and expenses incurred by satisfying the real-name requirement.

No matter it is to anti-tax avoidance, anti-money laundering, counter-terrorism financing, to protect financial consumers' rights and interests, to maintain foreign exchange order, or to protect monetary sovereignty, real-name requirements always have their specific legislation purpose and specific interests protection objects. As long as these legislative purposes can be effectively achieved through scientific methods, and the rights and interests of the subjects can be effectively protected, on-chain corporate governance and compliance operation goals can be perfectly combined ultimately.

---

| |
|:---|
| 229 |
| *[**Table of Contents**](#Toc)* |

---

 **10.2. Real Time Information Disclosure VS. Trade Secret Protection**

Blockchain's technical features determine that once equity shares and corporate behaviors are booked on chain, such records will become publicly aware and cannot be kept as confidential information in traditional way.

However, equity shares and corporate governance records, by nature, shall be public information and should not be regarded as trade secrets. By means of public registration system to ensure a proper transparency of corporate governance, so as to protect rights of creditors, bona fide third parties and other external stakeholders, to establish the fiduciary duties of managers to shareholders, and to determine the apparent agency relationship between managers and the company, these are the general legal principles that most countries adopted to regulate the external legal relationships of companies as per their prevailing commercial laws. It is also a fundamental reason why the public registration system of company archives has been established in so many countries.

Usually, what are protected as trade secrets are usually confidential information that has monopoly legitimacy and commercial value, such as intellectual property rights, major transactions pricing, etc. Most corporate governance documents and most contents thereof obviously do not belong to this category.

For those parts of corporate governance documents that really need to be kept confidential, other workarounds can be used to deal with them, thereby resolving the conflict between information confidentiality and governance behavior on chain.

---

| |
|:---|
| 230 |
| *[**Table of Contents**](#Toc)* |

---

For example, encrypt the electronic document with natural language first, and then upload the encrypted file to the IPFS, and finally use the CID hash as the content index to be stored on blockchain. In this way, the confidentiality of trade secrets can be satisfied on the one hand, and corporate governance behaviors such as company decisions and shareholder resolutions can be kept on the blockchain on the other, and the original text of confidential information can be retrieved, downloaded, decrypted, and restored from IPFS when necessary, so as to verify the consistency of decision-making results with the subject contents reviewed. With this approach, corporate governance can maintain openness and standardization while achieving effective protection of trade secrets, avoiding the use of "confidentiality" as an excuse to circumvent the voting process on blockchain, or sacrificing the commercial interests of confidential information because of voting on blockchain.

Therefore, the distance between information disclosure on blockchain and the trade secret protection can be solved by smart contracts. While ensuring the information security, the transparency and non-tamperability of blockchain can be well utilized to achieve transparency and standardization of corporate governance.

---

| |
|:---|
| 231 |
| *[**Table of Contents**](#Toc)* |

---

 **10.3. Internal Book-Entry Records VS. Public Registration Information**

Public registration system has been widely adopted in various countries as a basic legal principle to maintain the commercial order. At the same time, company laws usually require companies to properly manage corporate governance documents such as the register of shares, register of members, general meetings minutes, register of directors, etc. to ensure the transparency and legality of company operations.

So, if there are any discrepancies between the internal governance records managed by**ComBoox a**nd the company files in public registration authority, which one should prevail and will it give rise to a conflict of laws?

In international judicial practices, the delivery of equity and the establishment of shareholder identity are often determined on company's internal legal behaviors, such as issuing a capital certificate or recording names of shareholders in the register of members. In other words, when regulating the "internal" equity investment relationship between shareholders and the company, and when judging the delivery time of the "internal" contractual relationship between the buyers and sellers of equity transactions, the company's internal files are often the decisive basis for judgment. Therefore, it can also be generally understood that the company's internal files are the "effective basis" for judging equity establishment and equity delivery, and are the fundamental basis for handling internal investment relationships and internal contract relationships.

On the other hand, when a creditor relies on the public information to claim that shareholders shall implement capital contribution obligation, the stock investors claim that the managers of a listed company shall bear their fiduciary duties, bona fide third party claims that a contract signed by directors shall bind the company, the internal files' records (such as equity shares have been transferred, managers have resigned etc.) cannot be used as a defensive reason then. Judicial practice often determines the attribution of liability and the establishment of an apparent agency relationship based on the public registration information. Therefore, the publicly registered company records are the "confrontational basis" for judging the attribution of responsibilities and adversarial legal claims, and are the fundamental basis for handling the company's external relationship of creditors' rights or apparent agencies.

---

| |
|:---|
| 232 |
| *[**Table of Contents**](#Toc)* |

---

Therefore, the internal files managed by the company do not conflict with the officially registered company records, but play different legal roles at different levels. Moreover, this problem is not a new problem brought by **ComBoox** or blockchain technology, but an inherent legal problem that has existed for a long time. Existing legal principles, legal norms and judicial practices have mature rules and jurisprudence to solve them. The internal company records confirm the shareholder's identity, allocate the ownership of shares, and regulate the internal legal relationship of a company; public registration records deal with credit relationship, insolvency liability and apparent agents, and regulate external legal relationship for a company. The two records system together constitute the legal system of corporate governance, are interconnected and complementary, and jointly ensure the legality and transparency of company operations.

It is worth noting that most countries require companies to update their public registration information in a timely manner in event of changes in shareholdings, managers or major company governance decisions, thus ensuring the consistency of the internal file and the official registry, which proves that both records are well coexisting and complementing with each other.

Therefore, if a company adopts **ComBoox** to manage its internal records on blockchain, it will not create a legal conflict with the information in official public registration system. Moreover, if **ComBoox** solution is widely used, it is likely to promote or even revolutionize existing public registration system, and may lead to the integration of two records system into one.

---

| |
|:---|
| 233 |
| *[**Table of Contents**](#Toc)* |

---

 **10.4. Give Legal Effects to On-Chain Books**

In brief, through constitutional documents like articles of association or bylaws, the company needs to give on-chain books special legal effects from the following aspects:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) **Registers of Interests**: The contents of **Register of Shares**, **Register of Pledges** and **Register of Options** directly reflect property rights and interests. Therefore, it is necessary to clearly stipulate in the constitutional document that these on-chain **Registers** shall be regarded as the fundamental basis for the relevant rights and interests, so that changes in these **Registers** can directly lead to legal consequences of creation, modification, disposal or elimination of the relevant legal rights or legal relationships;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) **Registers of Governance Behaviors**: The core meaning of **Registers** of governance behaviors (like **Board Meeting Minutes**, **General Meeting Minutes**, or **Register of Directors**) is to record the expressions of intention, and the key points of recording the expressions of intention lies in confirming the binding forces of electronic signatures to their specific subjects, therefore, it needs to stipulate in the constitutional documents that:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a. calling commands relating to expressions of intention (such as signing documents, proposing motion, voting, taking office, resignation, etc.) signed (or triggered) by the parties through their electronic wallet (or private key) have legal binding forces upon the perpetrators;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b. on-chain timestamp recorded by the system shall be regarded as the time when the relevant legal behavior occurred;

---

| |
|:---|
| 234 |
| *[**Table of Contents**](#Toc)* |

---

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c. the hash digest value stored on-chain shall be regarded as the fundamental basis for verifying the integrity of the expression content; and

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d. legal documents that lack on-chain evidence (such as general meeting resolution, board meeting resolutions, or director's signature etc.) are not legally binding on the company.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) **Prevailing of Smart Contracts**: **Shareholders Agreements, Investment Agreements** and other smart contracts of the system will automatically control on-chain legal actions, and will directly result in legal consequences like equity changes, inauguration and resignation. Therefore, it's vital important to clearly specify in the company's constitutional document drafted in natural language that, in case any descriptions exist (in meaning or in logical) between the natural language documents and their corresponding on-chain smart contracts, the smart contracts shall prevail.

---

| |
|:---|
| 235 |
| *[**Table of Contents**](#Toc)* |

---

 **11. Software License**

**ComBoox Software License 1.0**

TERMS AND CONDITIONS FOR USE, REPRODUCTION AND DISTRIBUTION.

**1. Definition.**

"**Contributor**" shall mean copyright owner, and the other contribution owner and any individual or Legal Entity who have submitted the Work to the Copyright Owner and subsequently incorporated within the Work.

"**Contribution**" shall mean the original version of the Work and any additions to that Work, that is intentionally submitted to Contributor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner.

"**Legal Entity**" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"**License**" shall mean the terms and conditions for the permitted use as defined by this document.

"**Licensor**" shall mean the copyright owner and/or Legal Entity authorized by the copyright owner that is granting the License.

"**Permitted Use**" shall mean the acts of calling the smart contracts of **ComBoox** via their specific API to read or write data on the blockchain network where they were originally deployed by Contributor, and the acts of reproduction, distribution or presentation of the Work for purposes of research, verification or testing, on a computer not linking with any blockchain network, or on a local testing blockchain that consists of one or more nodes entirely and exclusively controlled by You.

---

| |
|:---|
| 236 |
| *[**Table of Contents**](#Toc)* |

---

"**Work**" or ("**ComBoox**") shall mean the ComBoox system, a blockchain based statutory books keeping system, consisting of a series of smart contracts, including all Contribution(s).

"**You**" shall mean an individual or Legal Entity exercising permissions granted by this License.

**2. Grant of License**

Subject to the terms and conditions of this License, each Contributor hereby grants to you a worldwide, non-exclusive copyright License for the Permitted Use of Work.

**3. No Trademark License**

No trademark license is granted to use the trade names, trademarks of Contributor, except as required for reasonable and customary use in describing the origin of the Work.

**4. Prohibition**

Unless expressly permitted in this License or other agreements, You are prohibited from:

Deploying the smart contracts of ComBoox, in whole or in part, for whatever purpose, on any blockchain network that has one or more nodes out of your control;

Modifying, translating, or creating derivative works based on the Work; or

Using or disposing of the Work in any illegal manner.

---

| |
|:---|
| 237 |
| *[**Table of Contents**](#Toc)* |

---

**5. Additional Terms**

If you intend to use the Licensed Work in a way that does not fully comply with the requirements stipulated in this License, please contact Contributor in advance to apply for a commercial license.

The Permitted Use and any Contributions to the Work must include a readable copy of this License (refer to the section below on Special Requirements On Reproduction or Distribution).

**6. Termination**

Any use of the Work in violation of this License will automatically terminate your rights under this License for the current and all other Work.

**7. Disclaimer of Warranty**

(1) Contributor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE WORK OR THE CONTRIBUTION, NO MATTER HOW IT'S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

---

| |
|:---|
| 238 |
| *[**Table of Contents**](#Toc)* |

---

(2) Although ComBoox provides some valuable Legal and Compliance solutions, whereas, it cannot ensure absolute compliance for any significant legal issues, please seek professional advice from legal experts of the relevant jurisdictions. IN NO EVENT SHALL ANY CONTRIBUTOR BE LIABLE FOR ANY DAMAGES caused by below issues:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i. AML/KYC Compliance: shall mean the mandatory legal requirements about identity verification and identity archives management, that various countries stipulated in the fields of financing, securities, investment, asset management, currency exchange, payment etc., for the purpose of investor suitability protection, anti-money laundering, anti-terrorist financing, anti-tax avoidance, and other related purposes,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ii. Securities Compliance: shall mean the mandatory legal requirements around securities issuance and/or transaction activities (such as reporting, filing, and disclosure) for the securities-type equity public offerings or specified private placement in terms of stocks, bonds, and other financing instruments in various countries; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iii. Data Compliance: shall mean the mandatory legal requirements for data processing activities in various countries, in order to protecting data security, personal information rights, national security and/or commercial secrets.

(3) As an infrastructure software, ComBoox cannot influence or control any behavior of its users or third parties. IN NO EVENT SHALL ANY CONTRIBUTOR BE LIABLE FOR ANY DAMAGES caused by below third party behavior:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i. Inaccurate, incomplete or untimely data uploaded/provided by users;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ii. A third party malicious attack, hack, tamper, intercept, or controls over the data against its owner's intention; or

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iii. The unavailability of the blockchain due to the failure of any external environment supplier, such as the unavailability of electrical power, internet connection, and/or any other similar public utilities or infrastructures failure caused by third parties' behavior or negligence.

---

| |
|:---|
| 239 |
| *[**Table of Contents**](#Toc)* |

---

**8. Language**

This License is written in English and Chinese; both shall have the same legal effect. In case of any discrepancies between the two versions, the English one shall prevail.

**9. Special Requirements On Reproduction or Distribution**

To reproduce or distribute this WORK, you are required to complete following steps:

Create a file named "LICENSE" which contains the whole context of this License in the first directory of your package;

Attach the statement to the appropriate annotated syntax at the beginning of each source file.

This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which can be obtained at:

[https://github.com/paul-lee-attorney/comboox]

THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.

YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR MORE NODES THAT ARE OUT OF YOUR CONTROL.

## Ex-32

# Souce Codes of ComBoox

---

| | |
|:---|:---|
| File Name | Path |
| [CreateNewComp.sol](#createnewcomp) | contracts/center/CreateNewComp.sol |
| [FuelTank.sol](#fueltank) | contracts/center/FuelTank.sol |
| [CashLockers.sol](#cashlockers) | contracts/center/CashLockers.sol |
| [ICashLockers.sol](#icashlockers) | contracts/center/ICashLockers.sol |
| [UsdFuelTank.sol](#usdfueltank) | contracts/center/UsdFuelTank.sol |
| [ICreateNewComp.sol](#icreatenewcomp) | contracts/center/ICreateNewComp.sol |
| [IRegCenter.sol](#iregcenter) | contracts/center/IRegCenter.sol |
| [RegCenter.sol](#regcenter) | contracts/center/RegCenter.sol |
| [PriceConsumer.sol](#priceconsumer) | contracts/center/Oracles/PriceConsumer.sol |
| [IPriceConsumer.sol](#ipriceconsumer) | contracts/center/Oracles/IPriceConsumer.sol |
| [IOwnable.sol](#iownable) | contracts/center/access/IOwnable.sol |
| [Ownable.sol](#ownable) | contracts/center/access/Ownable.sol |
| [IERC20.sol](#ierc20) | contracts/center/ERC20/IERC20.sol |
| [ERC20.sol](#erc20) | contracts/center/ERC20/ERC20.sol |
| [MockUSDC.sol](#mockusdc) | contracts/center/ERC20/MockUSDC.sol |
| [IERC20Metadata.sol](#ierc20metadata) | contracts/center/ERC20/IERC20Metadata.sol |
| [IUSDC.sol](#iusdc) | contracts/center/ERC20/IUSDC.sol |
| [Context.sol](#context) | contracts/center/ERC20/Context.sol |
| [BookOfDocs.sol](#bookofdocs) | contracts/center/books/BookOfDocs.sol |
| [IBookOfUsers.sol](#ibookofusers) | contracts/center/books/IBookOfUsers.sol |
| [BookOfPoints.sol](#bookofpoints) | contracts/center/books/BookOfPoints.sol |
| [BookOfUsers.sol](#bookofusers) | contracts/center/books/BookOfUsers.sol |
| [IBookOfDocs.sol](#ibookofdocs) | contracts/center/books/IBookOfDocs.sol |
| [IBookOfPoints.sol](#ibookofpoints) | contracts/center/books/IBookOfPoints.sol |
| [DealsRepo.sol](#dealsrepo) | contracts/lib/DealsRepo.sol |
| [MembersRepo.sol](#membersrepo) | contracts/lib/MembersRepo.sol |
| [MotionsRepo.sol](#motionsrepo) | contracts/lib/MotionsRepo.sol |
| [Checkpoints.sol](#checkpoints) | contracts/lib/Checkpoints.sol |
| [BallotsBox.sol](#ballotsbox) | contracts/lib/BallotsBox.sol |
| [ArrayUtils.sol](#arrayutils) | contracts/lib/ArrayUtils.sol |
| [DTClaims.sol](#dtclaims) | contracts/lib/DTClaims.sol |
| [MockFeedRegistry.sol](#mockfeedregistry) | contracts/lib/MockFeedRegistry.sol |
| [SafeBoxes.sol](#safeboxes) | contracts/lib/SafeBoxes.sol |
| [OfficersRepo.sol](#officersrepo) | contracts/lib/OfficersRepo.sol |
| [UsdOrdersRepo.sol](#usdordersrepo) | contracts/lib/UsdOrdersRepo.sol |
| [GoldChain.sol](#goldchain) | contracts/lib/GoldChain.sol |
| [TeamsRepo.sol](#teamsrepo) | contracts/lib/TeamsRepo.sol |
| [FRClaims.sol](#frclaims) | contracts/lib/FRClaims.sol |
| [UsersRepo.sol](#usersrepo) | contracts/lib/UsersRepo.sol |
| [PledgesRepo.sol](#pledgesrepo) | contracts/lib/PledgesRepo.sol |
| [Address.sol](#address) | contracts/lib/Address.sol |
| [UsdLockersRepo.sol](#usdlockersrepo) | contracts/lib/UsdLockersRepo.sol |
| [OrdersRepo.sol](#ordersrepo) | contracts/lib/OrdersRepo.sol |
| [EnumerableSet.sol](#enumerableset) | contracts/lib/EnumerableSet.sol |
| [SwapsRepo.sol](#swapsrepo) | contracts/lib/SwapsRepo.sol |
| [TopChain.sol](#topchain) | contracts/lib/TopChain.sol |
| [SharesRepo.sol](#sharesrepo) | contracts/lib/SharesRepo.sol |
| [CondsRepo.sol](#condsrepo) | contracts/lib/CondsRepo.sol |
| [RulesParser.sol](#rulesparser) | contracts/lib/RulesParser.sol |
| [SigsRepo.sol](#sigsrepo) | contracts/lib/SigsRepo.sol |
| [FilesRepo.sol](#filesrepo) | contracts/lib/FilesRepo.sol |
| [OptionsRepo.sol](#optionsrepo) | contracts/lib/OptionsRepo.sol |
| [RolesRepo.sol](#rolesrepo) | contracts/lib/RolesRepo.sol |
| [DocsRepo.sol](#docsrepo) | contracts/lib/DocsRepo.sol |
| [InvestorsRepo.sol](#investorsrepo) | contracts/lib/InvestorsRepo.sol |
| [LinksRepo.sol](#linksrepo) | contracts/lib/LinksRepo.sol |
| [DelegateMap.sol](#delegatemap) | contracts/lib/DelegateMap.sol |
| [LockersRepo.sol](#lockersrepo) | contracts/lib/LockersRepo.sol |
| [USDKeeper.sol](#usdkeeper) | contracts/comps/USDKeeper.sol |
| [GeneralKeeper.sol](#generalkeeper) | contracts/comps/GeneralKeeper.sol |
| [IUSDKeeper.sol](#iusdkeeper) | contracts/comps/IUSDKeeper.sol |
| [IGeneralKeeper.sol](#igeneralkeeper) | contracts/comps/IGeneralKeeper.sol |
| [ROOkeeper.sol](#rookeeper) | contracts/comps/keepers/ROOkeeper.sol |
| [IROPKeeper.sol](#iropkeeper) | contracts/comps/keepers/IROPKeeper.sol |
| [UsdROAKeeper.sol](#usdroakeeper) | contracts/comps/keepers/UsdROAKeeper.sol |
| [SHAKeeper.sol](#shakeeper) | contracts/comps/keepers/SHAKeeper.sol |
| [IROCKeeper.sol](#irockeeper) | contracts/comps/keepers/IROCKeeper.sol |
| [IUsdROAKeeper.sol](#iusdroakeeper) | contracts/comps/keepers/IUsdROAKeeper.sol |
| [RODKeeper.sol](#rodkeeper) | contracts/comps/keepers/RODKeeper.sol |
| [UsdROMKeeper.sol](#usdromkeeper) | contracts/comps/keepers/UsdROMKeeper.sol |
| [ROCKeeper.sol](#rockeeper) | contracts/comps/keepers/ROCKeeper.sol |
| [IRODKeeper.sol](#irodkeeper) | contracts/comps/keepers/IRODKeeper.sol |
| [IUsdLOOKeeper.sol](#iusdlookeeper) | contracts/comps/keepers/IUsdLOOKeeper.sol |
| [IROOKeeper.sol](#irookeeper) | contracts/comps/keepers/IROOKeeper.sol |
| [IUsdROMKeeper.sol](#iusdromkeeper) | contracts/comps/keepers/IUsdROMKeeper.sol |
| [ROPKeeper.sol](#ropkeeper) | contracts/comps/keepers/ROPKeeper.sol |
| [UsdLOOKeeper.sol](#usdlookeeper) | contracts/comps/keepers/UsdLOOKeeper.sol |
| [ISHAKeeper.sol](#ishakeeper) | contracts/comps/keepers/ISHAKeeper.sol |
| [ROMKeeper.sol](#romkeeper) | contracts/comps/keepers/ROMKeeper.sol |
| [BMMKeeper.sol](#bmmkeeper) | contracts/comps/keepers/BMMKeeper.sol |
| [GMMKeeper.sol](#gmmkeeper) | contracts/comps/keepers/GMMKeeper.sol |
| [LOOKeeper.sol](#lookeeper) | contracts/comps/keepers/LOOKeeper.sol |
| [IROAKeeper.sol](#iroakeeper) | contracts/comps/keepers/IROAKeeper.sol |
| [IGMMKeeper.sol](#igmmkeeper) | contracts/comps/keepers/IGMMKeeper.sol |
| [UsdROOKeeper.sol](#usdrookeeper) | contracts/comps/keepers/UsdROOKeeper.sol |
| [ILOOKeeper.sol](#ilookeeper) | contracts/comps/keepers/ILOOKeeper.sol |
| [ROAKeeper.sol](#roakeeper) | contracts/comps/keepers/ROAKeeper.sol |
| [IROMKeeper.sol](#iromkeeper) | contracts/comps/keepers/IROMKeeper.sol |
| [IUsdROOKeeper.sol](#iusdrookeeper) | contracts/comps/keepers/IUsdROOKeeper.sol |
| [IBMMKeeper.sol](#ibmmkeeper) | contracts/comps/keepers/IBMMKeeper.sol |
| [ICashier.sol](#icashier) | contracts/comps/books/cashier/ICashier.sol |
| [Cashier.sol](#cashier) | contracts/comps/books/cashier/Cashier.sol |
| [IRegisterOfOptions.sol](#iregisterofoptions) | contracts/comps/books/roo/IRegisterOfOptions.sol |
| [RegisterOfOptions.sol](#registerofoptions) | contracts/comps/books/roo/RegisterOfOptions.sol |
| [RegisterOfAgreements.sol](#registerofagreements) | contracts/comps/books/roa/RegisterOfAgreements.sol |
| [InvestmentAgreement.sol](#investmentagreement) | contracts/comps/books/roa/InvestmentAgreement.sol |
| [IRegisterOfAgreements.sol](#iregisterofagreements) | contracts/comps/books/roa/IRegisterOfAgreements.sol |
| [IInvestmentAgreement.sol](#iinvestmentagreement) | contracts/comps/books/roa/IInvestmentAgreement.sol |
| [IRegisterOfShares.sol](#iregisterofshares) | contracts/comps/books/ros/IRegisterOfShares.sol |
| [RegisterOfShares.sol](#registerofshares) | contracts/comps/books/ros/RegisterOfShares.sol |
| [ListOfProjects.sol](#listofprojects) | contracts/comps/books/lop/ListOfProjects.sol |
| [IListOfProjects.sol](#ilistofprojects) | contracts/comps/books/lop/IListOfProjects.sol |
| [RegisterOfDirectors.sol](#registerofdirectors) | contracts/comps/books/rod/RegisterOfDirectors.sol |
| [IRegisterOfDirectors.sol](#iregisterofdirectors) | contracts/comps/books/rod/IRegisterOfDirectors.sol |
| [RegisterOfConstitution.sol](#registerofconstitution) | contracts/comps/books/roc/RegisterOfConstitution.sol |
| [IShareholdersAgreement.sol](#ishareholdersagreement) | contracts/comps/books/roc/IShareholdersAgreement.sol |
| [IRegisterOfConstitution.sol](#iregisterofconstitution) | contracts/comps/books/roc/IRegisterOfConstitution.sol |
| [ShareholdersAgreement.sol](#shareholdersagreement) | contracts/comps/books/roc/ShareholdersAgreement.sol |
| [LockUp.sol](#lockup) | contracts/comps/books/roc/terms/LockUp.sol |
| [ILockUp.sol](#ilockup) | contracts/comps/books/roc/terms/ILockUp.sol |
| [IAlongs.sol](#ialongs) | contracts/comps/books/roc/terms/IAlongs.sol |
| [Alongs.sol](#alongs) | contracts/comps/books/roc/terms/Alongs.sol |
| [AntiDilution.sol](#antidilution) | contracts/comps/books/roc/terms/AntiDilution.sol |
| [Options.sol](#options) | contracts/comps/books/roc/terms/Options.sol |
| [IAntiDilution.sol](#iantidilution) | contracts/comps/books/roc/terms/IAntiDilution.sol |
| [IOptions.sol](#ioptions) | contracts/comps/books/roc/terms/IOptions.sol |
| [RegisterOfMembers.sol](#registerofmembers) | contracts/comps/books/rom/RegisterOfMembers.sol |
| [IRegisterOfMembers.sol](#iregisterofmembers) | contracts/comps/books/rom/IRegisterOfMembers.sol |
| [IRegisterOfPledges.sol](#iregisterofpledges) | contracts/comps/books/rop/IRegisterOfPledges.sol |
| [RegisterOfPledges.sol](#registerofpledges) | contracts/comps/books/rop/RegisterOfPledges.sol |
| [IUsdListOfOrders.sol](#iusdlistoforders) | contracts/comps/books/loo/IUsdListOfOrders.sol |
| [UsdListOfOrders.sol](#usdlistoforders) | contracts/comps/books/loo/UsdListOfOrders.sol |
| [IListOfOrders.sol](#ilistoforders) | contracts/comps/books/loo/IListOfOrders.sol |
| [ListOfOrders.sol](#listoforders) | contracts/comps/books/loo/ListOfOrders.sol |
| [IDraftControl.sol](#idraftcontrol) | contracts/comps/common/access/IDraftControl.sol |
| [DraftControl.sol](#draftcontrol) | contracts/comps/common/access/DraftControl.sol |
| [AnyKeeper.sol](#anykeeper) | contracts/comps/common/access/AnyKeeper.sol |
| [RoyaltyCharge.sol](#royaltycharge) | contracts/comps/common/access/RoyaltyCharge.sol |
| [IAccessControl.sol](#iaccesscontrol) | contracts/comps/common/access/IAccessControl.sol |
| [AccessControl.sol](#accesscontrol) | contracts/comps/common/access/AccessControl.sol |
| [SigPage.sol](#sigpage) | contracts/comps/common/components/SigPage.sol |
| [FilesFolder.sol](#filesfolder) | contracts/comps/common/components/FilesFolder.sol |
| [IFilesFolder.sol](#ifilesfolder) | contracts/comps/common/components/IFilesFolder.sol |
| [ISigPage.sol](#isigpage) | contracts/comps/common/components/ISigPage.sol |
| [IMeetingMinutes.sol](#imeetingminutes) | contracts/comps/common/components/IMeetingMinutes.sol |
| [MeetingMinutes.sol](#meetingminutes) | contracts/comps/common/components/MeetingMinutes.sol |

---

## CreateNewComp.sol

---

| |
|:---|
| **contracts/center/CreateNewComp.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./access/Ownable.sol";<br>import "./ICreateNewComp.sol";<br>contract CreateNewComp is ICreateNewComp, Ownable {<br>address immutable public usdc;<br>constructor(address _usdc) {<br> usdc = _usdc;<br> }<br>function createComp(address dk) external <br> {<br> address primeKeyOfOwner = msg.sender;<br>address gk = _createDocAtLatestVersion(20, primeKeyOfOwner);<br> IAccessControl(gk).initKeepers(address(this), gk);<br> IGeneralKeeper(gk).createCorpSeal();<br>address[16] memory keepers = <br> _deployKeepers(primeKeyOfOwner, dk, gk);<br>_deployBooks(keepers, primeKeyOfOwner, gk);<br>IAccessControl(gk).setDirectKeeper(dk);<br> }<br>function _deployKeepers(<br> address primeKeyOfOwner, address dk, address gk) private returns (address[16] memory keepers) {<br> keepers[0] = dk;<br> uint i = 1;<br> while (i < 11) {<br> keepers[i] = _createDocAtLatestVersion(i, primeKeyOfOwner);<br> IAccessControl(keepers[i]).initKeepers(gk, gk);<br> IGeneralKeeper(gk).regKeeper(i, keepers[i]);<br> i++;<br> }<br>keepers[15] = _createDocAtLatestVersion(30, primeKeyOfOwner);<br> IAccessControl(keepers[15]).initKeepers(dk, gk);<br> IGeneralKeeper(gk).regKeeper(15, keepers[15]);<br>while (i < 15) {<br> keepers[i] = _createDocAtLatestVersion(i+20, primeKeyOfOwner);<br> IAccessControl(keepers[i]).initKeepers(keepers[15], gk);<br> IGeneralKeeper(gk).regKeeper(i, keepers[i]);<br> i++;<br> }<br>}<br>function _deployBooks(<br> address[16] memory keepers,address primeKeyOfOwner,address gk) private {<br> address[12] memory books;<br> uint8[10] memory types = [11, 12, 13, 14, 13, 15, 16, 17, 18, 19];<br> uint8[10] memory seqOfDK = [1, 2, 3, 0, 5, 6, 7, 8, 0, 10];<br>uint i;<br> while (i < 10) {<br> books[i] = _createDocAtLatestVersion(types[i], primeKeyOfOwner);<br> IAccessControl(books[i]).initKeepers(keepers[seqOfDK[i]], gk);<br> IGeneralKeeper(gk).regBook(i+1, books[i]);<br> i++;<br> }<br>books[10] = _createDocAtLatestVersion(28, primeKeyOfOwner);<br> IAccessControl(books[10]).initKeepers(keepers[15], gk);<br> IGeneralKeeper(gk).regBook(11, books[10]);<br>IGeneralKeeper(gk).regBook(12, usdc);<br>books[11] = _createDocAtLatestVersion(29, primeKeyOfOwner);<br> IAccessControl(books[11]).initKeepers(keepers[13], gk);<br> IGeneralKeeper(gk).regBook(13, books[11]);<br>}<br>function _createDocAtLatestVersion(uint256 typeOfDoc, address primeKeyOfOwner) internal<br> returns(address body)<br> {<br> uint256 latest = _rc.counterOfVersions(typeOfDoc);<br> bytes32 snOfDoc = bytes32((typeOfDoc << 224) + uint224(latest << 192));<br> body = _rc.createDoc(snOfDoc, primeKeyOfOwner).body;<br> }<br>}<br>|
| [Contents](#toc) |

---

## FuelTank.sol

---

| |
|:---|
| **contracts/center/FuelTank.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./access/Ownable.sol";<br> import "../lib/Address.sol";<br>contract FuelTank is Ownable {<br>uint public rate;<br> uint public sum;<br>constructor(address rc, uint _rate) {<br> init(msg.sender, rc);<br> rate = _rate;<br> }<br>event SetRate(uint indexed newRate);<br> event Refuel (address indexed buyer, uint indexed amtOfEth, uint indexed amtOfCbp);<br> event WithdrawFuel (address indexed owner, uint indexed amt);<br> event WithdrawIncome (address indexed owner, uint indexed amt);<br>// ##################<br> // ## Write I/O ##<br> // ##################<br>function setRate(uint newRate) external onlyOwner {<br> rate = newRate;<br> emit SetRate(newRate);<br> }<br>function refuel() external payable {<br>uint amt = msg.value \* rate / 10000;<br>if (amt > 0 && _rc.balanceOf(address(this)) >= amt) {<br> sum += amt;<br> emit Refuel (msg.sender, msg.value, amt);<br> if (!_rc.transfer(msg.sender, amt)) {<br> revert ('CBP Transfer Failed');<br> }<br> } else revert ('zero amt or insufficient balance');<br>}<br>function withdrawIncome(uint amt) external onlyOwner {<br> require(address(this).balance >= amt, 'Insufficient ETH');<br> emit WithdrawIncome(msg.sender, amt);<br> Address.sendValue(payable(msg.sender), amt);<br> }<br>function withdrawFuel(uint amt) external onlyOwner {<br> if (_rc.balanceOf(address(this)) >= amt) {<br> emit WithdrawFuel(msg.sender, amt);<br> if (!_rc.transfer(msg.sender, amt)) {<br> revert('CBP Transfer Failed');<br> }<br> } else revert('insufficient fuel');<br> }<br>}<br>|
| [Contents](#toc) |

---

## CashLockers.sol

---

| |
|:---|
| **contracts/center/CashLockers.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./ICashLockers.sol";<br>contract CashLockers is ICashLockers {<br>using UsdLockersRepo for UsdLockersRepo.Repo;<br>IUSDC immutable public usdc;<br>constructor(address _usdc) {<br> usdc = IUSDC(_usdc);<br> }<br>mapping(address => uint256) private _coffers;<br> UsdLockersRepo.Repo private _lockers;<br>//###############<br> //## Write ##<br> //###############<br>function _transferWithAuthorization(TransferAuth memory auth) private {<br> usdc.transferWithAuthorization(<br> auth.from, <br> address(this), <br> auth.value,<br> auth.validAfter, <br> auth.validBefore, <br> auth.nonce, <br> auth.v,<br> auth.r,<br> auth.s);<br> }<br>function lockUsd(<br> TransferAuth memory auth, address to, uint expireDate, bytes32 lock) external {<br>auth.from = msg.sender;<br>_transferWithAuthorization(auth);<br>_coffers[auth.from] += auth.value;<br> _coffers[address(1)] += auth.value;<br>_lockers.lockUsd(auth.from, to, expireDate, auth.value, lock);<br>emit LockUsd(auth.from, to, auth.value, expireDate, lock);<br> }<br>function lockConsideration(<br> TransferAuth memory auth, <br> address to, <br> uint expireDate, <br> address target, <br> bytes calldata payload, <br> bytes32 hashLock) external {<br>auth.from = msg.sender;<br>_transferWithAuthorization(auth);<br>_lockers.lockConsideration(<br> auth.from, to, expireDate, auth.value, <br> target, payload, hashLock);<br>emit LockConsideration(auth.from, to, auth.value, expireDate, hashLock);<br> }<br>function unlockUsd(bytes32 lock, string memory key) external {<br>UsdLockersRepo.Head memory head =<br> _lockers.releaseUsd(lock, key, msg.sender);<br>require(_coffers[head.from] >= head.amt,<br> "CashLocker.releaseUsd: insufficient balance");<br>_coffers[head.from] -= head.amt;<br> _coffers[address(1)] -= head.amt;<br>emit UnlockUsd(head.from, head.to, head.amt, lock);<br>require(usdc.transfer(head.to, head.amt),<br> "CashLocker.releaseUsd: transfer failed");<br> }<br>function withdrawUsd(bytes32 lock) external {<br>UsdLockersRepo.Head memory head =<br> _lockers.withdrawUsd(lock, msg.sender);<br>require(_coffers[head.from] >= head.amt,<br> "CashLocker.withdrawUsd: insufficient amt");<br>_coffers[head.from] -= head.amt;<br> _coffers[address(1)] -= head.amt;<br>emit WithdrawUsd(head.from, head.amt, lock);<br>require(usdc.transfer(head.from, head.amt),<br> "CashLocker.withdrawUsd: transfer failed");<br> }<br>//##################<br> //## Read I/O ##<br> //##################<br>function isLocked(bytes32 lock) external view returns(bool) {<br> return _lockers.isLocked(lock);<br> }<br>function counterOfLockers() external view returns(uint) {<br> return _lockers.counterOfLockers();<br> }<br>function getHeadOfLocker(bytes32 lock) external view returns(UsdLockersRepo.Head memory) {<br> return _lockers.getHeadOfLocker(lock);<br> }<br>function getLocker(bytes32 lock) external view returns(UsdLockersRepo.Locker memory) {<br> return _lockers.getLocker(lock);<br> }<br>function getLockersList() external view returns (bytes32[] memory) {<br> return _lockers.getSnList();<br> }<br>function custodyOf(address acct) external view returns(uint) {<br> return _coffers[acct];<br> }<br>function totalCustody() external view returns(uint) {<br> return _coffers[address(1)];<br> }<br> } |
| [Contents](#toc) |

---

## ICashLockers.sol

---

| |
|:---|
| **contracts/center/ICashLockers.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../lib/UsdLockersRepo.sol";<br> import "./ERC20/IUSDC.sol";<br>interface ICashLockers {<br>struct TransferAuth{<br> address from;<br> address to;<br> uint256 value;<br> uint256 validAfter;<br> uint256 validBefore;<br> bytes32 nonce;<br> uint8 v;<br> bytes32 r;<br> bytes32 s;<br> }<br>// ##################<br> // ## Event ##<br> // ##################<br>event LockUsd(<br> address indexed from, address indexed to, uint indexed amt,<br> uint expireDate, bytes32 lock);<br>event LockConsideration(<br> address indexed from, address indexed to,<br> uint indexed amt, uint expireDate, bytes32 lock);<br>event UnlockUsd(<br> address indexed from, address indexed to, uint indexed amt, bytes32 lock);<br>event WithdrawUsd(address indexed from, uint indexed amt, bytes32 lock);<br>// ##################<br> // ## Write ##<br> // ##################<br>function lockUsd(<br> TransferAuth memory auth, address to, uint expireDate, bytes32 lock) external;<br>function lockConsideration(<br> TransferAuth memory auth, address to, uint expireDate, <br> address counterLocker, bytes calldata payload, bytes32 hashLock) external;<br>function unlockUsd(bytes32 lock, string memory key) external;<br>function withdrawUsd(bytes32 lock) external;<br>//##################<br> //## Read I/O ##<br> //##################<br>// function usdc() external view returns(IUSDC);<br>function isLocked(bytes32 lock) external view returns(bool);<br>function counterOfLockers() external view returns(uint);<br>function getHeadOfLocker(bytes32 lock) external view returns(UsdLockersRepo.Head memory);<br>function getLocker(bytes32 lock) external view returns(UsdLockersRepo.Locker memory);<br>function getLockersList() external view returns (bytes32[] memory);<br>function custodyOf(address acct) external view returns(uint);<br>function totalCustody() external view returns(uint);<br>} |
| [Contents](#toc) |

---

## UsdFuelTank.sol

---

| |
|:---|
| **contracts/center/UsdFuelTank.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./access/Ownable.sol";<br> import "../lib/Address.sol";<br> import "../comps/books/cashier/ICashier.sol";<br>contract UsdFuelTank is Ownable {<br>address public cashier;<br> uint public rate;<br> uint public sum;<br>constructor(address rc, uint _rate) {<br> init(msg.sender, rc);<br> rate = _rate;<br> }<br>event SetCashier(address indexed newCashier);<br> event SetRate(uint indexed newRate);<br> event Refuel(address indexed buyer, uint indexed amtOfUSDC, uint indexed amtOfCbp);<br> event WithdrawFuel(address indexed owner, uint indexed amt);<br>// ##################<br> // ## Write I/O ##<br> // ##################<br>function setCashier(address newCashier) external onlyOwner {<br> cashier = newCashier;<br> emit SetCashier(newCashier);<br> }<br>function setRate(uint newRate) external onlyOwner {<br> rate = newRate;<br> emit SetRate(newRate);<br> }<br>function refuel(ICashier.TransferAuth memory auth, uint amt) external {<br> uint balance = 0;<br> if (amt == 0) {<br> amt = auth.value \* 10 \*\* 18 / rate ;<br> } else {<br> require (auth.value >= (rate \* amt / 10 \*\* 18), <br> "UsdFT.Refule: insufficient USDC");<br> balance = auth.value - (rate \* amt / 10 \*\* 18);<br> }<br>if (amt > 0 && _rc.balanceOf(address(this)) >= amt) {<br> sum += amt;<br> emit Refuel (msg.sender, auth.value - balance, amt);<br> //remark: CollectUSDCForRefuelCBP<br> ICashier(cashier).collectUsd(auth,<br> bytes32(0x436f6c6c65637455534443466f7252656675656c434250000000000000000000));<br> if (!_rc.transfer(msg.sender, amt)) {<br> revert ('CBP Transfer Failed');<br> } else if (balance > 0) {<br> uint temp = balance;<br> balance = 0;<br> //remark: RefundBalanceUSDCForRefuelCBP<br> ICashier(cashier).transferUsd(auth.from, temp, <br> bytes32(0x526566756e6442616c616e636555534443466f7252656675656c434250000000));<br> }<br> } else revert ('zero amt or insufficient CBP reserve');<br>}<br>function withdrawFuel(uint amt) external onlyOwner {<br> if (_rc.balanceOf(address(this)) >= amt) {<br> emit WithdrawFuel(msg.sender, amt);<br> if (!_rc.transfer(msg.sender, amt)) {<br> revert('CBP Transfer Failed');<br> }<br> } else revert('insufficient fuel');<br> }<br>}<br>|
| [Contents](#toc) |

---

## ICreateNewComp.sol

---

| |
|:---|
| **contracts/center/ICreateNewComp.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../comps/common/access/IAccessControl.sol";<br> import "../comps/IGeneralKeeper.sol";<br>interface ICreateNewComp {<br> function createComp(address dk) external;<br> }<br>|
| [Contents](#toc) |

---

## IRegCenter.sol

---

| |
|:---|
| **contracts/center/IRegCenter.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./access/IOwnable.sol";<br>import "../lib/UsersRepo.sol";<br> import "../lib/DocsRepo.sol";<br>import "./books/IBookOfDocs.sol";<br> import "./books/IBookOfPoints.sol";<br> import "./books/IBookOfUsers.sol";<br>import "./ERC20/IERC20.sol";<br>interface IRegCenter is IBookOfDocs, IBookOfPoints, IERC20, IBookOfUsers{<br>enum TypeOfDoc{<br> ZeroPoint,<br> ROCKeeper, // 1<br> RODKeeper, // 2<br> BMMKeeper, // 3<br> ROMKeeper, // 4<br> GMMKeeper, // 5<br> ROAKeeper, // 6<br> ROOKeeper, // 7<br> ROPKeeper, // 8<br> SHAKeeper, // 9<br> LOOKeeper, // 10<br> ROC, // 11<br> ROD, // 12<br> MeetingMinutes, // 13<br> ROM, // 14<br> ROA, // 15<br> ROO, // 16<br> ROP, // 17<br> ROS, // 18<br> LOO, // 19<br> GeneralKeeper, // 20<br> IA, // 21<br> SHA, // 22 <br> AntiDilution, // 23<br> LockUp, // 24<br> Alongs, // 25<br> Options, // 26<br> LOP // 27<br> }<br>event SetPriceFeed(uint indexed seq, address indexed feed_);<br>function regUser() external;<br>function getUserNo(address targetAddr, uint fee, uint author) external returns (uint40);<br>function getCentPriceInWei(uint seq) external view returns(uint);<br>}<br>|
| [Contents](#toc) |

---

## RegCenter.sol

---

| |
|:---|
| **contracts/center/RegCenter.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegCenter.sol";<br> import "./Oracles/IPriceConsumer.sol";<br> import "./books/BookOfDocs.sol";<br>contract RegCenter is IRegCenter, BookOfDocs {<br>IPriceConsumer private _oracle;<br>constructor(address keeper) BookOfDocs(keeper){}<br>// #################<br> // ## Write ##<br> // #################<br>function setOracle(address pf) external onlyKeeper {<br> _oracle = IPriceConsumer(pf);<br> }<br>function setPriceFeed(uint seq, address feed_) onlyKeeper external {<br> _oracle.setPriceFeed(seq, feed_);<br> emit SetPriceFeed(seq, feed_);<br> }<br>function regUser() external {<br> uint gift = _regUser();<br> if (gift > 0) {<br> _mint(msg.sender, gift \* 10 \*\* 9);<br> }<br> }<br>function getUserNo(address targetAddr, uint fee, uint author) external returns (uint40) {<br>uint40 target = _getUserNo(targetAddr);<br>require(docExist(msg.sender), <br> "RC.getUserNo: not registered ");<br>UsersRepo.Key memory rr = getRoyaltyRule(author);<br> address authorAddr = _getUserByNo(author).primeKey.pubKey; <br>_chargeFee(targetAddr, fee, authorAddr, rr);<br>return target;<br> }<br>function _chargeFee(<br> address targetAddr, <br> uint fee, <br> address authorAddr,<br> UsersRepo.Key memory rr) private {<br>UsersRepo.User memory t = _getUserByNo(_getUserNo(targetAddr));<br> address ownerAddr = getOwner();<br>UsersRepo.Rule memory pr = getPlatformRule();<br>uint floorPrice = uint(pr.floor) \* 10 \*\* 9;<br>require(fee >= floorPrice, "RC.chargeFee: lower than floor");<br>uint offAmt = uint(t.primeKey.coupon) \* uint(rr.discount) \* fee / 10000 + uint(rr.coupon) \* 10 \*\* 9;<br>fee = (offAmt < (fee - floorPrice))<br> ? (fee - offAmt)<br> : floorPrice;<br>uint giftAmt = uint(rr.gift) \* 10 \*\* 9;<br>if (ownerAddr == authorAddr \|\| pr.rate == 2000) {<br> if (fee > giftAmt)<br> _transfer(t.primeKey.pubKey, authorAddr, fee - giftAmt);<br> } else {<br> _transfer(t.primeKey.pubKey, ownerAddr, fee \* (2000 - pr.rate) / 10000);<br>uint balaceAmt = fee \* (8000 + pr.rate) / 10000;<br> if (balaceAmt > giftAmt)<br> _transfer(t.primeKey.pubKey, authorAddr, balaceAmt - giftAmt);<br> }<br>t.primeKey.coupon++;<br> }<br>function getOracle () external view returns(address) {<br> return address(_oracle);<br> }<br>function getPriceFeed(uint seq) external view returns (address) {<br> return _oracle.getPriceFeed(seq);<br> }<br>function decimals(address quote) public view returns (uint8) {<br> return _oracle.decimals(quote);<br> }<br>function getCentPriceInWei(uint seq) external view returns(uint) {<br> return _oracle.getCentPriceInWei(seq);<br> }<br>}<br>|
| [Contents](#toc) |

---

## PriceConsumer.sol

---

| |
|:---|
| **contracts/center/Oracles/PriceConsumer.sol** |
| <br>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.8.8;<br>import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";<br> import "@chainlink/contracts/src/v0.8/Denominations.sol";<br>import "./IPriceConsumer.sol";<br>contract PriceConsumer is IPriceConsumer{<br>mapping(address => AggregatorV3Interface) private _priceFeeds;<br>address[20] private _currencies = [<br> Denominations.USD, Denominations.GBP, Denominations.EUR, Denominations.JPY, Denominations.KRW, Denominations.CNY,<br> Denominations.AUD, Denominations.CAD, Denominations.CHF, Denominations.ARS, Denominations.PHP, Denominations.NZD,<br> Denominations.SGD, Denominations.NGN, Denominations.ZAR, Denominations.RUB, Denominations.INR, Denominations.BRL,<br> Denominations.ETH, Denominations.BTC<br> ];<br>address private _rc;<br>/\*\*<br> \* Network: Arbitrum One<br> \* ETH/USD (Base_0): 0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612<br> \* GBP/USD (quote_1): 0x9C4424Fd84C6661F97D8d6b3fc3C1aAc2BeDd137<br> \* EUR/USD (quote_2): 0xA14d53bC1F1c0F31B4aA3BD109344E5009051a84<br> \* JPY/USD (quote_3): 0x3dD6e51CB9caE717d5a8778CF79A04029f9cFDF8<br> \* KRW/USD (quote_4): 0x85bb02E0Ae286600d1c68Bb6Ce22Cc998d411916<br> \* CNY/USD (quote_5): 0xcC3370Bde6AFE51e1205a5038947b9836371eCCb<br> \* AUD/USD (quote_6): 0x9854e9a850e7C354c1de177eA953a6b1fba8Fc22<br> \* CAD/USD (quote_7): 0xf6DA27749484843c4F02f5Ad1378ceE723dD61d4<br> \* CHF/USD (quote_8): 0xe32AccC8c4eC03F6E75bd3621BfC9Fbb234E1FC3<br> \* ARS/USD (quote_9): 0x0000000000000000000000000000000000000000<br> \* PHP/USD (quote_10): 0xfF82AAF635645fD0bcc7b619C3F28004cDb58574<br> \* NZD/USD (quote_11): 0x0000000000000000000000000000000000000000<br> \* SGD/USD (quote_12): 0xF0d38324d1F86a176aC727A4b0c43c9F9d9c5EB1<br> \* NGN/USD (quote_13): 0x0000000000000000000000000000000000000000<br> \* ZAR/USD (quote_14): 0x0000000000000000000000000000000000000000<br> \* RUB/USD (quote_15): 0x0000000000000000000000000000000000000000<br> \* INR/USD (quote_16): 0x0000000000000000000000000000000000000000<br> \* BRL/USD (quote_17): 0x04b7384473A2aDF1903E3a98aCAc5D62ba8C2702<br> \*/<br>constructor(address rc){<br> _priceFeeds[_currencies[0]] = AggregatorV3Interface(<br> 0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612);<br> _priceFeeds[_currencies[1]] = AggregatorV3Interface(<br> 0x9C4424Fd84C6661F97D8d6b3fc3C1aAc2BeDd137);<br> _priceFeeds[_currencies[2]] = AggregatorV3Interface(<br> 0xA14d53bC1F1c0F31B4aA3BD109344E5009051a84);<br> _priceFeeds[_currencies[3]] = AggregatorV3Interface(<br> 0x3dD6e51CB9caE717d5a8778CF79A04029f9cFDF8);<br> _priceFeeds[_currencies[4]] = AggregatorV3Interface(<br> 0x85bb02E0Ae286600d1c68Bb6Ce22Cc998d411916);<br> _priceFeeds[_currencies[5]] = AggregatorV3Interface(<br> 0xcC3370Bde6AFE51e1205a5038947b9836371eCCb);<br> _priceFeeds[_currencies[6]] = AggregatorV3Interface(<br> 0x9854e9a850e7C354c1de177eA953a6b1fba8Fc22);<br> _priceFeeds[_currencies[7]] = AggregatorV3Interface(<br> 0xf6DA27749484843c4F02f5Ad1378ceE723dD61d4);<br> _priceFeeds[_currencies[8]] = AggregatorV3Interface(<br> 0xe32AccC8c4eC03F6E75bd3621BfC9Fbb234E1FC3);<br> _priceFeeds[_currencies[10]] = AggregatorV3Interface(<br> 0xfF82AAF635645fD0bcc7b619C3F28004cDb58574);<br> _priceFeeds[_currencies[12]] = AggregatorV3Interface(<br> 0xF0d38324d1F86a176aC727A4b0c43c9F9d9c5EB1);<br> _priceFeeds[_currencies[17]] = AggregatorV3Interface(<br> 0x04b7384473A2aDF1903E3a98aCAc5D62ba8C2702);<br> _rc = rc;<br> }<br>function setPriceFeed(uint seq, address _feed) external {<br> require (msg.sender == _rc, "PC.setPriceFeed: not rc");<br> _priceFeeds[_currencies[seq]] = AggregatorV3Interface(_feed);<br> }<br>function getRC() external view returns(address) {<br> return address(_rc);<br> }<br>function getPriceFeed(uint seq) external view returns (address) {<br> return address(_priceFeeds[_currencies[seq]]);<br> }<br>function decimals(address quote) public view returns (uint8) {<br> return _priceFeeds[quote].decimals();<br> }<br>function getCentPriceInWei(uint seq) public view returns (uint) {<br>(int base, uint8 dec) = _getLatestPrice(0);<br>if (seq == 0) {<br>return 10 \*\* uint(16 + dec) / uint(base);<br>} else if (seq <= 17){<br>(int quote, uint8 quoteDec) = _getLatestPrice(seq);<br> quote = _scalePrice(quote, quoteDec, dec);<br>return 10 \*\* uint(16 + dec) \* uint(quote) / uint(base);<br>} else revert("seqOfCurrency overflow");<br> }<br>function _getLatestPrice(uint seq) private view <br> returns(int price, uint8 dec) <br> {<br> require(address(_priceFeeds[_currencies[seq]]) > address(0),<br> "No Available PriceFeed");<br>(<br> /\*uint80 roundID\*/,<br> price,<br> /\*uint startedAt\*/,<br> /\*uint timeStamp\*/,<br> /\*uint80 answeredInRound\*/) = _priceFeeds[_currencies[seq]].latestRoundData();<br>dec = _priceFeeds[_currencies[seq]].decimals(); <br> }<br>function _scalePrice(<br> int256 _price,<br> uint8 _priceDecimals,<br> uint8 _decimals) private pure returns (int256) {<br> if (_priceDecimals < _decimals) {<br> return _price \* int256(10 \*\* uint(_decimals - _priceDecimals));<br> } else if (_priceDecimals > _decimals) {<br> return _price / int256(10 \*\* uint(_priceDecimals - _decimals));<br> }<br> return _price;<br> }<br>}<br>|
| [Contents](#toc) |

---

## IPriceConsumer.sol

---

| |
|:---|
| **contracts/center/Oracles/IPriceConsumer.sol** |
| <br>// SPDX-License-Identifier: MIT<br> pragma solidity ^0.8.8;<br>interface IPriceConsumer {<br>/\*\*<br> \* Network: Arbitrum One<br> \* ETH/USD (Base_0): 0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612<br> \* GBP/USD (quote_1): 0x9C4424Fd84C6661F97D8d6b3fc3C1aAc2BeDd137<br> \* EUR/USD (quote_2): 0xA14d53bC1F1c0F31B4aA3BD109344E5009051a84<br> \* JPY/USD (quote_3): 0x3dD6e51CB9caE717d5a8778CF79A04029f9cFDF8<br> \* KRW/USD (quote_4): 0x85bb02E0Ae286600d1c68Bb6Ce22Cc998d411916<br> \* CNY/USD (quote_5): 0xcC3370Bde6AFE51e1205a5038947b9836371eCCb<br> \* AUD/USD (quote_6): 0x9854e9a850e7C354c1de177eA953a6b1fba8Fc22<br> \* CAD/USD (quote_7): 0xf6DA27749484843c4F02f5Ad1378ceE723dD61d4<br> \* CHF/USD (quote_8): 0xe32AccC8c4eC03F6E75bd3621BfC9Fbb234E1FC3<br> \* ARS/USD (quote_9): 0x0000000000000000000000000000000000000000<br> \* PHP/USD (quote_10): 0xfF82AAF635645fD0bcc7b619C3F28004cDb58574<br> \* NZD/USD (quote_11): 0x0000000000000000000000000000000000000000<br> \* SGD/USD (quote_12): 0xF0d38324d1F86a176aC727A4b0c43c9F9d9c5EB1<br> \* NGN/USD (quote_13): 0x0000000000000000000000000000000000000000<br> \* ZAR/USD (quote_14): 0x0000000000000000000000000000000000000000<br> \* RUB/USD (quote_15): 0x0000000000000000000000000000000000000000<br> \* INR/USD (quote_16): 0x0000000000000000000000000000000000000000<br> \* BRL/USD (quote_17): 0x04b7384473A2aDF1903E3a98aCAc5D62ba8C2702<br> \*/<br>function setPriceFeed(uint seq, address _feed) external;<br>function getRC() external returns(address);<br>function getPriceFeed(uint seq) external view returns (address);<br>function decimals(address quote) external view returns (uint8);<br>function getCentPriceInWei(uint seq) external view returns (uint);<br>}<br>|
| [Contents](#toc) |

---

## IOwnable.sol

---

| |
|:---|
| **contracts/center/access/IOwnable.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../IRegCenter.sol";<br>interface IOwnable {<br>struct Admin{<br> address addr;<br> uint8 state;<br> }<br>event SetNewOwner(address indexed owner);<br>// #################<br> // ## Write ##<br> // #################<br>function init(address owner, address regCenter) external;<br>function setNewOwner(address acct) external;<br>// ##############<br> // ## Read ##<br> // ##############<br>function getOwner() external view returns (address);<br>function getRegCenter() external view returns (address);<br>}<br>|
| [Contents](#toc) |

---

## Ownable.sol

---

| |
|:---|
| **contracts/center/access/Ownable.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IOwnable.sol";<br>contract Ownable is IOwnable {<br>Admin private _owner;<br> IRegCenter internal _rc;<br>// ################<br> // ## Modifier ##<br> // ################<br>modifier onlyOwner {<br> require(<br> _owner.addr == msg.sender,<br> "O.onlyOwner: NOT");<br> _;<br> }<br>// #################<br> // ## Write I/O ##<br> // #################<br>function init(<br> address owner,<br> address regCenter) public {<br> require(_owner.state == 0, "already inited");<br> _owner.addr = owner;<br> _owner.state = 1;<br> _rc = IRegCenter(regCenter);<br> }<br>function setNewOwner(address acct) onlyOwner public {<br> _owner.addr = acct;<br> emit SetNewOwner(acct);<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>function getOwner() public view returns (address) {<br> return _owner.addr;<br> }<br>function getRegCenter() public view returns (address) {<br> return address(_rc);<br> }<br>}<br>|
| [Contents](#toc) |

---

## IERC20.sol

---

| |
|:---|
| **contracts/center/ERC20/IERC20.sol** |
| <br>// SPDX-License-Identifier: MIT<br> // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)<br>pragma solidity ^0.8.0;<br>/\*\*<br> \* @dev Interface of the ERC20 standard as defined in the EIP.<br> \*/<br> interface IERC20 {<br> /\*\*<br> \* @dev Emitted when `value` tokens are moved from one account (`from`) to<br> \* another (`to`).<br> \*<br> \* Note that `value` may be zero.<br> \*/<br> event Transfer(address indexed from, address indexed to, uint256 indexed value);<br>/\*\*<br> \* @dev Emitted when the allowance of a `spender` for an `owner` is set by<br> \* a call to {approve}. `value` is the new allowance.<br> \*/<br> event Approval(address indexed owner, address indexed spender, uint256 indexed value);<br>/\*\*<br> \* @dev Returns the amount of tokens in existence.<br> \*/<br> function totalSupply() external view returns (uint256);<br>/\*\*<br> \* @dev Returns the amount of tokens owned by `account`.<br> \*/<br> function balanceOf(address account) external view returns (uint256);<br>/\*\*<br> \* @dev Moves `amount` tokens from the caller's account to `to`.<br> \*<br> \* Returns a boolean value indicating whether the operation succeeded.<br> \*<br> \* Emits a {Transfer} event.<br> \*/<br> function transfer(address to, uint256 amount) external returns (bool);<br>/\*\*<br> \* @dev Returns the remaining number of tokens that `spender` will be<br> \* allowed to spend on behalf of `owner` through {transferFrom}. This is<br> \* zero by default.<br> \*<br> \* This value changes when {approve} or {transferFrom} are called.<br> \*/<br> function allowance(address owner, address spender) external view returns (uint256);<br>/\*\*<br> \* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.<br> \*<br> \* Returns a boolean value indicating whether the operation succeeded.<br> \*<br> \* IMPORTANT: Beware that changing an allowance with this method brings the risk<br> \* that someone may use both the old and the new allowance by unfortunate<br> \* transaction ordering. One possible solution to mitigate this race<br> \* condition is to first reduce the spender's allowance to 0 and set the<br> \* desired value afterwards:<br> \* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729<br> \*<br> \* Emits an {Approval} event.<br> \*/<br> function approve(address spender, uint256 amount) external returns (bool);<br>/\*\*<br> \* @dev Moves `amount` tokens from `from` to `to` using the<br> \* allowance mechanism. `amount` is then deducted from the caller's<br> \* allowance.<br> \*<br> \* Returns a boolean value indicating whether the operation succeeded.<br> \*<br> \* Emits a {Transfer} event.<br> \*/<br> function transferFrom(<br> address from,<br> address to,<br> uint256 amount) external returns (bool);<br> }<br>|
| [Contents](#toc) |

---

## ERC20.sol

---

| |
|:---|
| **contracts/center/ERC20/ERC20.sol** |
| <br>// SPDX-License-Identifier: MIT<br> // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)<br>pragma solidity ^0.8.0;<br>import "./IERC20.sol";<br> import "./IERC20Metadata.sol";<br> import "./Context.sol";<br>/\*\*<br> \* @dev Implementation of the {IERC20} interface.<br> \*<br> \* This implementation is agnostic to the way tokens are created. This means<br> \* that a supply mechanism has to be added in a derived contract using {_mint}.<br> \* For a generic mechanism see {ERC20PresetMinterPauser}.<br> \*<br> \* TIP: For a detailed writeup see our guide<br> \* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How<br> \* to implement supply mechanisms].<br> \*<br> \* We have followed general OpenZeppelin Contracts guidelines: functions revert<br> \* instead returning `false` on failure. This behavior is nonetheless<br> \* conventional and does not conflict with the expectations of ERC20<br> \* applications.<br> \*<br> \* Additionally, an {Approval} event is emitted on calls to {transferFrom}.<br> \* This allows applications to reconstruct the allowance for all accounts just<br> \* by listening to said events. Other implementations of the EIP may not emit<br> \* these events, as it isn't required by the specification.<br> \*<br> \* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}<br> \* functions have been added to mitigate the well-known issues around setting<br> \* allowances. See {IERC20-approve}.<br> \*/<br> contract ERC20 is Context, IERC20, IERC20Metadata {<br> mapping(address => uint256) private _balances;<br>mapping(address => mapping(address => uint256)) private _allowances;<br>uint256 private _totalSupply;<br>string private _name;<br> string private _symbol;<br>/\*\*<br> \* @dev Sets the values for {name} and {symbol}.<br> \*<br> \* The default value of {decimals} is 18. To select a different value for<br> \* {decimals} you should overload it.<br> \*<br> \* All two of these values are immutable: they can only be set once during<br> \* construction.<br> \*/<br> constructor(string memory name_, string memory symbol_) {<br> _name = name_;<br> _symbol = symbol_;<br> }<br>/\*\*<br> \* @dev Returns the name of the token.<br> \*/<br> function name() public view virtual override returns (string memory) {<br> return _name;<br> }<br>/\*\*<br> \* @dev Returns the symbol of the token, usually a shorter version of the<br> \* name.<br> \*/<br> function symbol() public view virtual override returns (string memory) {<br> return _symbol;<br> }<br>/\*\*<br> \* @dev Returns the number of decimals used to get its user representation.<br> \* For example, if `decimals` equals `2`, a balance of `505` tokens should<br> \* be displayed to a user as `5.05` (`505 / 10 \*\* 2`).<br> \*<br> \* Tokens usually opt for a value of 18, imitating the relationship between<br> \* Ether and Wei. This is the value {ERC20} uses, unless this function is<br> \* overridden;<br> \*<br> \* NOTE: This information is only used for _display_ purposes: it in<br> \* no way affects any of the arithmetic of the contract, including<br> \* {IERC20-balanceOf} and {IERC20-transfer}.<br> \*/<br> function decimals() public view virtual override returns (uint8) {<br> return 18;<br> }<br>/\*\*<br> \* @dev See {IERC20-totalSupply}.<br> \*/<br> function totalSupply() public view virtual override returns (uint256) {<br> return _totalSupply;<br> }<br>/\*\*<br> \* @dev See {IERC20-balanceOf}.<br> \*/<br> function balanceOf(address account) public view virtual override returns (uint256) {<br> return _balances[account];<br> }<br>/\*\*<br> \* @dev See {IERC20-transfer}.<br> \*<br> \* Requirements:<br> \*<br> \* - `to` cannot be the zero address.<br> \* - the caller must have a balance of at least `amount`.<br> \*/<br> function transfer(address to, uint256 amount) public virtual override returns (bool) {<br> address owner = _msgSender();<br> _transfer(owner, to, amount);<br> return true;<br> }<br>/\*\*<br> \* @dev See {IERC20-allowance}.<br> \*/<br> function allowance(address owner, address spender) public view virtual override returns (uint256) {<br> return _allowances[owner][spender];<br> }<br>/\*\*<br> \* @dev See {IERC20-approve}.<br> \*<br> \* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on<br> \* `transferFrom`. This is semantically equivalent to an infinite approval.<br> \*<br> \* Requirements:<br> \*<br> \* - `spender` cannot be the zero address.<br> \*/<br> function approve(address spender, uint256 amount) public virtual override returns (bool) {<br> address owner = _msgSender();<br> _approve(owner, spender, amount);<br> return true;<br> }<br>/\*\*<br> \* @dev See {IERC20-transferFrom}.<br> \*<br> \* Emits an {Approval} event indicating the updated allowance. This is not<br> \* required by the EIP. See the note at the beginning of {ERC20}.<br> \*<br> \* NOTE: Does not update the allowance if the current allowance<br> \* is the maximum `uint256`.<br> \*<br> \* Requirements:<br> \*<br> \* - `from` and `to` cannot be the zero address.<br> \* - `from` must have a balance of at least `amount`.<br> \* - the caller must have allowance for ``from``'s tokens of at least<br> \* `amount`.<br> \*/<br> function transferFrom(<br> address from,<br> address to,<br> uint256 amount) public virtual override returns (bool) {<br> address spender = _msgSender();<br> _spendAllowance(from, spender, amount);<br> _transfer(from, to, amount);<br> return true;<br> }<br>/\*\*<br> \* @dev Atomically increases the allowance granted to `spender` by the caller.<br> \*<br> \* This is an alternative to {approve} that can be used as a mitigation for<br> \* problems described in {IERC20-approve}.<br> \*<br> \* Emits an {Approval} event indicating the updated allowance.<br> \*<br> \* Requirements:<br> \*<br> \* - `spender` cannot be the zero address.<br> \*/<br> function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {<br> address owner = _msgSender();<br> _approve(owner, spender, allowance(owner, spender) + addedValue);<br> return true;<br> }<br>/\*\*<br> \* @dev Atomically decreases the allowance granted to `spender` by the caller.<br> \*<br> \* This is an alternative to {approve} that can be used as a mitigation for<br> \* problems described in {IERC20-approve}.<br> \*<br> \* Emits an {Approval} event indicating the updated allowance.<br> \*<br> \* Requirements:<br> \*<br> \* - `spender` cannot be the zero address.<br> \* - `spender` must have allowance for the caller of at least<br> \* `subtractedValue`.<br> \*/<br> function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {<br> address owner = _msgSender();<br> uint256 currentAllowance = allowance(owner, spender);<br> require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");<br> unchecked {<br> _approve(owner, spender, currentAllowance - subtractedValue);<br> }<br>return true;<br> }<br>/\*\*<br> \* @dev Moves `amount` of tokens from `from` to `to`.<br> \*<br> \* This internal function is equivalent to {transfer}, and can be used to<br> \* e.g. implement automatic token fees, slashing mechanisms, etc.<br> \*<br> \* Emits a {Transfer} event.<br> \*<br> \* Requirements:<br> \*<br> \* - `from` cannot be the zero address.<br> \* - `to` cannot be the zero address.<br> \* - `from` must have a balance of at least `amount`.<br> \*/<br> function _transfer(<br> address from,<br> address to,<br> uint256 amount) internal virtual {<br> require(from != address(0), "ERC20: transfer from the zero address");<br> require(to != address(0), "ERC20: transfer to the zero address");<br>_beforeTokenTransfer(from, to, amount);<br>uint256 fromBalance = _balances[from];<br> require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");<br> unchecked {<br> _balances[from] = fromBalance - amount;<br> // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by<br> // decrementing then incrementing.<br> _balances[to] += amount;<br> }<br>emit Transfer(from, to, amount);<br>_afterTokenTransfer(from, to, amount);<br> }<br>/\*\* @dev Creates `amount` tokens and assigns them to `account`, increasing<br> \* the total supply.<br> \*<br> \* Emits a {Transfer} event with `from` set to the zero address.<br> \*<br> \* Requirements:<br> \*<br> \* - `account` cannot be the zero address.<br> \*/<br> function _mint(address account, uint256 amount) internal virtual {<br> require(account != address(0), "ERC20: mint to the zero address");<br>_beforeTokenTransfer(address(0), account, amount);<br>_totalSupply += amount;<br> unchecked {<br> // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.<br> _balances[account] += amount;<br> }<br> emit Transfer(address(0), account, amount);<br>_afterTokenTransfer(address(0), account, amount);<br> }<br>/\*\*<br> \* @dev Destroys `amount` tokens from `account`, reducing the<br> \* total supply.<br> \*<br> \* Emits a {Transfer} event with `to` set to the zero address.<br> \*<br> \* Requirements:<br> \*<br> \* - `account` cannot be the zero address.<br> \* - `account` must have at least `amount` tokens.<br> \*/<br> function _burn(address account, uint256 amount) internal virtual {<br> require(account != address(0), "ERC20: burn from the zero address");<br>_beforeTokenTransfer(account, address(0), amount);<br>uint256 accountBalance = _balances[account];<br> require(accountBalance >= amount, "ERC20: burn amount exceeds balance");<br> unchecked {<br> _balances[account] = accountBalance - amount;<br> // Overflow not possible: amount <= accountBalance <= totalSupply.<br> _totalSupply -= amount;<br> }<br>emit Transfer(account, address(0), amount);<br>_afterTokenTransfer(account, address(0), amount);<br> }<br>/\*\*<br> \* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.<br> \*<br> \* This internal function is equivalent to `approve`, and can be used to<br> \* e.g. set automatic allowances for certain subsystems, etc.<br> \*<br> \* Emits an {Approval} event.<br> \*<br> \* Requirements:<br> \*<br> \* - `owner` cannot be the zero address.<br> \* - `spender` cannot be the zero address.<br> \*/<br> function _approve(<br> address owner,<br> address spender,<br> uint256 amount) internal virtual {<br> require(owner != address(0), "ERC20: approve from the zero address");<br> require(spender != address(0), "ERC20: approve to the zero address");<br>_allowances[owner][spender] = amount;<br> emit Approval(owner, spender, amount);<br> }<br>/\*\*<br> \* @dev Updates `owner` s allowance for `spender` based on spent `amount`.<br> \*<br> \* Does not update the allowance amount in case of infinite allowance.<br> \* Revert if not enough allowance is available.<br> \*<br> \* Might emit an {Approval} event.<br> \*/<br> function _spendAllowance(<br> address owner,<br> address spender,<br> uint256 amount) internal virtual {<br> uint256 currentAllowance = allowance(owner, spender);<br> if (currentAllowance != type(uint256).max) {<br> require(currentAllowance >= amount, "ERC20: insufficient allowance");<br> unchecked {<br> _approve(owner, spender, currentAllowance - amount);<br> }<br> }<br> }<br>/\*\*<br> \* @dev Hook that is called before any transfer of tokens. This includes<br> \* minting and burning.<br> \*<br> \* Calling conditions:<br> \*<br> \* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens<br> \* will be transferred to `to`.<br> \* - when `from` is zero, `amount` tokens will be minted for `to`.<br> \* - when `to` is zero, `amount` of ``from``'s tokens will be burned.<br> \* - `from` and `to` are never both zero.<br> \*<br> \* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].<br> \*/<br> function _beforeTokenTransfer(<br> address from,<br> address to,<br> uint256 amount) internal virtual {}<br>/\*\*<br> \* @dev Hook that is called after any transfer of tokens. This includes<br> \* minting and burning.<br> \*<br> \* Calling conditions:<br> \*<br> \* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens<br> \* has been transferred to `to`.<br> \* - when `from` is zero, `amount` tokens have been minted for `to`.<br> \* - when `to` is zero, `amount` of ``from``'s tokens have been burned.<br> \* - `from` and `to` are never both zero.<br> \*<br> \* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].<br> \*/<br> function _afterTokenTransfer(<br> address from,<br> address to,<br> uint256 amount) internal virtual {}<br> }<br>|
| [Contents](#toc) |

---

## MockUSDC.sol

---

| |
|:---|
| **contracts/center/ERC20/MockUSDC.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IUSDC.sol";<br> import "./ERC20.sol";<br>import "../access/Ownable.sol";<br>contract MockUSDC is IUSDC, ERC20("USD Coin", "USDC"), Ownable {<br>// keccak256("TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)")<br> bytes32<br> public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH = 0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;<br>// USDC on ArbitrumOne EIP-712 DomainSeparator (SM Addr: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831)<br> // bytes32 public constant DOMAIN_SEPARATOR = 0x08d11903f8419e68b1b8721bcbe2e9fc68569122a77ef18c216f10b3b5112c78;<br>// keccak256("USD Coin");<br> bytes32 public constant NAME_HASH = 0x52878b207aaddbfc15ea7bebcda681eb8ccd306e2227b61cef68505c8c056341;<br>// keccak256("2");<br> bytes32 public constant VERSION_HASH = 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5;<br>// keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),<br> bytes32 public constant TYPE_HASH = 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;<br>function domainSeparator() public view returns (bytes32) {<br> return keccak256(<br> abi.encode(<br> TYPE_HASH,<br> NAME_HASH,<br> VERSION_HASH,<br> block.chainid,<br> address(this)));<br> } <br>// ---- Authorization ----<br>mapping(address => mapping(bytes32 => bool)) private _authorizationStates;<br>function authorizationState(address authorizer, bytes32 nonce)<br> external<br> view<br> returns (bool)<br> {<br> return _authorizationStates[authorizer][nonce];<br> }<br>// ---- Mint & Burn ----<br>function mint(address to, uint amt) external onlyOwner {<br> _mint(to, amt);<br> }<br>function burn(uint amt) external {<br> _burn(msg.sender, amt);<br> }<br>// ---- TransferWithAuthorization ----<br>function transferWithAuthorization(<br> address from,<br> address to,<br> uint256 value,<br> uint256 validAfter,<br> uint256 validBefore,<br> bytes32 nonce,<br> uint8 v,<br> bytes32 r,<br> bytes32 s) external {<br>require(<br> block.timestamp > validAfter,<br> "FiatTokenV2: authorization is not yet valid");<br>require(<br> block.timestamp < validBefore, <br> "FiatTokenV2: authorization is expired");<br>require(<br> !_authorizationStates[from][nonce],<br> "FiatTokenV2: authorization is used or canceled");<br>_requireValidSignature(<br> from,<br> keccak256(<br> abi.encode(<br> TRANSFER_WITH_AUTHORIZATION_TYPEHASH,<br> from,<br> to,<br> value,<br> validAfter,<br> validBefore,<br> nonce)),<br> v,<br> r,<br> s);<br>_authorizationStates[from][nonce] = true;<br> emit AuthorizationUsed(from, nonce);<br>_transfer(from, to, value);<br> }<br>function _requireValidSignature(<br> address signer,<br> bytes32 dataHash,<br> uint8 v,<br> bytes32 r,<br> bytes32 s) private view {<br> require(<br> _isValidSignatureNow(<br> signer,<br> _toTypedDataHash(dataHash),<br> v,<br> r,<br> s),<br> "FiatTokenV2: invalid signature");<br> }<br>function _toTypedDataHash(bytes32 structHash)<br> internal<br> view<br> returns (bytes32 digest)<br> {<br> bytes32 separator = domainSeparator();<br> assembly {<br> let ptr := mload(0x40)<br> mstore(ptr, "\x19\x01")<br> mstore(add(ptr, 0x02), separator)<br> mstore(add(ptr, 0x22), structHash)<br> digest := keccak256(ptr, 0x42)<br> }<br> }<br>function _isValidSignatureNow(<br> address signer,<br> bytes32 digest,<br> uint8 v,<br> bytes32 r,<br> bytes32 s) private view returns (bool) {<br> if (!_isContract(signer)) {<br> return _recover(digest, v, r, s) == signer;<br> }<br> return false;<br> }<br>function _isContract(address addr) private view returns (bool) {<br> uint256 size;<br> assembly {<br> size := extcodesize(addr)<br> }<br> return size > 0;<br> }<br>function _recover(<br> bytes32 digest,<br> uint8 v,<br> bytes32 r,<br> bytes32 s) private pure returns (address) {<br> if (<br> uint256(s) ><br> 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {<br> revert("ECRecover: invalid signature 's' value");<br> }<br>if (v != 27 && v != 28) {<br> revert("ECRecover: invalid signature 'v' value");<br> }<br>address signer = ecrecover(digest, v, r, s);<br> require(signer != address(0), "ECRecover: invalid signature");<br>return signer;<br> }<br>} |
| [Contents](#toc) |

---

## IERC20Metadata.sol

---

| |
|:---|
| **contracts/center/ERC20/IERC20Metadata.sol** |
| <br>// SPDX-License-Identifier: MIT<br> // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)<br>pragma solidity ^0.8.0;<br>import "./IERC20.sol";<br>/\*\*<br> \* @dev Interface for the optional metadata functions from the ERC20 standard.<br> \*<br> \* _Available since v4.1._<br> \*/<br> interface IERC20Metadata is IERC20 {<br> /\*\*<br> \* @dev Returns the name of the token.<br> \*/<br> function name() external view returns (string memory);<br>/\*\*<br> \* @dev Returns the symbol of the token.<br> \*/<br> function symbol() external view returns (string memory);<br>/\*\*<br> \* @dev Returns the decimals places of the token.<br> \*/<br> function decimals() external view returns (uint8);<br> }<br>|
| [Contents](#toc) |

---

## IUSDC.sol

---

| |
|:---|
| **contracts/center/ERC20/IUSDC.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IERC20.sol";<br>// Decimal = 6 <br> interface IUSDC is IERC20{<br>event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);<br>function authorizationState(address authorizer, bytes32 nonce)<br> external<br> view<br> returns (bool);<br>// ---- Mint & Burn ----<br>function mint(address to, uint amt) external;<br>function burn(uint amt) external;<br>// ---- TransferWithAuthorization ----<br>function transferWithAuthorization(<br> address from,<br> address to,<br> uint256 value,<br> uint256 validAfter,<br> uint256 validBefore,<br> bytes32 nonce,<br> uint8 v,<br> bytes32 r,<br> bytes32 s) external;<br>} |
| [Contents](#toc) |

---

## Context.sol

---

| |
|:---|
| **contracts/center/ERC20/Context.sol** |
| <br>// SPDX-License-Identifier: MIT<br> // OpenZeppelin Contracts v4.4.1 (utils/Context.sol)<br>pragma solidity ^0.8.0;<br>/\*\*<br> \* @dev Provides information about the current execution context, including the<br> \* sender of the transaction and its data. While these are generally available<br> \* via msg.sender and msg.data, they should not be accessed in such a direct<br> \* manner, since when dealing with meta-transactions the account sending and<br> \* paying for execution may not be the actual sender (as far as an application<br> \* is concerned).<br> \*<br> \* This contract is only required for intermediate, library-like contracts.<br> \*/<br> abstract contract Context {<br> function _msgSender() internal view virtual returns (address) {<br> return msg.sender;<br> }<br>function _msgData() internal view virtual returns (bytes calldata) {<br> return msg.data;<br> }<br> }<br>|
| [Contents](#toc) |

---

## BookOfDocs.sol

---

| |
|:---|
| **contracts/center/books/BookOfDocs.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IBookOfDocs.sol";<br>import "../access/IOwnable.sol";<br>import "./BookOfPoints.sol";<br>contract BookOfDocs is IBookOfDocs, BookOfPoints {<br> using DocsRepo for DocsRepo.Repo;<br> using DocsRepo for DocsRepo.Head;<br>DocsRepo.Repo private _docs;<br>constructor(address keeper) BookOfPoints(keeper) {}<br>// ###############<br> // ## Docs ##<br> // ###############<br>function setTemplate(<br> uint typeOfDoc, address body, uint author) external onlyKeeper {<br> DocsRepo.Head memory head = <br> _docs.setTemplate(typeOfDoc, body, author, getMyUserNo());<br>emit SetTemplate(head.typeOfDoc, head.version, body);<br> }<br>function transferIPR(uint typeOfDoc, uint version, uint transferee) external {<br> _docs.transferIPR(typeOfDoc, version, transferee, getMyUserNo());<br>emit TransferIPR(typeOfDoc, version, transferee);<br> }<br>function createDoc(bytes32 snOfDoc,address primeKeyOfOwner) external returns(<br> DocsRepo.Doc memory doc) {<br> doc = _docs.createDoc(snOfDoc, msg.sender);<br> IOwnable(doc.body).init(primeKeyOfOwner, address(this));<br>emit CreateDoc(doc.head.codifyHead(), doc.body);<br> }<br>// ##################<br> // ## Read I/O ##<br> // ##################<br>function counterOfTypes() external view returns(uint32) {<br> return _docs.counterOfTypes();<br> }<br>function counterOfVersions(uint256 typeOfDoc) external view returns(uint32) {<br> return _docs.counterOfVersions(uint32(typeOfDoc));<br> }<br>function counterOfDocs(uint256 typeOfDoc, uint256 version) external view returns(uint64) {<br> return _docs.counterOfDocs(uint32(typeOfDoc), uint32(version));<br> }<br>function docExist(address body) public view returns(bool) {<br> return _docs.docExist(body);<br> }<br>function getAuthor(uint typeOfDoc, uint version) external view returns(uint40) {<br> return _docs.getAuthor(typeOfDoc, version);<br> }<br>function getAuthorByBody(address body) external view returns(uint40) {<br> return _docs.getAuthorByBody(body);<br> }<br>function getHeadByBody(address body) public view returns (DocsRepo.Head memory) {<br> return _docs.getHeadByBody(body);<br> }<br>function getDoc(bytes32 snOfDoc) external view returns(DocsRepo.Doc memory doc) {<br> doc = _docs.getDoc(snOfDoc);<br> }<br>function getDocByUserNo(uint acct) external view returns (DocsRepo.Doc memory doc) {<br> if (counterOfUsers() >= acct) { <br> doc.body = _getUserByNo(acct).primeKey.pubKey;<br> if (_docs.docExist(doc.body)) doc.head = _docs.heads[doc.body];<br> else doc.body = address(0);<br> }<br> }<br>function verifyDoc(bytes32 snOfDoc) external view returns(bool flag) {<br> flag = _docs.verifyDoc(snOfDoc);<br> }<br>function getVersionsList(uint256 typeOfDoc) external view returns(DocsRepo.Doc[] memory) {<br> return _docs.getVersionsList(uint32(typeOfDoc));<br> }<br>function getDocsList(bytes32 snOfDoc) external view returns(DocsRepo.Doc[] memory) {<br> return _docs.getDocsList(snOfDoc);<br> } <br> }<br>|
| [Contents](#toc) |

---

## IBookOfUsers.sol

---

| |
|:---|
| **contracts/center/books/IBookOfUsers.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../lib/UsersRepo.sol";<br>interface IBookOfUsers {<br>// ##################<br> // ## Event ##<br> // ##################<br>// ==== Config ====<br>event SetPlatformRule(bytes32 indexed snOfRule);<br>event TransferOwnership(address indexed newOwner);<br>event TurnOverCenterKey(address indexed newKeeper);<br>// ##################<br> // ## Write ##<br> // ##################<br>// ==== Opts Setting ====<br>function setPlatformRule(bytes32 snOfRule) external;<br>// ==== Power transfer ====<br>function transferOwnership(address newOwner) external;<br>function handoverCenterKey(address newKeeper) external;<br>// ==== User ====<br>function setBackupKey(address bKey) external;<br>function upgradeBackupToPrime() external;<br>function setRoyaltyRule(bytes32 snOfRoyalty) external;<br>// #################<br> // ## Read ##<br> // #################<br>// ==== Config ====<br>function getOwner() external view returns (address);<br>function getBookeeper() external view returns (address);<br>function getPlatformRule() external returns(UsersRepo.Rule memory);<br>// ==== Users ====<br>function isKey(address key) external view returns (bool);<br>function counterOfUsers() external view returns(uint40);<br>function getUser() external view returns (UsersRepo.User memory);<br>function getMyUserNo() external returns (uint40);<br>function getRoyaltyRule(uint author)external view returns (UsersRepo.Key memory);<br> }<br>|
| [Contents](#toc) |

---

## BookOfPoints.sol

---

| |
|:---|
| **contracts/center/books/BookOfPoints.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IBookOfPoints.sol";<br> import "../ERC20/ERC20.sol";<br> import "./BookOfUsers.sol";<br>contract BookOfPoints is IBookOfPoints, ERC20("ComBooxPoints", "CBP"), BookOfUsers {<br> using LockersRepo for LockersRepo.Repo;<br>mapping(address => uint256) private _coffers;<br> LockersRepo.Repo private _lockers;<br>constructor(address keeper) BookOfUsers(keeper){}<br>// ##################<br> // ## Mint & Lock ##<br> // ##################<br>function mint(address to, uint amt) external onlyOwner {<br> _mint(to, amt);<br> }<br>function burn(uint amt) external {<br> _burn(msg.sender, amt);<br> }<br>function _prepareLockerHead(<br> uint to,<br> uint amt,<br> uint expireDate) private view returns (LockersRepo.Head memory head) {<br> require((amt >> 128) == 0, <br> "UR.prepareLockerHead: amt overflow");<br>head = LockersRepo.Head({<br> from: getMyUserNo(),<br> to: uint40(to),<br> expireDate: uint48(expireDate),<br> value: uint128(amt)<br> });<br> }<br>function _lockPoints(<br> uint to,<br> uint amt,<br> uint expireDate,<br> bytes32 hashLock) private {<br> LockersRepo.Head memory head = <br> _prepareLockerHead(to, amt, expireDate);<br> _lockers.lockPoints(head, hashLock);<br> emit LockPoints(LockersRepo.codifyHead(head), hashLock);<br> }<br>function _lockPointsInCoffer(address beneficiary, uint value) private {<br> _coffers[beneficiary] += value;<br> _coffers[address(0)] += value;<br> emit LockPointsInCoffer(beneficiary, value);<br> }<br>function mintAndLockPoints(<br> uint to, <br> uint amtOfGLee, <br> uint expireDate, <br> bytes32 hashLock) external onlyOwner {<br> _lockPoints(to, amtOfGLee, expireDate, hashLock);<br> uint amt = amtOfGLee \* 10 \*\* 9;<br> _mint(address(this), amt);<br> _lockPointsInCoffer(msg.sender, amt);<br> }<br>function lockPoints(<br> uint to, <br> uint amtOfGLee, <br> uint expireDate, <br> bytes32 hashLock) external {<br> _lockPoints(to, amtOfGLee, expireDate, hashLock);<br> uint amt = amtOfGLee \* 10 \*\* 9;<br> _transfer(msg.sender, address(this), amt);<br> _lockPointsInCoffer(msg.sender, amt);<br> }<br>function lockConsideration(<br> uint to, <br> uint amtOfGLee, <br> uint expireDate, <br> address counterLocker, <br> bytes calldata payload, <br> bytes32 hashLock) external {<br>LockersRepo.Head memory head =<br> _prepareLockerHead(to, amtOfGLee, expireDate);<br> LockersRepo.Body memory body = LockersRepo.Body({<br> counterLocker: counterLocker,<br> payload: payload<br> });<br>_lockers.lockConsideration(head, body, hashLock);<br>_lockPointsInCoffer(msg.sender, amtOfGLee \* 10 \*\* 9);<br>emit LockConsideration(LockersRepo.codifyHead(head), counterLocker, payload, hashLock);<br> }<br>function _pickupPointsFromCoffer(address from, address to, uint amt) private {<br> require(_coffers[from] >= amt, <br> "BOP.pickupPointsFromCoffer: insufficient balance");<br> _coffers[from] -= amt;<br> _coffers[address(0)] -= amt;<br> _transfer(address(this), to, amt);<br> emit PickupPointsFromCoffer(from, to, amt);<br> }<br>function pickupPoints(bytes32 hashLock, string memory hashKey) external<br> {<br> uint caller = getMyUserNo();<br>LockersRepo.Head memory head = <br> _lockers.pickupPoints(hashLock, hashKey, caller);<br>if (head.value > 0) {<br> _pickupPointsFromCoffer(<br> _getUserByNo(head.from).primeKey.pubKey,<br> _getUserByNo(head.to).primeKey.pubKey,<br> head.value \* 10 \*\* 9);<br> }<br> }<br>function _withdrawPoints(address from, uint amt) private {<br> require(_coffers[from] >= amt, <br> "RC.withdrawPoints: insufficient balance");<br> _coffers[from] -= amt;<br> _coffers[address(0)] -= amt;<br> _transfer(address(this), from, amt);<br> emit WithdrawPointsFromLocker(from, amt);<br> }<br>function withdrawPoints(bytes32 hashLock) external<br> {<br> uint caller = getMyUserNo();<br> LockersRepo.Head memory head = <br> _lockers.withdrawDeposit(hashLock, caller);<br>if (head.value > 0) {<br> _withdrawPoints(<br> msg.sender,<br> head.value \* 10 \*\* 9);<br> emit WithdrawPoints(LockersRepo.codifyHead(head));<br> }<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>function getDepositAmt(address from) external view returns(uint) {<br> return _coffers[from];<br> }<br>function getLocker(bytes32 hashLock) external<br> view returns (LockersRepo.Locker memory locker)<br> {<br> locker = _lockers.getLocker(hashLock);<br> }<br>function getLocksList() external <br> view returns (bytes32[] memory)<br> {<br> return _lockers.getSnList();<br> }<br> }<br>|
| [Contents](#toc) |

---

## BookOfUsers.sol

---

| |
|:---|
| **contracts/center/books/BookOfUsers.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IBookOfUsers.sol";<br>contract BookOfUsers is IBookOfUsers {<br> using UsersRepo for UsersRepo.Repo;<br> using UsersRepo for uint256;<br>UsersRepo.Repo private _users;<br>constructor(address keeper) {<br> _users.users[0].primeKey.pubKey = msg.sender;<br> _users.users[0].backupKey.pubKey = keeper;<br> _users.regUser(msg.sender);<br> _users.regUser(keeper);<br> }<br>modifier onlyOwner() {<br> require(msg.sender == getOwner(),<br> "BOU: not owner");<br> _;<br> }<br>modifier onlyKeeper() {<br> require(msg.sender == getBookeeper(),<br> "BOU: not keeper");<br> _;<br> }<br>// #####################<br> // ## Write I/O ##<br> // #####################<br>// ==== Config ====<br>function setPlatformRule(bytes32 snOfRule) external {<br> _users.setPlatformRule(snOfRule, msg.sender);<br> emit SetPlatformRule(snOfRule);<br> }<br>function transferOwnership(address newOwner) external {<br> _users.transferOwnership(newOwner, msg.sender);<br> emit TransferOwnership(newOwner);<br> }<br>function handoverCenterKey(address newKeeper) external {<br> _users.handoverCenterKey(newKeeper, msg.sender);<br> emit TurnOverCenterKey(newKeeper);<br> }<br>// ==== Users ====<br>function _regUser() internal returns(uint){<br> UsersRepo.User memory user = _users.regUser(msg.sender);<br> return user.primeKey.gift;<br> }<br>function setBackupKey(address bKey) external {<br> _users.setBackupKey(bKey, msg.sender);<br> }<br>function upgradeBackupToPrime() external {<br> _users.upgradeBackupToPrime(msg.sender);<br> }<br>function setRoyaltyRule(bytes32 snOfRoyalty) external {<br> _users.setRoyaltyRule(snOfRoyalty, msg.sender);<br> } <br>// ################<br> // ## Read I/O ##<br> // ################<br>// ==== Config ====<br>function getOwner() public view returns (address) {<br> return _users.getOwner();<br> }<br>function getBookeeper() public view returns (address) {<br> return _users.getBookeeper();<br> }<br>function getPlatformRule() public view returns(UsersRepo.Rule memory) {<br> return _users.getPlatformRule();<br> }<br>// ==== Users ====<br>function isKey(address key) external view returns (bool) {<br> return _users.isKey(key);<br> }<br>function counterOfUsers() public view returns(uint40) {<br> return _users.counterOfUsers();<br> }<br>function _getUserByNo(uint acct) internal view returns (UsersRepo.User memory)<br> {<br> require(acct>0, "BOU: zero userNo");<br> return _users.users[acct];<br> }<br>function getUser() external view returns (UsersRepo.User memory)<br> {<br> return _users.getUser(msg.sender);<br> }<br>function _getUserNo(address targetAddr) internal view returns (uint40) {<br> return _users.getUserNo(targetAddr);<br> }<br>function getMyUserNo() public view returns(uint40) {<br> return _users.getUserNo(msg.sender);<br> }<br>function getRoyaltyRule(uint author)public view returns (UsersRepo.Key memory) {<br> return _users.getRoyaltyRule(author);<br> }<br> }<br>|
| [Contents](#toc) |

---

## IBookOfDocs.sol

---

| |
|:---|
| **contracts/center/books/IBookOfDocs.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../lib/DocsRepo.sol";<br>interface IBookOfDocs {<br>// ##################<br> // ## Event ##<br> // ##################<br>// ==== Docs ====<br>event SetTemplate(uint256 indexed typeOfDoc, uint256 indexed version, address indexed body);<br>event TransferIPR(uint indexed typeOfDoc, uint indexed version, uint indexed transferee);<br>event CreateDoc(bytes32 indexed snOfDoc, address indexed body);<br>event InsertDoc(bytes32 indexed snOfDoc, address indexed body);<br>// ##################<br> // ## Write ##<br> // ##################<br>function setTemplate(uint typeOfDoc, address body, uint author) external;<br>function transferIPR(uint typeOfDoc, uint version, uint transferee) external;<br>function createDoc(bytes32 snOfDoc, address primeKeyOfOwner) external <br> returns(DocsRepo.Doc memory doc);<br>// #################<br> // ## Read ##<br> // #################<br>function counterOfTypes() external view returns(uint32);<br>function counterOfVersions(uint256 typeOfDoc) external view returns(uint32 seq);<br>function counterOfDocs(uint256 typeOfDoc, uint256 version) external view returns(uint64 seq);<br>function docExist(address body) external view returns(bool);<br>function getAuthor(uint typeOfDoc, uint version) external view returns(uint40);<br>function getAuthorByBody(address body) external view returns(uint40);<br>function getHeadByBody(address body) external view returns (DocsRepo.Head memory);<br>function getDoc(bytes32 snOfDoc) external view returns(DocsRepo.Doc memory doc);<br>function getDocByUserNo(uint acct) external view returns (DocsRepo.Doc memory doc);<br>function verifyDoc(bytes32 snOfDoc) external view returns(bool flag);<br>function getVersionsList(uint256 typeOfDoc) external view returns(DocsRepo.Doc[] memory);<br>function getDocsList(bytes32 snOfDoc) external view returns(DocsRepo.Doc[] memory);<br> }<br>|
| [Contents](#toc) |

---

## IBookOfPoints.sol

---

| |
|:---|
| **contracts/center/books/IBookOfPoints.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../lib/LockersRepo.sol";<br>interface IBookOfPoints {<br>// ##################<br> // ## Event ##<br> // ##################<br>// ==== Points ====<br>event LockPoints(bytes32 indexed headSn, bytes32 indexed hashLock);<br>event LockPointsInCoffer(address indexed beneficiary, uint indexed amt);<br>event LockConsideration(bytes32 indexed headSn, address indexed counterLocker, bytes payload, bytes32 indexed hashLock);<br>event PickupPoints(bytes32 indexed head);<br>event PickupPointsFromCoffer(address indexed from, address indexed to, uint indexed amt);<br>event WithdrawPoints(bytes32 indexed head);<br>event WithdrawPointsFromLocker(address indexed from, uint indexed amt);<br>// ##################<br> // ## Write ##<br> // ##################<br>function mint(address to, uint amt) external;<br>function burn(uint amt) external;<br>function mintAndLockPoints(uint to, uint amtOfGLee, uint expireDate, bytes32 hashLock) external;<br>// ==== Points Trade ====<br>function lockPoints(uint to, uint amtOfGLee, uint expireDate, bytes32 hashLock) external;<br>function lockConsideration(uint to, uint amtOfGLee, uint expireDate, address counterLocker, bytes memory payload, bytes32 hashLock) external;<br>function pickupPoints(bytes32 hashLock, string memory hashKey) external;<br>function withdrawPoints(bytes32 hashLock) external;<br>// ##################<br> // ## Read ##<br> // ##################<br>function getDepositAmt(address from) external view returns(uint);<br>function getLocker(bytes32 hashLock) external view <br> returns (LockersRepo.Locker memory locker);<br>function getLocksList() external view <br> returns (bytes32[] memory);<br> }<br>|
| [Contents](#toc) |

---

## DealsRepo.sol

---

| |
|:---|
| **contracts/lib/DealsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br> import "./MotionsRepo.sol";<br> import "./SwapsRepo.sol";<br> import "./SharesRepo.sol";<br>import "../comps/common/components/IMeetingMinutes.sol";<br> import "../comps/books/ros/IRegisterOfShares.sol";<br>library DealsRepo {<br> using EnumerableSet for EnumerableSet.UintSet;<br> using SwapsRepo for SwapsRepo.Repo;<br>// _deals[0].head {<br> // seqOfDeal: counterOfClosedDeal;<br> // preSeq: counterOfDeal;<br> // typeOfDeal: typeOfIA;<br> // } <br>enum TypeOfDeal {<br> ZeroPoint,<br> CapitalIncrease,<br> ShareTransferExt,<br> ShareTransferInt,<br> PreEmptive,<br> TagAlong,<br> DragAlong,<br> FirstRefusal,<br> FreeGift<br> }<br>enum TypeOfIA {<br> ZeroPoint,<br> CapitalIncrease,<br> ShareTransferExt,<br> ShareTransferInt,<br> CI_STint,<br> SText_STint,<br> CI_SText_STint,<br> CI_SText<br> }<br>enum StateOfDeal {<br> Drafting,<br> Locked,<br> Cleared,<br> Closed,<br> Terminated<br> }<br>struct Head {<br> uint8 typeOfDeal;<br> uint16 seqOfDeal;<br> uint16 preSeq;<br> uint16 classOfShare;<br> uint32 seqOfShare;<br> uint40 seller;<br> uint32 priceOfPaid;<br> uint32 priceOfPar;<br> uint48 closingDeadline;<br> uint16 votingWeight;<br> }<br>struct Body {<br> uint40 buyer;<br> uint40 groupOfBuyer;<br> uint64 paid;<br> uint64 par;<br> uint8 state;<br> uint16 para;<br> uint16 distrWeight;<br> bool flag;<br> }<br>struct Deal {<br> Head head;<br> Body body;<br> bytes32 hashLock;<br> }<br>struct Repo {<br> mapping(uint256 => Deal) deals;<br> mapping(uint256 => SwapsRepo.Repo) swaps;<br> //seqOfDeal => seqOfShare => bool<br> mapping(uint => mapping(uint => bool)) priceDiffRequested;<br> EnumerableSet.UintSet seqList;<br> }<br>//##################<br> //## Modifier ##<br> //##################<br>modifier onlyCleared(Repo storage repo, uint256 seqOfDeal) {<br> require(<br> repo.deals[seqOfDeal].body.state == uint8(StateOfDeal.Cleared),<br> "DR.mf.OC: wrong stateOfDeal");<br> _;<br> }<br>modifier dealExist(Repo storage repo, uint seqOfDeal) {<br> require(isDeal(repo, seqOfDeal), "DR.mf.dealExist: not");<br> _;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>function snParser(bytes32 sn) public pure returns(Head memory head) {<br> uint _sn = uint(sn);<br>head = Head({<br> typeOfDeal: uint8(_sn >> 248),<br> seqOfDeal: uint16(_sn >> 232),<br> preSeq: uint16(_sn >> 216),<br> classOfShare: uint16(_sn >> 200),<br> seqOfShare: uint32(_sn >> 168),<br> seller: uint40(_sn >> 128),<br> priceOfPaid: uint32(_sn >> 96),<br> priceOfPar: uint32(_sn >> 64),<br> closingDeadline: uint48(_sn >> 16),<br> votingWeight: uint16(_sn) <br> });<br>} <br>function codifyHead(Head memory head) public pure returns(bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> head.typeOfDeal,<br> head.seqOfDeal,<br> head.preSeq,<br> head.classOfShare,<br> head.seqOfShare,<br> head.seller,<br> head.priceOfPaid,<br> head.priceOfPaid,<br> head.closingDeadline,<br> head.votingWeight); <br> assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br> }<br>function addDeal(<br> Repo storage repo,<br> bytes32 sn,<br> uint buyer,<br> uint groupOfBuyer,<br> uint paid,<br> uint par,<br> uint distrWeight) public returns (uint16 seqOfDeal) {<br>Deal memory deal;<br>deal.head = snParser(sn);<br>deal.body.buyer = uint40(buyer);<br> deal.body.groupOfBuyer = uint40(groupOfBuyer);<br> deal.body.paid = uint64(paid);<br> deal.body.par = uint64(par);<br> deal.body.distrWeight = uint16(distrWeight);<br>seqOfDeal = regDeal(repo, deal);<br> }<br>function regDeal(Repo storage repo, Deal memory deal) <br> public returns(uint16 seqOfDeal) <br> {<br> require(deal.body.par > 0, "DR.RD: zero par");<br> require(deal.body.par >= deal.body.paid, "DR.RD: paid overflow");<br>deal.head.seqOfDeal = _increaseCounterOfDeal(repo);<br> repo.seqList.add(deal.head.seqOfDeal);<br>repo.deals[deal.head.seqOfDeal] = Deal({<br> head: deal.head,<br> body: deal.body,<br> hashLock: bytes32(0)<br> });<br> seqOfDeal = deal.head.seqOfDeal;<br> }<br>function _increaseCounterOfDeal(Repo storage repo) private returns(uint16 seqOfDeal){<br> repo.deals[0].head.preSeq++;<br> seqOfDeal = repo.deals[0].head.preSeq;<br> }<br>function delDeal(Repo storage repo, uint256 seqOfDeal) public returns (bool flag) {<br> if (repo.seqList.remove(seqOfDeal)) {<br> delete repo.deals[seqOfDeal];<br> repo.deals[0].head.preSeq--;<br> flag = true;<br> }<br> }<br>function lockDealSubject(Repo storage repo, uint256 seqOfDeal) public returns (bool flag) {<br> if (repo.deals[seqOfDeal].body.state == uint8(StateOfDeal.Drafting)) {<br> repo.deals[seqOfDeal].body.state = uint8(StateOfDeal.Locked);<br> flag = true;<br> }<br> }<br>function releaseDealSubject(Repo storage repo, uint256 seqOfDeal) public returns (bool flag)<br> {<br> uint8 state = repo.deals[seqOfDeal].body.state;<br>if (state < uint8(StateOfDeal.Closed)) {<br>repo.deals[seqOfDeal].body.state = uint8(StateOfDeal.Drafting);<br> flag = true;<br>} else if (state == uint8(StateOfDeal.Terminated)) {<br>flag = true; <br> }<br> }<br>function clearDealCP(<br> Repo storage repo,<br> uint256 seqOfDeal,<br> bytes32 hashLock,<br> uint closingDeadline) public {<br> Deal storage deal = repo.deals[seqOfDeal];<br>require(deal.body.state == uint8(StateOfDeal.Locked), <br> "IA.CDCP: wrong Deal state");<br>deal.body.state = uint8(StateOfDeal.Cleared);<br> deal.hashLock = hashLock;<br>if (closingDeadline > 0) {<br> if (block.timestamp < closingDeadline) <br> deal.head.closingDeadline = uint48(closingDeadline);<br> else revert ("IA.clearDealCP: updated closingDeadline not FUTURE time");<br> }<br> }<br>function closeDeal(Repo storage repo, uint256 seqOfDeal, string memory hashKey)<br> public onlyCleared(repo, seqOfDeal) returns (bool flag)<br> {<br> require(<br> repo.deals[seqOfDeal].hashLock == keccak256(bytes(hashKey)),<br> "IA.closeDeal: hashKey NOT correct");<br>return _closeDeal(repo, seqOfDeal);<br> }<br>function directCloseDeal(Repo storage repo, uint seqOfDeal) <br> public returns (bool flag) <br> {<br> require(repo.deals[seqOfDeal].body.state == uint8(StateOfDeal.Locked), <br> "IA.directCloseDeal: wrong state of deal");<br>return _closeDeal(repo, seqOfDeal);<br> }<br>function _closeDeal(Repo storage repo, uint seqOfDeal)<br> private returns(bool flag) <br> {<br>Deal storage deal = repo.deals[seqOfDeal];<br>require(<br> block.timestamp < deal.head.closingDeadline,<br> "IA.closeDeal: MISSED closing date");<br>deal.body.state = uint8(StateOfDeal.Closed);<br>_increaseCounterOfClosedDeal(repo);<br>flag = (counterOfDeal(repo) == counterOfClosedDeal(repo));<br> }<br>function terminateDeal(Repo storage repo, uint256 seqOfDeal) public returns(bool flag){<br> Body storage body = repo.deals[seqOfDeal].body;<br>require(body.state == uint8(StateOfDeal.Locked) \|\|<br> body.state == uint8(StateOfDeal.Cleared)<br> , "DR.TD: wrong stateOfDeal");<br>body.state = uint8(StateOfDeal.Terminated);<br>_increaseCounterOfClosedDeal(repo);<br> flag = (counterOfDeal(repo) == counterOfClosedDeal(repo));<br> }<br>function takeGift(Repo storage repo, uint256 seqOfDeal)<br> public returns (bool flag)<br> {<br> Deal storage deal = repo.deals[seqOfDeal];<br>require(<br> deal.head.typeOfDeal == uint8(TypeOfDeal.FreeGift),<br> "not a gift deal");<br>require(<br> repo.deals[deal.head.preSeq].body.state == uint8(StateOfDeal.Closed),<br> "Capital Increase not closed");<br>require(deal.body.state == uint8(StateOfDeal.Locked), "wrong state");<br>deal.body.state = uint8(StateOfDeal.Closed);<br>_increaseCounterOfClosedDeal(repo);<br> flag = (counterOfDeal(repo) == counterOfClosedDeal(repo));<br> }<br>function _increaseCounterOfClosedDeal(Repo storage repo) private {<br> repo.deals[0].head.seqOfDeal++;<br> }<br>function calTypeOfIA(Repo storage repo) public {<br> uint[3] memory types;<br>uint[] memory seqList = repo.seqList.values();<br> uint len = seqList.length;<br>while (len > 0) {<br> uint typeOfDeal = repo.deals[seqList[len-1]].head.typeOfDeal;<br> len--;<br>if (typeOfDeal == 1) {<br> if (types[0] == 0) types[0] = 1;<br> continue;<br> } else if (typeOfDeal == 2) {<br> if (types[1] == 0) types[1] = 2;<br> continue;<br> } else if (typeOfDeal == 3) {<br> if (types[2] == 0) types[2] = 3;<br> continue;<br> }<br> }<br>uint8 sum = uint8(types[0] + types[1] + types[2]);<br> repo.deals[0].head.typeOfDeal = (sum == 3)<br> ? (types[2] == 0)<br> ? 7<br> : 3<br> : sum;<br> }<br>// ==== Swap ====<br>function createSwap(<br> Repo storage repo,<br> uint seqOfMotion,<br> uint seqOfDeal,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> uint caller,<br> IRegisterOfShares _ros,<br> IMeetingMinutes _gmm) public returns(SwapsRepo.Swap memory swap) {<br> Deal storage deal = repo.deals[seqOfDeal];<br>require(caller == deal.head.seller, <br> "DR.createSwap: not seller");<br>require(deal.body.state == uint8(StateOfDeal.Terminated),<br> "DR.createSwap: wrong state");<br>MotionsRepo.Motion memory motion = <br> _gmm.getMotion(seqOfMotion);<br>require(<br> motion.body.state == uint8(MotionsRepo.StateOfMotion.Rejected_ToBuy),<br> "DR.createSwap: NO need to buy");<br>require(block.timestamp < motion.body.voteEndDate + <br> uint48(motion.votingRule.execDaysForPutOpt) \* 86400, <br> "DR.createSwap: missed deadline");<br>swap = SwapsRepo.Swap({<br> seqOfSwap: 0,<br> seqOfPledge: uint32(seqOfPledge),<br> paidOfPledge: 0,<br> seqOfTarget: deal.head.seqOfShare,<br> paidOfTarget: uint64(paidOfTarget),<br> priceOfDeal: deal.head.priceOfPaid,<br> isPutOpt: true,<br> state: uint8(SwapsRepo.StateOfSwap.Issued)<br> });<br>SharesRepo.Head memory headOfPledge = _ros.getShare(swap.seqOfPledge).head;<br>require(_gmm.getBallot(seqOfMotion, _gmm.getDelegateOf(seqOfMotion, <br> headOfPledge.shareholder)).attitude == 2,<br> "DR.createSwap: not vetoer");<br>require (deal.body.paid >= repo.swaps[seqOfDeal].sumPaidOfTarget() +<br> swap.paidOfTarget, "DR.createSwap: paidOfTarget overflow");<br>swap.paidOfPledge = (swap.priceOfDeal - _ros.getShare(swap.seqOfTarget).head.priceOfPaid) \* <br> swap.paidOfTarget / headOfPledge.priceOfPaid;<br>return repo.swaps[seqOfDeal].regSwap(swap);<br> }<br>function payOffSwap(<br> Repo storage repo,<br> // uint seqOfMotion,<br> uint seqOfDeal,<br> uint seqOfSwap<br> // uint msgValue,<br> // uint centPrice,<br> // IMeetingMinutes _gmm) public returns(SwapsRepo.Swap memory){<br>// MotionsRepo.Motion memory motion = _gmm.getMotion(seqOfMotion);<br>// require(block.timestamp < motion.body.voteEndDate + <br> // uint48(motion.votingRule.execDaysForPutOpt) \* 86400, <br> // "DR.payOffSwap: missed deadline");<br>return repo.swaps[seqOfDeal].payOffSwap(seqOfSwap);<br> }<br>function terminateSwap(<br> Repo storage repo,<br> uint seqOfMotion,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> IMeetingMinutes _gmm) public returns (SwapsRepo.Swap memory){<br>MotionsRepo.Motion memory motion = _gmm.getMotion(seqOfMotion);<br>require(block.timestamp >= motion.body.voteEndDate + <br> uint48(motion.votingRule.execDaysForPutOpt) \* 86400, <br> "DR.terminateSwap: still in exec period");<br>return repo.swaps[seqOfDeal].terminateSwap(seqOfSwap);<br> }<br>function payOffApprovedDeal(<br> Repo storage repo,<br> uint seqOfDeal,<br> uint caller) public returns (bool flag){<br>Deal storage deal = repo.deals[seqOfDeal];<br>require(deal.head.typeOfDeal != uint8(TypeOfDeal.FreeGift),<br> "DR.payApprDeal: free gift");<br>require(caller == deal.body.buyer,<br> "DR.payApprDeal: not buyer");<br>require(deal.body.state == uint8(StateOfDeal.Locked) \|\|<br> deal.body.state == uint8(StateOfDeal.Cleared) , <br> "DR.payApprDeal: wrong state");<br>require(block.timestamp < deal.head.closingDeadline,<br> "DR.payApprDeal: missed closingDeadline");<br>deal.body.state = uint8(StateOfDeal.Closed);<br>_increaseCounterOfClosedDeal(repo);<br>flag = (counterOfDeal(repo) == counterOfClosedDeal(repo));<br> }<br>function requestPriceDiff(<br> Repo storage repo,<br> uint seqOfDeal,<br> uint seqOfShare) public dealExist(repo, seqOfDeal) {<br> require(!repo.priceDiffRequested[seqOfDeal][seqOfShare],<br> "DR.requestPriceDiff: already requested");<br> repo.priceDiffRequested[seqOfDeal][seqOfShare] = true; <br> }<br>// ##########################<br> // ## Read I/O ##<br> // ##########################<br>function getTypeOfIA(Repo storage repo) external view returns (uint8) {<br> return repo.deals[0].head.typeOfDeal;<br> }<br>function counterOfDeal(Repo storage repo) public view returns (uint16) {<br> return repo.deals[0].head.preSeq;<br> }<br>function counterOfClosedDeal(Repo storage repo) public view returns (uint16) {<br> return repo.deals[0].head.seqOfDeal;<br> }<br>function isDeal(Repo storage repo, uint256 seqOfDeal) public view returns (bool) {<br> return repo.seqList.contains(seqOfDeal);<br> }<br>function getDeal(Repo storage repo, uint256 seq) <br> external view dealExist(repo, seq) returns (Deal memory)<br> {<br> return repo.deals[seq];<br> }<br>function getSeqList(Repo storage repo) external view returns (uint[] memory) {<br> return repo.seqList.values();<br> }<br>// ==== Swap ====<br>function counterOfSwaps(Repo storage repo, uint seqOfDeal)<br> public view returns (uint16)<br> {<br> return repo.swaps[seqOfDeal].counterOfSwaps();<br> }<br>function sumPaidOfTarget(Repo storage repo, uint seqOfDeal)<br> public view returns (uint64)<br> {<br> return repo.swaps[seqOfDeal].sumPaidOfTarget();<br> }<br>function isSwap(Repo storage repo, uint seqOfDeal, uint256 seqOfSwap)<br> public view returns (bool)<br> {<br> return repo.swaps[seqOfDeal].isSwap(seqOfSwap);<br> }<br>function getSwap(Repo storage repo, uint seqOfDeal, uint256 seqOfSwap)<br> public view returns (SwapsRepo.Swap memory)<br> {<br> return repo.swaps[seqOfDeal].getSwap(seqOfSwap);<br> }<br>function getAllSwaps(Repo storage repo, uint seqOfDeal)<br> public view returns (SwapsRepo.Swap[] memory)<br> {<br> return repo.swaps[seqOfDeal].getAllSwaps();<br> }<br>function allSwapsClosed(Repo storage repo, uint seqOfDeal)<br> public view returns (bool)<br> {<br> return repo.swaps[seqOfDeal].allSwapsClosed();<br> }<br>// ==== Value Calculation ==== <br>// function checkValueOfSwap(<br> // Repo storage repo,<br> // uint seqOfDeal,<br> // uint seqOfSwap,<br> // uint centPrice<br> //) public view dealExist(repo, seqOfDeal) returns (uint) {<br> // return repo.swaps[seqOfDeal].checkValueOfSwap(seqOfSwap, centPrice);<br> // }<br>function checkValueOfDeal(<br> Repo storage repo, <br> uint seqOfDeal, <br> uint centPrice) public view returns (uint) {<br> Deal memory deal = repo.deals[seqOfDeal];<br>return centPrice \* (deal.body.paid \* deal.head.priceOfPaid + <br> (deal.body.par - deal.body.paid) \* deal.head.priceOfPar) / 10 \*\* 6;<br> } <br> }<br>|
| [Contents](#toc) |

---

## MembersRepo.sol

---

| |
|:---|
| **contracts/lib/MembersRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./Checkpoints.sol";<br> import "./EnumerableSet.sol";<br> import "./SharesRepo.sol";<br> import "./TopChain.sol";<br>import "../comps/books/ros/IRegisterOfShares.sol";<br>library MembersRepo {<br> using Checkpoints for Checkpoints.History;<br> using EnumerableSet for EnumerableSet.UintSet;<br> using TopChain for TopChain.Chain;<br>struct Member {<br> Checkpoints.History votesInHand;<br> // class => seqList<br> mapping(uint => EnumerableSet.UintSet) sharesOfClass;<br> EnumerableSet.UintSet classesBelonged;<br> }<br>/\*<br> members[0] {<br> votesInHand: ownersEquity;<br> }<br> \*/<br>/\* Node[0] {<br> prev: tail;<br> next: head;<br> ptr: pending;<br> amt: pending;<br> sum: totalVotes;<br> cat: basedOnPar;<br> } \*/<br>struct Repo {<br> TopChain.Chain chain;<br> mapping(uint256 => Member) members;<br> // class => membersList<br> mapping(uint => EnumerableSet.UintSet) membersOfClass;<br> }<br>//###############<br> //## Modifer ##<br> //###############<br>modifier memberExist(<br> Repo storage repo,<br> uint acct) {<br> require(isMember(repo, acct),<br> "MR.memberExist: not");<br> _;<br> }<br>//##################<br> //## Write I/O ##<br> //##################<br>// ==== Zero Node Setting ====<br>function setVoteBase(<br> Repo storage repo,<br> IRegisterOfShares ros,<br> bool _basedOnPar) public returns (bool flag) {<br>if (repo.chain.basedOnPar() != _basedOnPar) {<br> uint256[] memory members = <br> repo.membersOfClass[0].values();<br> uint256 len = members.length;<br>while (len > 0) {<br> uint256 cur = members[len - 1];<br>Member storage m = repo.members[cur];<br>Checkpoints.Checkpoint memory cp = <br> m.votesInHand.latest();<br>if (cp.paid != cp.par) {<br>(uint sumOfVotes, uint sumOfDistrs) = _sortWeights(m, ros, _basedOnPar);<br>if (_basedOnPar) {<br> repo.chain.increaseAmt(cur, sumOfVotes - cp.points, true);<br> } else {<br> repo.chain.increaseAmt(cur, cp.points - sumOfVotes, false);<br> }<br>uint64 amt = _basedOnPar ? cp.par : cp.paid;<br>cp.rate = uint16(sumOfVotes \* 100 / amt);<br> cp.points = uint64(sumOfVotes);<br> m.votesInHand.push(cp.rate, cp.paid, cp.par, cp.points);<br>cp.rate = uint16(sumOfDistrs \* 100 / amt);<br> cp.points = uint64(sumOfDistrs);<br> m.votesInHand.updateDistrPoints(cp.rate, cp.paid, cp.par, cp.points);<br> }<br>len--;<br> }<br>repo.chain.setVoteBase(_basedOnPar);<br>flag = true;<br> }<br> }<br>function _sortWeights(<br> Member storage m,<br> IRegisterOfShares ros,<br> bool basedOnPar) private view returns(uint sumOfVotes, uint sumOfDistrs) { <br>uint[] memory ls = m.sharesOfClass[0].values();<br> uint len = ls.length;<br>while (len > 0) {<br> SharesRepo.Share memory share = ros.getShare(ls[len-1]);<br>uint amt = basedOnPar ? share.body.par : share.body.paid;<br>sumOfVotes += amt \* share.head.votingWeight / 100;<br> sumOfDistrs += amt \* share.body.distrWeight / 100;<br>len--; <br> }<br> }<br>// ==== Member ====<br>function addMember(<br> Repo storage repo, <br> uint acct) public returns (bool flag) {<br> if (repo.membersOfClass[0].add(acct)) {<br> repo.chain.addNode(acct);<br> flag = true;<br> }<br> }<br>function delMember(<br> Repo storage repo, <br> uint acct) public {<br> if (repo.membersOfClass[0].remove(acct)) {<br> repo.chain.delNode(acct);<br> delete repo.members[acct];<br> }<br> }<br>function addShareToMember(<br> Repo storage repo,<br> SharesRepo.Head memory head) public {<br>Member storage member = repo.members[head.shareholder];<br>if (member.sharesOfClass[0].add(head.seqOfShare)<br> && member.sharesOfClass[head.class].add(head.seqOfShare)<br> && member.classesBelonged.add(head.class))<br> repo.membersOfClass[head.class].add(head.shareholder);<br> }<br>function removeShareFromMember(<br> Repo storage repo,<br> SharesRepo.Head memory head) public {<br>Member storage member = <br> repo.members[head.shareholder];<br>if (member.sharesOfClass[head.class].remove(head.seqOfShare)<br> && member.sharesOfClass[0].remove(head.seqOfShare)) {<br>if(member.sharesOfClass[head.class].length() == 0) {<br> repo.membersOfClass[head.class].remove(head.shareholder);<br> member.classesBelonged.remove(head.class);<br> }<br> }<br>}<br>function increaseAmtOfMember(<br> Repo storage repo,<br> uint acct,<br> uint votingWeight,<br> uint distrWeight,<br> uint deltaPaid,<br> uint deltaPar,<br> bool isIncrease) public {<br> _increaseAmtOfMember(repo, acct, votingWeight, distrWeight, deltaPaid, deltaPar, isIncrease);<br> }<br>function _increaseAmtOfMember(<br> Repo storage repo,<br> uint acct,<br> uint votingWeight,<br> uint distrWeight,<br> uint deltaPaid,<br> uint deltaPar,<br> bool isIncrease) private {<br>Member storage m = repo.members[acct];<br> bool basedOnPar = repo.chain.basedOnPar();<br> uint64 deltaAmt = basedOnPar ? uint64(deltaPar) : uint64(deltaPaid);<br>Checkpoints.Checkpoint memory delta = Checkpoints.Checkpoint({<br> timestamp: 0,<br> rate: 0,<br> paid: uint64(deltaPaid),<br> par: uint64(deltaPar),<br> points: uint64(deltaAmt \* votingWeight / 100)<br> });<br>if (acct > 0 && deltaAmt > 0) {<br> repo.chain.increaseAmt(<br> acct, <br> delta.points,<br> isIncrease);<br> }<br>Checkpoints.Checkpoint memory cp = <br> m.votesInHand.latest();<br>cp = _adjustCheckpoint(cp, delta, basedOnPar, isIncrease);<br>m.votesInHand.push(cp.rate, cp.paid, cp.par, cp.points);<br>Checkpoints.Checkpoint memory dp = <br> m.votesInHand.getDistrPoints();<br>delta.points = deltaAmt \* uint16(distrWeight) / 100;<br>dp = _adjustCheckpoint(dp, delta, basedOnPar, isIncrease);<br>m.votesInHand.updateDistrPoints(dp.rate, dp.paid, dp.par, dp.points);<br> }<br>function _adjustCheckpoint(<br> Checkpoints.Checkpoint memory cp,<br> Checkpoints.Checkpoint memory delta,<br> bool basedOnPar,<br> bool isIncrease) private pure returns (Checkpoints.Checkpoint memory output) {<br>if (isIncrease) {<br> output.paid = cp.paid + delta.paid;<br> output.par = cp.par + delta.par;<br> output.points = cp.points + delta.points;<br> } else {<br> output.paid = cp.paid - delta.paid;<br> output.par = cp.par - delta.par;<br> output.points = cp.points - delta.points;<br> }<br>output.rate = basedOnPar<br> ? output.par > 0 ? uint16(output.points \* 100 / output.par) : 0<br> : output.paid > 0 ? uint16(output.points \* 100 / output.paid) : 0;<br> }<br>// function _calWeight(<br> // Checkpoints.Checkpoint memory cp,<br> // bool basedOnPar,<br> // Checkpoints.Checkpoint memory delta,<br> // bool isIncrease<br> //) private pure returns(uint16 output) {<br>// if (isIncrease) {<br> // output = basedOnPar<br> // ? uint16(((cp.votingWeight \* cp.par + delta.votingWeight \* delta.par) \* 100 / (cp.par + delta.par) + 50) / 100)<br> // : uint16(((cp.votingWeight \* cp.paid + delta.votingWeight \* delta.paid) \* 100 / (cp.paid + delta.paid) + 50) / 100);<br> // } else {<br> // output = basedOnPar<br> // ? uint16(((cp.votingWeight \* cp.par - delta.votingWeight \* delta.par) \* 100 / (cp.par - delta.par) + 50) / 100)<br> // : uint16(((cp.votingWeight \* cp.paid - delta.votingWeight \* delta.paid) \* 100 / (cp.paid - delta.paid) + 50) / 100);<br> // }<br> // }<br>function increaseAmtOfCap(<br> Repo storage repo,<br> uint votingWeight,<br> uint distrWeight,<br> uint deltaPaid,<br> uint deltaPar,<br> bool isIncrease) public {<br>_increaseAmtOfMember(repo, 0, votingWeight, distrWeight, deltaPaid, deltaPar, isIncrease);<br>bool basedOnPar = repo.chain.basedOnPar();<br>if (basedOnPar && deltaPar > 0) {<br> repo.chain.increaseTotalVotes(deltaPar \* votingWeight / 100, isIncrease);<br> } else if (!basedOnPar && deltaPaid > 0) {<br> repo.chain.increaseTotalVotes(deltaPaid \* votingWeight / 100, isIncrease);<br> }<br> }<br>// ==== Restore ====<br>function restoreSharesInRepo(Repo storage repo, SharesRepo.Share[] memory shares) public {<br> uint len = shares.length;<br>while (len > 0) {<br> SharesRepo.Share memory share = shares[len - 1];<br>Member storage member = repo.members[share.head.shareholder];<br> member.sharesOfClass[share.head.class].add(share.head.seqOfShare);<br> member.sharesOfClass[0].add(share.head.seqOfShare);<br> member.classesBelonged.add(share.head.class);<br>repo.membersOfClass[share.head.class].add(share.head.shareholder);<br> repo.membersOfClass[0].add(share.head.shareholder);<br>len--;<br> }<br> }<br>//##################<br> //## Read ##<br> //##################<br>// ==== member ====<br>function isMember(<br> Repo storage repo,<br> uint acct) public view returns(bool) {<br> return repo.membersOfClass[0].contains(acct);<br> }<br>function qtyOfMembers(<br> Repo storage repo) public view returns(uint) {<br> return repo.membersOfClass[0].length();<br> }<br>function membersList(<br> Repo storage repo) public view returns(uint[] memory) {<br> return repo.membersOfClass[0].values();<br> }<br>// ---- Votes ----<br>function ownersEquity(<br> Repo storage repo) public view returns(Checkpoints.Checkpoint memory) {<br> return repo.members[0].votesInHand.latest();<br> }<br>function ownersPoints(<br> Repo storage repo) public view returns(Checkpoints.Checkpoint memory) {<br> return repo.members[0].votesInHand.getDistrPoints();<br> }<br>function capAtDate(<br> Repo storage repo,<br> uint date) public view returns(Checkpoints.Checkpoint memory) {<br> return repo.members[0].votesInHand.getAtDate(date);<br> }<br>function ownersEquityHistory(Repo storage repo) public view <br> returns (Checkpoints.Checkpoint[] memory) <br> {<br> return repo.members[0].votesInHand.pointsOfHistory();<br> }<br>function equityOfMember(<br> Repo storage repo,<br> uint acct) public view memberExist(repo, acct) returns(<br> Checkpoints.Checkpoint memory) {<br> return repo.members[acct].votesInHand.latest();<br> }<br>function pointsOfMember(<br> Repo storage repo,<br> uint acct) public view memberExist(repo, acct) returns(<br> Checkpoints.Checkpoint memory) {<br> return repo.members[acct].votesInHand.getDistrPoints();<br> }<br>function equityAtDate(<br> Repo storage repo,<br> uint acct,<br> uint date) public view memberExist(repo, acct) returns(<br> Checkpoints.Checkpoint memory) {<br> return repo.members[acct].votesInHand.getAtDate(date);<br> }<br>function votesAtDate(<br> Repo storage repo,<br> uint256 acct,<br> uint date) public view returns (uint64) { <br> return repo.members[acct].votesInHand.getAtDate(date).points;<br> }<br>function votesHistory(<br> Repo storage repo,<br> uint acct) public view memberExist(repo, acct) <br> returns (Checkpoints.Checkpoint[] memory) <br> {<br> return repo.members[acct].votesInHand.pointsOfHistory();<br> }<br>// ---- Class ----<br>function isClassMember(<br> Repo storage repo, <br> uint256 acct, <br> uint class) public view memberExist(repo, acct) returns (bool flag) {<br> return repo.members[acct].classesBelonged.contains(class);<br> }<br>function classesBelonged(<br> Repo storage repo, <br> uint256 acct) public view memberExist(repo, acct) returns (uint[] memory) {<br> return repo.members[acct].classesBelonged.values();<br> }<br>function qtyOfClassMember(<br> Repo storage repo, <br> uint class) public view returns(uint256) {<br> return repo.membersOfClass[class].length();<br> }<br>function getMembersOfClass(<br> Repo storage repo, <br> uint class) public view returns(uint256[] memory) {<br> return repo.membersOfClass[class].values();<br> }<br>// ---- Share ----<br>function qtyOfSharesInHand(<br> Repo storage repo, <br> uint acct) public view memberExist(repo, acct) returns(uint) {<br> return repo.members[acct].sharesOfClass[0].length();<br> }<br>function sharesInHand(<br> Repo storage repo, <br> uint acct) public view memberExist(repo, acct) returns(uint[] memory) {<br> return repo.members[acct].sharesOfClass[0].values();<br> }<br>function qtyOfSharesInClass(<br> Repo storage repo, <br> uint acct,<br> uint class) public view memberExist(repo, acct) returns(uint) {<br> require(isClassMember(repo, acct, class), <br> "MR.qtyOfSharesInClass: not class member");<br> return repo.members[acct].sharesOfClass[class].length();<br> }<br>function sharesInClass(<br> Repo storage repo, <br> uint acct,<br> uint class) public view memberExist(repo, acct) returns(uint[] memory) {<br> require(isClassMember(repo, acct, class),<br> "MR.sharesInClass: not class member");<br> return repo.members[acct].sharesOfClass[class].values();<br> }<br>}<br>|
| [Contents](#toc) |

---

## MotionsRepo.sol

---

| |
|:---|
| **contracts/lib/MotionsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./BallotsBox.sol";<br> import "./DelegateMap.sol";<br> import "./EnumerableSet.sol";<br> import "./RulesParser.sol";<br>import "../comps/books/roc/IShareholdersAgreement.sol";<br>library MotionsRepo {<br> using BallotsBox for BallotsBox.Box;<br> using DelegateMap for DelegateMap.Map;<br> using EnumerableSet for EnumerableSet.UintSet;<br> using RulesParser for bytes32;<br>enum TypeOfMotion {<br> ZeroPoint,<br> ElectOfficer,<br> RemoveOfficer,<br> ApproveDoc,<br> ApproveAction,<br> TransferFund,<br> DistributeProfits,<br> DeprecateGK<br> }<br>enum StateOfMotion {<br> ZeroPoint, // 0<br> Created, // 1<br> Proposed, // 2<br> Passed, // 3<br> Rejected, // 4<br> Rejected_NotToBuy, // 5<br> Rejected_ToBuy, // 6<br> Executed // 7<br> }<br>struct Head {<br> uint16 typeOfMotion;<br> uint64 seqOfMotion;<br> uint16 seqOfVR;<br> uint40 creator;<br> uint40 executor;<br> uint48 createDate; <br> uint32 data;<br> }<br>struct Body {<br> uint40 proposer;<br> uint48 proposeDate;<br> uint48 shareRegDate;<br> uint48 voteStartDate;<br> uint48 voteEndDate;<br> uint16 para;<br> uint8 state;<br> }<br>struct Motion {<br> Head head;<br> Body body;<br> RulesParser.VotingRule votingRule;<br> uint contents;<br> }<br>struct Record {<br> DelegateMap.Map map;<br> BallotsBox.Box box;<br> }<br>struct VoteCalBase {<br> uint32 totalHead;<br> uint64 totalWeight;<br> uint32 supportHead;<br> uint64 supportWeight;<br> uint16 attendHeadRatio;<br> uint16 attendWeightRatio;<br> uint16 para;<br> uint8 state; <br> bool unaniConsent;<br> }<br>struct Repo {<br> mapping(uint256 => Motion) motions;<br> mapping(uint256 => Record) records;<br> EnumerableSet.UintSet seqList;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== snParser ====<br>function snParser (bytes32 sn) public pure returns(Head memory head) {<br> uint _sn = uint(sn);<br>head = Head({<br> typeOfMotion: uint16(_sn >> 240),<br> seqOfMotion: uint64(_sn >> 176),<br> seqOfVR: uint16(_sn >> 160),<br> creator: uint40(_sn >> 120),<br> executor: uint40(_sn >> 80),<br> createDate: uint48(_sn >> 32),<br> data: uint32(_sn)<br> });<br> }<br>function codifyHead(Head memory head) public pure returns(bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> head.typeOfMotion,<br> head.seqOfMotion,<br> head.seqOfVR,<br> head.creator,<br> head.executor,<br> head.createDate,<br> head.data); <br> assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br> } <br>// ==== addMotion ====<br>function addMotion(<br> Repo storage repo,<br> Head memory head,<br> uint256 contents) public returns (Head memory) {<br>require(head.typeOfMotion > 0, "MR.CM: zero typeOfMotion");<br> require(head.seqOfVR > 0, "MR.CM: zero seqOfVR");<br> require(head.creator > 0, "MR.CM: zero caller");<br>if (!repo.seqList.contains(head.seqOfMotion)) {<br> head.seqOfMotion = _increaseCounterOfMotion(repo);<br> head.createDate = uint48(block.timestamp);<br> repo.seqList.add(head.seqOfMotion);<br> }<br>Motion storage m = repo.motions[head.seqOfMotion];<br>m.head = head;<br> m.contents = contents;<br> m.body.state = uint8(StateOfMotion.Created);<br>return head;<br> } <br>function _increaseCounterOfMotion (Repo storage repo) private returns (uint64 seq) {<br> repo.motions[0].head.seqOfMotion++;<br> seq = repo.motions[0].head.seqOfMotion;<br> }<br>// ==== entrustDelegate ====<br>function entrustDelegate(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> uint delegate,<br> uint principal,<br> IRegisterOfMembers _rom,<br> IRegisterOfDirectors _rod) public returns (bool flag) {<br> Motion storage m = repo.motions[seqOfMotion];<br>require(m.body.state == uint8(StateOfMotion.Created) \|\|<br> m.body.state == uint8(StateOfMotion.Proposed) , <br> "MR.EntrustDelegate: wrong state");<br>if (m.head.seqOfVR < 11 && _rom.isMember(delegate) && _rom.isMember(principal)) {<br> uint64 weight;<br> if (m.body.shareRegDate > 0 && block.timestamp >= m.body.shareRegDate) <br> weight = _rom.votesAtDate(principal, m.body.shareRegDate); <br> return repo.records[seqOfMotion].map.entrustDelegate(principal, delegate, weight);<br> } else if (_rod.isDirector(delegate) && _rod.isDirector(principal)) {<br> return repo.records[seqOfMotion].map.entrustDelegate(principal, delegate, 0);<br> } else revert ("MR.entrustDelegate: not both Members or Directors"); <br> }<br>// ==== propose ====<br>function proposeMotionToGeneralMeeting(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> IShareholdersAgreement _sha,<br> IRegisterOfMembers _rom,<br> IRegisterOfDirectors _rod,<br> uint caller) public {<br>RulesParser.GovernanceRule memory gr =<br> _sha.getRule(0).governanceRuleParser();<br>require(_memberProposalRightCheck(repo, seqOfMotion, gr, caller, _rom) \|\|<br> _directorProposalRightCheck(repo, seqOfMotion, caller, gr.proposeHeadRatioOfDirectorsInGM, _rod),<br> "MR.PMTGM: has no proposalRight");<br>_proposeMotion(repo, seqOfMotion, _sha, caller, _rom.qtyOfMembers() == 1);<br> } <br>function _proposeMotion(<br> Repo storage repo,<br> uint seqOfMotion,<br> IShareholdersAgreement _sha,<br> uint caller,<br> bool soleMember) private {<br>require(caller > 0, "MR.PM: zero caller");<br>require(repo.records[seqOfMotion].map.voters[caller].delegate == 0,<br> "MR.PM: entrused delegate");<br>Motion storage m = repo.motions[seqOfMotion];<br> require(m.body.state == uint8(StateOfMotion.Created), <br> "MR.PM: wrong state");<br>RulesParser.VotingRule memory vr = <br> _sha.getRule(m.head.seqOfVR).votingRuleParser();<br>uint48 timestamp = uint48(block.timestamp);<br>Body memory body = Body({<br> proposer: uint40(caller),<br> proposeDate: timestamp,<br> shareRegDate: soleMember ? timestamp : timestamp + uint48(vr.invExitDays) \* 86400,<br> voteStartDate: soleMember ? timestamp : timestamp + uint48(vr.invExitDays + vr.votePrepareDays) \* 86400,<br> voteEndDate: soleMember ? timestamp + 86400 : timestamp + uint48(vr.invExitDays + vr.votePrepareDays + vr.votingDays) \* 86400,<br> para: 0,<br> state: uint8(StateOfMotion.Proposed)<br> });<br>m.body = body;<br> m.votingRule = vr;<br> }<br>function _memberProposalRightCheck(<br> Repo storage repo,<br> uint seqOfMotion,<br> RulesParser.GovernanceRule memory gr,<br> uint caller,<br> IRegisterOfMembers _rom) private returns(bool) {<br> if (!_rom.isMember(caller)) return false;<br>Motion memory motion = repo.motions[seqOfMotion];<br> if (motion.head.typeOfMotion == uint8(TypeOfMotion.ApproveDoc) \|\|<br> motion.head.typeOfMotion == uint8(TypeOfMotion.ElectOfficer))<br> return true;<br>uint totalVotes = _rom.totalVotes();<br>if (gr.proposeWeightRatioOfGM > 0 &&<br> _rom.votesInHand(caller) \* 10000 / totalVotes >= gr.proposeWeightRatioOfGM)<br> return true;<br>Record storage r = repo.records[seqOfMotion];<br> r.map.updateLeavesWeightAtDate(caller, uint48(block.timestamp), _rom);<br>DelegateMap.Voter memory voter = r.map.voters[caller];<br>if (gr.proposeWeightRatioOfGM > 0 && <br> (voter.weight + voter.repWeight) \* 10000 / totalVotes >= gr.proposeWeightRatioOfGM)<br> return true;<br>if (gr.proposeHeadRatioOfMembers > 0 &&<br> (voter.repHead + 1) \* 10000 / _rom.qtyOfMembers() >= <br> gr.proposeHeadRatioOfMembers)<br> return true;<br>return false;<br> }<br>function _directorProposalRightCheck(<br> Repo storage repo,<br> uint seqOfMotion,<br> uint caller,<br> uint16 proposalThreshold,<br> IRegisterOfDirectors _rod) private returns (bool) {<br> if (!_rod.isDirector(caller)) return false;<br>uint totalHead = _rod.getNumOfDirectors();<br> repo.records[seqOfMotion].map.updateLeavesHeadcountOfDirectors(caller, _rod);<br>if (proposalThreshold > 0 &&<br> (repo.records[seqOfMotion].map.voters[caller].repHead + 1) \* 10000 / totalHead >=<br> proposalThreshold)<br> return true;<br>return false;<br> } <br>function proposeMotionToBoard(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> IShareholdersAgreement _sha,<br> IRegisterOfDirectors _rod,<br> uint caller) public {<br>RulesParser.GovernanceRule memory gr = <br> _sha.getRule(0).governanceRuleParser();<br>require(<br> _directorProposalRightCheck(<br> repo, seqOfMotion, caller, <br> gr.proposeHeadRatioOfDirectorsInBoard, <br> _rod),<br> "MR.PMTB: has no proposalRight");<br>_proposeMotion(repo, seqOfMotion, _sha, caller, _rod.getNumOfDirectors() == 1);<br> } <br>// ==== vote ====<br>function castVoteInGeneralMeeting(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> uint256 acct,<br> uint attitude,<br> bytes32 sigHash,<br> IRegisterOfMembers _rom) public {<br>require(_rom.isMember(acct), "MR.castVoteInGM: not Member");<br>Motion storage m = repo.motions[seqOfMotion];<br> Record storage r = repo.records[seqOfMotion];<br> DelegateMap.Voter storage voter = r.map.voters[acct];<br>r.map.updateLeavesWeightAtDate(acct, m.body.shareRegDate, _rom);<br>_castVote(repo, seqOfMotion, acct, attitude, voter.repHead + 1, voter.weight + voter.repWeight, sigHash);<br> }<br>function castVoteInBoardMeeting(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> uint256 acct,<br> uint attitude,<br> bytes32 sigHash,<br> IRegisterOfDirectors _rod) public {<br> require(_rod.isDirector(acct), "MR.CVBM: not Director");<br>Record storage r = repo.records[seqOfMotion];<br>DelegateMap.Voter storage voter = r.map.voters[acct];<br>r.map.updateLeavesHeadcountOfDirectors(acct, _rod);<br>_castVote(repo, seqOfMotion, acct, attitude, voter.repHead + 1, 0, sigHash);<br> }<br>function _castVote(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> uint256 acct,<br> uint attitude,<br> uint headcount,<br> uint weight,<br> bytes32 sigHash) private {<br> require(seqOfMotion > 0, "MR.CV: zero seqOfMotion");<br> require(voteStarted(repo, seqOfMotion), "MR.CV: vote not started");<br> require(!voteEnded(repo, seqOfMotion), "MR.CV: vote is Ended");<br>Record storage r = repo.records[seqOfMotion];<br> DelegateMap.Voter storage voter = r.map.voters[acct];<br>require(voter.delegate == 0, <br> "MR.CV: entrusted delegate");<br>r.box.castVote(acct, attitude, headcount, weight, sigHash, voter.principals);<br> }<br>// ==== counting ====<br>function voteCounting(<br> Repo storage repo,<br> bool flag0,<br> uint256 seqOfMotion,<br> VoteCalBase memory base) public returns (uint8) {<br>Motion storage m = repo.motions[seqOfMotion];<br> Record storage r = repo.records[seqOfMotion];<br>require (m.body.state == uint8(StateOfMotion.Proposed) , "MR.VT: wrong state");<br>if (base.unaniConsent) {<br> m.body.state = uint8(MotionsRepo.StateOfMotion.Passed);<br> } else {<br> require (voteEnded(repo, seqOfMotion), "MR.VT: vote not ended yet");<br>bool flag1 = m.votingRule.headRatio == 0;<br> bool flag2 = m.votingRule.amountRatio == 0;<br>bool flag = (flag1 && flag2);<br>if (!flag && flag0 && !_isVetoed(r, m.votingRule.vetoers[0]) &&<br> !_isVetoed(r, m.votingRule.vetoers[1])) {<br> flag1 = flag1 ? true : base.totalHead > 0<br> ? ((r.box.cases[uint8(BallotsBox.AttitudeOfVote.Support)]<br> .sumOfHead + base.supportHead) \* 10000) /<br> base.totalHead ><br> m.votingRule.headRatio<br> : false;<br>flag2 = flag2 ? true : base.totalWeight > 0<br> ? ((r.box.cases[uint8(BallotsBox.AttitudeOfVote.Support)]<br> .sumOfWeight + base.supportWeight) \* 10000) /<br> base.totalWeight ><br> m.votingRule.amountRatio<br> : false;<br> }<br>m.body.state = flag \|\| (flag0 && flag1 && flag2) <br> ? uint8(MotionsRepo.StateOfMotion.Passed) <br> : m.votingRule.againstShallBuy <br> ? uint8(MotionsRepo.StateOfMotion.Rejected_ToBuy)<br> : uint8(MotionsRepo.StateOfMotion.Rejected_NotToBuy);<br> }<br>return m.body.state;<br> }<br>function _isVetoed(Record storage r, uint256 vetoer)<br> private<br> view<br> returns (bool)<br> {<br> return vetoer > 0 && (r.box.ballots[vetoer].sigDate == 0 \|\|<br> r.box.ballots[vetoer].attitude != uint8(BallotsBox.AttitudeOfVote.Support));<br> }<br>// ==== ExecResolution ====<br>function execResolution(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> uint256 contents,<br> uint executor) public {<br> Motion storage m = repo.motions[seqOfMotion];<br> require (m.contents == contents, <br> "MR.execResolution: wrong contents");<br> require (m.body.state == uint8(StateOfMotion.Passed), <br> "MR.execResolution: wrong state");<br> require (m.head.executor == uint40(executor), "MR.ER: not executor");<br>m.body.state = uint8(StateOfMotion.Executed);<br> }<br>//#################<br> //## Read ##<br> //#################<br>// ==== VoteState ====<br>function isProposed(Repo storage repo, uint256 seqOfMotion)<br> public view returns (bool)<br> {<br> return repo.motions[seqOfMotion].body.state == uint8(StateOfMotion.Proposed);<br> }<br>function voteStarted(Repo storage repo, uint256 seqOfMotion)<br> public view returns (bool)<br> {<br> return isProposed(repo, seqOfMotion) && <br> repo.motions[seqOfMotion].body.voteStartDate <= block.timestamp;<br> }<br>function voteEnded(Repo storage repo, uint256 seqOfMotion)<br> public view returns (bool)<br> {<br> return isProposed(repo, seqOfMotion) && <br> repo.motions[seqOfMotion].body.voteEndDate <= block.timestamp;<br> }<br>// ==== Delegate ====<br>function getVoterOfDelegateMap(Repo storage repo, uint256 seqOfMotion, uint256 acct)<br> public view returns (DelegateMap.Voter memory)<br> {<br> return repo.records[seqOfMotion].map.voters[acct];<br> }<br>function getDelegateOf(Repo storage repo, uint256 seqOfMotion, uint acct)<br> public view returns (uint)<br> {<br> return repo.records[seqOfMotion].map.getDelegateOf(acct);<br> }<br>// ==== motion ====<br>function getMotion(Repo storage repo, uint256 seqOfMotion)<br> public view returns (Motion memory motion)<br> {<br> motion = repo.motions[seqOfMotion];<br> }<br>// ==== voting ====<br>function isVoted(Repo storage repo, uint256 seqOfMotion, uint256 acct) <br> public view returns (bool) <br> {<br> return repo.records[seqOfMotion].box.isVoted(acct);<br> }<br>function isVotedFor(<br> Repo storage repo,<br> uint256 seqOfMotion,<br> uint256 acct,<br> uint256 atti) public view returns (bool) {<br> return repo.records[seqOfMotion].box.isVotedFor(acct, atti);<br> }<br>function getCaseOfAttitude(Repo storage repo, uint256 seqOfMotion, uint256 atti)<br> public view returns (BallotsBox.Case memory)<br> {<br> return repo.records[seqOfMotion].box.getCaseOfAttitude(atti);<br> }<br>function getBallot(Repo storage repo, uint256 seqOfMotion, uint256 acct)<br> public view returns (BallotsBox.Ballot memory)<br> {<br> return repo.records[seqOfMotion].box.getBallot(acct);<br> }<br>function isPassed(Repo storage repo, uint256 seqOfMotion) public view returns (bool) {<br> return repo.motions[seqOfMotion].body.state == uint8(MotionsRepo.StateOfMotion.Passed);<br> }<br>// ==== snList ====<br>function getSeqList(Repo storage repo) public view returns (uint[] memory) {<br> return repo.seqList.values();<br> }<br>}<br>|
| [Contents](#toc) |

---

## Checkpoints.sol

---

| |
|:---|
| **contracts/lib/Checkpoints.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library Checkpoints {<br>struct Checkpoint {<br> uint48 timestamp;<br> uint16 rate;<br> uint64 paid;<br> uint64 par;<br> uint64 points;<br> }<br>// checkpoints[0] {<br> // timestamp: counter;<br> // rate: distrWeight;<br> // paid;<br> // par;<br> // points: distrPoints;<br> // }<br>struct History {<br> mapping (uint256 => Checkpoint) checkpoints;<br> }<br>//##################<br> //## Write I/O ##<br> //##################<br>function push(<br> History storage self,<br> uint rate,<br> uint paid,<br> uint par,<br> uint points) public {<br>uint256 pos = counterOfPoints(self);<br>Checkpoint memory point = Checkpoint({<br> timestamp: uint48(block.timestamp),<br> rate: uint16(rate),<br> paid: uint64(paid),<br> par: uint64(par),<br> points: uint64(points)<br> });<br>if (self.checkpoints[pos].timestamp == point.timestamp) {<br> self.checkpoints[pos] = point;<br> } else {<br> self.checkpoints[pos+1] = point;<br> _increaseCounter(self);<br> }<br> }<br>function _increaseCounter(History storage self)<br> public<br> {<br> self.checkpoints[0].timestamp++;<br> }<br>function updateDistrPoints(<br> History storage self,<br> uint rate,<br> uint paid,<br> uint par,<br> uint points) public {<br> Checkpoint storage c = self.checkpoints[0];<br> c.rate = uint16(rate);<br> c.paid = uint64(paid);<br> c.par = uint64(par);<br> c.points = uint64(points);<br> }<br>function restoreHistory(History storage self, Checkpoint[] memory list) public {<br> uint len = list.length;<br> while (len > 0) {<br> self.checkpoints[len] = list[len-1];<br> len--;<br> }<br> self.checkpoints[0].timestamp = uint48(list.length);<br> }<br>//################<br> //## Read ##<br> //################<br>function counterOfPoints(History storage self)<br> public view returns (uint256)<br> {<br> return self.checkpoints[0].timestamp;<br> }<br>function latest(History storage self)<br> public view returns (Checkpoint memory point)<br> {<br> point = self.checkpoints[counterOfPoints(self)];<br> }<br>function _average(uint256 a, uint256 b) private pure returns (uint256) {<br> return (a & b) + ((a ^ b) >> 1);<br> }<br>function getAtDate(History storage self, uint256 timestamp)<br> public view returns (Checkpoint memory point)<br> {<br> require(<br> timestamp <= block.timestamp,<br> "Checkpoints: block not yet mined");<br>uint256 high = counterOfPoints(self) + 1;<br> uint256 low = 1;<br> while (low < high) {<br> uint256 mid = _average(low, high);<br> if (self.checkpoints[mid].timestamp > timestamp) {<br> high = mid;<br> } else {<br> low = mid + 1;<br> }<br> }<br> if (high > 1) point = self.checkpoints[high - 1];<br> }<br>function pointsOfHistory(History storage self)<br> public view returns (Checkpoint[] memory) <br> {<br> uint256 len = counterOfPoints(self);<br>Checkpoint[] memory output = new Checkpoint[](len);<br>while (len > 0) {<br> output[len-1] = self.checkpoints[len];<br> len--;<br> }<br>return output;<br> }<br>function getDistrPoints(History storage self)<br> public view returns (Checkpoint memory) <br> {<br> return self.checkpoints[0];<br> }<br>}<br>|
| [Contents](#toc) |

---

## BallotsBox.sol

---

| |
|:---|
| **contracts/lib/BallotsBox.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library BallotsBox {<br>enum AttitudeOfVote {<br> All,<br> Support,<br> Against,<br> Abstain<br> }<br>struct Ballot {<br> uint40 acct;<br> uint8 attitude;<br> uint32 head;<br> uint64 weight;<br> uint48 sigDate;<br> uint64 blocknumber;<br> bytes32 sigHash;<br> uint[] principals;<br> }<br>struct Case {<br> uint32 sumOfHead;<br> uint64 sumOfWeight;<br> uint256[] voters;<br> uint256[] principals;<br> }<br>struct Box {<br> mapping(uint256 => Case) cases;<br> mapping(uint256 => Ballot) ballots;<br> }<br>// #################<br> // ## Write ##<br> // #################<br>function castVote(<br> Box storage box,<br> uint acct,<br> uint attitude,<br> uint head,<br> uint weight,<br> bytes32 sigHash,<br> uint[] memory principals) public returns (bool flag) {<br>require(<br> attitude == uint8(AttitudeOfVote.Support) \|\|<br> attitude == uint8(AttitudeOfVote.Against) \|\|<br> attitude == uint8(AttitudeOfVote.Abstain),<br> "BB.CV: attitude overflow");<br>Ballot storage b = box.ballots[acct];<br>if (b.sigDate == 0) {<br> box.ballots[acct] = Ballot({<br> acct: uint40(acct),<br> attitude: uint8(attitude),<br> head: uint32(head),<br> weight: uint64(weight),<br> sigDate: uint48(block.timestamp),<br> blocknumber: uint64(block.number),<br> sigHash: sigHash,<br> principals: principals<br> });<br>_pushToCase(box.cases[attitude], b);<br> _pushToCase(box.cases[uint8(AttitudeOfVote.All)], b);<br>flag = true;<br> }<br> }<br>function _pushToCase(Case storage c, Ballot memory b) private {<br> c.sumOfHead += b.head;<br> c.sumOfWeight += b.weight;<br> c.voters.push(b.acct);<br>uint len = b.principals.length;<br> while (len > 0) {<br> c.principals.push(b.principals[len - 1]);<br> len--;<br> }<br> }<br>// #################<br> // ## Read ##<br> // #################<br>function isVoted(Box storage box, uint256 acct) <br> public view returns (bool) <br> {<br> return box.ballots[acct].sigDate > 0;<br> }<br>function isVotedFor(<br> Box storage box,<br> uint256 acct,<br> uint256 atti) public view returns (bool) {<br> return box.ballots[acct].attitude == atti;<br> }<br>function getCaseOfAttitude(Box storage box, uint256 atti)<br> public view returns (Case memory)<br> {<br> return box.cases[atti];<br> }<br>function getBallot(Box storage box, uint256 acct)<br> public view returns (Ballot memory)<br> {<br> return box.ballots[acct];<br> }<br>}<br>|
| [Contents](#toc) |

---

## ArrayUtils.sol

---

| |
|:---|
| **contracts/lib/ArrayUtils.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library ArrayUtils {<br>function merge(uint256[] memory arrA, uint256[] memory arrB)<br> public pure returns(uint256[] memory)<br> {<br> uint256[] memory arrC = new uint256[](arrA.length + arrB.length);<br> uint256 lenC;<br>(arrC, lenC) = filter(arrA, arrC, 0);<br> (arrC, lenC) = filter(arrB, arrC, lenC);<br>return resize(arrC, lenC);<br> }<br>function filter(uint256[] memory arrA, uint256[] memory arrC, uint256 lenC) <br> public pure returns(uint256[] memory, uint256)<br> {<br> uint256 lenA = arrA.length;<br> uint256 i;<br>while (i < lenA) {<br>uint256 j;<br> while (j < lenC){<br> if (arrA[i] == arrC[j]) break;<br> j++;<br> }<br>if (j == lenC) {<br> arrC[lenC] = arrA[i];<br> lenC++;<br> }<br>i++;<br> }<br>return (arrC, lenC);<br> }<br>function refine(uint256[] memory arrA) <br> public pure returns(uint256[] memory)<br> {<br> uint256[] memory arrB = new uint256[](arrA.length); <br> uint256 lenB;<br> (arrB, lenB) = filter(arrA, arrB, 0);<br>return resize(arrB, lenB);<br> }<br>function resize(uint256[] memory arrA, uint256 len)<br> public pure returns(uint256[] memory)<br> {<br> uint256[] memory output = new uint256[](len);<br>while (len > 0) {<br> output[len - 1] = arrA[len - 1];<br> len--;<br> }<br>return output;<br> }<br>function combine(uint256[] memory arrA, uint256[] memory arrB)<br> public pure returns (uint256[] memory)<br> {<br> uint256 lenA = arrA.length;<br> uint256 lenB = arrB.length;<br> uint256 i;<br>uint256[] memory arrC = new uint256[](lenA + lenB);<br>for (i = 0; i < lenA; i++) arrC[i] = arrA[i];<br> for (i = 0; i < lenB; i++) arrC[lenA + i] = arrB[i];<br>return arrC;<br> }<br>function minus(uint256[] memory arrA, uint256[] memory arrB)<br> public pure returns (uint256[] memory)<br> {<br> uint256 lenA = arrA.length;<br> uint256 lenB = arrB.length;<br>uint256[] memory arrC = new uint256[](lenA);<br>uint256 pointer;<br>while (lenA > 0) {<br> bool flag = false;<br> lenB = arrB.length;<br>while (lenB > 0) {<br> if (arrB[lenB - 1] == arrA[lenA - 1]) {<br> flag = true;<br> break;<br> }<br> lenB--;<br> }<br>if (!flag) {<br> arrC[pointer] = arrA[lenA - 1];<br> pointer++;<br> }<br>lenA--;<br> }<br>return resize(arrC, pointer);<br> }<br>function fullyCoveredBy(uint256[] memory arrA, uint256[] memory arrB)<br> public pure returns (bool)<br> {<br> uint256[] memory arrAr = refine(arrA);<br> uint256[] memory arrBr = refine(arrB);<br>uint256 lenA = arrAr.length;<br> uint256 lenB = arrBr.length;<br>while (lenA > 0) {<br> uint256 i;<br> while (i < lenB) {<br> if (arrBr[i] == arrAr[lenA-1]) break;<br> i++;<br> }<br> if (i==lenB) return false;<br> lenA--;<br> }<br>return true;<br> }<br>function noOverlapWith(uint[] memory arrA, uint[] memory arrB) public pure returns(bool) {<br> uint lenA = arrA.length;<br> uint lenB = arrB.length;<br>while (lenA > 0) {<br> uint i = 0;<br> while (i < lenB) {<br> if (arrA[lenA-1] == arrB[i]) {<br> return false;<br> }<br> i++;<br> }<br> lenA--;<br> }<br>return true;<br> }<br>}<br>|
| [Contents](#toc) |

---

## DTClaims.sol

---

| |
|:---|
| **contracts/lib/DTClaims.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library DTClaims {<br> using EnumerableSet for EnumerableSet.UintSet;<br>struct Head {<br> uint16 seqOfDeal;<br> bool dragAlong;<br> uint32 seqOfShare;<br> uint64 paid;<br> uint64 par;<br> uint40 caller;<br> uint16 para;<br> uint16 argu;<br> }<br>struct Claim {<br> uint8 typeOfClaim;<br> uint32 seqOfShare;<br> uint64 paid;<br> uint64 par;<br> uint40 claimer;<br> uint48 sigDate;<br> bytes32 sigHash;<br> }<br>struct Pack {<br> //seqOfShare => Claim<br> mapping(uint256 => Claim) claims;<br> EnumerableSet.UintSet shares;<br> }<br>struct Claims {<br> // seqOfDeal => drag/tag/merged => Pack<br> mapping(uint256 => mapping(uint256 => Pack)) packs;<br> EnumerableSet.UintSet deals;<br> }<br>modifier dealExist(Claims storage cls, uint seqOfDeal) {<br> require (hasClaim(cls, seqOfDeal), "DTClaims.mf.dealExist: not");<br> _;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>function snParser(bytes32 sn) public pure returns(Head memory head) {<br> uint _sn = uint(sn);<br> head = Head({<br> seqOfDeal: uint16(_sn >> 240),<br> dragAlong: bool(uint8(_sn >> 232) == 1),<br> seqOfShare: uint32(_sn >> 200),<br> paid: uint64(_sn >> 136),<br> par: uint64(_sn >> 72),<br> caller: uint40(_sn >> 32),<br> para: uint16(_sn >> 16),<br> argu: uint16(_sn)<br> });<br> }<br>function codifyHead(Head memory head) public pure returns(bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> head.seqOfDeal,<br> head.dragAlong,<br> head.seqOfShare,<br> head.paid,<br> head.par,<br> head.caller,<br> head.para,<br> head.argu);<br>assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br> }<br>function execAlongRight(<br> Claims storage cls,<br> bool dragAlong,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> uint256 claimer,<br> bytes32 sigHash) public {<br>uint16 intSeqOfDeal = uint16(seqOfDeal);<br> require(intSeqOfDeal > 0, "DTClaims.exec: zero seqOfDeal");<br>Claim memory newClaim = Claim({<br> typeOfClaim: dragAlong ? 0 : 1,<br> seqOfShare: uint32(seqOfShare),<br> paid: uint64(paid),<br> par: uint64(par),<br> claimer: uint40(claimer),<br> sigDate: uint48(block.timestamp),<br> sigHash: sigHash<br> }); <br>require(newClaim.seqOfShare > 0, "DTClaims.exec: zero seqOfShare");<br>Pack storage p = cls.packs[intSeqOfDeal][newClaim.typeOfClaim];<br>if (p.shares.add(newClaim.seqOfShare)){<br>p.claims[newClaim.seqOfShare] = newClaim;<br>cls.deals.add(intSeqOfDeal);<br>_consolidateClaimsOfShare(cls, intSeqOfDeal, newClaim);<br> }<br> }<br>function _consolidateClaimsOfShare(<br> Claims storage cls,<br> uint intSeqOfDeal,<br> Claim memory newClaim) private {<br> Pack storage m = cls.packs[intSeqOfDeal][2];<br>if (m.shares.add(newClaim.seqOfShare)) {<br> m.claims[newClaim.seqOfShare] = newClaim;<br> } else {<br> Claim storage mClaim = m.claims[newClaim.seqOfShare];<br>mClaim.paid = newClaim.paid > mClaim.paid ? newClaim.paid : mClaim.paid;<br> mClaim.par = newClaim.par > mClaim.par ? newClaim.par : mClaim.par;<br>if (mClaim.typeOfClaim == 0){<br>Claim memory tClaim = cls.packs[intSeqOfDeal][1].claims[newClaim.seqOfShare];<br>mClaim.typeOfClaim = 1;<br> mClaim.claimer = tClaim.claimer;<br> mClaim.sigDate = tClaim.sigDate;<br> mClaim.sigHash = tClaim.sigHash;<br> }<br> }<br> }<br>function acceptAlongClaims(<br> Claims storage cls,<br> uint seqOfDeal) public returns (Claim[] memory) {<br> cls.packs[seqOfDeal][2].claims[0].typeOfClaim = 1;<br> return getClaimsOfDeal(cls, seqOfDeal);<br> }<br>// ################################<br> // ## Read I/O ##<br> // ################################<br>function hasClaim(Claims storage cls, uint seqOfDeal) public view returns(bool) {<br> return cls.deals.contains(seqOfDeal);<br> }<br>function getDeals(Claims storage cls) public view returns(uint[] memory) {<br> return cls.deals.values();<br> }<br>function getClaimsOfDeal(<br> Claims storage cls,<br> uint seqOfDeal) public view dealExist(cls, seqOfDeal) returns(Claim[] memory) {<br>Pack storage m = cls.packs[seqOfDeal][2];<br>uint[] memory sharesList = m.shares.values();<br> uint len = sharesList.length;<br>Claim[] memory output = new Claim[](len);<br>while (len > 0) {<br> output[len - 1] = m.claims[sharesList[len - 1]];<br> len --;<br> }<br>return output;<br> }<br>function hasShare(<br> Claims storage cls,<br> uint seqOfDeal,<br> uint seqOfShare ) public view dealExist(cls, seqOfDeal) returns(bool) {<br> return cls.packs[seqOfDeal][2].shares.contains(seqOfShare);<br> }<br>function getClaimForShare(<br> Claims storage cls,<br> uint seqOfDeal,<br> uint seqOfShare) public view returns (Claim memory) {<br> require (hasShare(cls, seqOfDeal, seqOfShare), "DTClaims.getClaimsForShare: not exist");<br> return cls.packs[seqOfDeal][2].claims[seqOfShare];<br> }<br>function allAccepted(Claims storage cls) public view returns(bool flag) {<br> uint[] memory dealsList = cls.deals.values();<br> uint len = dealsList.length;<br>flag = true;<br> while(len > 0) {<br> if (cls.packs[dealsList[len - 1]][2].claims[0].typeOfClaim == 0) {<br> flag = false;<br> break;<br> }<br> len--;<br> }<br> }<br>}<br>|
| [Contents](#toc) |

---

## MockFeedRegistry.sol

---

| |
|:---|
| **contracts/lib/MockFeedRegistry.sol** |
| <br>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.8.8;<br>import "@chainlink/contracts/src/v0.8/Denominations.sol";<br>contract MockFeedRegistry {<br>/\*\*<br> \* Network: Ethereum Mainnet<br> \* Feed Registry: 0x47Fb2585D2C56Fe188D0E6ec628a38b74fCeeeDf<br> \*/<br>function decimals() external pure returns (uint8) {<br> // require(base == Denominations.ETH, "not based on ETH");<br> // require(quote != address(0), "zero quote");<br> return 8;<br> }<br>function latestRoundData() external <br> view returns (<br> uint80 roundID,<br> int price,<br> uint startedAt,<br> uint timeStamp,<br> uint80 answeredInRound) <br> {<br> roundID = 770919;<br> startedAt = 1567958400;<br> timeStamp = block.timestamp;<br> answeredInRound = 190909;<br> price = 225880000000;<br>// int[6] memory rates = [int(0), 166680000000, 130907250548, 153193742107, 24234983023517, 1212778000143];<br>// price = base != Denominations.ETH<br> // ? rates[0]<br> // : quote == Denominations.USD<br> // ? rates[1]<br> // : quote == Denominations.GBP<br> // ? rates[2]<br> // : quote == Denominations.EUR<br> // ? rates[3]<br> // : quote == Denominations.JPY<br> // ? rates[4]<br> // : quote == Denominations.CNY<br> // ? rates[5]<br> // : rates[0];<br> }<br>}<br>|
| [Contents](#toc) |

---

## SafeBoxes.sol

---

| |
|:---|
| **contracts/lib/SafeBoxes.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library SafeBoxes {<br> using EnumerableSet for EnumerableSet.Bytes32Set;<br>struct Head {<br> uint96 amtHead;<br> address from;<br> uint48 expireDate;<br> uint48 amtTail;<br> address to;<br> }<br>struct Body {<br> address counterLocker;<br> bytes payload;<br> }<br>struct Box {<br> Head head;<br> Body body;<br> }<br>struct Repo {<br> // hashLock => Box<br> mapping (bytes32 => Box) boxes;<br> EnumerableSet.Bytes32Set snList;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>function createBox(<br> Repo storage repo,<br> address from,<br> address to,<br> uint expireDate,<br> bytes32 hashLock) public {<br> Body memory body;<br> createBox(repo, from, to, expireDate, body, hashLock);<br> }<br>function createBox(<br> Repo storage repo,<br> address from,<br> address to,<br> uint expireDate,<br> Body memory body,<br> bytes32 hashLock) public {<br> if (repo.snList.add(hashLock)) { <br> Box storage box = repo.boxes[hashLock];<br>box.head.from = from;<br> box.head.to = to;<br> box.head.expireDate = uint48(expireDate);<br>box.body = body;<br> } else revert ("SafeBox.lockConsideration: occupied");<br> }<br>function depositMoney(<br> Repo storage repo,<br> bytes32 hashLock,<br> uint amt) public {<br> require((amt >> 144) == 0, "SafeBox.depositMoney: amt overflow");<br>require(repo.snList.contains(hashLock),<br> "SafeBox: hashLock not exist");<br>Box storage box = repo.boxes[hashLock];<br>require(box.head.amtTail == 0 &&<br> box.head.amtHead == 0, "SafeBox.depositMoney: not empty");<br>box.head.amtHead = uint96(amt >> 48);<br> box.head.amtTail = uint48(amt);<br>}<br>function pickupDeposits(<br> Repo storage repo,<br> bytes32 hashLock,<br> string memory hashKey) internal returns(Head memory head) { <br> bytes memory key = bytes(hashKey);<br>require(hashLock == keccak256(key),<br> "SafeBox.pickup: wrong key");<br>if (repo.snList.remove(hashLock)) {<br> Box storage box = repo.boxes[hashLock];<br>require(block.timestamp < box.head.expireDate, <br> "SafeBox.pickup: box expired");<br>bool flag;<br>if (box.body.counterLocker != address(0)) {<br> uint len = key.length;<br> bytes memory zero = new bytes(32 - (len % 32));<br>bytes memory payload = abi.encodePacked(box.body.payload, len, key, zero);<br> (flag,) = box.body.counterLocker.call(payload);<br>require (flag, "SafeBox.pickup: counterCall failed");<br> }<br>uint amt = (uint(box.head.amtHead) << 48) + box.head.amtTail;<br>if (amt > 0) {<br> require(address(this).balance >= amt, <br> "SafeBox.pickup: insufficient balance");<br>(flag,) = payable(box.head.to).call{value: amt}("");<br> require(flag, "SafeBox.pickup: money transfer failed");<br> }<br>head = box.head;<br> delete repo.boxes[hashLock];<br> } else revert ("SafeBox.pickup: box not exist");<br>}<br>function withdrawDeposit(<br> Repo storage repo,<br> bytes32 hashLock,<br> address msgSender) public returns(Head memory head) {<br>Box memory box = repo.boxes[hashLock];<br>require(block.timestamp >= box.head.expireDate, <br> "SafeBox.withdrawDeposit: box not expired");<br>require(box.head.from == msgSender, <br> "SafeBox.withdrawDeposit: wrong msgSender");<br>if (repo.snList.remove(hashLock)) {<br> head = box.head;<br> delete repo.boxes[hashLock];<br> } else revert ("SafeBox.withdrawDeposit: box not exist");<br> }<br>//#################<br> //## Read ##<br> //#################<br>function getHeadOfBox(<br> Repo storage repo,<br> bytes32 hashLock) public view returns (Head memory head) {<br> return repo.boxes[hashLock].head;<br> }<br>function getBox(<br> Repo storage repo,<br> bytes32 hashLock) public view returns (Box memory) {<br> return repo.boxes[hashLock];<br> }<br>function getSnList(<br> Repo storage repo) public view returns (bytes32[] memory) {<br> return repo.snList.values();<br> }<br>}<br>|
| [Contents](#toc) |

---

## OfficersRepo.sol

---

| |
|:---|
| **contracts/lib/OfficersRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br> import "../comps/books/rom/IRegisterOfMembers.sol";<br>library OfficersRepo {<br> using EnumerableSet for EnumerableSet.Bytes32Set;<br> using EnumerableSet for EnumerableSet.UintSet;<br>enum TitleOfOfficers {<br> ZeroPoint,<br> Shareholder,<br> Chairman,<br> ViceChairman,<br> ManagingDirector,<br> Director,<br> CEO,<br> CFO,<br> COO,<br> CTO,<br> President,<br> VicePresident,<br> Supervisor,<br> SeniorManager,<br> Manager,<br> ViceManager <br> }<br>struct Position {<br> uint16 title;<br> uint16 seqOfPos;<br> uint40 acct;<br> uint40 nominator;<br> uint48 startDate;<br> uint48 endDate;<br> uint16 seqOfVR;<br> uint16 titleOfNominator;<br> uint16 argu;<br> }<br>struct Group {<br> // seqList<br> EnumerableSet.UintSet posList;<br> // acctList<br> EnumerableSet.UintSet acctList;<br> }<br>struct Repo {<br> //seqOfPos => Position<br> mapping(uint => Position) positions;<br> // acct => seqOfPos<br> mapping(uint => EnumerableSet.UintSet) posInHand;<br> Group directors;<br> Group managers;<br> }<br>//#################<br> //## Modifier ##<br> //#################<br>modifier isVacant(Repo storage repo, uint256 seqOfPos) {<br> require(!isOccupied(repo, seqOfPos), <br> "OR.mf.IV: position occupied");<br> _;<br> }<br>//#################<br> //## Write ##<br> //#################<br>// ==== snParser ====<br>function snParser(bytes32 sn) public pure returns (Position memory position) {<br> uint _sn = uint(sn);<br>position = Position({<br> title: uint16(_sn >> 240),<br> seqOfPos: uint16(_sn >> 224),<br> acct: uint40(_sn >> 184),<br> nominator: uint40(_sn >> 144),<br> startDate: uint48(_sn >> 96),<br> endDate: uint48(_sn >> 48),<br> seqOfVR: uint16(_sn >> 32),<br> titleOfNominator: uint16(_sn >> 16),<br> argu: uint16(_sn)<br> });<br> }<br>function codifyPosition(Position memory position) public pure returns (bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> position.title,<br> position.seqOfPos,<br> position.acct,<br> position.nominator,<br> position.startDate,<br> position.endDate,<br> position.seqOfVR,<br> position.titleOfNominator,<br> position.argu); <br> assembly {<br> sn := mload(add(_sn, 0x20))<br> } <br> }<br>// ======== Setting ========<br>function createPosition (Repo storage repo, bytes32 snOfPos) <br> public <br> {<br> Position memory pos = snParser(snOfPos);<br> addPosition(repo, pos);<br> }<br>function addPosition(<br> Repo storage repo,<br> Position memory pos) public {<br> require (pos.title > uint8(TitleOfOfficers.Shareholder), "OR.addPosition: title overflow");<br> require (pos.seqOfPos > 0, "OR.addPosition: zero seqOfPos");<br> require (pos.titleOfNominator > 0, "OR.addPosition: zero titleOfNominator");<br> require (pos.endDate > pos.startDate, "OR.addPosition: endDate <= startDate");<br> require (pos.endDate > block.timestamp, "OR.addPosition: endDate not future");<br>Position storage p = repo.positions[pos.seqOfPos];<br>if (p.seqOfPos == 0) {<br> if (pos.title <= uint8(TitleOfOfficers.Director)) <br> repo.directors.posList.add(pos.seqOfPos);<br> else repo.managers.posList.add(pos.seqOfPos); <br> } else require (p.seqOfPos == pos.seqOfPos && p.title == pos.title,<br> "OR.addPosition: remove pos first");<br>repo.positions[pos.seqOfPos] = pos;<br> }<br>function removePosition(Repo storage repo, uint256 seqOfPos) <br> public isVacant(repo, seqOfPos) returns (bool flag)<br> {<br> if (repo.directors.posList.remove(seqOfPos) \|\|<br> repo.managers.posList.remove(seqOfPos)) <br> {<br> delete repo.positions[seqOfPos];<br> flag = true;<br> }<br> }<br>function takePosition (<br> Repo storage repo,<br> uint256 seqOfPos,<br> uint acct) public returns (bool flag) {<br> require (seqOfPos > 0, "OR.takePosition: zero seqOfPos");<br> require (acct > 0, "OR.takePosition: zero acct");<br>Position storage pos = repo.positions[seqOfPos];<br>if (repo.directors.posList.contains(seqOfPos))<br> repo.directors.acctList.add(acct);<br> else if (repo.managers.posList.contains(seqOfPos))<br> repo.managers.acctList.add(acct);<br> else revert("OR.takePosition: pos not exist");<br>pos.acct = uint40(acct);<br> pos.startDate = uint48(block.timestamp);<br>repo.posInHand[acct].add(seqOfPos);<br>flag = true;<br> }<br>function quitPosition(<br> Repo storage repo, <br> uint256 seqOfPos,<br> uint acct) public returns (bool flag)<br> {<br> Position memory pos = repo.positions[seqOfPos];<br> require(acct == pos.acct, <br> "OR.quitPosition: not the officer");<br> flag = vacatePosition(repo, seqOfPos);<br> }<br>function vacatePosition (<br> Repo storage repo,<br> uint seqOfPos) public returns (bool flag)<br> {<br> Position storage pos = repo.positions[seqOfPos];<br>uint acct = pos.acct;<br> require (acct > 0, "OR.vacatePosition: empty pos");<br>if (repo.posInHand[acct].remove(seqOfPos)) {<br> pos.acct = 0;<br>if (pos.title <= uint8(TitleOfOfficers.Director))<br> repo.directors.acctList.remove(acct);<br> else if (repo.posInHand[acct].length() == 0) {<br> repo.managers.acctList.remove(acct);<br> }<br>flag = true;<br> } <br> }<br>//################<br> //## Read ##<br> //################<br>// ==== Positions ====<br>function posExist(Repo storage repo, uint256 seqOfPos) public view returns (bool flag) {<br> flag = repo.positions[seqOfPos].endDate > block.timestamp;<br> } <br>function isOccupied(Repo storage repo, uint256 seqOfPos) public view returns (bool flag) {<br> flag = repo.positions[seqOfPos].acct > 0;<br> }<br>function getPosition(Repo storage repo, uint256 seqOfPos) public view returns (Position memory pos) {<br> pos = repo.positions[seqOfPos];<br> }<br>function getFullPosInfo(Repo storage repo, uint[] memory pl) <br> public view returns(Position[] memory) <br> {<br> uint256 len = pl.length;<br> Position[] memory ls = new Position[](len);<br>while (len > 0) {<br> ls[len-1] = repo.positions[pl[len-1]];<br> len--;<br> }<br>return ls; <br> }<br>// ==== Managers ====<br>function isManager(Repo storage repo, uint256 acct) public view returns (bool flag) {<br> flag = repo.managers.acctList.contains(acct);<br> }<br>function getNumOfManagers(Repo storage repo) public view returns (uint256 num) {<br> num = repo.managers.acctList.length();<br> }<br>function getManagersList(Repo storage repo) public view returns (uint256[] memory ls) {<br> ls = repo.managers.acctList.values();<br> }<br>function getManagersPosList(Repo storage repo) public view returns(uint[] memory list) {<br> list = repo.managers.posList.values();<br> }<br>function getManagersFullPosInfo(Repo storage repo) public view <br> returns(Position[] memory output) <br> {<br> uint[] memory pl = repo.managers.posList.values();<br> output = getFullPosInfo(repo, pl);<br> }<br>// ==== Directors ====<br>function isDirector(Repo storage repo, uint256 acct) <br> public view returns (bool flag) <br> {<br> flag = repo.directors.acctList.contains(acct);<br> }<br>function getNumOfDirectors(Repo storage repo) public view <br> returns (uint256 num) <br> {<br> num = repo.directors.acctList.length();<br> }<br>function getDirectorsList(Repo storage repo) public view <br> returns (uint256[] memory ls) <br> {<br> ls = repo.directors.acctList.values();<br> }<br>function getDirectorsPosList(Repo storage repo) public view <br> returns (uint256[] memory ls) <br> {<br> ls = repo.directors.posList.values();<br> }<br>function getDirectorsFullPosInfo(Repo storage repo) public view <br> returns(Position[] memory output) <br> {<br> uint[] memory pl = repo.directors.posList.values();<br> output = getFullPosInfo(repo, pl);<br> }<br>// ==== Executives ====<br>function hasPosition(Repo storage repo, uint256 acct, uint256 seqOfPos) <br> public view returns (bool flag) <br> {<br> flag = repo.posInHand[acct].contains(seqOfPos);<br> }<br>function getPosInHand(Repo storage repo, uint256 acct) <br> public view returns (uint256[] memory ls) <br> {<br> ls = repo.posInHand[acct].values();<br> }<br>function getFullPosInfoInHand(Repo storage repo, uint acct) <br> public view returns (Position[] memory output) <br> {<br> uint256[] memory pl = repo.posInHand[acct].values();<br> output = getFullPosInfo(repo, pl);<br> }<br>function hasTitle(Repo storage repo, uint acct, uint title, IRegisterOfMembers _rom)<br> public view returns (bool)<br> {<br> if (title == uint8(TitleOfOfficers.Shareholder))<br> return _rom.isMember(acct);<br>if (title == uint8(TitleOfOfficers.Director))<br> return isDirector(repo, acct);<br>Position[] memory list = getFullPosInfoInHand(repo, acct);<br> uint len = list.length;<br> while (len > 0) {<br> if (list[len-1].title == uint16(title))<br> return true;<br> len --;<br> }<br> return false;<br> }<br>function hasNominationRight(Repo storage repo, uint seqOfPos, uint acct, IRegisterOfMembers _rom)<br> public view returns (bool)<br> {<br> Position memory pos = repo.positions[seqOfPos];<br> if (pos.endDate <= block.timestamp) return false;<br> else if (pos.nominator == 0)<br> return hasTitle(repo, acct, pos.titleOfNominator, _rom);<br> else return (pos.nominator == acct);<br> }<br>// ==== seatsCalculator ====<br>function getBoardSeatsQuota(Repo storage repo, uint256 acct) public view <br> returns (uint256 quota)<br> {<br> uint[] memory pl = repo.directors.posList.values();<br> uint256 len = pl.length;<br> while (len > 0) {<br> Position memory pos = repo.positions[pl[len-1]];<br> if (pos.nominator == acct) quota++;<br> len--;<br> } <br> }<br>function getBoardSeatsOccupied(Repo storage repo, uint acct) public view <br> returns (uint256 num)<br> {<br> uint256[] memory dl = repo.directors.acctList.values();<br> uint256 lenOfDL = dl.length;<br>while (lenOfDL > 0) {<br> uint256[] memory pl = repo.posInHand[dl[lenOfDL-1]].values();<br> uint256 lenOfPL = pl.length;<br>while(lenOfPL > 0) {<br> Position memory pos = repo.positions[pl[lenOfPL-1]];<br> if (pos.title <= uint8(TitleOfOfficers.Director)) { <br> if (pos.nominator == acct) num++;<br> break;<br> }<br> lenOfPL--;<br> }<br>lenOfDL--;<br> }<br> }<br> }<br>|
| [Contents](#toc) |

---

## UsdOrdersRepo.sol

---

| |
|:---|
| **contracts/lib/UsdOrdersRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./GoldChain.sol";<br>library UsdOrdersRepo {<br> using GoldChain for GoldChain.Chain;<br>struct Brief {<br> uint16 classOfShare;<br> uint32 seqOfShare;<br> uint40 buyer;<br> uint40 seller; <br> uint64 paid;<br> uint32 price;<br> uint16 votingWeight;<br> uint16 distrWeight;<br> }<br>struct Deal {<br> address from;<br> uint40 buyer;<br> uint40 groupRep;<br> uint16 classOfShare;<br> address to;<br> uint40 seller; <br> uint32 seqOfShare;<br> uint8 state;<br> bool inEth;<br> bool isOffer;<br> uint64 paid;<br> uint32 price;<br> uint16 votingWeight;<br> uint16 distrWeight;<br> uint128 consideration;<br> }<br>struct Repo {<br> GoldChain.Chain offers;<br> GoldChain.Chain bids;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== Codify & Parse ====<br>function parseBrief(bytes32 sn) public pure returns(<br> Brief memory brief) {<br> uint _sn = uint(sn);<br>brief.classOfShare = uint16(_sn >> 240);<br> brief.seqOfShare = uint32(_sn >> 208);<br> brief.buyer = uint40(_sn >> 168);<br> brief.seller = uint40(_sn >> 128);<br> brief.paid = uint64(_sn >> 64);<br> brief.price = uint32(_sn >> 32);<br> brief.votingWeight = uint16(_sn >> 16);<br> brief.distrWeight = uint16(_sn);<br> }<br>function codifyBrief(<br> Deal memory deal) public pure returns(bytes32 sn) {<br> bytes memory _sn = <br> abi.encodePacked(<br> deal.classOfShare,<br> deal.seqOfShare,<br> deal.buyer,<br> deal.seller,<br> deal.paid,<br> deal.price,<br> deal.votingWeight,<br> deal.distrWeight);<br>assembly {<br> sn := mload(add(_sn, 0x20))<br> } <br> }<br>function parseDeal(<br> bytes32 fromSn, bytes32 toSn, bytes32 qtySn) public pure returns(<br> Deal memory deal) {<br> uint _fromSn = uint(fromSn);<br>deal.from = address(uint160(_fromSn >> 96));<br> deal.buyer = uint40(_fromSn >> 56);<br> deal.groupRep = uint40(_fromSn >> 16);<br> deal.classOfShare = uint16(_fromSn);<br>uint _toSn = uint(toSn);<br>deal.to = address(uint160(_toSn >> 96));<br> deal.seller = uint40(_toSn >> 56);<br> deal.seqOfShare = uint32(_toSn >> 24);<br> deal.state = uint8(_toSn >> 16);<br> deal.inEth = uint8(_toSn >> 8) == 1;<br> deal.isOffer = uint8(_toSn) == 1;<br>uint _qtySn = uint(qtySn);<br>deal.paid = uint64(_qtySn >> 192);<br> deal.price = uint32(_qtySn >> 160);<br> deal.votingWeight = uint16(_qtySn >> 144);<br> deal.distrWeight = uint16(_qtySn >> 128);<br> deal.consideration = uint128(_qtySn);<br> }<br>function codifyDeal(Deal memory deal) public pure returns(<br> bytes32 fromSn, bytes32 toSn, bytes32 qtySn) {<br> bytes memory _fromSn = <br> abi.encodePacked(<br> deal.from,<br> deal.buyer,<br> deal.groupRep,<br> deal.classOfShare);<br>assembly {<br> fromSn := mload(add(_fromSn, 0x20))<br> }<br>bytes memory _toSn = <br> abi.encodePacked(<br> deal.to,<br> deal.seller,<br> deal.seqOfShare,<br> deal.state,<br> deal.inEth,<br> deal.isOffer);<br>assembly {<br> toSn := mload(add(_toSn, 0x20))<br> }<br>bytes memory _qtySn = <br> abi.encodePacked(<br> deal.paid,<br> deal.price,<br> deal.votingWeight,<br> deal.distrWeight,<br> deal.consideration);<br>assembly {<br> qtySn := mload(add(_qtySn, 0x20))<br> }<br> }<br>// ==== Order ====<br>function dealToData(Deal memory deal) public view <br> returns (GoldChain.Data memory data) {<br> return GoldChain.Data({<br> classOfShare : deal.classOfShare,<br> seqOfShare : deal.seqOfShare,<br> groupRep: deal.groupRep,<br> votingWeight : deal.votingWeight,<br> distrWeight : deal.distrWeight,<br> margin: deal.consideration,<br> inEth : deal.inEth, <br> pubKey : deal.isOffer ? deal.to : deal.from,<br> date: 0,<br> issueDate : uint48(block.timestamp) <br> });<br> }<br>function placeSellOrder(<br> Repo storage repo,<br> Deal memory input,<br> uint execHours) public returns (<br> Deal[] memory deals,<br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> Deal memory offer) {<br>offer = input;<br>GoldChain.Chain storage bids = repo.bids;<br> uint len = bids.length();<br>deals = new Deal[](len);<br> expired = new GoldChain.Order[](len);<br>if (offer.price > 0) {<br> (lenOfDeals, lenOfExpired) = _matchOfferToBid(bids, offer, deals, expired);<br> } else {<br> (lenOfDeals, lenOfExpired) = _matchMarketToBid(bids, offer, deals, expired);<br> }<br>if (offer.paid > 0 && offer.price > 0) {<br>GoldChain.Data memory data = dealToData(offer);<br>repo.offers.createNode(<br> offer.seller,<br> offer.paid,<br> offer.price,<br> execHours, <br> true,<br> data);<br> }<br> }<br>function placeBuyOrder(<br> Repo storage repo,<br> Deal memory input,<br> uint execHours) public returns (<br> Deal[] memory deals,<br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> Deal memory bid) {<br>bid = input;<br>GoldChain.Chain storage offers = repo.offers;<br> uint len = offers.length();<br>deals = new Deal[](len);<br> expired = new GoldChain.Order[](len);<br>if (bid.price > 0) {<br> (lenOfDeals, lenOfExpired) = _matchBidToOffer(offers, bid, deals, expired);<br> } else {<br> (lenOfDeals, lenOfExpired) = _matchMarketToOffer(offers, bid, deals, expired);<br> }<br>if (bid.paid > 0 && bid.price > 0) {<br>GoldChain.Data memory data = dealToData(bid);<br>repo.bids.createNode(<br> bid.buyer,<br> bid.paid,<br> bid.price,<br> execHours,<br> false,<br> data);<br> }<br>}<br>function withdrawOrder(<br> Repo storage repo,<br> uint seqOfOrder,<br> bool isOffer) public returns (GoldChain.Order memory removed)<br> {<br> removed = isOffer <br> ? repo.offers.offChain(seqOfOrder)<br> : repo.bids.offChain(seqOfOrder);<br> }<br>function _matchOfferToBid(<br> GoldChain.Chain storage bids, Deal memory offer, Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = bids.head();<br>while(seqOfNode > 0 && offer.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(bids, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break;<br>GoldChain.Order storage n = bids.orders[seqOfNode];<br>if (n.node.price >= offer.price) {<br>Deal memory deal = _createDeal(offer, offer.price, n.node.paid);<br>n.data.margin -= deal.consideration;<br> n.node.paid -= deal.paid;<br> offer.paid -= deal.paid;<br>_fillInOfferDeal(deal, offer, n);<br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = bids.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> expired[lenOfExpired] = delistedOrder;<br> lenOfExpired++;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br>} else break;<br> }<br> }<br>function _matchBidToOffer(<br> GoldChain.Chain storage offers, Deal memory bid, Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = offers.head();<br>while(seqOfNode > 0 && bid.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(offers, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break;<br>GoldChain.Order storage n = offers.orders[seqOfNode];<br>if (n.node.price <= bid.price) {<br>Deal memory deal = <br> _createDeal(bid, n.node.price, n.node.paid);<br>n.node.paid -= deal.paid;<br> bid.consideration -= deal.consideration;<br> bid.paid -= deal.paid;<br>_fillInBidDeal(deal, bid, n);<br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = offers.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br>} else break;<br> }<br> }<br>function _matchMarketToBid(<br> GoldChain.Chain storage bids, Deal memory offer, Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = bids.head();<br>while(seqOfNode > 0 && offer.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(bids, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break;<br>GoldChain.Order storage n = bids.orders[seqOfNode];<br>Deal memory deal = _createDeal(offer, n.node.price, n.node.paid);<br>n.data.margin -= deal.consideration;<br> n.node.paid -= deal.paid;<br> offer.paid -= deal.paid;<br>_fillInOfferDeal(deal, offer, n);<br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = bids.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br> }<br> }<br>function _matchMarketToOffer(<br> GoldChain.Chain storage offers, Deal memory bid, Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = offers.head();<br>while(seqOfNode > 0 && bid.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(offers, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break;<br>GoldChain.Order storage n = offers.orders[seqOfNode];<br>Deal memory deal = _createDeal(bid, n.node.price, n.node.paid);<br>if (deal.consideration >= bid.consideration) {<br> deal.consideration = bid.consideration;<br> deal.paid = uint64(uint(deal.consideration) / deal.price);<br>bid.paid = deal.paid;<br>if (deal.state == 1) {<br> deal.state = 0;<br> }<br> }<br>n.node.paid -= deal.paid;<br> bid.consideration -= deal.consideration;<br> bid.paid -= deal.paid;<br>_fillInBidDeal(deal, bid, n);<br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = offers.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br> }<br> }<br>function _checkExpired(<br> GoldChain.Chain storage chain, uint32 seqOfNode, GoldChain.Order[] memory expired, uint lenOfExpired) private returns(uint32, uint) {<br>while (seqOfNode > 0) {<br> if (chain.orders[seqOfNode].node.expireDate <= block.timestamp) {<br> GoldChain.Order memory removedNode = chain.offChain(seqOfNode); <br> expired[lenOfExpired] = (removedNode);<br> lenOfExpired++;<br> seqOfNode = removedNode.node.next;<br> } else break;<br> }<br>return (seqOfNode, lenOfExpired);<br> }<br>function _createDeal(<br> Deal memory order, uint offerPrice, uint nodePaid) private pure returns (Deal memory deal) {<br> deal.price = uint32(offerPrice);<br>if (order.paid >= nodePaid) {<br> deal.paid = uint64(nodePaid);<br> deal.state = 1;<br> } else {<br> deal.paid = order.paid;<br> }<br>deal.consideration = deal.paid \* deal.price;<br> }<br>function _fillInBidDeal(<br> Deal memory deal, Deal memory bid, GoldChain.Order memory n) private pure {<br> deal.from = bid.from;<br> deal.to = n.data.pubKey;<br> deal.seller = n.node.issuer;<br>deal.classOfShare = n.data.classOfShare;<br> deal.seqOfShare = n.data.seqOfShare;<br> deal.buyer = bid.buyer;<br> deal.groupRep = bid.groupRep;<br> deal.votingWeight = n.data.votingWeight;<br> deal.distrWeight = n.data.distrWeight;<br> }<br>function _fillInOfferDeal(<br> Deal memory deal, Deal memory offer, GoldChain.Order memory n) private pure {<br> deal.from = n.data.pubKey;<br> deal.to = offer.to;<br> deal.seller = offer.seller;<br>deal.classOfShare = offer.classOfShare;<br> deal.seqOfShare = offer.seqOfShare;<br> deal.buyer = n.node.issuer;<br> deal.groupRep = n.data.groupRep;<br> deal.votingWeight = offer.votingWeight;<br> deal.distrWeight = offer.distrWeight;<br> }<br>//################<br> //## Read I/O ##<br> //################<br>function counterOfOrders(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.counter()<br> : repo.bids.counter();<br> }<br>function headOfList(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.head()<br> : repo.bids.head();<br> }<br>function tailOfList(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.tail()<br> : repo.bids.tail();<br> }<br>function lengthOfList(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.length()<br> : repo.bids.length();<br> }<br>// ==== Order ====<br>function isOrder(<br> Repo storage repo,<br> bool isOffer,<br> uint seqOfOrder) public view returns (bool) {<br> return isOffer<br> ? repo.offers.isNode(seqOfOrder)<br> : repo.bids.isNode(seqOfOrder);<br> }<br>function getOrder(<br> Repo storage repo,<br> bool isOffer,<br> uint seqOfOrder) public view returns (GoldChain.Order memory order) {<br> order = isOffer<br> ? repo.offers.getOrder(seqOfOrder)<br> : repo.bids.getOrder(seqOfOrder);<br> }<br>function getSeqList(<br> Repo storage repo,<br> bool isOffer) public view returns (uint[] memory orders) {<br> orders = isOffer<br> ? repo.offers.getSeqList()<br> : repo.bids.getSeqList();<br> }<br>function getOrders(<br> Repo storage repo,<br> bool isOffer) public view returns (GoldChain.Order[] memory orders) {<br> orders = isOffer<br> ? repo.offers.getChain()<br> : repo.bids.getChain();<br> }<br> } |
| [Contents](#toc) |

---

## GoldChain.sol

---

| |
|:---|
| **contracts/lib/GoldChain.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library GoldChain {<br>struct Node {<br> uint32 prev;<br> uint32 next;<br> uint40 issuer;<br> uint64 paid;<br> uint32 price;<br> uint48 expireDate;<br> bool isOffer;<br> }<br>struct Data {<br> uint16 classOfShare;<br> uint32 seqOfShare;<br> uint40 groupRep;<br> uint16 votingWeight;<br> uint16 distrWeight;<br> uint128 margin;<br> bool inEth;<br> address pubKey;<br> uint48 date;<br> uint48 issueDate; <br> }<br>struct Order {<br> Node node;<br> Data data;<br> }<br>/\* node[0] {<br> prev: tail;<br> next: head;<br> price: counter;<br> } \*/<br>/\* data[0] {<br> seqOfShare: length;<br> }\*/<br>struct Chain {<br> mapping (uint => Order) orders;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== Node ====<br>function parseNode(<br> bytes32 sn) public pure returns(Node memory node) {<br>uint _sn = uint(sn);<br>node.prev = uint32(_sn >> 224);<br> node.next = uint32(_sn >> 192);<br> node.issuer = uint40(_sn >> 152);<br> node.paid = uint64(_sn >> 88);<br> node.price = uint32(_sn >> 56);<br> node.expireDate = uint48(_sn >> 8);<br> node.isOffer = uint8(_sn) == 1;<br> }<br>function codifyNode(<br> Node memory node) public pure returns(bytes32 sn) {<br>bytes memory _sn = <br> abi.encodePacked(<br> node.prev,<br> node.next,<br> node.issuer,<br> node.paid,<br> node.price,<br> node.expireDate,<br> uint8(node.isOffer ? 1 : 0));<br>assembly {<br> sn := mload(add(_sn, 0x20))<br> } <br> }<br>// ==== Data ====<br>function parseData(<br> bytes32 sn) public pure returns(Data memory data) {<br>uint _sn = uint(sn);<br>data.classOfShare = uint16(_sn >> 240);<br> data.seqOfShare = uint32(_sn >> 208);<br> data.groupRep = uint40(_sn >> 168);<br> data.votingWeight = uint16(_sn >> 152);<br> data.distrWeight = uint16(_sn >> 136);<br> data.margin = uint128(_sn >> 8);<br> data.inEth = bool(uint8(_sn) == 1);<br> }<br>function codifyData(<br> Data memory data) public pure returns(bytes32 sn) {<br> bytes memory _sn = <br> abi.encodePacked(<br> data.classOfShare,<br> data.seqOfShare,<br> data.groupRep,<br> data.votingWeight,<br> data.distrWeight,<br> data.margin,<br> uint8(data.inEth ? 1 : 0));<br>assembly {<br> sn := mload(add(_sn, 0x20))<br> } <br> }<br>// ==== Node ====<br>function createNode(<br> Chain storage chain,<br> uint issuer,<br> uint paid,<br> uint price,<br> uint execHours,<br> bool isOffer,<br> Data memory data) public {<br>require (uint64(paid) > 0, 'GC.createNode: zero paid');<br>if (!isOffer) {<br> require(data.margin > 0, "GC.createNode: zero margin");<br> }<br>uint32 seqOfOrder = _increaseCounter(chain);<br>chain.orders[seqOfOrder].node = Node({<br> prev:0,<br> next:0,<br> issuer: uint40(issuer),<br> paid: uint64(paid),<br> price: uint32(price),<br> expireDate: uint48(block.timestamp + 3600 \* execHours),<br> isOffer: isOffer<br> });<br>chain.orders[seqOfOrder].data = data;<br>_increaseLength(chain);<br> _upChain(chain, seqOfOrder);<br> }<br>function _abs(uint32 a, uint32 b) private pure returns(uint32 c) {<br> c = a > b ? a - b : b - a;<br> }<br>function _upChain(Chain storage chain, uint32 seqOfOrder) private {<br>Node storage node = chain.orders[seqOfOrder].node;<br>bool sortFromHead = <br> _abs(chain.orders[tail(chain)].node.price, node.price) > <br> _abs(chain.orders[head(chain)].node.price, node.price);<br>(uint prev, uint next) = <br> _getPos(<br> chain,<br> node.price,<br> sortFromHead ? 0 : tail(chain),<br> sortFromHead ? head(chain) : 0,<br> sortFromHead,<br> node.isOffer);<br>node.prev = uint32(prev);<br> node.next = uint32(next);<br>chain.orders[prev].node.next = seqOfOrder;<br> chain.orders[next].node.prev = seqOfOrder;<br> }<br>function _getPos(<br> Chain storage chain,<br> uint price,<br> uint prev,<br> uint next,<br> bool sortFromHead,<br> bool isAscedning) private view returns(uint, uint) {<br> if (sortFromHead) {<br> if (isAscedning) {<br> while(next > 0 && chain.orders[next].node.price <= price) {<br> prev = next;<br> next = chain.orders[next].node.next;<br> }<br> } else {<br> while(next > 0 && chain.orders[next].node.price >= price) {<br> prev = next;<br> next = chain.orders[next].node.next;<br> } <br> }<br> } else {<br> if (isAscedning) {<br> while(prev > 0 && chain.orders[prev].node.price > price) {<br> next = prev;<br> prev = chain.orders[prev].node.prev;<br> }<br> } else {<br> while(prev > 0 && chain.orders[prev].node.price < price) {<br> next = prev;<br> prev = chain.orders[prev].node.prev;<br> }<br> }<br> }<br> return (prev, next);<br> }<br>function offChain(<br> Chain storage chain, uint seqOfOrder) public returns(Order memory order) {<br>require(isNode(chain, seqOfOrder), "GC.offChain: Node not exist");<br>order = chain.orders[seqOfOrder];<br>chain.orders[order.node.prev].node.next = order.node.next;<br> chain.orders[order.node.next].node.prev = order.node.prev;<br>delete chain.orders[seqOfOrder];<br>_decreaseLength(chain);<br> }<br>function _increaseCounter(<br> Chain storage chain) private returns (uint32 out) { <br>Node storage node = chain.orders[0].node;<br> out = node.price;<br>do {<br> unchecked {<br> out++; <br> }<br> } while(isNode(chain, out) \|\|<br> out == 0);<br>node.price = out;<br> }<br>function _increaseLength(<br> Chain storage chain) private {<br> chain.orders[0].data.seqOfShare++;<br> }<br>function _decreaseLength(<br> Chain storage chain) private {<br> chain.orders[0].data.seqOfShare--;<br> }<br>//#################<br> //## Read I/O ##<br> //#################<br>// ==== Node[0] ====<br>function counter(<br> Chain storage chain) public view returns (uint32) {<br> return chain.orders[0].node.price;<br> }<br>function length(<br> Chain storage chain) public view returns (uint32) {<br> return chain.orders[0].data.seqOfShare;<br> }<br>function head(<br> Chain storage chain) public view returns (uint32) {<br> return chain.orders[0].node.next;<br> }<br>function tail(<br> Chain storage chain) public view returns (uint32) {<br> return chain.orders[0].node.prev;<br> }<br>// ==== Node ====<br>function isNode(<br> Chain storage chain, uint seqOfOrder) public view returns(bool) {<br> return chain.orders[seqOfOrder].node.expireDate > 0;<br> } <br>function getNode(<br> Chain storage chain, uint seqOfOrder) public view returns(Node memory node) {<br> node = chain.orders[seqOfOrder].node;<br> }<br>function getData(<br> Chain storage chain, uint seqOfOrder) public view returns(Data memory data) {<br> data = chain.orders[seqOfOrder].data;<br> }<br>function getOrder(<br> Chain storage chain, uint seqOfOrder) public view returns(Order memory order) {<br> order = chain.orders[seqOfOrder];<br> }<br>// ==== Chain ====<br>function getSeqList(<br> Chain storage chain) public view returns (uint[] memory) {<br> uint len = length(chain);<br> uint[] memory list = new uint[](len);<br>Node memory node = chain.orders[0].node;<br>while (len > 0) {<br> list[len-1] = node.prev;<br> node = chain.orders[node.prev].node;<br> len--;<br> }<br>return list;<br> }<br>function getChain(<br> Chain storage chain) public view returns (Order[] memory) {<br> uint len = length(chain);<br> Order[] memory list = new Order[](len);<br>Node memory node = chain.orders[0].node;<br>while (len > 0) {<br> list[len-1] = chain.orders[node.prev];<br> node = chain.orders[node.prev].node;<br> len--;<br> }<br>return list;<br> }<br> }<br>|
| [Contents](#toc) |

---

## TeamsRepo.sol

---

| |
|:---|
| **contracts/lib/TeamsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library TeamsRepo {<br> using EnumerableSet for EnumerableSet.UintSet;<br>struct Member {<br> uint16 seqOfTeam;<br> uint40 userNo;<br> uint8 state;<br> uint32 rate; <br> uint32 workHours; // appliedAmt for Team / Project<br> uint32 budgetAmt;<br> uint32 approvedAmt;<br> uint32 receivableAmt;<br> uint32 paidAmt;<br> }<br>struct Team {<br> EnumerableSet.UintSet membersList;<br> mapping(uint256 => Member) members;<br> }<br>struct Repo {<br> EnumerableSet.UintSet teamsList;<br> mapping(uint256 => Team) teams;<br> EnumerableSet.UintSet payroll;<br> mapping(uint256 => uint256) cashBox;<br> }<br>modifier onlyManager(Repo storage repo, uint caller) {<br> require(isManager(repo, caller),<br> "TR.onlyManager: not");<br> _;<br> }<br>modifier onlyListedTeam(<br> Repo storage repo,<br> uint seqOfTeam) {<br> require(teamIsListed(repo, seqOfTeam),<br> "TR.onlyListedTeam: not");<br> _;<br> }<br>modifier onlyTeamLeader(<br> Repo storage repo, <br> uint caller,<br> uint seqOfTeam) {<br> require(isTeamLeader(repo, caller, seqOfTeam),<br> "TR.onlyLeader: not");<br> _;<br> }<br>///////////////////<br> // Write I/O //<br> ///////////////////<br>function setManager(Repo storage repo, uint acct) public {<br> repo.teams[0].members[0].userNo = uint40(acct); <br> }<br>function transferProject(<br> Repo storage repo,<br> uint caller,<br> uint newManager) public onlyManager(repo, caller) {<br> repo.teams[0].members[0].userNo = uint40(newManager); <br> }<br>// ---- Project ----<br>function setBudget(<br> Repo storage repo,<br> uint caller,<br> uint budget) public onlyManager(repo, caller) {<br> Member storage info = repo.teams[0].members[0];<br> require (info.state == 0, "TR.setBudget: already fixed");<br> info.budgetAmt = uint32(budget);<br> }<br>function fixBudget(Repo storage repo, uint caller) <br> public onlyManager(repo, caller) <br> {<br> Member storage info = repo.teams[0].members[0];<br> require (info.state == 0, "TR.fixBudget: already fixed");<br> info.state = 1;<br> }<br>function increaseBudget(<br> Repo storage repo,<br> uint caller,<br> uint deltaAmt) public onlyManager(repo, caller) {<br> Member storage info = repo.teams[0].members[0];<br> require (info.state > 0,<br> "TR.increaseBudget: still pending");<br> info.budgetAmt += uint32(deltaAmt);<br> }<br>// ---- Team ----<br>function createTeam(<br> Repo storage repo,<br> uint caller,<br> uint budget) public {<br> uint40 acct = uint40(caller);<br>require(acct > 0, "TR.addTeam: zero leader");<br>Member storage projInfo = <br> repo.teams[0].members[0];<br>projInfo.seqOfTeam++;<br>Member storage teamInfo = <br> repo.teams[projInfo.seqOfTeam].members[0];<br>teamInfo.seqOfTeam = projInfo.seqOfTeam; <br> teamInfo.userNo = acct;<br> teamInfo.budgetAmt = uint32(budget);<br>repo.teamsList.add(projInfo.seqOfTeam);<br> }<br>function updateTeam(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint budget) public onlyTeamLeader(repo, caller, seqOfTeam){<br>Member storage teamInfo = <br> repo.teams[seqOfTeam].members[0];<br>require(teamInfo.state == 0,<br> "updateTeam: already approved");<br>teamInfo.budgetAmt = uint32(budget);<br> }<br>function enrollTeam(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam) public onlyManager(repo, caller) <br> onlyListedTeam(repo, seqOfTeam) <br> {<br> Member storage projInfo = <br> repo.teams[0].members[0];<br>Member storage teamInfo = <br> repo.teams[seqOfTeam].members[0];<br>_enrollMember(projInfo, teamInfo);<br> }<br>function _enrollMember(<br> Member storage teamInfo,<br> Member storage member) private {<br> require(member.state == 0,<br> "enrollTeam: already enrolled");<br>require(teamInfo.budgetAmt >= <br> (teamInfo.approvedAmt + member.budgetAmt),<br> "enrollTeam: budget overflow");<br>member.state = 1;<br> teamInfo.approvedAmt += member.budgetAmt;<br> }<br>function replaceLeader(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint leader) public onlyManager(repo, caller) <br> onlyListedTeam(repo, seqOfTeam)<br> {<br> uint40 acct = uint40(leader);<br> require(acct > 0,"TR.addTeam: zero leader");<br> repo.teams[seqOfTeam].members[0].userNo = acct;<br> }<br>function increaseTeamBudget(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint delta) public onlyManager(repo, caller) <br> onlyListedTeam(repo, seqOfTeam)<br> {<br> Member storage projInfo = repo.teams[0].members[0];<br> Member storage teamInfo = repo.teams[seqOfTeam].members[0];<br>_increaseBudget(projInfo, teamInfo, delta);<br> }<br>function _increaseBudget(<br> Member storage teamInfo,<br> Member storage member,<br> uint delta) private {<br>uint32 amt = uint32(delta);<br>require (amt > 0, "TR.increaseBudget: Zero amt");<br>require (teamInfo.budgetAmt >= teamInfo.approvedAmt + amt,<br> "TR.increaseTeamBudget: budget overflow");<br>member.budgetAmt += amt;<br> teamInfo.approvedAmt += amt;<br> }<br>// ---- Member ----<br>function enrollMember(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint userNo,<br> uint rate,<br> uint budgetAmt) public onlyTeamLeader(repo, caller, seqOfTeam) { <br> Team storage t = repo.teams[seqOfTeam];<br> Member storage teamInfo = t.members[0];<br>uint40 acct = uint40(userNo);<br> require(acct > 0,<br> "enrollMember: zero userNo");<br>require(!t.membersList.contains(acct),<br> "enrollMember: already enrolled");<br>Member storage member = t.members[acct];<br>member.seqOfTeam = teamInfo.seqOfTeam;<br> member.userNo = acct;<br> member.rate = uint32(rate);<br> member.budgetAmt = uint32(budgetAmt);<br>_enrollMember(teamInfo, member); <br>t.membersList.add(acct);<br> repo.payroll.add(acct);<br> }<br>function removeMember(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint userNo) public {<br>(Member storage teamInfo, Member storage member) = <br> _getTeamInfoAndMember(repo, caller, seqOfTeam, userNo);<br>require(member.state > 0,<br> "removeMember: not enrolled");<br>member.state = 0;<br>teamInfo.approvedAmt -= (member.budgetAmt - member.receivableAmt);<br> teamInfo.workHours -= (member.approvedAmt);<br> }<br>function _getTeamInfoAndMember(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint userNo) private view returns(<br> Member storage teamInfo,<br> Member storage member ) {<br> (teamInfo, member) = _getInfoAndMember(repo, seqOfTeam, userNo);<br> require(teamInfo.userNo == caller, "not team leader");<br> }<br>function _getInfoAndMember(<br> Repo storage repo,<br> uint seqOfTeam,<br> uint userNo) private view onlyListedTeam(repo, seqOfTeam) returns(<br> Member storage teamInfo,<br> Member storage member ) { <br> Team storage t = repo.teams[seqOfTeam];<br> teamInfo = t.members[0];<br>require(t.membersList.contains(userNo),<br> "removeMember: not listed");<br>member = t.members[userNo];<br> }<br>function restoreMember(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint userNo) public {<br>(Member storage teamInfo, Member storage member) = <br> _getTeamInfoAndMember(repo, caller, seqOfTeam, userNo);<br>require(member.state == 0,<br> "restoreMember: already enrolled");<br>uint32 balance = (member.budgetAmt - member.receivableAmt);<br> require(teamInfo.budgetAmt >= teamInfo.approvedAmt + balance,<br> "enrollMember: budget overflow");<br> teamInfo.budgetAmt += balance;<br>if (member.approvedAmt > 0) {<br> member.state = 2;<br> teamInfo.workHours += member.approvedAmt; <br> } else {<br> member.state = 1;<br> }<br> }<br>function increaseMemberBudget(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint userNo,<br> uint delta) public {<br>(Member storage teamInfo, Member storage member) =<br> _getTeamInfoAndMember(repo, caller, seqOfTeam, userNo);<br>require(member.state > 0,<br> "increaseMemberBudget: not enrolled");<br>_increaseBudget(teamInfo, member, delta);<br> }<br>function adjustSalary(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint userNo,<br> bool increase,<br> uint delta) public {<br>(, Member storage member) = <br> _getTeamInfoAndMember(repo, caller, seqOfTeam, userNo);<br>require(member.state > 0,<br> "adjustSalary: not enrolled");<br>uint32 amt = uint32(delta);<br>if (increase) {<br> member.rate += amt;<br> } else {<br> require (member.rate >= amt, <br> "adjustSalary: insufficient amt");<br> member.rate -= amt;<br> }<br> }<br>// ---- Work ----<br>function applyWorkingHour(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint hrs) public {<br>(, Member storage member) = _getInfoAndMember(repo, seqOfTeam, caller);<br>require(member.state == 1,<br> "TR.applyHr: wrong state");<br>uint32 delta = uint32(member.rate \* hrs);<br>require(member.budgetAmt >= member.receivableAmt + delta,<br> "TR.applyHr: exceed budget");<br>member.workHours += uint32(hrs);<br> member.approvedAmt = delta;<br>member.state = 2;<br> }<br>function verifyMemberWork(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint userNo,<br> uint ratio) public {<br> require(ratio <= 10000, "TR.verifyHr: ratio overflow");<br>(Member storage teamInfo, Member storage member) = <br> _getTeamInfoAndMember(repo, caller, seqOfTeam, userNo);<br>require(member.state == 2, "TR.verifyHr: wrong state");<br>member.approvedAmt = uint32(member.approvedAmt \* ratio / 10000);<br> member.state = 3;<br>teamInfo.workHours += member.approvedAmt;<br> }<br>function verifyTeamWork(<br> Repo storage repo,<br> uint caller,<br> uint seqOfTeam,<br> uint ratio) public onlyManager(repo, caller) <br> onlyListedTeam(repo, seqOfTeam)<br> {<br> require(ratio <= 10000,<br> "TR.verifyHr: ratio overflow");<br>Team storage t = repo.teams[seqOfTeam];<br> Member storage teamInfo = t.members[0];<br>require(teamInfo.workHours > 0,<br> "TR.approveTeamWork: zero applied");<br>uint32 deltaAmt = uint32(teamInfo.workHours \* ratio / 10000);<br> teamInfo.receivableAmt += deltaAmt;<br>Member storage proInfo = repo.teams[0].members[0];<br> proInfo.receivableAmt += deltaAmt;<br>_confirmTeamWork(t, ratio);<br>teamInfo.workHours = 0;<br> }<br>function _confirmTeamWork(<br> Team storage t,<br> uint ratio) private {<br> uint[] memory ls = t.membersList.values();<br> uint len = ls.length;<br>while (len > 0) {<br> Member storage m = t.members[ls[len-1]];<br> if (m.state == 3) {<br> m.receivableAmt += uint32(m.approvedAmt \* ratio / 10000);<br> m.approvedAmt = 0;<br> m.state = 1;<br> }<br> len--;<br> }<br> }<br>function distributePayment(<br> Repo storage repo,<br> uint amtInWei,<br> uint centPriceInWei) public {<br>uint[] memory ls = repo.teamsList.values();<br> uint len = ls.length;<br>Member storage projInfo = repo.teams[0].members[0];<br>uint rate = amtInWei \* 10000 / (projInfo.receivableAmt - projInfo.paidAmt);<br> uint32 sum = 0;<br>while (len > 0) {<br> Team storage t = repo.teams[ls[len-1]];<br> Member storage info = t.members[0];<br>if (info.receivableAmt > info.paidAmt) {<br> uint32 amt = _distributePackage(repo, t, rate, centPriceInWei);<br> info.paidAmt += amt; <br> sum += amt;<br> }<br>len--;<br> }<br>projInfo.paidAmt += sum;<br> repo.cashBox[0] += amtInWei;<br> }<br>function _distributePackage(<br> Repo storage repo,<br> Team storage t,<br> uint rate,<br> uint centPriceInWei) private returns (uint32 sum) {<br> uint[] memory ls = t.membersList.values();<br> uint len = ls.length;<br> sum = 0;<br>while (len > 0) {<br> Member storage m = t.members[ls[len-1]];<br>uint outstandingAmt = m.receivableAmt - m.paidAmt;<br>if (outstandingAmt > 0) {<br> repo.cashBox[m.userNo] += rate \* outstandingAmt / 10000;<br>uint32 amtFiat = uint32(rate \* outstandingAmt / centPriceInWei / 10 \*\* 4);<br>m.paidAmt += amtFiat;<br> sum += amtFiat;<br> }<br>len--;<br> }<br> }<br>function pickupDeposit(<br> Repo storage repo,<br> uint caller,<br> uint amt) public {<br> require (repo.payroll.contains(caller),<br> "TR.pickupDeposit: not in payroll");<br>uint balance = repo.cashBox[caller];<br>require (balance >= amt,<br> "TR.pickupDeposit: insufficient balance");<br>repo.cashBox[caller] -= amt;<br> repo.cashBox[0] -= amt;<br> }<br>///////////////////<br> // Read I/O //<br> ///////////////////<br>function isManager(<br> Repo storage repo,<br> uint acct) public view returns(bool) {<br> return acct > 0 &&<br> repo.teams[0].members[0].userNo == acct;<br> }<br>function getProjectInfo(<br> Repo storage repo) public view returns(Member memory info) {<br> info = repo.teams[0].members[0];<br> }<br>// ---- Teams ----<br>function qtyOfTeams (<br> Repo storage repo) public view returns(uint) {<br> return repo.teams[0].members[0].seqOfTeam;<br> }<br>function getListOfTeams(<br> Repo storage repo) public view returns(uint[] memory) {<br> return repo.teamsList.values();<br> }<br>function teamIsListed(<br> Repo storage repo,<br> uint seqOfTeam) public view returns(bool) {<br> return repo.teamsList.contains(seqOfTeam);<br> }<br>function teamIsEnrolled(<br> Repo storage repo,<br> uint seqOfTeam) public view returns(bool) {<br> return repo.teamsList.contains(seqOfTeam) &&<br> repo.teams[seqOfTeam].members[0].state == 1;<br> }<br>// ---- TeamInfo ----<br>function isTeamLeader(<br> Repo storage repo,<br> uint acct,<br> uint seqOfTeam) public view returns(bool) {<br> return repo.teamsList.contains(seqOfTeam) &&<br> repo.teams[seqOfTeam].members[0].userNo == acct;<br> }<br>function getTeamInfo(<br> Repo storage repo,<br> uint seqOfTeam) public view returns(Member memory info) {<br> if (repo.teamsList.contains(seqOfTeam)) {<br> info = repo.teams[seqOfTeam].members[0];<br> }<br> }<br>// ---- Member ----<br>function isMember(<br> Repo storage repo,<br> uint acct,<br> uint seqOfTeam) public view returns (bool) {<br> return repo.teamsList.contains(seqOfTeam) &&<br> repo.teams[seqOfTeam].membersList.contains(acct);<br> }<br>function isEnrolledMember(<br> Repo storage repo,<br> uint acct,<br> uint seqOfTeam) public view returns (bool) {<br> return repo.teamsList.contains(seqOfTeam) &&<br> repo.teams[seqOfTeam].membersList.contains(acct) &&<br> repo.teams[seqOfTeam].members[acct].state > 0;<br> }<br>function getTeamMembersList(<br> Repo storage repo,<br> uint seqOfTeam) public view returns (uint[] memory ls) {<br> if (repo.teamsList.contains(seqOfTeam)) {<br> ls = repo.teams[seqOfTeam].membersList.values();<br> }<br> }<br>function getMemberInfo(<br> Repo storage repo,<br> uint acct,<br> uint seqOfTeam) public view returns (Member memory m) {<br>if (repo.teamsList.contains(seqOfTeam) &&<br> repo.teams[seqOfTeam].membersList.contains(acct)) {<br> m = repo.teams[seqOfTeam].members[acct];<br> }<br> }<br>function getMembersOfTeam(Repo storage repo,uint seqOfTeam) <br> public view returns (Member[] memory) <br> {<br> uint[] memory ls = getTeamMembersList(repo, seqOfTeam);<br> uint len = ls.length;<br> Member[] memory output = new Member[](len);<br>Team storage t = repo.teams[seqOfTeam];<br>while (len > 0) {<br> output[len-1] = t.members[ls[len-1]];<br> len--;<br> }<br>return output;<br> }<br>// ---- Payroll ----<br>function getPayroll(<br> Repo storage repo) public view returns (uint[] memory list) {<br> return repo.payroll.values();<br> }<br>function inPayroll(<br> Repo storage repo,<br> uint acct) public view returns(bool) {<br> return repo.payroll.contains(acct);<br> }<br>function getBalanceOf(<br> Repo storage repo,<br> uint acct) public view returns(uint) {<br> return repo.cashBox[acct];<br> }<br> } |
| [Contents](#toc) |

---

## FRClaims.sol

---

| |
|:---|
| **contracts/lib/FRClaims.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../comps/books/rom/IRegisterOfMembers.sol";<br>library FRClaims {<br>struct Claim {<br> uint16 seqOfDeal;<br> uint40 claimer;<br> uint64 weight;<br> uint64 ratio;<br> uint48 sigDate;<br> bytes32 sigHash;<br> }<br>struct Package {<br> uint64 sumOfWeight;<br> Claim[] claims;<br> mapping(uint256 => bool) isClaimer;<br> }<br>// packages[0] {<br> // claims: deals;<br> // isClaimer: isClaimer;<br> // }<br>struct Claims {<br> // seqOfDeal => Package<br> mapping(uint256 => Package) packages;<br> }<br>//##################<br> //## Write I/O ##<br> //##################<br>function claimFirstRefusal(<br> Claims storage cls,<br> uint256 seqOfDeal,<br> uint256 acct,<br> bytes32 sigHash) public {<br>Claim memory cl = Claim({<br> seqOfDeal: uint16(seqOfDeal),<br> claimer: uint40(acct),<br> weight: 0,<br> ratio: 0,<br> sigDate: uint48(block.timestamp),<br> sigHash: sigHash<br> });<br>require(cl.seqOfDeal > 0, "FRClaims.exec: zero seqOfDeal");<br>require(!isClaimerOfDeal(cls, cl.seqOfDeal, cl.claimer),<br> "FRClaims.exec: double claim");<br>if (!isDeal(cls, cl.seqOfDeal))<br> cls.packages[0].claims.push(cl);<br>Package storage p = cls.packages[cl.seqOfDeal];<br>p.isClaimer[cl.claimer] = true;<br> p.claims.push(cl);<br>cls.packages[0].isClaimer[cl.claimer] = true;<br> }<br>function computeFirstRefusal(<br> Claims storage cls,<br> uint256 seqOfDeal,<br> IRegisterOfMembers rom) public returns (Claim[] memory output) {<br>require(isDeal(cls, seqOfDeal), "FRClaims.accept: no claims received");<br>Package storage p = cls.packages[seqOfDeal];<br>if (p.sumOfWeight == 0) {<br> uint256 len = p.claims.length; <br> uint256 i;<br>while (i < len) {<br> Claim storage cl = p.claims[i];<br>uint64 weight = rom.votesInHand(cl.claimer);<br> cl.weight = weight;<br> p.sumOfWeight += weight;<br> i++;<br> }<br>i = 0;<br> uint256 sum;<br> len--;<br>while(i < len) {<br> Claim storage cl = p.claims[i];<br>cl.ratio = cl.weight \* 10000 / p.sumOfWeight;<br> sum += cl.ratio;<br> i++; <br> }<br>p.claims[len].ratio = 10000 - uint64(sum);<br>} else revert("FRClaims: already created");<br>output = p.claims;<br> }<br>// ################################<br> // ## Read I/O ##<br> // ################################<br>function isClaimer(Claims storage cls, uint acct) public view returns(bool) {<br> return cls.packages[0].isClaimer[acct];<br> }<br>function isClaimerOfDeal(<br> Claims storage cls, <br> uint seqOfDeal, <br> uint acct) public view returns(bool) {<br> return cls.packages[seqOfDeal].isClaimer[acct];<br> }<br>function isDeal(<br> Claims storage cls,<br> uint seqOfDeal) public view returns(bool) {<br> return cls.packages[seqOfDeal].claims.length > 0;<br> }<br>function getDeals(Claims storage cls) public view returns(uint[] memory) {<br> Claim[] memory claims = cls.packages[0].claims;<br> uint len = claims.length;<br> uint[] memory deals = new uint[](len);<br>while (len > 0) {<br> deals[len - 1] = claims[len - 1].seqOfDeal;<br> len--;<br> }<br>return deals;<br> }<br>function getClaimsOfDeal(Claims storage cls, uint256 seqOfDeal)<br> public view returns (Claim[] memory)<br> {<br> require(isDeal(cls, seqOfDeal), "FRD.COFR: not a targetDeal");<br> return cls.packages[seqOfDeal].claims;<br> }<br>function allAccepted(Claims storage cls) public view returns (bool) {<br>uint[] memory deals = getDeals(cls);<br> uint len = deals.length;<br>while (len > 0) {<br> if (cls.packages[deals[len - 1]].sumOfWeight == 0)<br> return false;<br> len--;<br> }<br>return true;<br> }<br>}<br>|
| [Contents](#toc) |

---

## UsersRepo.sol

---

| |
|:---|
| **contracts/lib/UsersRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./LockersRepo.sol";<br>library UsersRepo {<br> using LockersRepo for LockersRepo.Repo;<br>struct Key {<br> address pubKey;<br> uint16 discount;<br> uint40 gift; <br> uint40 coupon;<br> }<br>struct User {<br> Key primeKey;<br> Key backupKey;<br> }<br>struct Rule {<br> uint40 eoaRewards;<br> uint40 coaRewards;<br> uint40 floor;<br> uint16 rate;<br> uint16 para;<br> }<br>struct Repo {<br> // userNo => User<br> mapping(uint256 => User) users;<br> // key => userNo<br> mapping(address => uint) userNo;<br> LockersRepo.Repo lockers; <br> }<br>// platformRule: Rule({<br> // eoaRewards: users[0].primeKey.gift,<br> // coaRewards: users[0].backupKey.gift,<br> // floor: users[0].backupKey.coupon,<br> // rate: users[0].primeKey.discount,<br> // para: users[0].backupKey.discount<br> // });<br>// counterOfUers: users[0].primeKey.coupon;<br>// owner: users[0].primeKey.pubKey;<br> // bookeeper: users[0].backupKey.pubKey;<br>// ####################<br> // ## Modifier ##<br> // ####################<br>modifier onlyOwner(Repo storage repo, address msgSender) {<br> require(msgSender == getOwner(repo), <br> "UR.mf.OO: not owner");<br> _;<br> }<br>modifier onlyKeeper(Repo storage repo, address msgSender) {<br> require(msgSender == getBookeeper(repo), <br> "UR.mf.OK: not bookeeper");<br> _;<br> }<br>modifier onlyPrimeKey(Repo storage repo, address msgSender) {<br> require(msgSender == repo.users[getUserNo(repo, msgSender)].primeKey.pubKey, <br> "UR.mf.OPK: not primeKey");<br> _;<br> }<br>// ########################<br> // ## Opts Setting ##<br> // ########################<br>function ruleParser(bytes32 sn) public pure <br> returns(Rule memory rule) <br> {<br> uint _sn = uint(sn);<br>rule = Rule({<br> eoaRewards: uint40(_sn >> 216),<br> coaRewards: uint40(_sn >> 176),<br> floor: uint40(_sn >> 136),<br> rate: uint16(_sn >> 120),<br> para: uint16(_sn >> 96)<br> });<br> }<br>function setPlatformRule(Repo storage repo, bytes32 snOfRule, address msgSender) <br> public onlyOwner(repo, msgSender) <br> {<br>Rule memory rule = ruleParser(snOfRule);<br>User storage opt = repo.users[0];<br>opt.primeKey.discount = rule.rate;<br> opt.primeKey.gift = rule.eoaRewards;<br>opt.backupKey.discount = rule.para;<br> opt.backupKey.gift = rule.coaRewards;<br> opt.backupKey.coupon = rule.floor;<br> }<br>function getPlatformRule(Repo storage repo) public view <br> returns (Rule memory rule) <br> {<br> User storage opt = repo.users[0];<br>rule = Rule({<br> eoaRewards: opt.primeKey.gift,<br> coaRewards: opt.backupKey.gift,<br> floor: opt.backupKey.coupon,<br> rate: opt.primeKey.discount,<br> para: opt.backupKey.discount<br> });<br> }<br>function transferOwnership(Repo storage repo, address newOwner, address msgSender) <br> public onlyOwner(repo, msgSender)<br> {<br> repo.users[0].primeKey.pubKey = newOwner;<br> }<br>function handoverCenterKey(Repo storage repo, address newKeeper, address msgSender) <br> public onlyKeeper(repo, msgSender) <br> {<br> repo.users[0].backupKey.pubKey = newKeeper;<br> }<br>// ==== Author Setting ====<br>function infoParser(bytes32 info) public pure returns(Key memory)<br> {<br> uint _info = uint(info);<br>Key memory out = Key({<br> pubKey: address(0),<br> discount: uint16(_info >> 80),<br> gift: uint40(_info >> 40),<br> coupon: uint40(_info)<br> });<br>return out;<br> }<br>function setRoyaltyRule(<br> Repo storage repo,<br> bytes32 snOfRoyalty,<br> address msgSender) public onlyPrimeKey(repo, msgSender) {<br>Key memory rule = infoParser(snOfRoyalty);<br>uint author = getUserNo(repo, msgSender);<br> User storage a = repo.users[author];<br>a.backupKey.discount = rule.discount;<br> a.backupKey.gift = rule.gift;<br> a.backupKey.coupon = rule.coupon;<br>}<br>function getRoyaltyRule(Repo storage repo, uint author)<br> public view returns (Key memory) <br> {<br> require (author > 0, 'zero author');<br>Key memory rule = repo.users[author].backupKey;<br> delete rule.pubKey;<br>return rule;<br> }<br>// ##################<br> // ## Points ##<br> // ##################<br>function mintAndLockPoints(Repo storage repo, uint to, uint amt, uint expireDate, bytes32 hashLock, address msgSender) <br> public onlyOwner(repo, msgSender) returns (LockersRepo.Head memory head)<br> {<br> head = _prepareLockerHead(repo, to, amt, expireDate, msgSender);<br> repo.lockers.lockPoints(head, hashLock);<br> }<br>function _prepareLockerHead(<br> Repo storage repo, <br> uint to, <br> uint amt, <br> uint expireDate, <br> address msgSender) private view returns (LockersRepo.Head memory head) {<br> uint40 caller = getUserNo(repo, msgSender);<br>require((amt >> 128) == 0, <br> "UR.prepareLockerHead: amt overflow");<br>head = LockersRepo.Head({<br> from: caller,<br> to: uint40(to),<br> expireDate: uint48(expireDate),<br> value: uint128(amt)<br> });<br> }<br>function lockPoints(Repo storage repo, uint to, uint amt, uint expireDate, bytes32 hashLock, address msgSender) <br> public onlyPrimeKey(repo, msgSender) returns (LockersRepo.Head memory head)<br> {<br> head = _prepareLockerHead(repo, to, amt, expireDate, msgSender);<br> repo.lockers.lockPoints(head, hashLock);<br> }<br>function lockConsideration(<br> Repo storage repo, <br> uint to, <br> uint amt, <br> uint expireDate, <br> address counterLocker, <br> bytes calldata payload, <br> bytes32 hashLock, <br> address msgSender) public onlyPrimeKey(repo, msgSender) returns (LockersRepo.Head memory head) {<br> head = _prepareLockerHead(repo, to, amt, expireDate, msgSender);<br> LockersRepo.Body memory body = LockersRepo.Body({<br> counterLocker: counterLocker,<br> payload: payload <br> });<br> repo.lockers.lockConsideration(head, body, hashLock);<br> }<br>function pickupPoints(<br> Repo storage repo, <br> bytes32 hashLock, <br> string memory hashKey,<br> address msgSender) public returns (LockersRepo.Head memory head) <br> {<br> uint caller = getUserNo(repo, msgSender);<br> head = repo.lockers.pickupPoints(hashLock, hashKey, caller);<br> }<br>function withdrawDeposit(<br> Repo storage repo, <br> bytes32 hashLock, <br> address msgSender) public onlyPrimeKey(repo, msgSender) returns (LockersRepo.Head memory head) {<br> uint caller = getUserNo(repo, msgSender);<br> head = repo.lockers.withdrawDeposit(hashLock, caller);<br> }<br>function getLocker(<br> Repo storage repo,<br> bytes32 hashLock) public view returns (LockersRepo.Locker memory locker) <br> {<br> locker = repo.lockers.getLocker(hashLock);<br> }<br>function getLocksList(<br> Repo storage repo) public view returns (bytes32[] memory) <br> {<br> return repo.lockers.getSnList();<br> }<br>// ##########################<br> // ## User & Members ##<br> // ##########################<br>// ==== reg user ====<br>function _increaseCounterOfUsers(Repo storage repo) private returns (uint40) {<br> repo.users[0].primeKey.coupon++;<br> return repo.users[0].primeKey.coupon;<br> }<br>function regUser(Repo storage repo, address msgSender) public <br> returns (User memory)<br> {<br>require(!isKey(repo, msgSender), "UserRepo.RegUser: used key");<br>uint seqOfUser = _increaseCounterOfUsers(repo);<br>repo.userNo[msgSender] = seqOfUser;<br>User memory user;<br>user.primeKey.pubKey = msgSender;<br>Rule memory rule = getPlatformRule(repo);<br>if (_isContract(msgSender)) {<br> user.primeKey.discount = 1;<br> user.primeKey.gift = rule.coaRewards;<br> } else user.primeKey.gift = rule.eoaRewards;<br>repo.users[seqOfUser] = user;<br>return user;<br> }<br>function _isContract(address acct) private view returns (bool) {<br> uint32 size;<br> assembly {<br> size := extcodesize(acct)<br> }<br> return size != 0;<br> }<br>function setBackupKey(Repo storage repo, address bKey, address msgSender) <br> public onlyPrimeKey(repo, msgSender)<br> {<br> require (!isKey(repo, bKey), "UR.SBK: used key");<br>uint caller = getUserNo(repo, msgSender);<br>User storage user = repo.users[caller];<br>require(user.backupKey.pubKey == address(0), <br> "UR.SBK: already set backupKey");<br>user.backupKey.pubKey = bKey;<br>repo.userNo[bKey] = caller;<br> }<br>function upgradeBackupToPrime(<br> Repo storage repo,<br> address msgSender) public {<br> User storage user = repo.users[getUserNo(repo, msgSender)];<br> (user.primeKey.pubKey, user.backupKey.pubKey) =<br> (user.backupKey.pubKey, user.primeKey.pubKey);<br> }<br>// ##############<br> // ## Read I/O ##<br> // ##############<br>// ==== options ====<br>function counterOfUsers(Repo storage repo) public view returns (uint40) {<br> return repo.users[0].primeKey.coupon;<br> }<br>function getOwner(Repo storage repo) public view returns (address) {<br> return repo.users[0].primeKey.pubKey;<br> }<br>function getBookeeper(Repo storage repo) public view returns (address) {<br> return repo.users[0].backupKey.pubKey;<br> }<br>// ==== register ====<br>function isKey(Repo storage repo, address key) public view returns (bool) {<br> return repo.userNo[key] > 0;<br> }<br>function getUser(Repo storage repo, address msgSender) <br> public view returns (User memory)<br> {<br> return repo.users[getUserNo(repo, msgSender)];<br> }<br>function getUserNo(Repo storage repo, address msgSender) <br> public view returns(uint40) <br> {<br> uint40 user = uint40(repo.userNo[msgSender]);<br>if (user > 0) return user;<br> else revert ("UR.getUserNo: not registered");<br> }<br> }<br>|
| [Contents](#toc) |

---

## PledgesRepo.sol

---

| |
|:---|
| **contracts/lib/PledgesRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library PledgesRepo {<br> using EnumerableSet for EnumerableSet.Bytes32Set;<br>enum StateOfPld {<br> Pending,<br> Issued,<br> Locked,<br> Released,<br> Executed,<br> Revoked<br> }<br>struct Head {<br> uint32 seqOfShare;<br> uint16 seqOfPld;<br> uint48 createDate;<br> uint16 daysToMaturity;<br> uint16 guaranteeDays;<br> uint40 creditor;<br> uint40 debtor;<br> uint40 pledgor;<br> uint8 state;<br> }<br>struct Body {<br> uint64 paid;<br> uint64 par;<br> uint64 guaranteedAmt;<br> uint16 preSeq;<br> uint16 execDays;<br> uint16 para;<br> uint16 argu;<br> }<br>struct Pledge {<br> Head head;<br> Body body;<br> bytes32 hashLock;<br> }<br>struct Repo{<br> // seqOfShare => seqOfPld => Pledge<br> mapping(uint256 => mapping(uint256 => Pledge)) pledges;<br> EnumerableSet.Bytes32Set snList;<br> }<br>//##################<br> //## Write I/O ##<br> //##################<br>function snParser(bytes32 sn) public pure returns (Head memory head) {<br> uint _sn = uint(sn);<br>head = Head({<br> seqOfShare: uint32(_sn >> 224),<br> seqOfPld: uint16(_sn >> 208),<br> createDate: uint48(_sn >> 160),<br> daysToMaturity: uint16(_sn >> 144),<br> guaranteeDays: uint16(_sn >> 128),<br> creditor: uint40(_sn >> 88),<br> debtor: uint40(_sn >> 48),<br> pledgor: uint40(_sn >> 8),<br> state: uint8(_sn)<br> });<br> } <br>function codifyHead(Head memory head) public pure returns (bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> head.seqOfShare,<br> head.seqOfPld,<br> head.createDate,<br> head.daysToMaturity,<br> head.guaranteeDays,<br> head.creditor,<br> head.pledgor,<br> head.debtor,<br> head.state); <br> assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br>} <br>function createPledge(<br> Repo storage repo, <br> bytes32 snOfPld, <br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays) public returns (Head memory head) <br> {<br> head = snParser(snOfPld);<br> head = issuePledge(repo, head, paid, par, guaranteedAmt, execDays);<br> }<br>function issuePledge(<br> Repo storage repo,<br> Head memory head,<br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays) public returns(Head memory regHead) {<br>require (guaranteedAmt > 0, "PR.issuePld: zero guaranteedAmt");<br> require (par > 0, "PR.issuePld: zero par");<br> require (par >= paid, "PR.issuePld: paid overflow");<br>Pledge memory pld;<br>pld.head = head;<br>pld.head.createDate = uint48(block.timestamp);<br> pld.head.state = uint8(StateOfPld.Issued);<br>pld.body = Body({<br> paid: uint64(paid),<br> par: uint64(par),<br> guaranteedAmt: uint64(guaranteedAmt),<br> preSeq:0,<br> execDays: uint16(execDays),<br> para:0,<br> argu:0<br> });<br>regHead = regPledge(repo, pld);<br> }<br>function regPledge(<br> Repo storage repo,<br> Pledge memory pld) public returns(Head memory){<br>require(pld.head.seqOfShare > 0,"PR.regPledge: zero seqOfShare");<br>pld.head.seqOfPld = _increaseCounterOfPld(repo, pld.head.seqOfShare);<br>repo.pledges[pld.head.seqOfShare][pld.head.seqOfPld] = pld;<br> repo.snList.add(codifyHead(pld.head));<br>return pld.head;<br> }<br>// ==== Update Pledge ====<br>function splitPledge(<br> Repo storage repo,<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint buyer,<br> uint amt,<br> uint caller) public returns(Pledge memory newPld) {<br>Pledge storage pld = repo.pledges[seqOfShare][seqOfPld];<br>require(caller == pld.head.creditor, "PR.splitPld: not creditor");<br>require(!isExpired(pld), "PR.splitPld: pledge expired");<br> require(pld.head.state == uint8(StateOfPld.Issued) \|\|<br> pld.head.state == uint8(StateOfPld.Locked), "PR.splitPld: wrong state");<br> require(amt > 0, "PR.splitPld: zero amt");<br>newPld = pld;<br>if (amt < pld.body.guaranteedAmt) {<br> // uint64 ratio = uint64(amt) \* 10000 / newPld.body.guaranteedAmt;<br>newPld.body.paid = uint64(pld.body.paid \* amt / newPld.body.guaranteedAmt);<br> newPld.body.par = uint64(pld.body.par \* amt / newPld.body.guaranteedAmt);<br> newPld.body.guaranteedAmt = uint64(amt);<br>pld.body.paid -= newPld.body.paid;<br> pld.body.par -= newPld.body.par;<br> pld.body.guaranteedAmt -= newPld.body.guaranteedAmt;<br>} else if (amt == pld.body.guaranteedAmt) {<br>pld.head.state = uint8(StateOfPld.Released);<br>} else revert("PR.splitPld: amt overflow");<br>if (buyer > 0) {<br> newPld.body.preSeq = pld.head.seqOfPld;<br>newPld.head.creditor = uint40(buyer);<br> newPld.head = regPledge(repo, newPld);<br> }<br> }<br>function extendPledge(<br> Pledge storage pld,<br> uint extDays,<br> uint caller) public {<br> require(caller == pld.head.pledgor, "PR.extendPld: not pledgor");<br> require(pld.head.state == uint8(StateOfPld.Issued) \|\|<br> pld.head.state == uint8(StateOfPld.Locked), "PR.EP: wrong state");<br> require(!isExpired(pld), "PR.UP: pledge expired");<br> pld.head.guaranteeDays += uint16(extDays);<br> }<br>// ==== Lock & Release ====<br>function lockPledge(<br> Pledge storage pld,<br> bytes32 hashLock,<br> uint caller) public {<br> require(caller == pld.head.creditor, "PR.lockPld: not creditor"); <br> require (!isExpired(pld), "PR.lockPld: pledge expired");<br> require (hashLock != bytes32(0), "PR.lockPld: zero hashLock");<br>if (pld.head.state == uint8(StateOfPld.Issued)){<br> pld.head.state = uint8(StateOfPld.Locked);<br> pld.hashLock = hashLock;<br> } else revert ("PR.lockPld: wrong state");<br> }<br>function releasePledge(<br> Pledge storage pld,<br> string memory hashKey) public {<br> require (pld.head.state == uint8(StateOfPld.Locked), "PR.RP: wrong state");<br> if (pld.hashLock == keccak256(bytes(hashKey))) {<br> pld.head.state = uint8(StateOfPld.Released);<br> } else revert("PR.releasePld: wrong Key");<br> }<br>function execPledge(Pledge storage pld, uint caller) public {<br>require(caller == pld.head.creditor, "PR.execPld: not creditor");<br> require(isTriggerd(pld), "PR.execPld: pledge not triggered");<br> require(!isExpired(pld), "PR.execPld: pledge expired");<br>if (pld.head.state == uint8(StateOfPld.Issued) \|\|<br> pld.head.state == uint8(StateOfPld.Locked))<br> {<br> pld.head.state = uint8(StateOfPld.Executed);<br> } else revert ("PR.execPld: wrong state");<br> }<br>function revokePledge(Pledge storage pld, uint caller) public {<br> require(caller == pld.head.pledgor, "PR.revokePld: not pledgor");<br> require(isExpired(pld), "PR.revokePld: pledge not expired");<br>if (pld.head.state == uint8(StateOfPld.Issued) \|\| <br> pld.head.state == uint8(StateOfPld.Locked)) <br> {<br> pld.head.state = uint8(StateOfPld.Revoked);<br> } else revert ("PR.revokePld: wrong state");<br> }<br>// ==== Counter ====<br>function _increaseCounterOfPld(Repo storage repo, uint256 seqOfShare) <br> private returns (uint16 seqOfPld) <br> {<br> repo.pledges[seqOfShare][0].head.seqOfPld++;<br> seqOfPld = repo.pledges[seqOfShare][0].head.seqOfPld;<br> }<br>//#################<br> //## Read ##<br> //#################<br>function isTriggerd(Pledge storage pld) public view returns(bool) {<br> uint64 triggerDate = pld.head.createDate + uint48(pld.head.daysToMaturity) \* 86400;<br> return block.timestamp >= triggerDate;<br> }<br>function isExpired(Pledge storage pld) public view returns(bool) {<br> uint64 expireDate = pld.head.createDate + uint48(pld.head.daysToMaturity + pld.head.guaranteeDays) \* 86400;<br> return block.timestamp >= expireDate;<br> }<br>function counterOfPld(Repo storage repo, uint256 seqOfShare) <br> public view returns (uint16) <br> {<br> return repo.pledges[seqOfShare][0].head.seqOfPld;<br> }<br>function isPledge(Repo storage repo, uint seqOfShare, uint seqOfPledge) <br> public view returns (bool)<br> {<br> return repo.pledges[seqOfShare][seqOfPledge].head.createDate > 0;<br> }<br>function getSNList(Repo storage repo) public view returns (bytes32[] memory list)<br> {<br> list = repo.snList.values();<br> }<br>function getPledge(Repo storage repo, uint256 seqOfShare, uint seqOfPld) <br> public view returns (Pledge memory)<br> {<br> return repo.pledges[seqOfShare][seqOfPld];<br> } <br>function getPledgesOfShare(Repo storage repo, uint256 seqOfShare) <br> public view returns (Pledge[] memory) <br> {<br> uint256 len = counterOfPld(repo, seqOfShare);<br>Pledge[] memory output = new Pledge[](len);<br>while (len > 0) {<br> output[len - 1] = repo.pledges[seqOfShare][len];<br> len--;<br> }<br>return output;<br> }<br>function getAllPledges(Repo storage repo) <br> public view returns (Pledge[] memory)<br> {<br> bytes32[] memory snList = getSNList(repo);<br> uint len = snList.length;<br> Pledge[] memory ls = new Pledge[](len);<br>while(len > 0) {<br> Head memory head = snParser(snList[len - 1]);<br> ls[len - 1] = repo.pledges[head.seqOfShare][head.seqOfPld];<br> len--;<br> }<br>return ls;<br> }<br> }<br>|
| [Contents](#toc) |

---

## Address.sol

---

| |
|:---|
| **contracts/lib/Address.sol** |
| <br>// SPDX-License-Identifier: MIT<br> // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)<br>pragma solidity ^0.8.8;<br> /\*\*<br> \* @dev Collection of functions related to the address type<br> \*/<br> library Address {<br>function toString(address account) public pure returns (string memory) {<br> return _toString(abi.encodePacked(account));<br> }<br>function _toString(bytes memory data) internal pure returns (string memory) {<br> bytes memory alphabet = "0123456789abcdef";<br> bytes memory str = new bytes(2 + data.length \* 2);<br> str[0] = "0";<br> str[1] = "x";<br> for (uint i = 0; i < data.length; i++) {<br> str[2 + i \* 2] = alphabet[uint(uint8(data[i] >> 4))];<br> str[3 + i \* 2] = alphabet[uint(uint8(data[i] & 0x0f))];<br> }<br> return string(str);<br> }<br>/\*\*<br> \* @dev Returns true if `account` is a contract.<br> \*<br> \* [IMPORTANT]<br> \* ====<br> \* It is unsafe to assume that an address for which this function returns<br> \* false is an externally-owned account (EOA) and not a contract.<br> \*<br> \* Among others, `isContract` will return false for the following<br> \* types of addresses:<br> \*<br> \* - an externally-owned account<br> \* - a contract in construction<br> \* - an address where a contract will be created<br> \* - an address where a contract lived, but was destroyed<br> \* ====<br> \*<br> \* [IMPORTANT]<br> \* ====<br> \* You shouldn't rely on `isContract` to protect against flash loan attacks!<br> \*<br> \* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets<br> \* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract<br> \* constructor.<br> \* ====<br> \*/<br> function isContract(address account) internal view returns (bool) {<br> // This method relies on extcodesize/address.code.length, which returns 0<br> // for contracts in construction, since the code is only stored at the end<br> // of the constructor execution.<br>return account.code.length > 0;<br> }<br>/\*\*<br> \* @dev Replacement for Solidity's `transfer`: sends `amount` wei to<br> \* `recipient`, forwarding all available gas and reverting on errors.<br> \*<br> \* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost<br> \* of certain opcodes, possibly making contracts go over the 2300 gas limit<br> \* imposed by `transfer`, making them unable to receive funds via<br> \* `transfer`. {sendValue} removes this limitation.<br> \*<br> \* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].<br> \*<br> \* IMPORTANT: because control is transferred to `recipient`, care must be<br> \* taken to not create reentrancy vulnerabilities. Consider using<br> \* {ReentrancyGuard} or the<br> \* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].<br> \*/<br> function sendValue(address payable recipient, uint256 amount) internal {<br> // require(address(this).balance >= amount, "Address: insufficient balance");<br>(bool success,) = recipient.call{value: amount}("");<br> require(success, "Address: ETH transfer failed");<br> }<br>/\*\*<br> \* @dev Performs a Solidity function call using a low level `call`. A<br> \* plain `call` is an unsafe replacement for a function call: use this<br> \* function instead.<br> \*<br> \* If `target` reverts with a revert reason, it is bubbled up by this<br> \* function (like regular Solidity function calls).<br> \*<br> \* Returns the raw returned data. To convert to the expected return value,<br> \* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].<br> \*<br> \* Requirements:<br> \*<br> \* - `target` must be a contract.<br> \* - calling `target` with `data` must not revert.<br> \*<br> \* _Available since v3.1._<br> \*/<br> function functionCall(address target, bytes memory data) internal returns (bytes memory) {<br> return functionCallWithValue(target, data, 0, "Address: low-level call failed");<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with<br> \* `errorMessage` as a fallback revert reason when `target` reverts.<br> \*<br> \* _Available since v3.1._<br> \*/<br> function functionCall(<br> address target,<br> bytes memory data,<br> string memory errorMessage) internal returns (bytes memory) {<br> return functionCallWithValue(target, data, 0, errorMessage);<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],<br> \* but also transferring `value` wei to `target`.<br> \*<br> \* Requirements:<br> \*<br> \* - the calling contract must have an ETH balance of at least `value`.<br> \* - the called Solidity function must be `payable`.<br> \*<br> \* _Available since v3.1._<br> \*/<br> function valuedCallWithNoReturn(<br> address target,<br> bytes memory data,<br> uint256 value) internal {<br> // require(address(this).balance >= value, "Address: insufficient balance for call");<br> (bool success,) = target.call{value: value}(data);<br> require(success, "Address: Valued Call Failed");<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],<br> \* but also transferring `value` wei to `target`.<br> \*<br> \* Requirements:<br> \*<br> \* - the calling contract must have an ETH balance of at least `value`.<br> \* - the called Solidity function must be `payable`.<br> \*<br> \* _Available since v3.1._<br> \*/<br> function functionCallWithValue(<br> address target,<br> bytes memory data,<br> uint256 value) internal returns (bytes memory) {<br> return functionCallWithValue(target, data, value, "Address: low-level call with value failed");<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but<br> \* with `errorMessage` as a fallback revert reason when `target` reverts.<br> \*<br> \* _Available since v3.1._<br> \*/<br> function functionCallWithValue(<br> address target,<br> bytes memory data,<br> uint256 value,<br> string memory errorMessage) internal returns (bytes memory) {<br> require(address(this).balance >= value, "Address: insufficient balance for call");<br> (bool success, bytes memory returndata) = target.call{value: value}(data);<br> return verifyCallResultFromTarget(target, success, returndata, errorMessage);<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],<br> \* but performing a static call.<br> \*<br> \* _Available since v3.3._<br> \*/<br> function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {<br> return functionStaticCall(target, data, "Address: low-level static call failed");<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],<br> \* but performing a static call.<br> \*<br> \* _Available since v3.3._<br> \*/<br> function functionStaticCall(<br> address target,<br> bytes memory data,<br> string memory errorMessage) internal view returns (bytes memory) {<br> (bool success, bytes memory returndata) = target.staticcall(data);<br> return verifyCallResultFromTarget(target, success, returndata, errorMessage);<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],<br> \* but performing a delegate call.<br> \*<br> \* _Available since v3.4._<br> \*/<br> function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {<br> return functionDelegateCall(target, data, "Address: low-level delegate call failed");<br> }<br>/\*\*<br> \* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],<br> \* but performing a delegate call.<br> \*<br> \* _Available since v3.4._<br> \*/<br> function functionDelegateCall(<br> address target,<br> bytes memory data,<br> string memory errorMessage) internal returns (bytes memory) {<br> (bool success, bytes memory returndata) = target.delegatecall(data);<br> return verifyCallResultFromTarget(target, success, returndata, errorMessage);<br> }<br>/\*\*<br> \* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling<br> \* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.<br> \*<br> \* _Available since v4.8._<br> \*/<br> function verifyCallResultFromTarget(<br> address target,<br> bool success,<br> bytes memory returndata,<br> string memory errorMessage) internal view returns (bytes memory) {<br> if (success) {<br> if (returndata.length == 0) {<br> // only check isContract if the call was successful and the return data is empty<br> // otherwise we already know that it was a contract<br> require(isContract(target), "Address: call to non-contract");<br> }<br> return returndata;<br> } else {<br> _revert(returndata, errorMessage);<br> }<br> }<br>/\*\*<br> \* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the<br> \* revert reason or using the provided one.<br> \*<br> \* _Available since v4.3._<br> \*/<br> function verifyCallResult(<br> bool success,<br> bytes memory returndata,<br> string memory errorMessage) internal pure returns (bytes memory) {<br> if (success) {<br> return returndata;<br> } else {<br> _revert(returndata, errorMessage);<br> }<br> }<br>function _revert(bytes memory returndata, string memory errorMessage) private pure {<br> // Look for revert reason and bubble it up if present<br> if (returndata.length > 0) {<br> // The easiest way to bubble the revert reason is using memory via assembly<br> /// @solidity memory-safe-assembly<br> assembly {<br> let returndata_size := mload(returndata)<br> revert(add(32, returndata), returndata_size)<br> }<br> } else {<br> revert(errorMessage);<br> }<br> }<br>} |
| [Contents](#toc) |

---

## UsdLockersRepo.sol

---

| |
|:---|
| **contracts/lib/UsdLockersRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library UsdLockersRepo {<br>using EnumerableSet for EnumerableSet.Bytes32Set;<br>enum StateOfLocker {<br> empty,<br> locked,<br> picked,<br> withdrawn<br> }<br>struct Head {<br> address from;<br> uint40 payer;<br> uint48 expireDate;<br> uint8 state;<br> address to;<br> uint40 payee;<br> uint48 pickupDate;<br> bool flag;<br> uint256 amt;<br> }<br>struct Body {<br> address counterLocker;<br> bytes payload;<br> }<br>struct Locker {<br> Head head;<br> Body body;<br> }<br>struct Repo {<br> mapping(bytes32 => Locker) lockers;<br> EnumerableSet.Bytes32Set snList;<br> }<br>function _createHead(<br> address from, address to, uint payer, <br> uint payee, uint expireDate, uint amt) private view returns (Head memory head){<br> require(from != address(0), "ULR.lockUsd: zero from");<br> require(to != address(0), "ULR.lockUsd: zero to");<br> require(amt > 0, "ULR.lockUsd: zero amt");<br>require(expireDate > block.timestamp, <br> "ULR.lockUsd: not future");<br>head = Head({<br> from: from,<br> payer: uint40(payer),<br> expireDate: uint40(expireDate),<br> state: 1,<br> to: to,<br> payee: uint40(payee),<br> pickupDate: 0,<br> flag: true,<br> amt: amt<br> });<br> }<br>function _addLocker(<br> Repo storage repo, Head memory head, <br> Body memory body, bytes32 hashLock) private {<br> if (repo.snList.add(hashLock)) {<br> Locker storage locker = repo.lockers[hashLock];<br> locker.head = head;<br> locker.body = body;<br> } else revert ("ULR.addLocker: occupied");<br> }<br>function lockConsideration(<br> Repo storage repo, address from, address to, <br> uint expireDate, uint amt, address counterLocker,<br> bytes calldata payload, bytes32 hashLock) public {<br>Head memory head = <br> _createHead(from, to, 0, 0, expireDate, amt);<br>Body memory body = Body({<br> counterLocker: counterLocker,<br> payload: payload<br> });<br>_addLocker(repo, head, body, hashLock);<br> }<br>function lockUsd(<br> Repo storage repo, address from, address to, <br> uint expireDate, uint amt, bytes32 hashLock) public {<br>Head memory head = <br> _createHead(from, to, 0, 0, expireDate, amt);<br> Body memory body;<br>_addLocker(repo, head, body, hashLock);<br> }<br>function releaseUsd(<br> Repo storage repo, bytes32 lock, <br> string memory hashKey, address msgSender) public returns(Head memory){<br>bytes memory key = bytes(hashKey);<br>require(isLocked(repo, lock), <br> "ULR.releaseUsd: not exist");<br>require(lock == keccak256(key), <br> "ULR.releaseUsd: wrong key");<br>Locker storage locker = repo.lockers[lock];<br>require(locker.head.expireDate > block.timestamp,<br> "ULR.releaseUsd: lock expired");<br>if (locker.body.counterLocker != address(0)) {<br> require(locker.head.to == msgSender, <br> "ULR.releaseUSD: wrong msgSender");<br>uint len = key.length;<br> bytes memory zero = new bytes(32 - (len % 32));<br>bytes memory payload = abi.encodePacked(locker.body.payload, len, key, zero);<br> (bool flag,) = locker.body.counterLocker.call(payload);<br> require(flag, "ULR.releaseUSD: counter call failed");<br> }<br>locker.head.pickupDate = uint48(block.timestamp);<br> locker.head.state = 2;<br>return locker.head;<br> }<br>function withdrawUsd(<br> Repo storage repo, bytes32 lock, address msgSender) public returns(Head memory){<br>require(isLocked(repo, lock), <br> "ULR.withdrawUsd: not exist");<br>Locker storage locker = repo.lockers[lock];<br>require(locker.head.expireDate <= block.timestamp,<br> "ULR.withdrawUsd: locker not expired");<br>require(locker.head.from == msgSender,<br> "ULR.withdrawUsd: not creator");<br>locker.head.pickupDate = uint48(block.timestamp);<br> locker.head.state = 3;<br>return locker.head;<br> }<br>//##################<br> //## Read I/O ##<br> //##################<br>function isLocked(Repo storage repo, bytes32 lock) public view returns(bool){<br> return repo.lockers[lock].head.flag;<br> }<br>function counterOfLockers(Repo storage repo) public view returns(uint) {<br> return repo.snList.length();<br> }<br>function getHeadOfLocker(Repo storage repo, bytes32 lock) public view returns(Head memory) {<br> require(isLocked(repo, lock), "ULR.getLocker: not exist");<br> return repo.lockers[lock].head;<br> }<br>function getLocker(Repo storage repo, bytes32 lock) public view returns(Locker memory) {<br> require(isLocked(repo, lock), "ULR.getLocker: not exist");<br> return repo.lockers[lock];<br> }<br>function getSnList(Repo storage repo) public view returns (bytes32[] memory) {<br> return repo.snList.values();<br> }<br>} |
| [Contents](#toc) |

---

## OrdersRepo.sol

---

| |
|:---|
| **contracts/lib/OrdersRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./GoldChain.sol";<br>library OrdersRepo {<br> using GoldChain for GoldChain.Chain;<br>struct Brief {<br> uint16 classOfShare;<br> uint32 seqOfShare;<br> uint40 buyer;<br> uint40 seller; <br> uint64 paid;<br> uint32 price;<br> uint16 votingWeight;<br> uint16 distrWeight;<br> }<br>struct Deal {<br> address from;<br> uint40 buyer;<br> uint40 groupRep;<br> uint16 classOfShare;<br> address to;<br> uint40 seller; <br> uint32 seqOfShare;<br> uint8 state;<br> bool inEth;<br> bool isOffer;<br> uint64 paid;<br> uint32 price;<br> uint16 votingWeight;<br> uint16 distrWeight;<br> uint128 consideration;<br> }<br>struct Repo {<br> GoldChain.Chain offers;<br> GoldChain.Chain bids;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== Codify & Parse ====<br>function parseBrief(bytes32 sn) public pure returns(<br> Brief memory brief) {<br> uint _sn = uint(sn);<br>brief.classOfShare = uint16(_sn >> 240);<br> brief.seqOfShare = uint32(_sn >> 208);<br> brief.buyer = uint40(_sn >> 168);<br> brief.seller = uint40(_sn >> 128);<br> brief.paid = uint64(_sn >> 64);<br> brief.price = uint32(_sn >> 32);<br> brief.votingWeight = uint16(_sn >> 16);<br> brief.distrWeight = uint16(_sn);<br> }<br>function codifyBrief(<br> Deal memory deal) public pure returns(bytes32 sn) {<br> bytes memory _sn = <br> abi.encodePacked(<br> deal.classOfShare,<br> deal.seqOfShare,<br> deal.buyer,<br> deal.seller,<br> deal.paid,<br> deal.price,<br> deal.votingWeight,<br> deal.distrWeight);<br>assembly {<br> sn := mload(add(_sn, 0x20))<br> } <br> }<br>function parseDeal(<br> bytes32 fromSn, bytes32 toSn, bytes32 qtySn) public pure returns(<br> Deal memory deal) {<br> uint _fromSn = uint(fromSn);<br>deal.from = address(uint160(_fromSn >> 96));<br> deal.buyer = uint40(_fromSn >> 56);<br> deal.groupRep = uint40(_fromSn >> 16);<br> deal.classOfShare = uint16(_fromSn);<br>uint _toSn = uint(toSn);<br>deal.to = address(uint160(_toSn >> 96));<br> deal.seller = uint40(_toSn >> 56);<br> deal.seqOfShare = uint32(_toSn >> 24);<br> deal.state = uint8(_toSn >> 16);<br> deal.inEth = uint8(_toSn >> 8) == 1;<br> deal.isOffer = uint8(_toSn) == 1;<br>uint _qtySn = uint(qtySn);<br>deal.paid = uint64(_qtySn >> 192);<br> deal.price = uint32(_qtySn >> 160);<br> deal.votingWeight = uint16(_qtySn >> 144);<br> deal.distrWeight = uint16(_qtySn >> 128);<br> deal.consideration = uint128(_qtySn);<br> }<br>function codifyDeal(Deal memory deal) public pure returns(<br> bytes32 fromSn, bytes32 toSn, bytes32 qtySn) {<br> bytes memory _fromSn = <br> abi.encodePacked(<br> deal.from,<br> deal.buyer,<br> deal.groupRep,<br> deal.classOfShare);<br>assembly {<br> fromSn := mload(add(_fromSn, 0x20))<br> }<br>bytes memory _toSn = <br> abi.encodePacked(<br> deal.to,<br> deal.seller,<br> deal.seqOfShare,<br> deal.state,<br> deal.inEth,<br> deal.isOffer);<br>assembly {<br> toSn := mload(add(_toSn, 0x20))<br> }<br>bytes memory _qtySn = <br> abi.encodePacked(<br> deal.paid,<br> deal.price,<br> deal.votingWeight,<br> deal.distrWeight,<br> deal.consideration);<br>assembly {<br> qtySn := mload(add(_qtySn, 0x20))<br> }<br> }<br>// ==== Order ====<br>function dealToData(Deal memory deal) public view <br> returns (GoldChain.Data memory data) {<br> return GoldChain.Data({<br> classOfShare : deal.classOfShare,<br> seqOfShare : deal.seqOfShare,<br> groupRep: deal.groupRep,<br> votingWeight : deal.votingWeight,<br> distrWeight : deal.distrWeight,<br> margin: deal.consideration,<br> inEth : deal.inEth, <br> pubKey : deal.isOffer ? deal.to : deal.from,<br> date: 0,<br> issueDate : uint48(block.timestamp) <br> });<br> }<br>function placeSellOrder(<br> Repo storage repo,<br> Deal memory input,<br> uint execHours,<br> uint centPriceInWei) public returns (<br> Deal[] memory deals,<br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> Deal memory offer) {<br>offer = input;<br>GoldChain.Chain storage bids = repo.bids;<br> uint len = bids.length();<br>deals = new Deal[](len);<br> expired = new GoldChain.Order[](len);<br>if (offer.price > 0) {<br> (lenOfDeals, lenOfExpired) = _matchOfferToBid(bids, offer, centPriceInWei, deals, expired);<br> } else {<br> (lenOfDeals, lenOfExpired) = _matchMarketToBid(bids, offer, centPriceInWei, deals, expired);<br> }<br>if (offer.paid > 0 && offer.price > 0) {<br>GoldChain.Data memory data = dealToData(offer);<br>repo.offers.createNode(<br> offer.seller,<br> offer.paid,<br> offer.price,<br> execHours, <br> true,<br> data);<br> }<br> }<br>function getDealValue(<br> uint paid, uint price, uint centPrice) public pure returns (uint128) {<br> return uint128(paid \* price \* centPrice / 10 \*\* 6);<br> }<br>function placeBuyOrder(<br> Repo storage repo,<br> Deal memory input,<br> uint execHours,<br> uint centPriceInWei) public returns (<br> Deal[] memory deals,<br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> Deal memory bid) {<br>bid = input;<br>require(getDealValue(bid.paid, bid.price, centPriceInWei) <=<br> bid.consideration, "OR.placeBuyOrder: insufficient msgValue");<br>GoldChain.Chain storage offers = repo.offers;<br> uint len = offers.length();<br>deals = new Deal[](len);<br> expired = new GoldChain.Order[](len);<br>if (bid.price > 0) {<br> (lenOfDeals, lenOfExpired) = _matchBidToOffer(offers, bid, centPriceInWei, deals, expired);<br> } else {<br> (lenOfDeals, lenOfExpired) = _matchMarketToOffer(offers, bid, centPriceInWei, deals, expired);<br> }<br>if (bid.paid > 0 && bid.price > 0) {<br>GoldChain.Data memory data = dealToData(bid);<br>repo.bids.createNode(<br> bid.buyer,<br> bid.paid,<br> bid.price,<br> execHours, <br> false,<br> data);<br> }<br> }<br>function withdrawOrder(<br> Repo storage repo,<br> uint seqOfOrder,<br> bool isOffer) public returns (GoldChain.Order memory removed)<br> {<br> removed = isOffer <br> ? repo.offers.offChain(seqOfOrder)<br> : repo.bids.offChain(seqOfOrder);<br> }<br>function _matchOfferToBid(<br> GoldChain.Chain storage bids, Deal memory offer, uint centPriceInWei,<br> Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = bids.head();<br>while(seqOfNode > 0 && offer.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(bids, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break;<br>GoldChain.Order storage n = bids.orders[seqOfNode];<br>if (n.node.price >= offer.price) {<br>Deal memory deal = <br> _createDeal(offer, offer.price, n.node.paid, centPriceInWei);<br>if (deal.consideration >= n.data.margin) {<br> deal.consideration = n.data.margin;<br> deal.paid = <br> uint64(uint(deal.consideration) \* 10 \*\* 6 / centPriceInWei / deal.price);<br>n.data.margin = 0;<br> n.node.paid = 0;<br> deal.state = 1;<br> } else {<br> n.data.margin -= deal.consideration;<br> n.node.paid -= deal.paid;<br> }<br>offer.paid -= deal.paid;<br>_fillInOfferDeal(deal, offer, n);<br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = bids.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> expired[lenOfExpired] = delistedOrder;<br> lenOfExpired++;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br>} else break;<br> }<br> }<br>function _matchBidToOffer(<br> GoldChain.Chain storage offers, Deal memory bid, uint centPriceInWei,<br> Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = offers.head();<br>while(seqOfNode > 0 && bid.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(offers, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break; <br>GoldChain.Order storage n = offers.orders[seqOfNode];<br>if (n.node.price <= bid.price) {<br>Deal memory deal = _createDeal(bid, n.node.price, n.node.paid, centPriceInWei);<br>if (deal.consideration >= bid.consideration) {<br> deal.consideration = bid.consideration;<br> deal.paid = <br> uint64(uint(deal.consideration) \* 10 \*\* 6 / centPriceInWei / deal.price);<br>bid.paid = deal.paid;<br>if (deal.state == 1) {<br> deal.state = 0;<br> }<br> }<br>n.node.paid -= deal.paid;<br> bid.consideration -= deal.consideration;<br> bid.paid -= deal.paid;<br>_fillInBidDeal(deal, bid, n);<br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = offers.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br>} else break;<br> }<br> }<br>function _matchMarketToBid(<br> GoldChain.Chain storage bids, Deal memory offer, uint centPriceInWei,<br> Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = bids.head();<br>while(seqOfNode > 0 && offer.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(bids, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break;<br>GoldChain.Order storage n = bids.orders[seqOfNode];<br>Deal memory deal = _createDeal(offer, n.node.price, n.node.paid, centPriceInWei);<br>if (deal.consideration >= n.data.margin) {<br> deal.consideration = n.data.margin;<br> deal.paid = uint64(uint(deal.consideration) \* 10 \*\* 6 / centPriceInWei / deal.price);<br>n.data.margin = 0;<br> n.node.paid = 0;<br> n.data.date = 1;<br> } else {<br> n.data.margin -= deal.consideration;<br> n.node.paid -= deal.paid;<br> }<br>offer.paid -= deal.paid;<br>_fillInOfferDeal(deal, offer, n); <br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = bids.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> expired[lenOfExpired] = delistedOrder;<br> lenOfExpired++;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br> }<br> }<br>function _matchMarketToOffer(<br> GoldChain.Chain storage offers, Deal memory bid, uint centPriceInWei,<br> Deal[] memory deals, GoldChain.Order[] memory expired) private returns(uint lenOfDeals, uint lenOfExpired){<br>uint32 seqOfNode = offers.head();<br>while(seqOfNode > 0 && bid.paid > 0) {<br>(seqOfNode, lenOfExpired) = _checkExpired(offers, seqOfNode, expired, lenOfExpired);<br> if (seqOfNode == 0) break; <br>GoldChain.Order storage n = offers.orders[seqOfNode];<br>Deal memory deal = _createDeal(bid, n.node.price, n.node.paid, centPriceInWei);<br>if (deal.consideration >= bid.consideration) {<br> deal.consideration = bid.consideration;<br> deal.paid = <br> uint64(uint(deal.consideration) \* 10 \*\* 6 / centPriceInWei / deal.price);<br>bid.paid = deal.paid;<br>if (deal.state == 1) {<br> deal.state = 0;<br> }<br> }<br>n.node.paid -= deal.paid;<br> bid.consideration -= deal.consideration;<br> bid.paid -= deal.paid;<br>_fillInBidDeal(deal, bid, n);<br>if (deal.state == 1) {<br> GoldChain.Order memory delistedOrder = offers.offChain(seqOfNode);<br> seqOfNode = delistedOrder.node.next;<br> }<br>deals[lenOfDeals] = deal;<br> lenOfDeals++;<br>}<br> }<br>function _checkExpired(<br> GoldChain.Chain storage chain, uint32 seqOfNode, GoldChain.Order[] memory expired, uint lenOfExpired) private returns(uint32, uint) {<br>while (seqOfNode > 0) {<br> if (chain.orders[seqOfNode].node.expireDate <= block.timestamp) {<br> GoldChain.Order memory removedNode = chain.offChain(seqOfNode); <br> expired[lenOfExpired] = (removedNode);<br> lenOfExpired++;<br> seqOfNode = removedNode.node.next;<br> } else break;<br> }<br>return (seqOfNode, lenOfExpired);<br> }<br>function _createDeal(<br> Deal memory order, uint32 offerPrice, uint64 nodePaid, uint centPriceInWei) private pure returns (Deal memory deal) {<br> deal.price = offerPrice;<br>if (order.paid >= nodePaid) {<br> deal.paid = nodePaid;<br> deal.state = 1;<br> } else {<br> deal.paid = order.paid;<br> }<br> deal.inEth = true; <br>deal.consideration = <br> getDealValue(deal.paid, deal.price, centPriceInWei);<br> }<br>function _fillInOfferDeal(<br> Deal memory deal, Deal memory offer, GoldChain.Order memory n )private pure{<br> deal.from = n.data.pubKey;<br> deal.to = offer.to;<br> deal.seller = offer.seller;<br>deal.classOfShare = offer.classOfShare;<br> deal.seqOfShare = offer.seqOfShare;<br> deal.buyer = n.node.issuer;<br> deal.groupRep = n.data.groupRep;<br> deal.votingWeight = offer.votingWeight;<br> deal.distrWeight = offer.distrWeight;<br> }<br>function _fillInBidDeal(<br> Deal memory deal, Deal memory bid, GoldChain.Order memory n )private pure{<br>deal.from = bid.from;<br> deal.to = n.data.pubKey;<br> deal.seller = n.node.issuer;<br>deal.classOfShare = n.data.classOfShare;<br> deal.seqOfShare = n.data.seqOfShare;<br> deal.buyer = bid.buyer;<br> deal.groupRep = bid.groupRep;<br> deal.votingWeight = n.data.votingWeight;<br> deal.distrWeight = n.data.distrWeight;<br>}<br>//################<br> //## Read I/O ##<br> //################<br>function counterOfOrders(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.counter()<br> : repo.bids.counter();<br> }<br>function headOfList(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.head()<br> : repo.bids.head();<br> }<br>function tailOfList(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.tail()<br> : repo.bids.tail();<br> }<br>function lengthOfList(<br> Repo storage repo, bool isOffer) public view returns (uint32) {<br> return isOffer<br> ? repo.offers.length()<br> : repo.bids.length();<br> }<br>// ==== Order ====<br>function isOrder(<br> Repo storage repo,<br> bool isOffer,<br> uint seqOfOrder) public view returns (bool) {<br> return isOffer<br> ? repo.offers.isNode(seqOfOrder)<br> : repo.bids.isNode(seqOfOrder);<br> }<br>function getOrder(<br> Repo storage repo,<br> bool isOffer,<br> uint seqOfOrder) public view returns (GoldChain.Order memory order) {<br> order = isOffer<br> ? repo.offers.getOrder(seqOfOrder)<br> : repo.bids.getOrder(seqOfOrder);<br> }<br>function getSeqList(<br> Repo storage repo,<br> bool isOffer) public view returns (uint[] memory orders) {<br> orders = isOffer<br> ? repo.offers.getSeqList()<br> : repo.bids.getSeqList();<br> }<br>function getOrders(<br> Repo storage repo,<br> bool isOffer) public view returns (GoldChain.Order[] memory orders) {<br> orders = isOffer<br> ? repo.offers.getChain()<br> : repo.bids.getChain();<br> }<br> } |
| [Contents](#toc) |

---

## EnumerableSet.sol

---

| |
|:---|
| **contracts/lib/EnumerableSet.sol** |
| <br>// SPDX-License-Identifier: MIT<br> // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)<br>pragma solidity ^0.8.8;<br>library EnumerableSet {<br> struct Set {<br> bytes32[] _values;<br> mapping(bytes32 => uint256) _indexes;<br> }<br>function _add(Set storage set, bytes32 value) private returns (bool) {<br> if (!_contains(set, value)) {<br> set._values.push(value);<br> set._indexes[value] = set._values.length;<br> return true;<br> } else {<br> return false;<br> }<br> }<br>function _remove(Set storage set, bytes32 value) private returns (bool) {<br> uint256 valueIndex = set._indexes[value];<br>if (valueIndex != 0) {<br> uint256 toDeleteIndex = valueIndex - 1;<br> uint256 lastIndex = set._values.length - 1;<br>if (lastIndex != toDeleteIndex) {<br> bytes32 lastValue = set._values[lastIndex];<br>set._values[toDeleteIndex] = lastValue;<br> set._indexes[lastValue] = valueIndex;<br> }<br>delete set._values[lastIndex];<br> set._values.pop();<br>delete set._indexes[value];<br>return true;<br> } else {<br> return false;<br> }<br> }<br>function _contains(Set storage set, bytes32 value)<br> private<br> view<br> returns (bool)<br> {<br> return set._indexes[value] != 0;<br> }<br>function _length(Set storage set) private view returns (uint256) {<br> return set._values.length;<br> }<br>function _at(Set storage set, uint256 index)<br> private<br> view<br> returns (bytes32)<br> {<br> return set._values[index];<br> }<br>function _values(Set storage set) private view returns (bytes32[] memory) {<br> return set._values;<br> }<br>//======== Bytes32Set ========<br>struct Bytes32Set {<br> Set _inner;<br> }<br>function add(Bytes32Set storage set, bytes32 value)<br> public<br> returns (bool)<br> {<br> return _add(set._inner, value);<br> }<br>function remove(Bytes32Set storage set, bytes32 value)<br> public<br> returns (bool)<br> {<br> return _remove(set._inner, value);<br> }<br>function contains(Bytes32Set storage set, bytes32 value)<br> public<br> view<br> returns (bool)<br> {<br> return _contains(set._inner, value);<br> }<br>function length(Bytes32Set storage set) public view returns (uint256) {<br> return _length(set._inner);<br> }<br>function at(Bytes32Set storage set, uint256 index)<br> public<br> view<br> returns (bytes32)<br> {<br> return _at(set._inner, index);<br> }<br>function values(Bytes32Set storage set)<br> public<br> view<br> returns (bytes32[] memory)<br> {<br> return _values(set._inner);<br> }<br>//======== AddressSet ========<br>struct AddressSet {<br> Set _inner;<br> }<br>function add(AddressSet storage set, address value)<br> public<br> returns (bool)<br> {<br> return _add(set._inner, bytes32(uint256(uint160(value))));<br> }<br>function remove(AddressSet storage set, address value)<br> public<br> returns (bool)<br> {<br> return _remove(set._inner, bytes32(uint256(uint160(value))));<br> }<br>function contains(AddressSet storage set, address value)<br> public<br> view<br> returns (bool)<br> {<br> return _contains(set._inner, bytes32(uint256(uint160(value))));<br> }<br>function length(AddressSet storage set) public view returns (uint256) {<br> return _length(set._inner);<br> }<br>function at(AddressSet storage set, uint256 index)<br> public<br> view<br> returns (address)<br> {<br> return address(uint160(uint256(_at(set._inner, index))));<br> }<br>function values(AddressSet storage set)<br> public<br> view<br> returns (address[] memory)<br> {<br> bytes32[] memory store = _values(set._inner);<br> address[] memory result;<br>assembly {<br> result := store<br> }<br>return result;<br> }<br>//======== UintSet ========<br>struct UintSet {<br> Set _inner;<br> }<br>function add(UintSet storage set, uint256 value) public returns (bool) {<br> return _add(set._inner, bytes32(value));<br> }<br>function remove(UintSet storage set, uint256 value)<br> public<br> returns (bool)<br> {<br> return _remove(set._inner, bytes32(value));<br> }<br>/\*\*<br> \* @dev Returns true if the value is in the set. O(1).<br> \*/<br> function contains(UintSet storage set, uint256 value)<br> public<br> view<br> returns (bool)<br> {<br> return _contains(set._inner, bytes32(value));<br> }<br>/\*\*<br> \* @dev Returns the number of values on the set. O(1).<br> \*/<br> function length(UintSet storage set) public view returns (uint256) {<br> return _length(set._inner);<br> }<br>function at(UintSet storage set, uint256 index)<br> public<br> view<br> returns (uint256)<br> {<br> return uint256(_at(set._inner, index));<br> }<br>function values(UintSet storage set)<br> public<br> view<br> returns (uint256[] memory)<br> {<br> bytes32[] memory store = _values(set._inner);<br> uint256[] memory result;<br>assembly {<br> result := store<br> }<br>return result;<br> }<br> }<br>|
| [Contents](#toc) |

---

## SwapsRepo.sol

---

| |
|:---|
| **contracts/lib/SwapsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library SwapsRepo {<br>enum StateOfSwap {<br> Pending, <br> Issued,<br> Closed,<br> Terminated<br> }<br>struct Swap {<br> uint16 seqOfSwap;<br> uint32 seqOfPledge;<br> uint64 paidOfPledge;<br> uint32 seqOfTarget;<br> uint64 paidOfTarget;<br> uint32 priceOfDeal;<br> bool isPutOpt;<br> uint8 state;<br> }<br>struct Repo {<br> // seqOfSwap => Swap<br> mapping(uint256 => Swap) swaps;<br> }<br>// ###############<br> // ## Modifier ##<br> // ###############<br>modifier swapExist(Repo storage repo, uint seqOfSwap) {<br> require (isSwap(repo, seqOfSwap), "SR.swapExist: not");<br> _;<br> }<br>// ###############<br> // ## Write I/O ##<br> // ###############<br>// ==== cofify / parser ====<br>function codifySwap(Swap memory swap) public pure returns (bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> swap.seqOfSwap,<br> swap.seqOfPledge,<br> swap.paidOfPledge,<br> swap.seqOfTarget,<br> swap.paidOfTarget,<br> swap.priceOfDeal,<br> swap.isPutOpt,<br> swap.state);<br> assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br> }<br>function regSwap(<br> Repo storage repo,<br> Swap memory swap) public returns(Swap memory) {<br>require(swap.seqOfTarget \* swap.paidOfTarget \* swap.seqOfPledge > 0,<br> "SWR.regSwap: zero para");<br>swap.seqOfSwap = _increaseCounter(repo);<br>repo.swaps[swap.seqOfSwap] = swap;<br> repo.swaps[0].paidOfTarget += swap.paidOfTarget;<br>return swap;<br> }<br>function payOffSwap(<br> Repo storage repo,<br> uint seqOfSwap<br> // uint msgValue,<br> // uint centPrice) public returns (Swap memory) {<br>Swap storage swap = repo.swaps[seqOfSwap];<br>require(swap.state == uint8(StateOfSwap.Issued), <br> "SWR.payOffSwap: wrong state");<br>// require (centPrice \* uint(swap.paidOfTarget) \* uint(swap.priceOfDeal) / 10 \*\* 6<br> // <= msgValue, "SWR.payOffSwap: insufficient amt");<br>swap.state = uint8(StateOfSwap.Closed);<br>return swap;<br> }<br>function terminateSwap(<br> Repo storage repo,<br> uint seqOfSwap) public returns (Swap memory){<br>Swap storage swap = repo.swaps[seqOfSwap];<br>require(swap.state == uint8(StateOfSwap.Issued), <br> "SWR.terminateSwap: wrong state");<br>swap.state = uint8(StateOfSwap.Terminated);<br>return swap;<br> }<br>// ==== Counter ====<br>function _increaseCounter(Repo storage repo) private returns(uint16) {<br> repo.swaps[0].seqOfSwap++;<br> return repo.swaps[0].seqOfSwap;<br> } <br>// ################<br> // ## Read I/O ##<br> // ################<br>function counterOfSwaps(Repo storage repo)<br> public view returns (uint16)<br> {<br> return repo.swaps[0].seqOfSwap;<br> }<br>function sumPaidOfTarget(Repo storage repo)<br> public view returns (uint64)<br> {<br> return repo.swaps[0].paidOfTarget;<br> }<br>function isSwap(Repo storage repo, uint256 seqOfSwap)<br> public view returns (bool)<br> {<br> return seqOfSwap <= counterOfSwaps(repo);<br> }<br>function getSwap(Repo storage repo, uint256 seqOfSwap)<br> public view swapExist(repo, seqOfSwap) returns (Swap memory)<br> {<br> return repo.swaps[seqOfSwap];<br> }<br>// function checkValueOfSwap(<br> // Repo storage repo,<br> // uint seqOfSwap,<br> // uint centPrice<br> //) public view returns (uint) {<br> // Swap memory swap = getSwap(repo, seqOfSwap);<br> // return centPrice \* swap.paidOfTarget \* swap.priceOfDeal / 10 \*\* 6;<br> // }<br>function getAllSwaps(Repo storage repo)<br> public view returns (Swap[] memory)<br> {<br> uint256 len = counterOfSwaps(repo);<br> Swap[] memory swaps = new Swap[](len);<br>while (len > 0) {<br> swaps[len-1] = repo.swaps[len];<br> len--;<br> }<br> return swaps;<br> }<br>function allSwapsClosed(Repo storage repo)<br> public view returns (bool)<br> {<br> uint256 len = counterOfSwaps(repo);<br> while (len > 0) {<br> if (repo.swaps[len].state < uint8(StateOfSwap.Closed))<br> return false;<br> len--;<br> }<br>return true; <br> }<br> }<br>|
| [Contents](#toc) |

---

## TopChain.sol

---

| |
|:---|
| **contracts/lib/TopChain.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../comps/books/roa/IInvestmentAgreement.sol";<br> import "../comps/books/ros/IRegisterOfShares.sol";<br>import "./DealsRepo.sol";<br>library TopChain {<br>enum CatOfNode {<br> IndepMemberInQueue, // 0<br> GroupRepInQueue, // 1<br> GroupMember, // 2<br> IndepMemberOnChain, // 3 <br> GroupRepOnChain // 4<br> }<br>struct Node {<br> uint40 prev;<br> uint40 next;<br> uint40 ptr;<br> uint64 amt;<br> uint64 sum;<br> uint8 cat;<br> }<br>struct Para {<br> uint40 tail;<br> uint40 head;<br> uint32 maxQtyOfMembers;<br> uint16 minVoteRatioOnChain;<br> uint32 qtyOfSticks;<br> uint32 qtyOfBranches;<br> uint32 qtyOfMembers;<br> uint16 para;<br> uint16 argu;<br> }<br>struct Chain {<br> // usrNo => Node<br> mapping(uint256 => Node) nodes;<br> Para para;<br> }<br>/\* Node[0] {<br> prev: tail;<br> next: head;<br> ptr: pending;<br> amt: pending;<br> sum: totalVotes;<br> cat: basedOnPar;<br> } \*/<br>//#################<br> //## Modifier ##<br> //#################<br>modifier memberExist(Chain storage chain, uint256 acct) {<br> require(isMember(chain, acct), "TC.memberExist: acct not member");<br> _;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== Options ====<br>function setMaxQtyOfMembers(Chain storage chain, uint max) public {<br> chain.para.maxQtyOfMembers = uint32(max);<br> }<br>function setMinVoteRatioOnChain(Chain storage chain, uint min) public {<br> require(min < 5000, "minVoteRatioOnChain: overflow");<br> chain.para.minVoteRatioOnChain = uint16(min);<br> }<br>function setVoteBase(<br> Chain storage chain, <br> bool _basedOnPar) public {<br> chain.nodes[0].cat = _basedOnPar ? 1 : 0;<br> }<br>// ==== Node ====<br>function addNode(Chain storage chain, uint acct) public {<br>require(acct > 0, "TC.addNode: zero acct");<br>Node storage n = chain.nodes[acct];<br>if (n.ptr == 0) {<br> require(maxQtyOfMembers(chain) == 0 \|\|<br> qtyOfMembers(chain) < maxQtyOfMembers(chain),<br> "TC.addNode: no vacance");<br>n.ptr = uint40(acct);<br>_appendToQueue(chain, n, n.ptr);<br> _increaseQtyOfMembers(chain);<br> }<br> }<br>function delNode(Chain storage chain, uint acct) public {<br> _carveOut(chain, acct);<br> delete chain.nodes[acct];<br> _decreaseQtyOfMembers(chain); <br> }<br>// ==== ChangeAmt ====<br>function increaseTotalVotes(<br> Chain storage chain,<br> uint deltaAmt, <br> bool isIncrease) public {<br> uint40 amt = uint40(deltaAmt);<br> if (isIncrease) _increaseTotalVotes(chain, amt);<br> else _decreaseTotalVotes(chain, amt);<br> }<br>function increaseAmt(<br> Chain storage chain, <br> uint256 acct, <br> uint deltaAmt, <br> bool isIncrease) public memberExist(chain, acct) {<br>uint64 amt = uint64(deltaAmt);<br>Node storage n = chain.nodes[acct];<br>if (isIncrease) {<br> n.amt += amt;<br> n.sum += amt;<br> } else {<br> n.amt -= amt;<br> n.sum -= amt;<br> }<br>if (n.cat == uint8(CatOfNode.GroupMember)) {<br>Node storage r = chain.nodes[n.ptr];<br>if (isIncrease) {<br>r.sum += amt;<br>if (r.cat == uint8(CatOfNode.GroupRepOnChain)) <br> _move(chain, n.ptr, isIncrease);<br> else if (_onChainTest(chain, r))<br> _upChainAndMove(chain, r, n.ptr);<br>} else {<br>r.sum -= amt;<br>if (r.cat == uint8(CatOfNode.GroupRepOnChain)) {<br>if (!_onChainTest(chain, r)) <br> _offChain(chain, r, n.ptr);<br> else _move(chain, n.ptr, isIncrease);<br>}<br> }<br>} else if (_isOnChain(n)) {<br>if (isIncrease) _move(chain, n.ptr, isIncrease);<br> else {<br> if (!_onChainTest(chain, n)) <br> _offChain(chain, n, n.ptr);<br> else _move(chain, n.ptr, isIncrease);<br> }<br>} else if(isIncrease && _onChainTest(chain, n))<br> _upChainAndMove(chain, n, n.ptr);<br>}<br>// ==== Grouping ====<br>function top2Sub(<br> Chain storage chain,<br> uint256 acct,<br> uint256 root) public memberExist(chain, root) {<br>Node storage n = chain.nodes[acct];<br> Node storage r = chain.nodes[root];<br>require(acct != root, "TC.T2S: self grouping");<br> require(_isIndepMember(n), "TC.T2S: not indepMember");<br> require(_notGroupMember(r), "TC.T2S: leaf as root");<br>_carveOut(chain, n.ptr);<br> _vInsert(chain, n.ptr, uint40(root));<br> }<br>function sub2Top(Chain storage chain, uint256 acct) public {<br>Node storage n = chain.nodes[acct];<br> require(_isInGroup(n), "TC.S2T: not in a branch");<br>_carveOut(chain, acct);<br>n.sum = n.amt;<br> n.ptr = uint40(acct);<br>if (_onChainTest(chain, n)) _upChainAndMove(chain, n, n.ptr);<br> else _appendToQueue(chain, n, n.ptr);<br> }<br>// ==== CarveOut ====<br>function _branchOff(Chain storage chain, uint256 root) private {<br> Node storage r = chain.nodes[root];<br>if (_isOnChain(r)) {<br>chain.nodes[r.next].prev = r.prev;<br> chain.nodes[r.prev].next = r.next;<br>_decreaseQtyOfBranches(chain);<br>} else {<br>if (r.prev > 0 && r.next > 0) {<br> chain.nodes[r.next].prev = r.prev;<br> chain.nodes[r.prev].next = r.next;<br> }else if (r.prev == 0 && r.next == 0) {<br> chain.para.tail = 0;<br> chain.para.head = 0;<br> }else if (r.next == 0) {<br> chain.para.tail = r.prev;<br> chain.nodes[r.prev].next = 0;<br> } else if (r.prev == 0) {<br> chain.nodes[r.next].prev = 0;<br> chain.para.head = r.next;<br> }<br>_decreaseQtyOfSticks(chain);<br>}<br> }<br>function _carveOut(Chain storage chain, uint acct)<br> private<br> memberExist(chain, acct)<br> {<br> Node storage n = chain.nodes[acct];<br>if (_isIndepMember(n)) {<br>_branchOff(chain, acct);<br>} else if (_isGroupRep(n)) {<br>if (n.cat == uint8(CatOfNode.GroupRepOnChain) \|\| (n.prev > 0 && n.next > 0)) {<br>chain.nodes[n.prev].next = n.ptr;<br> chain.nodes[n.next].prev = n.ptr;<br>} else {<br>if (n.prev == 0 && n.next == 0) {<br> chain.para.tail = n.ptr;<br> chain.para.head = n.ptr;<br> } else if (n.next == 0) {<br> chain.para.tail = n.ptr;<br> chain.nodes[n.prev].next = n.ptr;<br> } else if (n.prev == 0) {<br> chain.nodes[n.next].prev = n.ptr;<br> chain.para.head = n.ptr;<br> }<br>}<br>Node storage d = chain.nodes[n.ptr];<br>d.ptr = d.next;<br> d.prev = n.prev;<br> d.next = n.next;<br>if (d.ptr > 0) {<br> uint40 cur = d.ptr;<br> while (cur > 0) {<br> chain.nodes[cur].ptr = n.ptr;<br> cur = chain.nodes[cur].next;<br> }<br> d.cat = n.cat;<br> } else {<br> d.ptr = n.ptr;<br> d.cat = n.cat == uint8(CatOfNode.GroupRepInQueue) <br> ? uint8(CatOfNode.IndepMemberInQueue) <br> : uint8(CatOfNode.IndepMemberOnChain);<br> }<br>d.sum = n.sum - n.amt;<br>_offChainCheck(chain, d, n.ptr);<br>} else if (_isGroupMember(n)) {<br>Node storage u = chain.nodes[n.prev];<br>if (n.next > 0) chain.nodes[n.next].prev = n.prev;<br>if (u.cat == uint8(CatOfNode.GroupMember)) u.next = n.next;<br> else if (n.next > 0) {<br> u.ptr = n.next;<br> } else {<br> u.ptr = n.ptr;<br> u.cat = u.cat == uint8(CatOfNode.GroupRepInQueue) <br> ? uint8(CatOfNode.IndepMemberInQueue) <br> : uint8(CatOfNode.IndepMemberOnChain);<br> }<br>Node storage r = chain.nodes[n.ptr];<br>r.sum -= n.amt;<br>_offChainCheck(chain, r, n.ptr);<br>}<br> }<br>function _offChainCheck(<br> Chain storage chain,<br> Node storage r,<br> uint40 acct) private {<br> if (_isOnChain(r)) {<br> if (_onChainTest(chain, r)) _move(chain, acct, false);<br> else _offChain(chain, r, acct); <br> }<br> }<br>// ==== Insert ====<br>function _hInsert(<br> Chain storage chain,<br> uint acct,<br> uint prev,<br> uint next) private {<br> Node storage n = chain.nodes[acct];<br>chain.nodes[prev].next = uint40(acct);<br> n.prev = uint40(prev);<br>chain.nodes[next].prev = uint40(acct);<br> n.next = uint40(next);<br>_increaseQtyOfBranches(chain);<br> }<br>function _vInsert(<br> Chain storage chain,<br> uint40 acct,<br> uint40 root) private {<br> Node storage n = chain.nodes[acct];<br> Node storage r = chain.nodes[root];<br>if (_isIndepMember(r)) {<br> r.cat = r.cat == uint8(CatOfNode.IndepMemberInQueue) <br> ? uint8(CatOfNode.GroupRepInQueue) <br> : uint8(CatOfNode.GroupRepOnChain);<br> n.next = 0;<br> } else if (_isGroupRep(r)) {<br> n.next = r.ptr;<br> chain.nodes[n.next].prev = acct;<br> }<br>n.prev = root;<br> n.ptr = root;<br>n.cat = uint8(CatOfNode.GroupMember);<br>r.ptr = acct;<br> r.sum += n.amt;<br>if (_isOnChain(r)) _move(chain, root, true);<br> else if (_onChainTest(chain, r)) {<br> _upChainAndMove(chain, r, root);<br> }<br> }<br>// ==== Move ====<br>function _move(<br> Chain storage chain,<br> uint acct,<br> bool increase) private {<br> Node storage n = chain.nodes[acct];<br>(uint256 prev, uint256 next) = getPos(<br> chain,<br> n.sum,<br> n.prev,<br> n.next,<br> increase);<br>if (next != n.next \|\| prev != n.prev) {<br> _branchOff(chain, acct); <br> _hInsert(chain, acct, prev, next);<br> }<br> }<br>// ==== Chain & Queue ====<br>function _appendToQueue(<br> Chain storage chain,<br> Node storage n,<br> uint40 acct) private {<br>if (chain.para.qtyOfSticks > 0) {<br> chain.nodes[chain.para.tail].next = acct;<br> } else {<br> chain.para.head = acct;<br> }<br>n.prev = chain.para.tail;<br> n.next = 0;<br>chain.para.tail = acct;<br>if (_isOnChain(n)) n.cat -= 3;<br>_increaseQtyOfSticks(chain);<br> }<br>function _appendToChain(<br> Chain storage chain,<br> Node storage n,<br> uint40 acct) private {<br> n.prev = chain.nodes[0].prev;<br> chain.nodes[n.prev].next = acct;<br> chain.nodes[0].prev = acct;<br> n.next = 0;<br>if (_isInQueue(n)) n.cat += 3;<br>_increaseQtyOfBranches(chain);<br> }<br>function _onChainTest(<br> Chain storage chain,<br> Node storage r) private view returns(bool) {<br> return uint(r.sum) \* 10000 >= uint(totalVotes(chain)) \* minVoteRatioOnChain(chain);<br> }<br>function _upChainAndMove(<br> Chain storage chain,<br> Node storage n,<br> uint40 acct) private {<br> _trimChain(chain);<br> _branchOff(chain, acct);<br> _appendToChain(chain, n, acct);<br> _move(chain, acct, true);<br>}<br>function _trimChain(<br> Chain storage chain) private {<br>uint40 cur = chain.nodes[0].prev;<br>while (cur > 0) {<br> Node storage t = chain.nodes[cur];<br> uint40 prev = t.prev;<br> if (!_onChainTest(chain, t))<br> _offChain(chain, t, cur);<br> else break;<br> cur = prev;<br> }<br> }<br>function _offChain(<br> Chain storage chain,<br> Node storage n,<br> uint40 acct) private {<br> _branchOff(chain, acct);<br> _appendToQueue(chain, n, acct); <br> }<br>// ---- Categories Of Node ----<br>function _isOnChain(<br> Node storage n) private view returns (bool) {<br> return n.cat > 2;<br> }<br>function _isInQueue(<br> Node storage n) private view returns (bool) {<br> return n.cat < 2;<br> }<br>function _isIndepMember(<br> Node storage n) private view returns (bool) {<br> return n.cat % 3 == 0;<br> }<br>function _isInGroup(<br> Node storage n) private view returns (bool) {<br> return n.cat % 3 > 0;<br> }<br>function _isGroupRep(<br> Node storage n) private view returns (bool) {<br> return n.cat % 3 == 1;<br> }<br>function _isGroupMember(<br> Node storage n) private view returns (bool) {<br> return n.cat == uint8(CatOfNode.GroupMember);<br> }<br>function _notGroupMember(<br> Node storage n) private view returns (bool) {<br> return n.cat % 3 < 2;<br> }<br>// ==== setting ====<br>function _increaseQtyOfBranches(Chain storage chain) private {<br> chain.para.qtyOfBranches++;<br> }<br>function _increaseQtyOfMembers(Chain storage chain) private {<br> chain.para.qtyOfMembers++;<br> }<br>function _increaseQtyOfSticks(Chain storage chain) private {<br> chain.para.qtyOfSticks++;<br> }<br>function _increaseTotalVotes(Chain storage chain, uint64 deltaAmt) private {<br> chain.nodes[0].sum += deltaAmt;<br> }<br>function _decreaseQtyOfBranches(Chain storage chain) private {<br> chain.para.qtyOfBranches--;<br> }<br>function _decreaseQtyOfMembers(Chain storage chain) private {<br> chain.para.qtyOfMembers--;<br> }<br>function _decreaseQtyOfSticks(Chain storage chain) private {<br> chain.para.qtyOfSticks--;<br> }<br>function _decreaseTotalVotes(Chain storage chain, uint64 deltaAmt) private {<br> chain.nodes[0].sum -= deltaAmt;<br> }<br>//################<br> //## Read ##<br> //################<br>function isMember(Chain storage chain, uint256 acct)<br> public<br> view<br> returns (bool)<br> {<br> return chain.nodes[acct].ptr != 0;<br> }<br>// ==== Zero Node ====<br>function tail(Chain storage chain) public view returns (uint40) {<br> return chain.nodes[0].prev;<br> }<br>function head(Chain storage chain) public view returns (uint40) {<br> return chain.nodes[0].next;<br> }<br>function totalVotes(Chain storage chain) public view returns (uint64) {<br> return chain.nodes[0].sum;<br> }<br>function basedOnPar(Chain storage chain) public view returns (bool) {<br> return chain.nodes[0].cat == 1;<br> }<br>// ---- Para ----<br>function headOfQueue(Chain storage chain)<br> public<br> view<br> returns (uint40)<br> {<br> return chain.para.head;<br> }<br>function tailOfQueue(Chain storage chain)<br> public<br> view<br> returns (uint40)<br> {<br> return chain.para.tail;<br> }<br>function maxQtyOfMembers(Chain storage chain)<br> public<br> view<br> returns (uint32)<br> {<br> return chain.para.maxQtyOfMembers; <br> }<br>function minVoteRatioOnChain(Chain storage chain)<br> public<br> view<br> returns (uint16)<br> {<br> uint16 min = chain.para.minVoteRatioOnChain;<br> return min > 0 ? min : 500; <br> }<br>function qtyOfBranches(Chain storage chain) public view returns (uint32) {<br> return chain.para.qtyOfBranches;<br> }<br>function qtyOfGroups(Chain storage chain) public view returns (uint32) {<br> return chain.para.qtyOfBranches + chain.para.qtyOfSticks;<br> }<br>function qtyOfTopMembers(Chain storage chain) <br> public view <br> returns(uint qty) <br> {<br> uint cur = chain.nodes[0].next;<br>while(cur > 0) {<br> qty++;<br> cur = nextNode(chain, cur);<br> }<br> }<br>function qtyOfMembers(Chain storage chain) public view returns (uint32) {<br> return chain.para.qtyOfMembers;<br> }<br>// ==== locate position ====<br>function getPos(<br> Chain storage chain,<br> uint256 amount,<br> uint256 prev,<br> uint256 next,<br> bool increase) public view returns (uint256, uint256) {<br> if (increase)<br> while (prev > 0 && chain.nodes[prev].sum < amount) {<br> next = prev;<br> prev = chain.nodes[prev].prev;<br> }<br> else<br> while (next > 0 && chain.nodes[next].sum > amount) {<br> prev = next;<br> next = chain.nodes[next].next;<br> }<br>return (prev, next);<br> }<br>function nextNode(Chain storage chain, uint256 acct)<br> public view returns (uint256 next)<br> {<br> Node storage n = chain.nodes[acct];<br>if (_isIndepMember(n)) {<br> next = n.next;<br> } else if (_isGroupRep(n)) {<br> next = n.ptr;<br> } else if (_isGroupMember(n)) {<br> next = (n.next > 0) ? n.next : chain.nodes[n.ptr].next;<br> }<br> }<br>function getNode(Chain storage chain, uint256 acct)<br> public view returns (Node memory n)<br> {<br> n = chain.nodes[acct];<br> }<br>// ==== group ====<br>function rootOf(Chain storage chain, uint256 acct)<br> public<br> view<br> memberExist(chain, acct)<br> returns (uint40 group)<br> {<br> Node storage n = chain.nodes[acct];<br> group = (n.cat == uint8(CatOfNode.GroupMember)) ? n.ptr : uint40(acct) ;<br> }<br>function deepOfBranch(Chain storage chain, uint256 acct)<br> public<br> view<br> memberExist(chain, acct)<br> returns (uint256 deep)<br> {<br> Node storage n = chain.nodes[acct];<br>if (_isIndepMember(n)) deep = 1;<br> else if (_isGroupRep(n)) deep = _deepOfBranch(chain, acct);<br> else deep = _deepOfBranch(chain, n.ptr);<br> }<br>function _deepOfBranch(Chain storage chain, uint256 root)<br> private<br> view<br> returns (uint256 deep)<br> {<br> deep = 1;<br>uint40 next = chain.nodes[root].ptr;<br>while (next > 0) {<br> deep++;<br> next = chain.nodes[next].next;<br> }<br> }<br>function votesOfGroup(Chain storage chain, uint256 acct)<br> public<br> view<br> returns (uint64 votes)<br> {<br> uint256 group = rootOf(chain, acct);<br> votes = chain.nodes[group].sum;<br> }<br>function membersOfGroup(Chain storage chain, uint256 acct)<br> public<br> view<br> returns (uint256[] memory list)<br> {<br> uint256 cur = rootOf(chain, acct);<br> uint256 len = deepOfBranch(chain, acct);<br>list = new uint256[](len);<br> uint256 i = 0;<br>while (i < len) {<br> list[i] = cur;<br> cur = nextNode(chain, cur);<br> i++;<br> }<br> }<br>function affiliated(<br> Chain storage chain,<br> uint256 acct1,<br> uint256 acct2)<br> public<br> view<br> memberExist(chain, acct1)<br> memberExist(chain, acct2)<br> returns (bool)<br> {<br> Node storage n1 = chain.nodes[acct1];<br> Node storage n2 = chain.nodes[acct2];<br>return n1.ptr == n2.ptr \|\| n1.ptr == acct2 \|\| n2.ptr == acct1;<br> }<br>// ==== members ====<br>function topMembersList(Chain storage chain)<br> public view<br> returns (uint256[] memory list)<br> {<br> uint256 len = qtyOfTopMembers(chain);<br> list = new uint[](len);<br>len = 0;<br> uint cur = chain.nodes[0].next;<br>_seqListOfQueue(chain, list, cur, len);<br> }<br>function sortedMembersList(Chain storage chain)<br> public<br> view<br> returns (uint256[] memory list)<br> {<br> uint256 len = qtyOfMembers(chain);<br> list = new uint[](len);<br>uint cur = chain.nodes[0].next;<br> len = 0;<br>len = _seqListOfQueue(chain, list, cur, len);<br>cur = chain.para.head;<br> _seqListOfQueue(chain, list, cur, len);<br> }<br>function _seqListOfQueue(<br> Chain storage chain,<br> uint[] memory list,<br> uint cur,<br> uint i) private view returns (uint) {<br> while (cur > 0) {<br> list[i] = cur;<br> cur = nextNode(chain, cur);<br> i++;<br> }<br> return i;<br> }<br>// ==== Backup / Restore ====<br>function getSnapshot(Chain storage chain)<br> public view<br> returns (Node[] memory list, Para memory para)<br> {<br> para = chain.para;<br>uint256 len = qtyOfMembers(chain);<br> list = new Node[](len + 1);<br>list[0] = chain.nodes[0];<br>uint256 cur = chain.nodes[0].next;<br> len = 1;<br> len = _backupNodes(chain, list, cur, len);<br>cur = para.head;<br> _backupNodes(chain, list, cur, len);<br> }<br>function _backupNodes(<br> Chain storage chain,<br> Node[] memory list,<br> uint cur,<br> uint i) private view returns (uint) {<br> while (cur > 0) {<br> list[i] = chain.nodes[cur];<br> cur = nextNode(chain, cur);<br> i++;<br> }<br> return i;<br> }<br>function restoreChain(<br> Chain storage chain, <br> Node[] memory list, <br> Para memory para) public {<br>chain.nodes[0] = list[0];<br> chain.para = para;<br>uint256 cur = list[0].next;<br> uint256 i = 1;<br> i = _restoreNodes(chain, list, cur, i);<br>cur = para.head;<br> _restoreNodes(chain, list, cur, i);<br> }<br>function _restoreNodes(<br> Chain storage chain,<br> Node[] memory list,<br> uint cur,<br> uint i) private returns (uint) {<br> while (cur > 0) {<br> chain.nodes[cur] = list[i];<br> cur = nextNode(chain, cur);<br> i++;<br> }<br> return i;<br> }<br>// ==== MockDeals ====<br>function mockDealsOfIA(<br> Chain storage chain,<br> IInvestmentAgreement _ia,<br> IRegisterOfShares _ros) public {<br> uint[] memory seqList = _ia.getSeqList();<br>uint256 len = seqList.length;<br>while (len > 0) {<br> DealsRepo.Deal memory deal = _ia.getDeal(seqList[len-1]);<br>uint amount = basedOnPar(chain) ? deal.body.par : deal.body.paid;<br>if (deal.head.seller > 0) {<br> amount = amount \* _ros.getShare(deal.head.seqOfShare).head.votingWeight / 100;<br> mockDealOfSell(chain, deal.head.seller, amount);<br> } else {<br> amount = amount \* deal.head.votingWeight / 100;<br> }<br>mockDealOfBuy(chain, deal.body.buyer, deal.body.groupOfBuyer, amount);<br>len--;<br> }<br> }<br>function mockDealOfSell(<br> Chain storage chain, <br> uint256 seller, <br> uint amount) public {<br> increaseAmt(chain, seller, amount, false);<br>if (chain.nodes[seller].amt == 0)<br> delNode(chain, seller);<br> }<br>function mockDealOfBuy(<br> Chain storage chain, <br> uint256 buyer, <br> uint256 group,<br> uint amount) public {<br> addNode(chain, buyer);<br>increaseAmt(chain, buyer, amount, true);<br>if (rootOf(chain, buyer) != group)<br> top2Sub(chain, buyer, group);<br> }<br> } |
| [Contents](#toc) |

---

## SharesRepo.sol

---

| |
|:---|
| **contracts/lib/SharesRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library SharesRepo {<br> using EnumerableSet for EnumerableSet.UintSet;<br>struct Head {<br> uint16 class; <br> uint32 seqOfShare; <br> uint32 preSeq; <br> uint48 issueDate; <br> uint40 shareholder; <br> uint32 priceOfPaid; <br> uint32 priceOfPar; <br> uint16 votingWeight; <br> uint8 argu;<br> }<br>struct Body {<br> uint48 payInDeadline; <br> uint64 paid;<br> uint64 par; <br> uint64 cleanPaid; <br> uint16 distrWeight;<br> }<br>struct Share {<br> Head head;<br> Body body;<br> }<br>struct Class{<br> Share info;<br> EnumerableSet.UintSet seqList;<br> }<br>struct Repo {<br> // seqOfClass => Class<br> mapping(uint256 => Class) classes;<br> // seqOfShare => Share<br> mapping(uint => Share) shares;<br> }<br>//####################<br> //## Modifier ##<br> //####################<br>modifier shareExist(<br> Repo storage repo,<br> uint seqOfShare) {<br> require(isShare(repo, seqOfShare),<br> "SR.shareExist: not");<br> _;<br> }<br>//#################<br> //## Write ##<br> //#################<br>function snParser(bytes32 sn) public pure returns(Head memory head)<br> {<br> uint _sn = uint(sn);<br>head = Head({<br> class: uint16(_sn >> 240),<br> seqOfShare: uint32(_sn >> 208),<br> preSeq: uint32(_sn >> 176),<br> issueDate: uint48(_sn >> 128),<br> shareholder: uint40(_sn >> 88),<br> priceOfPaid: uint32(_sn >> 56),<br> priceOfPar: uint32(_sn >> 24),<br> votingWeight: uint16(_sn >> 8),<br> argu: uint8(_sn)<br> });<br> }<br>function codifyHead(Head memory head) public pure returns (bytes32 sn)<br> {<br> bytes memory _sn = <br> abi.encodePacked(<br> head.class, <br> head.seqOfShare, <br> head.preSeq, <br> head.issueDate, <br> head.shareholder, <br> head.priceOfPaid, <br> head.priceOfPar, <br> head.votingWeight, <br> head.argu);<br>assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br>}<br>// ==== issue/regist share ====<br>function createShare(<br> bytes32 sharenumber, <br> uint payInDeadline, <br> uint paid, <br> uint par,<br> uint distrWeight) public pure returns (Share memory share) {<br>share.head = snParser(sharenumber);<br>share.body = Body({<br> payInDeadline: uint48(payInDeadline),<br> paid: uint64(paid),<br> par: uint64(par),<br> cleanPaid: uint64(paid),<br> distrWeight: uint16(distrWeight)<br> });<br> }<br>function codifyPremium(uint premium) public pure returns(Body memory body) {<br> body = Body({<br> payInDeadline: uint48(premium >> 208),<br> paid: uint64(premium >> 144),<br> par: uint64(premium >> 80),<br> cleanPaid: uint64(premium >> 16),<br> distrWeight: uint16(premium)<br> });<br> }<br>function _addPremium(<br> Repo storage repo,<br> uint priceOfPaid,<br> uint paid) private {<br>if (priceOfPaid > 10000 && paid > 0) {<br>uint premium = getPremium(repo);<br>premium += ((priceOfPaid - 10000) \* paid / 10000);<br>repo.shares[0].body = codifyPremium(premium);<br> }<br>}<br>function addShare(Repo storage repo, Share memory share)<br> public returns(Share memory newShare) <br> {<br> newShare = regShare(repo, share);<br>_addPremium(repo, newShare.head.priceOfPaid, newShare.body.paid);<br>Share storage info = repo.classes[newShare.head.class].info;<br>if (info.head.issueDate == 0) {<br> info.head = newShare.head;<br> info.body.distrWeight = newShare.body.distrWeight;<br> }<br> }<br>function regShare(Repo storage repo, Share memory share)<br> public returns(Share memory)<br> {<br> require(share.head.class > 0, "SR.regShare: zero class");<br> require(share.body.par > 0, "SR.regShare: zero par");<br> require(share.body.par >= share.body.paid, "SR.regShare: paid overflow");<br> require(share.head.issueDate <= block.timestamp, "SR.regShare: future issueDate");<br> require(share.head.issueDate <= share.body.payInDeadline, "SR.regShare: issueDate later than payInDeadline");<br> require(share.head.shareholder > 0, "SR.regShare: zero shareholder");<br> require(share.head.votingWeight > 0, "SR.regShare: zero votingWeight");<br>if (share.head.class > counterOfClasses(repo))<br> share.head.class = _increaseCounterOfClasses(repo);<br>Class storage class = repo.classes[share.head.class];<br>if (!class.seqList.contains(share.head.seqOfShare)) {<br> share.head.seqOfShare = _increaseCounterOfShares(repo);<br>if (share.head.issueDate == 0)<br> share.head.issueDate = uint48(block.timestamp);<br>class.seqList.add(share.head.seqOfShare);<br> repo.classes[0].seqList.add(share.head.seqOfShare);<br> }<br>repo.shares[share.head.seqOfShare] = share;<br>return share;<br> }<br>// ==== counters ====<br>function _increaseCounterOfShares(<br> Repo storage repo) private returns(uint32) {<br>Head storage h = repo.shares[0].head;<br>do {<br> unchecked {<br> h.seqOfShare++; <br> }<br> } while (isShare(repo, h.seqOfShare) \|\| <br> h.seqOfShare == 0);<br>return h.seqOfShare;<br> }<br>function _increaseCounterOfClasses(Repo storage repo) <br> private returns(uint16)<br> {<br> repo.shares[0].head.class++;<br> return repo.shares[0].head.class;<br> }<br>// ==== amountChange ====<br>function payInCapital(<br> Repo storage repo,<br> uint seqOfShare,<br> uint amt) public shareExist(repo, seqOfShare) {<br>Share storage share = repo.shares[seqOfShare];<br>uint64 deltaPaid = uint64(amt);<br>require(deltaPaid > 0, "SR.payInCap: zero amt");<br>require(block.timestamp <= share.body.payInDeadline, <br> "SR.payInCap: missed deadline");<br>require(share.body.paid + deltaPaid <= share.body.par, <br> "SR.payInCap: amt overflow");<br>share.body.paid += deltaPaid;<br> share.body.cleanPaid += deltaPaid;<br>_addPremium(repo, share.head.priceOfPaid, share.body.paid);<br>}<br>function subAmtFromShare(<br> Repo storage repo,<br> uint seqOfShare,<br> uint paid, <br> uint par) public shareExist(repo, seqOfShare) {<br>Share storage share = repo.shares[seqOfShare];<br> Class storage class = repo.classes[share.head.class];<br>uint64 deltaPaid = uint64(paid);<br> uint64 deltaPar = uint64(par);<br>require(deltaPar > 0, "SR.subAmt: zero par");<br> require(share.body.cleanPaid >= deltaPaid, "SR.subAmt: insufficient cleanPaid");<br>if (deltaPar == share.body.par) { <br> class.seqList.remove(seqOfShare);<br> repo.classes[0].seqList.remove(seqOfShare);<br> delete repo.shares[seqOfShare];<br> } else {<br> share.body.paid -= deltaPaid;<br> share.body.par -= deltaPar;<br> share.body.cleanPaid -= deltaPaid;<br>require(share.body.par >= share.body.paid,<br> "SR.subAmt: result paid overflow");<br> }<br> }<br>function increaseCleanPaid(<br> Repo storage repo,<br> bool isIncrease,<br> uint seqOfShare,<br> uint paid) public shareExist(repo, seqOfShare) {<br>Share storage share = repo.shares[seqOfShare];<br>uint64 deltaClean = uint64(paid);<br>require(deltaClean > 0, "SR.incrClean: zero amt");<br>if (isIncrease && share.body.cleanPaid + deltaClean <= share.body.paid) <br> share.body.cleanPaid += deltaClean;<br> else if(!isIncrease && share.body.cleanPaid >= deltaClean)<br> share.body.cleanPaid -= deltaClean;<br> else revert("SR.incrClean: clean overflow");<br> }<br>// ---- EquityOfClass ----<br>function increaseEquityOfClass(<br> Repo storage repo,<br> bool isIncrease,<br> uint classOfShare,<br> uint deltaPaid,<br> uint deltaPar,<br> uint deltaCleanPaid) public {<br>Body storage equity = repo.classes[classOfShare].info.body;<br>if (isIncrease) {<br> equity.paid += uint64(deltaPaid);<br> equity.par += uint64(deltaPar);<br> equity.cleanPaid += uint64(deltaCleanPaid);<br> } else {<br> equity.paid -= uint64(deltaPaid);<br> equity.par -= uint64(deltaPar);<br> equity.cleanPaid -= uint64(deltaCleanPaid); <br> }<br> }<br>function updatePriceOfPaid(<br> Repo storage repo,<br> uint seqOfShare,<br> uint newPrice) public shareExist(repo, seqOfShare) {<br> Share storage share = repo.shares[seqOfShare];<br> share.head.priceOfPaid = uint32(newPrice);<br> }<br>function updatePayInDeadline(<br> Repo storage repo,<br> uint seqOfShare,<br> uint deadline) public shareExist(repo, seqOfShare) {<br>Share storage share = repo.shares[seqOfShare];<br>uint48 newLine = uint48(deadline);<br>require (block.timestamp < newLine, <br> "SR.updatePayInDeadline: not future");<br>share.body.payInDeadline = newLine;<br> }<br>function restoreRepo(<br> Repo storage repo, <br> Share[] memory shares,<br> Share[] memory classInfos) public {<br> uint len = shares.length;<br> while (len > 1) {<br> Share memory share = shares[len - 1];<br> repo.shares[share.head.seqOfShare] = share;<br>repo.classes[share.head.class].seqList.add(share.head.seqOfShare);<br> repo.classes[0].seqList.add(share.head.seqOfShare);<br>len --;<br> }<br>repo.shares[0] = shares[0];<br>len = classInfos.length;<br> while (len > 0) {<br> Share memory info = classInfos[len - 1];<br> repo.classes[info.head.class].info = info;<br>len--;<br> }<br> }<br>//####################<br> //## Read I/O ##<br> //####################<br>// ---- Counter ----<br>function counterOfShares(<br> Repo storage repo) public view returns(uint32) {<br> return repo.shares[0].head.seqOfShare;<br> }<br>function counterOfClasses(<br> Repo storage repo) public view returns(uint16) {<br> return repo.shares[0].head.class;<br> }<br>// ---- Share ----<br>function isShare(<br> Repo storage repo, <br> uint seqOfShare) public view returns(bool) {<br> return repo.shares[seqOfShare].head.issueDate > 0;<br> }<br>function getShare(<br> Repo storage repo, <br> uint seqOfShare) public view shareExist(repo, seqOfShare) returns (<br> Share memory) {<br> return repo.shares[seqOfShare];<br> }<br>function getQtyOfShares(<br> Repo storage repo) public view returns(uint) {<br> return repo.classes[0].seqList.length();<br> }<br>function getSeqListOfShares(<br> Repo storage repo) public view returns(uint[] memory) {<br> return repo.classes[0].seqList.values();<br> }<br>function getSharesList(<br> Repo storage repo) public view returns(Share[] memory) {<br> uint[] memory seqList = repo.classes[0].seqList.values();<br> return _getShares(repo, seqList);<br> }<br>function getShareZero(Repo storage repo) <br> public view returns(Share memory share) {<br> share = repo.shares[0];<br> }<br>// ---- Class ---- <br>function getQtyOfSharesInClass(<br> Repo storage repo, <br> uint classOfShare) public view returns (uint) {<br> return repo.classes[classOfShare].seqList.length();<br> }<br>function getSeqListOfClass(<br> Repo storage repo, <br> uint classOfShare) public view returns (uint[] memory) {<br> return repo.classes[classOfShare].seqList.values();<br> }<br>function getInfoOfClass(<br> Repo storage repo,<br> uint classOfShare) public view returns (Share memory) {<br> return repo.classes[classOfShare].info;<br> }<br>function getSharesOfClass(<br> Repo storage repo, <br> uint classOfShare) public view returns (Share[] memory) {<br> uint[] memory seqList = <br> repo.classes[classOfShare].seqList.values();<br> return _getShares(repo, seqList);<br> }<br>function _getShares(<br> Repo storage repo,<br> uint[] memory seqList) private view returns(Share[] memory list) {<br>uint len = seqList.length;<br> list = new Share[](len);<br>while(len > 0) {<br> list[len - 1] = repo.shares[seqList[len - 1]];<br> len--;<br> }<br> }<br>function getPremium(Repo storage repo) public view returns(uint premium) {<br> Body memory body = repo.shares[0].body;<br>premium = (uint(body.payInDeadline) << 208) +<br> (uint(body.paid) << 144) +<br> (uint(body.par) << 80) +<br> (uint(body.cleanPaid) << 16) +<br> body.distrWeight;<br> }<br>}<br>|
| [Contents](#toc) |

---

## CondsRepo.sol

---

| |
|:---|
| **contracts/lib/CondsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library CondsRepo {<br> using EnumerableSet for EnumerableSet.Bytes32Set;<br>enum LogOps {<br> ZeroPoint, // 0<br> And, <br> Or, <br> Equal,<br> NotEqual, // 4<br> AndAnd, <br> OrOr,<br> AndOr,<br> OrAnd,<br> EqEq,<br> NeNe,<br> EqNe,<br> NeEq,<br> AndEq,<br> EqAnd,<br> OrEq,<br> EqOr,<br> AndNe,<br> NeAnd,<br> OrNe,<br> NeOr <br> }<br>enum ComOps {<br> ZeroPoint,<br> Equal,<br> NotEqual,<br> Bigger,<br> Smaller,<br> BiggerOrEqual,<br> SmallerOrEqual<br> }<br>struct Cond {<br> uint32 seqOfCond;<br> uint8 logicOpr; <br> uint8 compOpr1; <br> uint64 para1; <br> uint8 compOpr2; <br> uint64 para2; <br> uint8 compOpr3; <br> uint64 para3; <br> }<br>struct Repo {<br> mapping(uint256 => Cond) conds;<br> EnumerableSet.Bytes32Set seqList;<br> }<br>// ###############<br> // ## Write I/O ##<br> // ###############<br>// ==== codify / parser ====<br>function snParser(bytes32 sn) public pure returns(Cond memory cond)<br> {<br> uint _sn = uint(sn);<br>cond = Cond({<br> seqOfCond: uint32(_sn >> 224),<br> logicOpr: uint8(_sn >> 216),<br> compOpr1: uint8(_sn >> 208), <br> para1: uint64(_sn >> 144), <br> compOpr2: uint8(_sn >> 136), <br> para2: uint64(_sn >> 72), <br> compOpr3: uint8(_sn >> 64), <br> para3: uint64(_sn) <br> });<br> }<br>function codifyCond(Cond memory cond) public pure returns(bytes32 sn)<br> {<br> bytes memory _sn = abi.encodePacked(<br> cond.seqOfCond,<br> cond.logicOpr,<br> cond.compOpr1,<br> cond.para1,<br> cond.compOpr2,<br> cond.para2,<br> cond.compOpr3,<br> cond.para3);<br>assembly {<br> sn := mload(add(_sn, 0x20))<br> } <br> }<br>// ==== create / reg ====<br> function createCond(Repo storage repo, bytes32 sn) public returns(uint32 seqOfCond)<br> {<br> seqOfCond = regCond(repo, snParser(sn));<br> }<br>function regCond(Repo storage repo, Cond memory cond) public returns(uint32 seqOfCond)<br> {<br> cond.seqOfCond = _increaseCounterOfConds(repo);<br> repo.conds[cond.seqOfCond] = cond;<br> repo.seqList.add(codifyCond(cond));<br> seqOfCond = cond.seqOfCond;<br> }<br>function _increaseCounterOfConds(Repo storage repo) private returns(uint32)<br> {<br> repo.conds[0].seqOfCond++;<br> return repo.conds[0].seqOfCond;<br> }<br>function removeCond(Repo storage repo, uint256 seqOfCond) public returns(bool flag)<br> {<br> if (repo.seqList.remove(codifyCond(repo.conds[seqOfCond])))<br> {<br> delete repo.conds[seqOfCond];<br> flag = true;<br> }<br> }<br>// ##################<br> // ## Write I/O ##<br> // ##################<br>function counterOfConds(Repo storage repo) public view returns(uint32 seqOfCond) {<br> seqOfCond = repo.conds[0].seqOfCond;<br> }<br>function getConds(Repo storage repo) public view returns(Cond[] memory)<br> {<br> uint256 len = repo.seqList.length();<br> Cond[] memory output = new Cond[](len);<br>while (len > 0) {<br> output[len -1] = repo.conds[len];<br> len--;<br> }<br>return output;<br> }<br>function checkCond(<br> uint compOpr,<br> uint para,<br> uint data) public pure returns (bool flag) {<br> if (compOpr == uint8(ComOps.Equal)) flag = data == para;<br> else if (compOpr == uint8(ComOps.NotEqual)) flag = data != para;<br> else if (compOpr == uint8(ComOps.Bigger)) flag = data > para;<br> else if (compOpr == uint8(ComOps.Smaller)) flag = data < para;<br> else if (compOpr == uint8(ComOps.BiggerOrEqual)) flag = data >= para;<br> else if (compOpr == uint8(ComOps.SmallerOrEqual)) flag = data <= para;<br> else revert ("CR.CSC: compOpr overflow");<br> }<br>function checkSoleCond(<br> Cond memory cond,<br> uint data) public pure returns (bool flag) {<br> flag = checkCond(cond.compOpr1, cond.para1, data);<br> }<br>function checkCondsOfTwo(<br> Cond memory cond,<br> uint data1,<br> uint data2) public pure returns (bool flag) {<br> bool flag1;<br> bool flag2;<br>flag1 = checkCond(cond.compOpr1, cond.para1, data1);<br> flag2 = checkCond(cond.compOpr2, cond.para2, data2);<br>if (cond.logicOpr == uint8(LogOps.And)) flag = flag1 && flag2;<br> else if (cond.logicOpr == uint8(LogOps.Or)) flag = flag1 \|\| flag2;<br> else if (cond.logicOpr == uint8(LogOps.Equal)) flag = flag1 == flag2;<br> else if (cond.logicOpr == uint8(LogOps.NotEqual)) flag = flag1 != flag2;<br> else revert("CR.CCO2: logicOpr overflow");<br> }<br>function checkCondsOfThree(<br> Cond memory cond,<br> uint data1,<br> uint data2,<br> uint data3) public pure returns (bool flag) {<br> bool flag1;<br> bool flag2;<br> bool flag3;<br>flag1 = checkCond(cond.compOpr1, cond.para1, data1);<br> flag2 = checkCond(cond.compOpr2, cond.para2, data2);<br> flag3 = checkCond(cond.compOpr3, cond.para3, data3);<br>if (cond.logicOpr == uint8(LogOps.AndAnd)) flag = flag1 && flag2 && flag3;<br> else if (cond.logicOpr == uint8(LogOps.OrOr)) flag = flag1 \|\| flag2 \|\| flag3;<br> else if (cond.logicOpr == uint8(LogOps.AndOr)) flag = flag1 && flag2 \|\| flag3;<br> else if (cond.logicOpr == uint8(LogOps.OrAnd)) flag = flag1 \|\| flag2 && flag3;<br> else if (cond.logicOpr == uint8(LogOps.EqEq)) flag = flag1 == flag2 == flag3;<br> else if (cond.logicOpr == uint8(LogOps.NeNe)) flag = flag1 != flag2 != flag3;<br> else if (cond.logicOpr == uint8(LogOps.EqNe)) flag = flag1 == flag2 != flag3;<br> else if (cond.logicOpr == uint8(LogOps.NeEq)) flag = flag1 != flag2 == flag3;<br> else if (cond.logicOpr == uint8(LogOps.AndEq)) flag = flag1 && flag2 == flag3;<br> else if (cond.logicOpr == uint8(LogOps.EqAnd)) flag = flag1 == flag2 && flag3;<br> else if (cond.logicOpr == uint8(LogOps.OrEq)) flag = flag1 \|\| flag2 == flag3;<br> else if (cond.logicOpr == uint8(LogOps.EqOr)) flag = flag1 == flag2 \|\| flag3;<br> else if (cond.logicOpr == uint8(LogOps.AndNe)) flag = flag1 && flag2 != flag3;<br> else if (cond.logicOpr == uint8(LogOps.NeAnd)) flag = flag1 != flag2 && flag3;<br> else if (cond.logicOpr == uint8(LogOps.OrNe)) flag = flag1 \|\| flag2 != flag3;<br> else if (cond.logicOpr == uint8(LogOps.NeOr)) flag = flag1 != flag2 \|\| flag3;<br> else revert("CR.CCO3: logicOpr overflow");<br> }<br> }<br>|
| [Contents](#toc) |

---

## RulesParser.sol

---

| |
|:---|
| **contracts/lib/RulesParser.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library RulesParser {<br>// ======== GovernanceRule ========<br>// bytes32 public constant SHA_INIT_GR = <br> // bytes32(uint(0x0000000000000000010000000000000000000000000000000000000000000000));<br>struct GovernanceRule {<br> uint32 fundApprovalThreshold; <br> bool basedOnPar;<br> uint16 proposeWeightRatioOfGM; <br> uint16 proposeHeadRatioOfMembers; <br> uint16 proposeHeadRatioOfDirectorsInGM;<br> uint16 proposeHeadRatioOfDirectorsInBoard;<br> uint16 maxQtyOfMembers;<br> uint16 quorumOfGM; <br> uint8 maxNumOfDirectors;<br> uint16 tenureMonOfBoard;<br> uint16 quorumOfBoardMeeting;<br> uint48 establishedDate; <br> uint8 businessTermInYears;<br> uint8 typeOfComp;<br> uint16 minVoteRatioOnChain;<br> }<br>function governanceRuleParser(bytes32 sn) public pure returns (GovernanceRule memory rule) {<br> uint _sn = uint(sn);<br>rule = GovernanceRule({<br> fundApprovalThreshold: uint32(_sn >> 224),<br> basedOnPar: uint8(_sn >> 216) == 1,<br> proposeWeightRatioOfGM: uint16(_sn >> 200),<br> proposeHeadRatioOfMembers: uint16(_sn >> 184),<br> proposeHeadRatioOfDirectorsInGM: uint16(_sn >> 168),<br> proposeHeadRatioOfDirectorsInBoard: uint16(_sn >> 152),<br> maxQtyOfMembers: uint16(_sn >> 136),<br> quorumOfGM: uint16(_sn >> 120),<br> maxNumOfDirectors: uint8(_sn >> 112),<br> tenureMonOfBoard: uint16(_sn >> 96),<br> quorumOfBoardMeeting: uint16(_sn >> 80),<br> establishedDate: uint48(_sn >> 32),<br> businessTermInYears: uint8(_sn >> 24),<br> typeOfComp: uint8(_sn >> 16),<br> minVoteRatioOnChain: uint16(_sn)<br> });<br> }<br>// ---- VotingRule ----<br>// bytes32 public constant SHA_INIT_VR = <br> // bytes32(uint(0x00080c080100001a0b0000010000000000000100000000000000000000000000));<br>struct VotingRule{<br> uint16 seqOfRule;<br> uint8 qtyOfSubRule;<br> uint8 seqOfSubRule;<br> uint8 authority;<br> uint16 headRatio;<br> uint16 amountRatio;<br> bool onlyAttendance;<br> bool impliedConsent;<br> bool partyAsConsent;<br> bool againstShallBuy;<br> uint8 frExecDays;<br> uint8 dtExecDays;<br> uint8 dtConfirmDays;<br> uint8 invExitDays;<br> uint8 votePrepareDays;<br> uint8 votingDays;<br> uint8 execDaysForPutOpt;<br> uint40[2] vetoers;<br> uint16 para;<br> }<br>function votingRuleParser(bytes32 sn) public pure returns (VotingRule memory rule) {<br> uint _sn = uint(sn);<br>rule = VotingRule({<br> seqOfRule: uint16(_sn >> 240),<br> qtyOfSubRule: uint8(_sn >> 232),<br> seqOfSubRule: uint8(_sn >> 224),<br> authority: uint8(_sn >> 216),<br> headRatio: uint16(_sn >> 200),<br> amountRatio: uint16(_sn >> 184),<br> onlyAttendance: uint8(_sn >> 176) == 1,<br> impliedConsent: uint8(_sn >> 168) == 1,<br> partyAsConsent: uint8(_sn >> 160) == 1,<br> againstShallBuy: uint8(_sn >> 152) == 1,<br> frExecDays: uint8(_sn >> 144),<br> dtExecDays: uint8(_sn >> 136),<br> dtConfirmDays: uint8(_sn >> 128),<br> invExitDays: uint8(_sn >> 120),<br> votePrepareDays: uint8(_sn >> 112),<br> votingDays: uint8(_sn >> 104),<br> execDaysForPutOpt: uint8(_sn >> 96),<br> vetoers: [uint40(_sn >> 56), uint40(_sn >> 16)],<br> para: uint16(_sn) <br> });<br> }<br>// ---- BoardSeatsRule ----<br>/\*<br> 1: Chairman;<br> 2: ViceChairman;<br> 3: Director;<br> ...<br> \*/<br>struct PositionAllocateRule {<br> uint16 seqOfRule;<br> uint8 qtyOfSubRule;<br> uint8 seqOfSubRule; <br> bool removePos; <br> uint16 seqOfPos;<br> uint16 titleOfPos; <br> uint40 nominator; <br> uint16 titleOfNominator; <br> uint16 seqOfVR; <br> uint48 endDate;<br> uint16 para; <br> uint16 argu;<br> uint32 data;<br> }<br>function positionAllocateRuleParser(bytes32 sn) public pure returns(PositionAllocateRule memory rule) {<br> uint _sn = uint(sn);<br>rule = PositionAllocateRule({<br> seqOfRule: uint16(_sn >> 240), <br> qtyOfSubRule: uint8(_sn >> 232),<br> seqOfSubRule: uint8(_sn >> 224), <br> removePos: uint8(_sn >> 216) == 1,<br> seqOfPos: uint16(_sn >> 200),<br> titleOfPos: uint16(_sn >> 184), <br> nominator: uint40(_sn >> 144), <br> titleOfNominator: uint16(_sn >> 128), <br> seqOfVR: uint16(_sn >> 112), <br> endDate: uint48(_sn >> 64),<br> para: uint16(_sn >> 48), <br> argu: uint16(_sn >> 32),<br> data: uint32(_sn)<br> });<br>}<br>// ---- FirstRefusal Rule ----<br>struct FirstRefusalRule {<br> uint16 seqOfRule;<br> uint8 qtyOfSubRule;<br> uint8 seqOfSubRule;<br> uint8 typeOfDeal;<br> bool membersEqual;<br> bool proRata;<br> bool basedOnPar;<br> uint40[4] rightholders;<br> uint16 para;<br> uint16 argu; <br> }<br>function firstRefusalRuleParser(bytes32 sn) public pure returns(FirstRefusalRule memory rule) {<br> uint _sn = uint(sn);<br>rule = FirstRefusalRule({<br> seqOfRule: uint16(_sn >> 240),<br> qtyOfSubRule: uint8(_sn >> 232),<br> seqOfSubRule: uint8(_sn >> 224),<br> typeOfDeal: uint8(_sn >> 216),<br> membersEqual: uint8(_sn >> 208) == 1,<br> proRata: uint8(_sn >> 200) == 1,<br> basedOnPar: uint8(_sn >> 192) == 1,<br> rightholders: [uint40(_sn >> 152), uint40(_sn >> 112), uint40(_sn >> 72), uint40(_sn >> 32)],<br> para: uint16(_sn >> 16),<br> argu: uint16(_sn) <br> });<br> }<br>// ---- GroupUpdateOrder ----<br>struct GroupUpdateOrder {<br> uint16 seqOfRule;<br> uint8 qtyOfSubRule;<br> uint8 seqOfSubRule;<br> bool addMember;<br> uint40 groupRep;<br> uint40[4] members;<br> uint16 para; <br> }<br>function groupUpdateOrderParser(bytes32 sn) public pure returns(GroupUpdateOrder memory order) {<br> uint _sn = uint(sn);<br>order = GroupUpdateOrder({<br> seqOfRule: uint16(_sn >> 240),<br> qtyOfSubRule: uint8(_sn >> 232),<br> seqOfSubRule: uint8(_sn >> 224),<br> addMember: uint8(_sn >> 216) == 1,<br> groupRep: uint40(_sn >> 176),<br> members: [<br> uint40(_sn >> 136),<br> uint40(_sn >> 96),<br> uint40(_sn >> 56),<br> uint40(_sn >> 16)<br> ],<br> para: uint16(_sn)<br> });<br> } <br>// ---- ListingRule ----<br>struct ListingRule {<br> uint16 seqOfRule;<br> uint16 titleOfIssuer;<br> uint16 classOfShare;<br> uint32 maxTotalPar;<br> uint16 titleOfVerifier;<br> uint16 maxQtyOfInvestors;<br> uint32 ceilingPrice;<br> uint32 floorPrice;<br> uint16 lockupDays;<br> uint16 offPrice;<br> uint16 votingWeight;<br> uint16 distrWeight;<br> uint16 para;<br> }<br>function listingRuleParser(bytes32 sn) public pure returns(ListingRule memory rule) {<br> uint _sn = uint(sn);<br>rule = ListingRule({<br> seqOfRule: uint16(_sn >> 240),<br> titleOfIssuer: uint16(_sn >> 224),<br> classOfShare: uint16(_sn >> 208),<br> maxTotalPar: uint32(_sn >> 176),<br> titleOfVerifier: uint16(_sn >> 160), <br> maxQtyOfInvestors: uint16(_sn >> 144),<br> ceilingPrice: uint32(_sn >> 112),<br> floorPrice: uint32(_sn >> 80),<br> lockupDays: uint16(_sn >> 64),<br> offPrice: uint16(_sn >> 48),<br> votingWeight: uint16(_sn >> 32),<br> distrWeight: uint16(_sn >> 16),<br> para: uint16(_sn)<br> });<br> } <br>// ======== LinkRule ========<br>struct LinkRule {<br> uint48 triggerDate;<br> uint16 effectiveDays;<br> uint8 triggerType; <br> uint16 shareRatioThreshold;<br> uint32 rate;<br> bool proRata;<br> uint16 seq;<br> uint16 para;<br> uint16 argu;<br> uint16 ref;<br> uint64 data;<br> }<br>function linkRuleParser(bytes32 sn) public pure returns (LinkRule memory rule) {<br> uint _sn = uint(sn);<br>rule = LinkRule({<br> triggerDate: uint48(_sn >> 208),<br> effectiveDays: uint16(_sn >> 192),<br> triggerType: uint8(_sn >> 184), <br> shareRatioThreshold: uint16(_sn >> 168),<br> rate: uint32(_sn >> 136),<br> proRata: uint8(_sn >> 128) == 1,<br> seq: uint16(_sn >> 112),<br> para: uint16(_sn >> 96),<br> argu: uint16(_sn >> 80),<br> ref: uint16(_sn >> 64),<br> data: uint64(_sn)<br> });<br> }<br>}<br>|
| [Contents](#toc) |

---

## SigsRepo.sol

---

| |
|:---|
| **contracts/lib/SigsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library SigsRepo {<br> using EnumerableSet for EnumerableSet.UintSet;<br>struct Signature {<br> uint40 signer;<br> uint48 sigDate;<br> uint64 blocknumber;<br> bool flag;<br> uint16 para;<br> uint16 arg;<br> uint16 seq;<br> uint16 attr;<br> uint32 data;<br> }<br>struct Blank{<br> EnumerableSet.UintSet seqOfDeals;<br> Signature sig;<br> bytes32 sigHash;<br> }<br>// blanks[0].sig {<br> // sigDate: circulateDate;<br> // flag: established;<br> // para: counterOfBlanks;<br> // arg: counterOfSigs;<br> // seq: signingDays;<br> // attr: closingDays;<br> // }<br>struct Page {<br> // party => Blank<br> mapping(uint256 => Blank) blanks;<br> EnumerableSet.UintSet buyers;<br> EnumerableSet.UintSet sellers;<br> }<br>//###################<br> //## Write ##<br> //###################<br>function circulateDoc(<br> Page storage p) public {<br> p.blanks[0].sig.sigDate = uint48(block.timestamp);<br> }<br>function setTiming(<br> Page storage p,<br> uint signingDays,<br> uint closingDays) public {<br> p.blanks[0].sig.seq = uint16(signingDays);<br> p.blanks[0].sig.attr = uint16(closingDays);<br> }<br>function addBlank(<br> Page storage p,<br> bool beBuyer,<br> uint256 seq,<br> uint256 acct) public {<br> require (seq > 0, "SR.AB: zero seq");<br> require (acct > 0, "SR.AB: zero acct");<br>if (beBuyer) {<br> require(!p.sellers.contains(acct), "SR.AB: seller intends to buy");<br> p.buyers.add(acct);<br> } else {<br> require(!p.buyers.contains(acct), "SR.AB: buyer intends to sell");<br> p.sellers.add(acct);<br> }<br>if (p.blanks[uint40(acct)].seqOfDeals.add(uint16(seq)))<br> _increaseCounterOfBlanks(p);<br> }<br>function removeBlank(<br> Page storage p,<br> uint256 seq,<br> uint256 acct) public {<br> if (p.buyers.contains(acct) \|\| p.sellers.contains(acct)) {<br> if (p.blanks[acct].seqOfDeals.remove(seq))<br> _decreaseCounterOfBlanks(p);<br>if (p.blanks[acct].seqOfDeals.length() == 0) {<br> delete p.blanks[acct]; <br> p.buyers.remove(acct) \|\| p.sellers.remove(acct);<br> }<br> }<br> }<br>function signDoc(Page storage p, uint256 acct, bytes32 sigHash) <br> public <br> {<br> require(block.timestamp < getSigDeadline(p) \|\|<br> getSigningDays(p) == 0,<br> "SR.SD: missed sigDeadline");<br>require(!established(p),<br> "SR.SD: Doc already established");<br>if ((p.buyers.contains(acct) \|\| p.sellers.contains(acct)) &&<br> p.blanks[acct].sig.sigDate == 0) {<br>Signature storage sig = p.blanks[acct].sig;<br>sig.signer = uint40(acct);<br> sig.sigDate = uint48(block.timestamp);<br> sig.blocknumber = uint64(block.number);<br>p.blanks[acct].sigHash = sigHash;<br>_increaseCounterOfSigs(p, p.blanks[acct].seqOfDeals.length());<br> }<br> }<br>function regSig(Page storage p, uint256 acct, uint sigDate, bytes32 sigHash)<br> public returns (bool flag)<br> {<br> require(block.timestamp < getSigDeadline(p),<br> "SR.RS: missed sigDeadline");<br>require(!established(p),<br> "SR.regSig: Doc already established");<br>if (p.buyers.contains(acct) \|\| p.sellers.contains(acct)) {<br>Signature storage sig = p.blanks[acct].sig;<br>sig.signer = uint40(acct);<br> sig.sigDate = uint48(sigDate);<br> sig.blocknumber = uint64(block.number);<br>p.blanks[acct].sigHash = sigHash;<br>_increaseCounterOfSigs(p, 1);<br>flag = true;<br> }<br>}<br>function _increaseCounterOfBlanks(Page storage p) private {<br> p.blanks[0].sig.para++;<br> }<br>function _decreaseCounterOfBlanks(Page storage p) private {<br> p.blanks[0].sig.para--;<br> }<br>function _increaseCounterOfSigs(Page storage p, uint qtyOfDeals) private {<br> p.blanks[0].sig.arg += uint16(qtyOfDeals);<br> }<br>//####################<br> //## Read I/O ##<br> //####################<br>function circulated(Page storage p) public view returns (bool)<br> {<br> return p.blanks[0].sig.sigDate > 0;<br> }<br>function established(Page storage p) public view returns (bool)<br> {<br> return counterOfBlanks(p) > 0 <br> && counterOfBlanks(p) == counterOfSigs(p);<br> }<br>function counterOfBlanks(Page storage p) public view returns(uint16) {<br> return p.blanks[0].sig.para;<br> }<br>function counterOfSigs(Page storage p) public view returns(uint16) {<br> return p.blanks[0].sig.arg;<br> }<br>function getCirculateDate(Page storage p) public view returns(uint48) {<br> return p.blanks[0].sig.sigDate;<br> }<br>function getSigningDays(Page storage p) public view returns(uint16) {<br> return p.blanks[0].sig.seq;<br> }<br>function getClosingDays(Page storage p) public view returns(uint16) {<br> return p.blanks[0].sig.attr;<br> }<br>function getSigDeadline(Page storage p) public view returns(uint48) {<br> return p.blanks[0].sig.sigDate + uint48(p.blanks[0].sig.seq) \* 86400; <br> }<br>function getClosingDeadline(Page storage p) public view returns(uint48) {<br> return p.blanks[0].sig.sigDate + uint48(p.blanks[0].sig.attr) \* 86400; <br> }<br>function isSigner(Page storage p, uint256 acct) <br> public view returns (bool) <br> {<br> return p.blanks[acct].sig.signer > 0;<br> }<br>function sigOfParty(Page storage p, uint256 acct) public view<br> returns (<br> uint256[] memory seqOfDeals, <br> Signature memory sig,<br> bytes32 sigHash) <br> {<br> seqOfDeals = p.blanks[acct].seqOfDeals.values();<br> sig = p.blanks[acct].sig;<br> sigHash = p.blanks[acct].sigHash;<br> }<br>function sigsOfPage(Page storage p) public view<br> returns (<br> Signature[] memory sigsOfBuyer, <br> Signature[]memory sigsOfSeller)<br> {<br> sigsOfBuyer = sigsOfSide(p, p.buyers);<br> sigsOfSeller = sigsOfSide(p, p.sellers);<br> }<br>function sigsOfSide(Page storage p, EnumerableSet.UintSet storage partiesOfSide) <br> public view<br> returns (Signature[] memory)<br> {<br> uint256[] memory parties = partiesOfSide.values();<br> uint256 len = parties.length;<br>Signature[] memory sigs = new Signature[](len);<br>while (len > 0) {<br> sigs[len-1] = p.blanks[parties[len-1]].sig;<br> len--;<br> }<br>return sigs;<br> }<br>}<br>|
| [Contents](#toc) |

---

## FilesRepo.sol

---

| |
|:---|
| **contracts/lib/FilesRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br> import "./RulesParser.sol";<br>library FilesRepo {<br> using EnumerableSet for EnumerableSet.AddressSet;<br>enum StateOfFile {<br> ZeroPoint, // 0<br> Created, // 1<br> Circulated, // 2<br> Proposed, // 3<br> Approved, // 4<br> Rejected, // 5<br> Closed, // 6<br> Revoked // 7<br> }<br>struct Head {<br> uint48 circulateDate;<br> uint8 signingDays;<br> uint8 closingDays;<br> uint16 seqOfVR;<br> uint8 frExecDays;<br> uint8 dtExecDays;<br> uint8 dtConfirmDays;<br> uint48 proposeDate;<br> uint8 invExitDays;<br> uint8 votePrepareDays;<br> uint8 votingDays;<br> uint8 execDaysForPutOpt;<br> uint64 seqOfMotion;<br> uint8 state;<br> }<br>struct Ref {<br> bytes32 docUrl;<br> bytes32 docHash;<br> }<br>struct File {<br> bytes32 snOfDoc;<br> Head head;<br> Ref ref;<br> }<br>struct Repo {<br> mapping(address => File) files;<br> EnumerableSet.AddressSet filesList;<br> }<br>//####################<br> //## modifier ##<br> //####################<br>modifier onlyRegistered(Repo storage repo, address body) {<br> require(repo.filesList.contains(body),<br> "FR.md.OR: doc NOT registered");<br> _;<br> }<br>//##################<br> //## Write I/O ##<br> //##################<br>function regFile(Repo storage repo, bytes32 snOfDoc, address body) <br> public returns (bool flag)<br> {<br> if (repo.filesList.add(body)) {<br>File storage file = repo.files[body];<br>file.snOfDoc = snOfDoc;<br> file.head.state = uint8(StateOfFile.Created);<br> flag = true;<br> }<br> }<br>function circulateFile(<br> Repo storage repo,<br> address body,<br> uint16 signingDays,<br> uint16 closingDays,<br> RulesParser.VotingRule memory vr,<br> bytes32 docUrl,<br> bytes32 docHash) public onlyRegistered(repo, body) returns (Head memory head){<br>require(<br> repo.files[body].head.state == uint8(StateOfFile.Created),<br> "FR.CF: Doc not pending");<br>head = Head({<br> circulateDate: uint48(block.timestamp),<br> signingDays: uint8(signingDays),<br> closingDays: uint8(closingDays),<br> seqOfVR: vr.seqOfRule,<br> frExecDays: vr.frExecDays,<br> dtExecDays: vr.dtExecDays,<br> dtConfirmDays: vr.dtConfirmDays,<br> proposeDate: 0,<br> invExitDays: vr.invExitDays,<br> votePrepareDays: vr.votePrepareDays,<br> votingDays: vr.votingDays,<br> execDaysForPutOpt: vr.execDaysForPutOpt,<br> seqOfMotion: 0,<br> state: uint8(StateOfFile.Circulated)<br> });<br>require(head.signingDays > 0, "FR.CF: zero signingDays");<br>require(head.closingDays >= signingDays + vr.frExecDays + vr.dtExecDays + vr.dtConfirmDays + <br> vr.invExitDays + vr.votePrepareDays + vr.votingDays,<br> "FR.CF: insufficient closingDays");<br>File storage file = repo.files[body];<br>file.head = head;<br>if (docUrl != bytes32(0) \|\| docHash != bytes32(0)){<br> file.ref = Ref({<br> docUrl: docUrl,<br> docHash: docHash<br> }); <br> }<br> return file.head;<br> }<br>function proposeFile(<br> Repo storage repo,<br> address body,<br> uint64 seqOfMotion) public onlyRegistered(repo, body) returns(Head memory){<br>require(repo.files[body].head.state == uint8(StateOfFile.Circulated),<br> "FR.PF: Doc not circulated");<br>uint48 timestamp = uint48(block.timestamp);<br>require(timestamp >= dtExecDeadline(repo, body), <br> "FR.proposeFile: still in dtExecPeriod");<br>File storage file = repo.files[body];<br>require(timestamp < terminateStartpoint(repo, body) \|\| (file.head.frExecDays<br> + file.head.dtExecDays + file.head.dtConfirmDays) == 0, <br> "FR.proposeFile: missed proposeDeadline");<br>file.head.proposeDate = timestamp;<br> file.head.seqOfMotion = seqOfMotion;<br> file.head.state = uint8(StateOfFile.Proposed);<br>return file.head;<br> }<br>function voteCountingForFile(<br> Repo storage repo,<br> address body,<br> bool approved) public onlyRegistered(repo, body) {<br>require(repo.files[body].head.state == uint8(StateOfFile.Proposed),<br> "FR.VCFF: Doc not proposed");<br>// uint48 timestamp = uint48(block.timestamp);<br>// require(timestamp >= votingDeadline(repo, body), <br> // "FR.voteCounting: still in votingPeriod");<br>File storage file = repo.files[body];<br>file.head.state = approved ? <br> uint8(StateOfFile.Approved) : uint8(StateOfFile.Rejected);<br> }<br>function execFile(<br> Repo storage repo,<br> address body) public onlyRegistered(repo, body) {<br>File storage file = repo.files[body];<br>require(file.head.state == uint8(StateOfFile.Approved),<br> "FR.EF: Doc not approved");<br>uint48 timestamp = uint48(block.timestamp);<br>require(timestamp < closingDeadline(repo, body), <br> "FR.EF: missed closingDeadline");<br>file.head.state = uint8(StateOfFile.Closed);<br> }<br>function terminateFile(<br> Repo storage repo,<br> address body) public onlyRegistered(repo, body) {<br>File storage file = repo.files[body];<br>require(file.head.state != uint8(StateOfFile.Closed),<br> "FR.terminateFile: Doc is closed");<br>file.head.state = uint8(StateOfFile.Revoked);<br> }<br>function setStateOfFile(Repo storage repo, address body, uint state) <br> public onlyRegistered(repo, body)<br> {<br> repo.files[body].head.state = uint8(state);<br> }<br>//##################<br> //## read I/O ##<br> //##################<br>function signingDeadline(Repo storage repo, address body) <br> public view returns (uint48) {<br>File storage file = repo.files[body];<br>return file.head.circulateDate + uint48(file.head.signingDays) \* 86400;<br> }<br>function closingDeadline(Repo storage repo, address body) <br> public view returns (uint48) {<br>File storage file = repo.files[body];<br>return file.head.circulateDate + uint48(file.head.closingDays) \* 86400;<br> }<br>function frExecDeadline(Repo storage repo, address body) <br> public view returns (uint48) {<br>File storage file = repo.files[body];<br>return file.head.circulateDate + uint48(file.head.signingDays + <br> file.head.frExecDays) \* 86400;<br> }<br>function dtExecDeadline(Repo storage repo, address body) <br> public view returns (uint48) {<br>File storage file = repo.files[body];<br>return file.head.circulateDate + uint48(file.head.signingDays + <br> file.head.frExecDays + file.head.dtExecDays) \* 86400;<br> }<br>function terminateStartpoint(Repo storage repo, address body) <br> public view returns (uint48) {<br>File storage file = repo.files[body];<br>return file.head.circulateDate + (uint48(file.head.signingDays + <br> file.head.frExecDays + file.head.dtExecDays + file.head.dtConfirmDays)) \* 86400;<br> }<br>function votingDeadline(Repo storage repo, address body) <br> public view returns (uint48) {<br>File storage file = repo.files[body];<br>return file.head.proposeDate + (uint48(file.head.invExitDays + <br> file.head.votePrepareDays + file.head.votingDays)) \* 86400;<br> } <br>function isRegistered(Repo storage repo, address body) public view returns (bool) {<br> return repo.filesList.contains(body);<br> }<br>function qtyOfFiles(Repo storage repo) public view returns (uint256) {<br> return repo.filesList.length();<br> }<br>function getFilesList(Repo storage repo) public view returns (address[] memory) {<br> return repo.filesList.values();<br> }<br>function getFile(Repo storage repo, address body) public view returns (File memory) {<br> return repo.files[body];<br> }<br>function getHeadOfFile(Repo storage repo, address body)<br> public view onlyRegistered(repo, body) returns (Head memory)<br> {<br> return repo.files[body].head;<br> }<br>}<br>|
| [Contents](#toc) |

---

## OptionsRepo.sol

---

| |
|:---|
| **contracts/lib/OptionsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br> import "./Checkpoints.sol";<br> import "./CondsRepo.sol";<br> import "./SharesRepo.sol";<br> import "./SwapsRepo.sol";<br>import "../comps/books/ros/IRegisterOfShares.sol";<br>library OptionsRepo {<br> using EnumerableSet for EnumerableSet.UintSet;<br> using Checkpoints for Checkpoints.History;<br> using CondsRepo for CondsRepo.Cond;<br> using CondsRepo for bytes32;<br> using SwapsRepo for SwapsRepo.Repo;<br>enum TypeOfOpt {<br> CallPrice, <br> PutPrice, <br> CallRoe, <br> PutRoe, <br> CallPriceWithCnds, <br> PutPriceWithCnds, <br> CallRoeWithCnds, <br> PutRoeWithCnds <br> }<br>enum StateOfOpt {<br> Pending, <br> Issued, <br> Executed,<br> Closed<br> }<br>struct Head {<br> uint32 seqOfOpt;<br> uint8 typeOfOpt;<br> uint16 classOfShare;<br> uint32 rate; <br> uint48 issueDate;<br> uint48 triggerDate; <br> uint16 execDays; <br> uint16 closingDays;<br> uint40 obligor; <br> }<br>struct Body {<br> uint48 closingDeadline;<br> uint40 rightholder;<br> uint64 paid;<br> uint64 par;<br> uint8 state;<br> uint16 para;<br> uint16 argu;<br> }<br>struct Option {<br> Head head;<br> CondsRepo.Cond cond;<br> Body body;<br> }<br>struct Record {<br> EnumerableSet.UintSet obligors;<br> SwapsRepo.Repo swaps;<br> Checkpoints.History oracles;<br> }<br>struct Repo {<br> mapping(uint256 => Option) options;<br> mapping(uint256 => Record) records;<br> EnumerableSet.UintSet seqList;<br> }<br>// ###############<br> // ## Modifier ##<br> // ###############<br>modifier optExist(Repo storage repo, uint seqOfOpt) {<br> require (isOption(repo, seqOfOpt), "OR.optExist: not");<br> _;<br> }<br>modifier onlyRightholder(Repo storage repo, uint seqOfOpt, uint caller) {<br> require (isRightholder(repo, seqOfOpt, caller),<br> "OR.mf.onlyRightholder: not");<br> _;<br> }<br>// ###############<br> // ## Write I/O ##<br> // ###############<br>// ==== cofify / parser ====<br>function snParser(bytes32 sn) public pure returns (Head memory head) {<br> uint _sn = uint(sn);<br>head = Head({<br> seqOfOpt: uint32(_sn >> 224),<br> typeOfOpt: uint8(_sn >> 216),<br> classOfShare: uint16(_sn >> 200),<br> rate: uint32(_sn >> 168),<br> issueDate: uint48(_sn >> 120),<br> triggerDate: uint48(_sn >> 72),<br> execDays: uint16(_sn >> 56),<br> closingDays: uint16(_sn >> 40),<br> obligor: uint40(_sn)<br> });<br> }<br>function codifyHead(Head memory head) public pure returns (bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> head.seqOfOpt,<br> head.typeOfOpt,<br> head.classOfShare,<br> head.rate,<br> head.issueDate,<br> head.triggerDate,<br> head.execDays,<br> head.closingDays,<br> head.obligor);<br> assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br> }<br>// ==== Option ====<br>function createOption(<br> Repo storage repo,<br> bytes32 snOfOpt,<br> bytes32 snOfCond,<br> uint rightholder,<br> uint paid,<br> uint par) public returns (Head memory head) <br> {<br> Option memory opt;<br>opt.head = snParser(snOfOpt);<br> opt.cond = snOfCond.snParser();<br>opt.body.closingDeadline = opt.head.triggerDate + (uint48(opt.head.execDays) + uint48(opt.head.closingDays)) \* 86400;<br> opt.body.rightholder = uint40(rightholder);<br> opt.body.paid = uint64(paid);<br> opt.body.par = uint64(par);<br>head = regOption(repo, opt);<br> }<br>function issueOption(<br> Repo storage repo,<br> Option memory opt) public returns(uint) {<br> Option storage o = repo.options[opt.head.seqOfOpt];<br>o.head.issueDate = uint48(block.timestamp);<br> o.body.state = uint8(StateOfOpt.Issued);<br>return o.head.issueDate;<br> }<br>function regOption(<br> Repo storage repo,<br> Option memory opt) public returns(Head memory) {<br>require(opt.head.rate > 0, "OR.IO: ZERO rate");<br>require(opt.head.triggerDate > block.timestamp, "OR.IO: triggerDate not future");<br> require(opt.head.execDays > 0, "OR.IO: ZERO execDays");<br> require(opt.head.closingDays > 0, "OR.IO: ZERO closingDays");<br> require(opt.head.obligor > 0, "OR.IO: ZERO obligor");<br>require(opt.body.rightholder > 0, "OR.IO: ZERO rightholder");<br> require(opt.body.paid > 0, "OR.IO: ZERO paid");<br> require(opt.body.par >= opt.body.paid, "OR.IO: INSUFFICIENT par");<br>opt.head.seqOfOpt = _increaseCounter(repo);<br>repo.seqList.add(opt.head.seqOfOpt);<br>repo.options[opt.head.seqOfOpt] = opt;<br> repo.records[opt.head.seqOfOpt].obligors.add(opt.head.obligor);<br>return opt.head; <br> }<br>function removeOption(<br> Repo storage repo,<br> uint seqOfOpt) public returns (bool flag) {<br>require (<br> repo.options[seqOfOpt].body.state == uint8(StateOfOpt.Pending),<br> "OR.removeOption: wrong state" );<br>if (repo.seqList.remove(seqOfOpt)) {<br> delete repo.options[seqOfOpt];<br> flag = true;<br> }<br> }<br>// ==== Record ====<br>function addObligorIntoOption(Repo storage repo, uint seqOfOpt, uint256 obligor)<br> public returns(bool)<br> {<br> require (obligor > 0, "OR.AOIO: zero obligor"); <br> return repo.records[seqOfOpt].obligors.add(uint40(obligor));<br> }<br>function removeObligorFromOption(Repo storage repo, uint seqOfOpt, uint256 obligor)<br> public returns(bool)<br> {<br> require (obligor > 0, "OR.ROFO: zero obligor"); <br> return repo.records[seqOfOpt].obligors.remove(obligor);<br> }<br>function addObligorsIntoOption(Repo storage repo, uint seqOfOpt, uint256[] memory obligors)<br> public<br> {<br> Record storage rcd = repo.records[seqOfOpt];<br> uint256 len = obligors.length;<br>while (len > 0) {<br> rcd.obligors.add(uint40(obligors[len-1]));<br> len--;<br> }<br> }<br>// ==== ExecOption ====<br>function updateOracle(<br> Repo storage repo,<br> uint256 seqOfOpt,<br> uint d1,<br> uint d2,<br> uint d3) public optExist(repo, seqOfOpt) {<br> repo.records[seqOfOpt].oracles.push(100, d1, d2, d3);<br> }<br>function execOption(<br> Repo storage repo,<br> uint256 seqOfOpt,<br> uint caller) public onlyRightholder(repo, seqOfOpt, caller) {<br> Option storage opt = repo.options[seqOfOpt]; <br> Record storage rcd = repo.records[seqOfOpt];<br>require(<br> opt.body.state == uint8(StateOfOpt.Issued),<br> "OR.EO: wrong state of Opt");<br> require(<br> block.timestamp >= opt.head.triggerDate,<br> "OR.EO: NOT reached TriggerDate");<br>require(<br> block.timestamp < opt.head.triggerDate + uint48(opt.head.execDays) \* 86400,<br> "OR.EO: NOT in exercise period");<br>if (opt.head.typeOfOpt > uint8(TypeOfOpt.PutRoe)) {<br> Checkpoints.Checkpoint memory cp = rcd.oracles.latest();<br>if (opt.cond.logicOpr == uint8(CondsRepo.LogOps.ZeroPoint)) { <br> require(opt.cond.checkSoleCond(cp.paid), <br> "OR.EO: conds not satisfied");<br> } else if (opt.cond.logicOpr <= uint8(CondsRepo.LogOps.NotEqual)) {<br> require(opt.cond.checkCondsOfTwo(cp.paid, cp.par), <br> "OR.EO: conds not satisfied"); <br> } else if (opt.cond.logicOpr <= uint8(CondsRepo.LogOps.NeOr)) {<br> require(opt.cond.checkCondsOfThree(cp.paid, cp.par, cp.points), <br> "OR.EO: conds not satisfied"); <br> } else revert("OR.EO: logical operator overflow");<br> }<br>opt.body.closingDeadline = uint48(block.timestamp) + uint48(opt.head.closingDays) \* 86400;<br> opt.body.state = uint8(StateOfOpt.Executed);<br> }<br>// ==== Brief ====<br>function createSwap(<br> Repo storage repo,<br> uint256 seqOfOpt,<br> uint seqOfTarget,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> uint caller,<br> IRegisterOfShares _ros) public onlyRightholder(repo, seqOfOpt, caller) returns(SwapsRepo.Swap memory swap) {<br>Option storage opt = repo.options[seqOfOpt];<br>require(opt.body.state == uint8(StateOfOpt.Executed), "OR.createSwap: wrong state");<br> require(block.timestamp < opt.body.closingDeadline, "OR.createSwap: option expired");<br>swap.seqOfTarget = uint32(seqOfTarget);<br> swap.paidOfTarget = uint64(paidOfTarget);<br> swap.seqOfPledge = uint32(seqOfPledge);<br> swap.state = uint8(SwapsRepo.StateOfSwap.Issued);<br>Record storage rcd = repo.records[opt.head.seqOfOpt];<br>SharesRepo.Head memory headOfTarget = _ros.getShare(swap.seqOfTarget).head;<br> SharesRepo.Head memory headOfPledge = _ros.getShare(swap.seqOfPledge).head;<br>require(opt.head.classOfShare == headOfTarget.class, <br> "OR.createSwap: wrong target class");<br>require (opt.body.paid >= rcd.swaps.sumPaidOfTarget() + swap.paidOfTarget, <br> "OR.PS: paidOfTarget overflow");<br>if (opt.head.typeOfOpt % 2 == 1) { // Put Option<br>require(opt.body.rightholder == headOfTarget.shareholder, <br> "OR.createSwap: rightholder not targetholder");<br> require(rcd.obligors.contains(headOfPledge.shareholder), <br> "OR.createSwap: pledge shareholder not obligor");<br>swap.isPutOpt = true;<br>} else { // Call Opt<br> require(opt.body.rightholder == headOfPledge.shareholder, <br> "OR.createSwap: pledge shareholder not rightholder");<br>require(rcd.obligors.contains(headOfTarget.shareholder), <br> "OR.createSwap: target shareholder not obligor");<br> }<br>if (opt.head.typeOfOpt % 4 < 2) <br> swap.priceOfDeal = opt.head.rate;<br> else {<br> uint32 ds = uint32(((block.timestamp - headOfTarget.issueDate) + 43200) / 86400);<br> swap.priceOfDeal = uint32(uint(headOfTarget.priceOfPaid) \* (opt.head.rate \* ds + 3650000) / 3650000); <br> }<br>if (opt.head.typeOfOpt % 2 == 1) { <br> swap.paidOfPledge = (swap.priceOfDeal - headOfTarget.priceOfPaid) \* 10000<br> \* swap.paidOfTarget / headOfPledge.priceOfPaid / 10000;<br> }<br>return rcd.swaps.regSwap(swap);<br>}<br>function payOffSwap(<br> Repo storage repo,<br> uint seqOfOpt,<br> uint seqOfSwap<br> // uint msgValue,<br> // uint centPrice) public returns (SwapsRepo.Swap memory) {<br>Option storage opt = repo.options[seqOfOpt];<br>require(opt.body.state == uint8(StateOfOpt.Executed), <br> "OR.payOffSwap: wrong state of Opt");<br> require(block.timestamp < opt.body.closingDeadline, <br> "OR.payOffSwap: option expired");<br>return repo.records[seqOfOpt].swaps.payOffSwap(seqOfSwap);<br> }<br>function terminateSwap(<br> Repo storage repo,<br> uint seqOfOpt,<br> uint seqOfSwap) public returns (SwapsRepo.Swap memory){<br>Option storage opt = repo.options[seqOfOpt];<br>require(opt.body.state == uint8(StateOfOpt.Executed), <br> "OR.terminateSwap: wrong state of Opt");<br> require(block.timestamp >= opt.body.closingDeadline, <br> "OR.terminateSwap: still in closing period");<br>return repo.records[seqOfOpt].swaps.terminateSwap(seqOfSwap);<br> }<br>// ==== Counter ====<br>function _increaseCounter(Repo storage repo) private returns(uint32 seqOfOpt) {<br> repo.options[0].head.seqOfOpt++;<br> seqOfOpt = repo.options[0].head.seqOfOpt;<br> } <br>// ################<br> // ## Read I/O ##<br> // ################<br>// ==== Repo ====<br>function counterOfOptions(Repo storage repo)<br> public view returns (uint32)<br> {<br> return repo.options[0].head.seqOfOpt;<br> }<br>function qtyOfOptions(Repo storage repo)<br> public view returns (uint)<br> {<br> return repo.seqList.length();<br> }<br>function isOption(Repo storage repo, uint256 seqOfOpt) <br> public view returns (bool) <br> {<br> return repo.seqList.contains(seqOfOpt);<br> }<br>function getOption(Repo storage repo, uint256 seqOfOpt) public view <br> optExist(repo, seqOfOpt) returns (OptionsRepo.Option memory option) <br> {<br> option = repo.options[seqOfOpt];<br> }<br>function getAllOptions(Repo storage repo) <br> public view returns (Option[] memory) <br> {<br> uint[] memory ls = repo.seqList.values();<br> uint256 len = ls.length;<br> Option[] memory output = new Option[](len);<br>while (len > 0) {<br> output[len-1] = repo.options[ls[len-1]];<br> len--;<br> }<br> return output;<br> }<br>function isRightholder(Repo storage repo, uint256 seqOfOpt, uint256 acct) <br> public view optExist(repo, seqOfOpt) returns (bool)<br> {<br> return repo.options[seqOfOpt].body.rightholder == acct;<br> }<br>function isObligor(Repo storage repo, uint256 seqOfOpt, uint256 acct) public <br> view optExist(repo, seqOfOpt) returns (bool) <br> {<br> return repo.records[seqOfOpt].obligors.contains(acct);<br> }<br>function getObligorsOfOption(Repo storage repo, uint256 seqOfOpt) public <br> view optExist(repo, seqOfOpt) returns (uint256[] memory)<br> {<br> return repo.records[seqOfOpt].obligors.values();<br> }<br>function getSeqList(Repo storage repo) public view returns(uint[] memory) {<br> return repo.seqList.values();<br> }<br>// ==== Order ====<br>function counterOfSwaps(Repo storage repo, uint256 seqOfOpt)<br> public view returns (uint16)<br> {<br> return repo.records[seqOfOpt].swaps.counterOfSwaps();<br> }<br>function sumPaidOfTarget(Repo storage repo, uint256 seqOfOpt)<br> public view returns (uint64)<br> {<br> return repo.records[seqOfOpt].swaps.sumPaidOfTarget();<br> }<br>function isSwap(Repo storage repo, uint256 seqOfOpt, uint256 seqOfOrder)<br> public view returns (bool)<br> {<br> return repo.records[seqOfOpt].swaps.isSwap(seqOfOrder);<br> }<br>function getSwap(Repo storage repo, uint256 seqOfOpt, uint256 seqOfSwap)<br> public view returns (SwapsRepo.Swap memory)<br> {<br> return repo.records[seqOfOpt].swaps.getSwap(seqOfSwap);<br> }<br>function getAllSwapsOfOption(Repo storage repo, uint256 seqOfOpt)<br> public view returns (SwapsRepo.Swap[] memory)<br> {<br> return repo.records[seqOfOpt].swaps.getAllSwaps();<br> }<br>function allSwapsClosed(Repo storage repo, uint256 seqOfOpt)<br> public view returns (bool)<br> {<br> return repo.records[seqOfOpt].swaps.allSwapsClosed();<br> }<br>// ==== Oracles ====<br>function getOracleAtDate(<br> Repo storage repo, <br> uint256 seqOfOpt, <br> uint date) public view optExist(repo, seqOfOpt) <br> returns (Checkpoints.Checkpoint memory)<br> {<br> return repo.records[seqOfOpt].oracles.getAtDate(date);<br> }<br>function getLatestOracle(Repo storage repo, uint256 seqOfOpt) <br> public view optExist(repo, seqOfOpt) <br> returns(Checkpoints.Checkpoint memory)<br> {<br> return repo.records[seqOfOpt].oracles.latest();<br> }<br>function getAllOraclesOfOption(Repo storage repo, uint256 seqOfOpt)<br> public view optExist(repo, seqOfOpt)<br> returns (Checkpoints.Checkpoint[] memory) <br> {<br> return repo.records[seqOfOpt].oracles.pointsOfHistory();<br> }<br>// function checkValueOfSwap(<br> // Repo storage repo, <br> // uint seqOfOpt, <br> // uint seqOfSwap, <br> // uint centPrice<br> //) public view optExist(repo, seqOfOpt) returns (uint) {<br> // return repo.records[seqOfOpt].swaps.checkValueOfSwap(seqOfSwap, centPrice);<br> // }<br>}<br>|
| [Contents](#toc) |

---

## RolesRepo.sol

---

| |
|:---|
| **contracts/lib/RolesRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \* <br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library RolesRepo {<br>struct Role {<br> address admin;<br> mapping(address => bool) isMember;<br> }<br>struct Repo {<br> mapping(bytes32 => Role) roles;<br> }<br>// ##################<br> // ## Modifier ##<br> // ##################<br>modifier onlyAdmin(<br> Repo storage repo, <br> bytes32 role, <br> address caller) {<br> require(repo.roles[role].admin == caller, <br> "RR.onlyAdmin: not admin");<br> _;<br> }<br>// #################<br> // ## Write ##<br> // #################<br>function setRoleAdmin(<br> Repo storage repo,<br> bytes32 role,<br> address acct) public {<br> repo.roles[role].admin = acct;<br> repo.roles[role].isMember[acct] = true;<br> }<br>function quitRoleAdmin(<br> Repo storage repo,<br> bytes32 role,<br> address caller) public onlyAdmin(repo, role, caller) {<br> delete repo.roles[role].admin;<br> delete repo.roles[role].isMember[caller];<br> }<br>function grantRole(<br> Repo storage repo,<br> bytes32 role,<br> address acct,<br> address caller) public onlyAdmin(repo, role, caller) {<br> repo.roles[role].isMember[acct] = true;<br> }<br>function revokeRole(<br> Repo storage repo,<br> bytes32 role,<br> address acct,<br> address caller) public onlyAdmin(repo, role, caller) {<br> delete repo.roles[role].isMember[acct];<br> }<br>function renounceRole(<br> Repo storage repo,<br> bytes32 role,<br> address caller) public {<br> delete repo.roles[role].isMember[caller];<br> }<br>function abandonRole(<br> Repo storage repo,<br> bytes32 role) public {<br> delete repo.roles[role];<br> }<br>// ###############<br> // ## Read ##<br> // ###############<br>function getRoleAdmin(Repo storage repo, bytes32 role)<br> public view returns (address)<br> {<br> return repo.roles[role].admin;<br> }<br>function hasRole(<br> Repo storage repo,<br> bytes32 role,<br> address acct) public view returns (bool) {<br> return repo.roles[role].isMember[acct];<br> }<br> }<br>|
| [Contents](#toc) |

---

## DocsRepo.sol

---

| |
|:---|
| **contracts/lib/DocsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library DocsRepo {<br>struct Head {<br> uint32 typeOfDoc;<br> uint32 version;<br> uint64 seqOfDoc;<br> uint40 author;<br> uint40 creator;<br> uint48 createDate;<br> }<br>struct Body {<br> uint64 seq;<br> address addr;<br> }<br>struct Doc {<br> Head head;<br> address body;<br> }<br>struct Repo {<br> // typeOfDoc => version => seqOfDoc => Body<br> mapping(uint256 => mapping(uint256 => mapping(uint256 => Body))) bodies;<br> mapping(address => Head) heads;<br> }<br>//##################<br> //## Write I/O ##<br> //##################<br>function snParser(bytes32 sn) public pure returns(Head memory head) {<br> uint _sn = uint(sn);<br>head.typeOfDoc = uint32(_sn >> 224);<br> head.version = uint32(_sn >> 192);<br> head.seqOfDoc = uint64(_sn >> 128);<br> head.author = uint40(_sn >> 88);<br> }<br>function codifyHead(Head memory head) public pure returns(bytes32 sn) {<br> bytes memory _sn = abi.encodePacked(<br> head.typeOfDoc,<br> head.version,<br> head.seqOfDoc,<br> head.author,<br> head.creator,<br> head.createDate); <br> assembly {<br> sn := mload(add(_sn, 0x20))<br> }<br> }<br>function setTemplate(<br> Repo storage repo,<br> uint typeOfDoc, <br> address body,<br> uint author,<br> uint caller) public returns (Head memory head) {<br> head.typeOfDoc = uint32(typeOfDoc);<br> head.author = uint40(author);<br> head.creator = uint40(caller);<br>require(body != address(0), "DR.setTemplate: zero address");<br> require(head.typeOfDoc > 0, "DR.setTemplate: zero typeOfDoc");<br> if (head.typeOfDoc > counterOfTypes(repo))<br> head.typeOfDoc = _increaseCounterOfTypes(repo);<br>require(head.author > 0, "DR.setTemplate: zero author");<br> require(head.creator > 0, "DR.setTemplate: zero creator");<br>head.version = _increaseCounterOfVersions(repo, head.typeOfDoc);<br> head.createDate = uint48(block.timestamp);<br>repo.bodies[head.typeOfDoc][head.version][0].addr = body;<br> repo.heads[body] = head;<br> }<br>function createDoc(<br> Repo storage repo, <br> bytes32 snOfDoc,<br> address creator) public returns (Doc memory doc)<br> {<br> doc.head = snParser(snOfDoc);<br> doc.head.creator = uint40(uint160(creator));<br>require(doc.head.typeOfDoc > 0, "DR.createDoc: zero typeOfDoc");<br> require(doc.head.version > 0, "DR.createDoc: zero version");<br> // require(doc.head.creator > 0, "DR.createDoc: zero creator");<br>address temp = repo.bodies[doc.head.typeOfDoc][doc.head.version][0].addr;<br> require(temp != address(0), "DR.createDoc: template not ready");<br>doc.head.author = repo.heads[temp].author;<br> doc.head.seqOfDoc = _increaseCounterOfDocs(repo, doc.head.typeOfDoc, doc.head.version); <br> doc.head.createDate = uint48(block.timestamp);<br>doc.body = _createClone(temp);<br>repo.bodies[doc.head.typeOfDoc][doc.head.version][doc.head.seqOfDoc].addr = doc.body;<br> repo.heads[doc.body] = doc.head;<br>}<br>function transferIPR(<br> Repo storage repo,<br> uint typeOfDoc,<br> uint version,<br> uint transferee,<br> uint caller ) public {<br> require (caller == getAuthor(repo, typeOfDoc, version),<br> "DR.transferIPR: not author");<br> repo.heads[repo.bodies[typeOfDoc][version][0].addr].author = uint40(transferee);<br> }<br>function _increaseCounterOfTypes(Repo storage repo) <br> private returns(uint32) <br> {<br> repo.bodies[0][0][0].seq++;<br> return uint32(repo.bodies[0][0][0].seq);<br> }<br>function _increaseCounterOfVersions(<br> Repo storage repo, <br> uint256 typeOfDoc) private returns(uint32) {<br> repo.bodies[typeOfDoc][0][0].seq++;<br> return uint32(repo.bodies[typeOfDoc][0][0].seq);<br> }<br>function _increaseCounterOfDocs(<br> Repo storage repo, <br> uint256 typeOfDoc, <br> uint256 version) private returns(uint64) {<br> repo.bodies[typeOfDoc][version][0].seq++;<br> return repo.bodies[typeOfDoc][version][0].seq;<br> }<br>// ==== CloneFactory ====<br>/\*<br> The MIT License (MIT)<br> Copyright (c) 2018 Murray Software, LLC.<br> Permission is hereby granted, free of charge, to any person obtaining<br> a copy of this software and associated documentation files (the<br> "Software"), to deal in the Software without restriction, including<br> without limitation the rights to use, copy, modify, merge, publish,<br> distribute, sublicense, and/or sell copies of the Software, and to<br> permit persons to whom the Software is furnished to do so, subject to<br> the following conditions:<br> The above copyright notice and this permission notice shall be included<br> in all copies or substantial portions of the Software.<br> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS<br> OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.<br> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY<br> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,<br> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE<br> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br> \*/<br> //solhint-disable max-line-length<br> //solhint-disable no-inline-assembly<br>function _createClone(address temp) private returns (address result) {<br> bytes20 tempBytes = bytes20(temp);<br> assembly {<br> let clone := mload(0x40)<br> mstore(<br> clone,<br> 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)<br> mstore(add(clone, 0x14), tempBytes)<br> mstore(<br> add(clone, 0x28),<br> 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)<br> result := create(0, clone, 0x37)<br> }<br> }<br>function _isClone(address temp, address query)<br> private view returns (bool result)<br> {<br> bytes20 tempBytes = bytes20(temp);<br> assembly {<br> let clone := mload(0x40)<br> mstore(<br> clone,<br> 0x363d3d373d3d3d363d7300000000000000000000000000000000000000000000)<br> mstore(add(clone, 0xa), tempBytes)<br> mstore(<br> add(clone, 0x1e),<br> 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)<br>let other := add(clone, 0x40)<br> extcodecopy(query, other, 0, 0x2d)<br> result := and(<br> eq(mload(clone), mload(other)),<br> eq(mload(add(clone, 0xd)), mload(add(other, 0xd))))<br> }<br> }<br>//##################<br> //## read I/O ##<br> //##################<br>function counterOfTypes(Repo storage repo) public view returns(uint32) {<br> return uint32(repo.bodies[0][0][0].seq);<br> }<br>function counterOfVersions(Repo storage repo, uint typeOfDoc) public view returns(uint32) {<br> return uint32(repo.bodies[uint32(typeOfDoc)][0][0].seq);<br> }<br>function counterOfDocs(Repo storage repo, uint typeOfDoc, uint version) public view returns(uint64) {<br> return repo.bodies[uint32(typeOfDoc)][uint32(version)][0].seq;<br> }<br>function getAuthor(<br> Repo storage repo,<br> uint typeOfDoc,<br> uint version) public view returns(uint40) {<br> address temp = repo.bodies[typeOfDoc][version][0].addr;<br> require(temp != address(0), "getAuthor: temp not exist");<br>return repo.heads[temp].author;<br> }<br>function getAuthorByBody(<br> Repo storage repo,<br> address body) public view returns(uint40) {<br> Head memory head = getHeadByBody(repo, body);<br> return getAuthor(repo, head.typeOfDoc, head.version);<br> }<br>function docExist(Repo storage repo, address body) public view returns(bool) {<br> Head memory head = repo.heads[body];<br> if (body == address(0) <br> \|\| head.typeOfDoc == 0 <br> \|\| head.version == 0 <br> \|\| head.seqOfDoc == 0) return false;<br>return repo.bodies[head.typeOfDoc][head.version][head.seqOfDoc].addr == body;<br> }<br>function getHeadByBody(<br> Repo storage repo,<br> address body) public view returns (Head memory) {<br> return repo.heads[body];<br> }<br>function getDoc(<br> Repo storage repo,<br> bytes32 snOfDoc) public view returns(Doc memory doc) {<br> doc.head = snParser(snOfDoc);<br>doc.body = repo.bodies[doc.head.typeOfDoc][doc.head.version][doc.head.seqOfDoc].addr;<br> doc.head = repo.heads[doc.body];<br> }<br>function getVersionsList(<br> Repo storage repo,<br> uint typeOfDoc) public view returns(Doc[] memory)<br> {<br> uint32 len = counterOfVersions(repo, typeOfDoc);<br> Doc[] memory out = new Doc[](len);<br>while (len > 0) {<br> Head memory head;<br> head.typeOfDoc = uint32(typeOfDoc);<br> head.version = len;<br>out[len - 1] = getDoc(repo, codifyHead(head));<br> len--;<br> }<br>return out;<br> }<br>function getDocsList(<br> Repo storage repo,<br> bytes32 snOfDoc) public view returns(Doc[] memory) {<br> Head memory head = snParser(snOfDoc);<br>uint64 len = counterOfDocs(repo, head.typeOfDoc, head.version);<br> Doc[] memory out = new Doc[](len);<br>while (len > 0) {<br> head.seqOfDoc = len;<br> out[len - 1] = getDoc(repo, codifyHead(head));<br> len--;<br> }<br>return out;<br> }<br>function verifyDoc(<br> Repo storage repo, <br> bytes32 snOfDoc) public view returns(bool) {<br> Head memory head = snParser(snOfDoc);<br>address temp = repo.bodies[head.typeOfDoc][head.version][0].addr;<br> address target = repo.bodies[head.typeOfDoc][head.version][head.seqOfDoc].addr;<br>return _isClone(temp, target);<br> }<br>}<br>|
| [Contents](#toc) |

---

## InvestorsRepo.sol

---

| |
|:---|
| **contracts/lib/InvestorsRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>library InvestorsRepo {<br>enum StateOfInvestor {<br> Pending,<br> Approved,<br> Revoked<br> }<br>struct Investor {<br> uint40 userNo;<br> uint40 groupRep;<br> uint48 regDate;<br> uint40 verifier;<br> uint48 approveDate;<br> uint32 data;<br> uint8 state;<br> bytes32 idHash;<br> }<br>struct Repo {<br> mapping(uint256 => Investor) investors;<br> uint[] investorsList;<br> }<br>//################<br> //## Modifier ##<br> //################<br>modifier investorExist(<br> Repo storage repo,<br> uint acct) {<br> require(isInvestor(repo, acct),<br> "OR.investorExist: not");<br> _;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== Investor ====<br>function regInvestor(<br> Repo storage repo,<br> uint userNo,<br> uint groupRep,<br> bytes32 idHash) public {<br> require(idHash != bytes32(0), <br> "OR.regInvestor: zero idHash");<br>uint40 user = uint40(userNo);<br>require(user > 0,<br> "OR.regInvestor: zero userNo");<br>Investor storage investor = repo.investors[user];<br>investor.userNo = user;<br> investor.groupRep = uint40(groupRep);<br> investor.idHash = idHash;<br>if (!isInvestor(repo, userNo)) {<br> repo.investorsList.push(user);<br> investor.regDate = uint48(block.timestamp);<br> } else {<br> if (investor.state == uint8(StateOfInvestor.Approved))<br> _decreaseQtyOfInvestors(repo);<br> investor.state = uint8(StateOfInvestor.Pending);<br> }<br> }<br>function approveInvestor(<br> Repo storage repo,<br> uint acct,<br> uint verifier) public investorExist(repo, acct) {<br>Investor storage investor = repo.investors[acct];<br>require(investor.state != uint8(StateOfInvestor.Approved),<br> "OR,apprInv: wrong state");<br>investor.verifier = uint40(verifier);<br> investor.approveDate = uint48(block.timestamp);<br> investor.state = uint8(StateOfInvestor.Approved);<br>_increaseQtyOfInvestors(repo);<br> }<br>function revokeInvestor(<br> Repo storage repo,<br> uint acct,<br> uint verifier) public {<br>Investor storage investor = repo.investors[acct];<br>require(investor.state == uint8(StateOfInvestor.Approved),<br> "OR,revokeInvestor: wrong state");<br>investor.verifier = uint40(verifier);<br> investor.approveDate = uint48(block.timestamp);<br> investor.state = uint8(StateOfInvestor.Revoked);<br>_decreaseQtyOfInvestors(repo);<br> }<br>function _increaseQtyOfInvestors(<br> Repo storage repo) private {<br> repo.investors[0].verifier++;<br> }<br>function _decreaseQtyOfInvestors(<br> Repo storage repo) private {<br> repo.investors[0].verifier--;<br> }<br>function restoreRepo(<br> Repo storage repo, Investor[] memory list, uint qtyOfInvestors) public { <br> uint len = list.length;<br> uint i = 0;<br> while (i < len) {<br> Investor memory investor = list[i];<br> repo.investors[investor.userNo] = investor;<br> repo.investorsList.push(investor.userNo);<br> i++;<br> }<br> repo.investors[0].verifier = uint40(qtyOfInvestors);<br> }<br>//################<br> //## Read I/O ##<br> //################<br>// ==== Investor ====<br>function isInvestor(<br> Repo storage repo,<br> uint acct) public view returns(bool) {<br> return repo.investors[acct].regDate > 0;<br> }<br>function getInvestor(<br> Repo storage repo,<br> uint acct) public view investorExist(repo, acct) returns(Investor memory) {<br> return repo.investors[acct];<br> }<br>function getQtyOfInvestors(<br> Repo storage repo) public view returns(uint) {<br> return repo.investors[0].verifier;<br> }<br>function investorList(<br> Repo storage repo) public view returns(uint[] memory) {<br> return repo.investorsList;<br> }<br>function investorInfoList(<br> Repo storage repo) public view returns(Investor[] memory list) {<br> uint[] memory seqList = repo.investorsList;<br> uint len = seqList.length;<br>list = new Investor[](len);<br>while (len > 0) {<br> list[len - 1] = repo.investors[seqList[len - 1]];<br> len--;<br> }<br>return list;<br> }<br>} |
| [Contents](#toc) |

---

## LinksRepo.sol

---

| |
|:---|
| **contracts/lib/LinksRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../comps/books/rom/IRegisterOfMembers.sol";<br> import "../comps/books/ros/IRegisterOfShares.sol";<br>import "./DealsRepo.sol";<br> import "./RulesParser.sol";<br> import "./SharesRepo.sol";<br>library LinksRepo {<br> using EnumerableSet for EnumerableSet.UintSet;<br> using RulesParser for bytes32;<br>enum TriggerTypeOfAlongs {<br> NoConditions,<br> ControlChanged,<br> ControlChangedWithHigherPrice,<br> ControlChangedWithHigherROE<br> }<br>struct Link {<br> RulesParser.LinkRule linkRule;<br> EnumerableSet.UintSet followersList;<br> }<br>struct Repo {<br> // dragger => Link<br> mapping(uint256 => Link) links;<br> EnumerableSet.UintSet draggersList;<br> }<br>modifier draggerExist(Repo storage repo, uint dragger, IRegisterOfMembers _rom) {<br> require(isDragger(repo, dragger, _rom), "LR.mf.draggerExist: not");<br> _;<br> }<br>// ###############<br> // ## Write I/O ##<br> // ###############<br>function addDragger(Repo storage repo, bytes32 rule, uint256 dragger, IRegisterOfMembers _rom) public {<br> uint40 groupRep = _rom.groupRep(dragger);<br> if (repo.draggersList.add(groupRep))<br> repo.links[groupRep].linkRule = rule.linkRuleParser();<br> }<br>function removeDragger(Repo storage repo, uint256 dragger) public {<br> if (repo.draggersList.remove(dragger))<br> delete repo.links[dragger];<br> }<br>function addFollower(Repo storage repo, uint256 dragger, uint256 follower) public {<br> repo.links[dragger].followersList.add(uint40(follower));<br> }<br>function removeFollower(Repo storage repo, uint256 dragger, uint256 follower) public {<br> repo.links[dragger].followersList.remove(follower);<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>function isDragger(Repo storage repo, uint256 dragger, IRegisterOfMembers _rom) <br> public view returns (bool) <br> {<br> uint40 groupRep = _rom.groupRep(dragger);<br> return repo.draggersList.contains(groupRep);<br> }<br>function getLinkRule(Repo storage repo, uint256 dragger, IRegisterOfMembers _rom) <br> public view draggerExist(repo, dragger, _rom)<br> returns (RulesParser.LinkRule memory) <br> {<br> uint40 groupRep = _rom.groupRep(dragger);<br> return repo.links[groupRep].linkRule;<br> }<br>function isFollower(<br> Repo storage repo, <br> uint256 dragger, <br> uint256 follower,<br> IRegisterOfMembers _rom) public view draggerExist(repo, dragger, _rom) <br> returns (bool) <br> {<br> uint40 groupRep = _rom.groupRep(dragger);<br> return repo.links[groupRep].followersList.contains(uint40(follower));<br> }<br>function getDraggers(Repo storage repo) public view returns (uint256[] memory) {<br> return repo.draggersList.values();<br> }<br>function getFollowers(Repo storage repo, uint256 dragger, IRegisterOfMembers _rom) <br> public view draggerExist(repo, dragger, _rom) returns (uint256[] memory) <br> {<br> uint40 groupRep = _rom.groupRep(dragger);<br> return repo.links[groupRep].followersList.values();<br> }<br>function priceCheck(<br> Repo storage repo,<br> DealsRepo.Deal memory deal,<br> IRegisterOfShares _ros,<br> IRegisterOfMembers _rom) public view returns (bool) {<br>RulesParser.LinkRule memory lr = <br> getLinkRule(repo, deal.head.seller, _rom);<br>if (lr.triggerType == uint8(TriggerTypeOfAlongs.ControlChangedWithHigherPrice)) <br> return (deal.head.priceOfPaid >= lr.rate);<br>SharesRepo.Share memory share = <br> _ros.getShare(deal.head.seqOfShare);<br>if (lr.triggerType == uint8(TriggerTypeOfAlongs.ControlChangedWithHigherROE))<br> return (_roeOfDeal(<br> deal.head.priceOfPaid, <br> share.head.priceOfPaid, <br> deal.head.closingDeadline, <br> share.head.issueDate) >= lr.rate);<br>return true;<br> }<br>function _roeOfDeal(<br> uint dealPrice,<br> uint issuePrice,<br> uint closingDeadline,<br> uint issueDateOfShare) private pure returns (uint roe) {<br> require(dealPrice > issuePrice, "ROE: NEGATIVE selling price");<br> require(closingDeadline > issueDateOfShare, "ROE: NEGATIVE holding period");<br>roe = (dealPrice - issuePrice) \* 31536 \* 10 \*\* 7 / issuePrice / (closingDeadline - issueDateOfShare);<br> }<br> }<br>|
| [Contents](#toc) |

---

## DelegateMap.sol

---

| |
|:---|
| **contracts/lib/DelegateMap.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../comps/books/rom/IRegisterOfMembers.sol";<br> import "../comps/books/rod/IRegisterOfDirectors.sol";<br>library DelegateMap {<br>struct LeavesInfo {<br> uint64 weight;<br> uint32 emptyHead;<br> }<br>struct Voter {<br> uint40 delegate;<br> uint64 weight;<br> uint64 repWeight;<br> uint32 repHead;<br> uint[] principals;<br> }<br>struct Map {<br> mapping(uint256 => Voter) voters;<br> }<br>// #################<br> // ## Write ##<br> // #################<br>function entrustDelegate(<br> Map storage map,<br> uint principal,<br> uint delegate,<br> uint weight) public returns (bool flag) {<br> require(principal != 0, "DM.ED: zero principal");<br> require(delegate != 0, "DM.ED: zero delegate");<br> require(principal != delegate,"DM.ED: self delegate");<br>if (map.voters[principal].delegate == 0 && <br> map.voters[delegate].delegate == 0) <br> {<br> Voter storage p = map.voters[principal];<br> Voter storage d = map.voters[delegate];<br>p.delegate = uint40(delegate);<br> p.weight = uint64(weight);<br>d.repHead += (p.repHead + 1);<br> d.repWeight += (p.repWeight + p.weight);<br>d.principals.push(uint40(principal));<br> _consolidatePrincipals(p.principals, d);<br>flag = true;<br> }<br> }<br>function _consolidatePrincipals(uint[] memory principals, Voter storage d) private {<br> uint len = principals.length;<br>while (len > 0) {<br> d.principals.push(principals[len-1]);<br> len--;<br> } <br> }<br>// #################<br> // ## Read ##<br> // #################<br>function getDelegateOf(Map storage map, uint acct)<br> public<br> view<br> returns (uint d)<br> {<br> while (acct > 0) {<br> d = acct;<br> acct = map.voters[d].delegate;<br> }<br> }<br>function updateLeavesWeightAtDate(Map storage map, uint256 acct, uint baseDate, IRegisterOfMembers _rom)<br> public<br> {<br> LeavesInfo memory info;<br> Voter storage voter = map.voters[acct];<br>uint[] memory leaves = voter.principals;<br> uint256 len = leaves.length;<br>while (len > 0) {<br> uint64 w = _rom.votesAtDate(leaves[len-1], baseDate);<br> if (w > 0) {<br> info.weight += w;<br> } else {<br> info.emptyHead++;<br> }<br> len--;<br> }<br>voter.weight = _rom.votesAtDate(acct, baseDate);<br> voter.repWeight = info.weight;<br> voter.repHead = uint32(leaves.length) - info.emptyHead;<br> }<br>function updateLeavesHeadcountOfDirectors(Map storage map, uint256 acct, IRegisterOfDirectors _rod) <br> public <br> {<br> uint[] memory leaves = map.voters[acct].principals;<br> uint256 len = leaves.length;<br>uint32 repHead;<br> while (len > 0) {<br> if (_rod.isDirector(leaves[len-1])) repHead++;<br> len--;<br> }<br>map.voters[acct].repHead = repHead;<br> }<br> }<br>|
| [Contents](#toc) |

---

## LockersRepo.sol

---

| |
|:---|
| **contracts/lib/LockersRepo.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./EnumerableSet.sol";<br>library LockersRepo {<br> using EnumerableSet for EnumerableSet.Bytes32Set;<br>struct Head {<br> uint40 from;<br> uint40 to;<br> uint48 expireDate;<br> uint128 value;<br> }<br> struct Body {<br> address counterLocker;<br> bytes payload;<br> }<br> struct Locker {<br> Head head;<br> Body body;<br> }<br>struct Repo {<br> // hashLock => locker<br> mapping (bytes32 => Locker) lockers;<br> EnumerableSet.Bytes32Set snList;<br> }<br>//#################<br> //## Write ##<br> //#################<br>function headSnParser(bytes32 sn) public pure returns (Head memory head) {<br> uint _sn = uint(sn);<br>head = Head({<br> from: uint40(_sn >> 216),<br> to: uint40(_sn >> 176),<br> expireDate: uint48(_sn >> 128),<br> value: uint128(_sn)<br> });<br> }<br>function codifyHead(Head memory head) public pure returns (bytes32 headSn) {<br> bytes memory _sn = abi.encodePacked(<br> head.from,<br> head.to,<br> head.expireDate,<br> head.value);<br> assembly {<br> headSn := mload(add(_sn, 0x20))<br> }<br> }<br>function lockPoints(<br> Repo storage repo,<br> Head memory head,<br> bytes32 hashLock) public {<br> Body memory body;<br> lockConsideration(repo, head, body, hashLock); <br> }<br>function lockConsideration(<br> Repo storage repo,<br> Head memory head,<br> Body memory body,<br> bytes32 hashLock) public { <br> if (repo.snList.add(hashLock)) { <br> Locker storage locker = repo.lockers[hashLock]; <br> locker.head = head;<br> locker.body = body;<br> } else revert ("LR.lockConsideration: occupied");<br> }<br>function pickupPoints(<br> Repo storage repo,<br> bytes32 hashLock,<br> string memory hashKey,<br> uint caller) public returns(Head memory head) {<br>bytes memory key = bytes(hashKey);<br>require(hashLock == keccak256(key),<br> "LR.pickupPoints: wrong key");<br>Locker storage locker = repo.lockers[hashLock];<br>require(block.timestamp < locker.head.expireDate, <br> "LR.pickupPoints: locker expired");<br>bool flag = true;<br>if (locker.body.counterLocker != address(0)) {<br> require(locker.head.to == caller, <br> "LR.pickupPoints: wrong caller");<br>uint len = key.length;<br> bytes memory zero = new bytes(32 - (len % 32));<br>bytes memory payload = abi.encodePacked(locker.body.payload, len, key, zero);<br> (flag,) = locker.body.counterLocker.call(payload);<br> }<br>if (flag) {<br> head = locker.head;<br> delete repo.lockers[hashLock];<br> repo.snList.remove(hashLock);<br> }<br> }<br>function withdrawDeposit(<br> Repo storage repo,<br> bytes32 hashLock,<br> uint256 caller) public returns(Head memory head) {<br>Locker memory locker = repo.lockers[hashLock];<br>require(block.timestamp >= locker.head.expireDate, <br> "LR.withdrawDeposit: locker not expired");<br>require(locker.head.from == caller, <br> "LR.withdrawDeposit: wrong caller");<br>if (repo.snList.remove(hashLock)) {<br> head = locker.head;<br> delete repo.lockers[hashLock];<br> } else revert ("LR.withdrawDeposit: locker not exist");<br> }<br>//#################<br> //## Read ##<br> //#################<br>function getHeadOfLocker(<br> Repo storage repo,<br> bytes32 hashLock) public view returns (Head memory head) {<br> return repo.lockers[hashLock].head;<br> }<br>function getLocker(<br> Repo storage repo,<br> bytes32 hashLock) public view returns (Locker memory) {<br> return repo.lockers[hashLock];<br> }<br>function getSnList(<br> Repo storage repo) public view returns (bytes32[] memory) {<br> return repo.snList.values();<br> }<br> }<br>|
| [Contents](#toc) |

---

## USDKeeper.sol

---

| |
|:---|
| **contracts/comps/USDKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./common/access/AccessControl.sol";<br> import "./IUSDKeeper.sol";<br>// _gk.getKeeper(15)<br> contract USDKeeper is IUSDKeeper, AccessControl {<br>// ---- Keeper ----<br>function isKeeper(address msgSender) external view returns(bool) {<br>if (msgSender == address(_gk)) {<br> return true;<br> }<br>uint i = 1;<br> address keeper = _gk.getKeeper(i);<br>while(keeper != address(0)) {<br> if (keeper == msgSender) {<br> return true;<br> }<br> i++;<br> keeper = _gk.getKeeper(i);<br> }<br>return false;<br> }<br>// ---- API ----<br>function payInCapital(ICashier.TransferAuth memory auth, uint seqOfShare, uint paid) external {<br> IUsdROMKeeper(_gk.getKeeper(11)).payInCapital(auth, seqOfShare, paid, msg.sender);<br> }<br>function payOffApprovedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal, address to) external {<br> IUsdROAKeeper(_gk.getKeeper(12)).payOffApprovedDeal(<br> auth, ia, seqOfDeal, to, msg.sender);<br> }<br>// ---- UsdLOO ----<br>function placeInitialOffer(<br> uint classOfShare,uint execHours, uint paid,<br> uint price,uint seqOfLR) external {<br> IUsdLOOKeeper(_gk.getKeeper(13)).placeInitialOffer(<br> msg.sender, classOfShare, execHours,<br> paid, price, seqOfLR);<br> }<br>function withdrawInitialOffer(<br> uint classOfShare, uint seqOfOrder, uint seqOfLR) external {<br> IUsdLOOKeeper(_gk.getKeeper(13)).withdrawInitialOffer(<br> msg.sender, classOfShare, seqOfOrder, seqOfLR);<br> }<br>function placeSellOrder(<br> uint seqOfClass, uint execHours, uint paid,<br> uint price, uint seqOfLR) external {<br> IUsdLOOKeeper(_gk.getKeeper(13)).placeSellOrder(<br> msg.sender, seqOfClass, execHours, paid,<br> price, seqOfLR );<br> }<br>function withdrawSellOrder(<br> uint classOfShare, uint seqOfOrder) external {<br> IUsdLOOKeeper(_gk.getKeeper(13)).withdrawSellOrder(<br> msg.sender, classOfShare, seqOfOrder);<br> }<br>function placeBuyOrder(<br> ICashier.TransferAuth memory auth, uint classOfShare, <br> uint paid, uint price, uint execHours) external {<br> IUsdLOOKeeper(_gk.getKeeper(13)).placeBuyOrder(<br> auth, msg.sender, classOfShare, paid, price, execHours);<br> }<br>function placeMarketBuyOrder(<br> ICashier.TransferAuth memory auth, uint classOfShare, <br> uint paid, uint execHours) external{<br> IUsdLOOKeeper(_gk.getKeeper(13)).placeMarketBuyOrder(<br> auth, msg.sender, classOfShare, paid, execHours);<br> }<br>function withdrawBuyOrder(<br> uint classOfShare, uint seqOfOrder) external {<br> IUsdLOOKeeper(_gk.getKeeper(13)).withdrawBuyOrder(<br> msg.sender, classOfShare, seqOfOrder);<br> }<br>// ---- UsdROO ----<br>function payOffSwap(<br> ICashier.TransferAuth memory auth, uint256 seqOfOpt, uint256 seqOfSwap, address to) external {<br> IUsdROOKeeper(_gk.getKeeper(14)).payOffSwap(<br> auth, seqOfOpt, seqOfSwap, to, msg.sender);<br> }<br>function payOffRejectedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal, uint seqOfSwap, address to) external {<br> IUsdROOKeeper(_gk.getKeeper(14)).payOffRejectedDeal(<br> auth, ia, seqOfDeal, seqOfSwap, to, msg.sender);<br> }<br>// ---- RegInvestor ----<br>function regInvestor(address bKey, uint groupRep, bytes32 idHash) external {<br> ILOOKeeper(_gk.getKeeper(10)).regInvestor(<br> msg.sender, bKey, groupRep, idHash);<br> }<br>} |
| [Contents](#toc) |

---

## GeneralKeeper.sol

---

| |
|:---|
| **contracts/comps/GeneralKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* v0.2.5<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./common/access/RoyaltyCharge.sol";<br> import "./IGeneralKeeper.sol";<br>contract GeneralKeeper is IGeneralKeeper, RoyaltyCharge {<br> using Address for address;<br>CompInfo private _info;<br>mapping(uint256 => address) private _books;<br> mapping(uint256 => address) private _keepers;<br> mapping(uint256 => uint256) private _coffers;<br>modifier isNormal() {<br> require(_info.state == 0, "GK: deprecated");<br> _;<br> }<br>// ######################<br> // ## AccessControl ##<br> // ######################<br>function setCompInfo (<br> uint8 _currency,<br> bytes19 _symbol,<br> string memory _name) external onlyDK {<br> _info.currency = _currency;<br> _info.symbol = _symbol;<br> _info.name = _name;<br> }<br>function createCorpSeal() external onlyDK {<br> _rc.regUser();<br> _info.regNum = _rc.getMyUserNo();<br> _info.regDate = uint48(block.timestamp);<br> }<br>function getCompInfo() external view returns(CompInfo memory) {<br> return _info;<br> }<br>function getCompUser() external view onlyOwner returns (UsersRepo.User memory) {<br> return _rc.getUser();<br> }<br>// ---- Keepers ----<br>function regKeeper(<br> uint256 title, <br> address keeper) external onlyDK {<br> _keepers[title] = keeper;<br> emit RegKeeper(title, keeper, msg.sender);<br> }<br>function isKeeper(address caller) external view returns (bool) { <br>uint256 len = 10;<br>while (len > 0) {<br> if (caller == _keepers[len]) return true;<br> len--;<br> }<br> return false;<br> }<br>function getKeeper(uint256 title) external view returns (address) {<br> return _keepers[title];<br> }<br>// ---- Books ----<br>function regBook(uint256 title, address book) external onlyDK {<br> _books[title] = book;<br> emit RegBook(title, book, msg.sender);<br> } <br>function getBook(uint256 title) external view returns (address) {<br> return _books[title];<br> }<br>// ##################<br> // ## ROCKeeper ##<br> // ##################<br>function createSHA(uint version) external {<br> IROCKeeper(_keepers[1]).createSHA(version, msg.sender); <br> }<br>function circulateSHA(address body, bytes32 docUrl, bytes32 docHash) external {<br> IROCKeeper(_keepers[1]).circulateSHA(body, docUrl, docHash, msg.sender); <br> }<br>function signSHA(address sha, bytes32 sigHash) external {<br> IROCKeeper(_keepers[1]).signSHA(sha, sigHash, msg.sender); <br> }<br>function activateSHA(address body) external {<br> IROCKeeper(_keepers[1]).activateSHA(body, msg.sender);<br> }<br>function acceptSHA(bytes32 sigHash) external {<br> IROCKeeper(_keepers[1]).acceptSHA(sigHash, msg.sender); <br> }<br>// ###################<br> // ## RODKeeper ##<br> // ###################<br>function takeSeat(uint256 seqOfMotion, uint256 seqOfPos) external {<br> IRODKeeper(_keepers[2]).takeSeat(seqOfMotion, seqOfPos, msg.sender);<br> }<br>function removeDirector (uint256 seqOfMotion, uint256 seqOfPos) external {<br> IRODKeeper(_keepers[2]).removeDirector(seqOfMotion, seqOfPos, msg.sender); <br> }<br>function takePosition(uint256 seqOfMotion, uint256 seqOfPos) external {<br> IRODKeeper(_keepers[2]).takePosition(seqOfMotion, seqOfPos, msg.sender);<br> }<br>function removeOfficer (uint256 seqOfMotion, uint256 seqOfPos) external {<br> IRODKeeper(_keepers[2]).removeOfficer(seqOfMotion, seqOfPos, msg.sender);<br> }<br>function quitPosition(uint256 seqOfPos) external {<br> IRODKeeper(_keepers[2]).quitPosition(seqOfPos, msg.sender);<br> }<br>// ###################<br> // ## BMMKeeper ##<br> // ###################<br>function nominateOfficer(uint256 seqOfPos, uint candidate) external {<br> IBMMKeeper(_keepers[3]).nominateOfficer(seqOfPos, candidate, msg.sender);<br> }<br>function createMotionToRemoveOfficer(uint256 seqOfPos) external {<br> IBMMKeeper(_keepers[3]).createMotionToRemoveOfficer(seqOfPos, msg.sender);<br> }<br>function createMotionToApproveDoc(uint doc, uint seqOfVR, uint executor) external{<br> IBMMKeeper(_keepers[3]).createMotionToApproveDoc(doc, seqOfVR, executor, msg.sender); <br> }<br>function createAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor) external{<br> IBMMKeeper(_keepers[3]).createAction(seqOfVR, targets, values, params, desHash, executor, msg.sender);<br> }<br>function entrustDelegaterForBoardMeeting(uint256 seqOfMotion, uint delegate) external {<br> IBMMKeeper(_keepers[3]).entrustDelegaterForBoardMeeting(seqOfMotion, delegate, msg.sender); <br> }<br>function proposeMotionToBoard (uint seqOfMotion) external {<br> IBMMKeeper(_keepers[3]).proposeMotionToBoard(seqOfMotion, msg.sender);<br> }<br>function castVote(uint256 seqOfMotion, uint attitude, bytes32 sigHash) external{<br> IBMMKeeper(_keepers[3]).castVote(seqOfMotion, attitude, sigHash, msg.sender);<br> }<br>function voteCounting(uint256 seqOfMotion) external{<br> IBMMKeeper(_keepers[3]).voteCounting(seqOfMotion, msg.sender);<br> }<br>function execAction(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion) external{<br> uint contents = IBMMKeeper(_keepers[3]).execAction(typeOfAction, targets, values, params, desHash, seqOfMotion, msg.sender);<br> _execute(targets, values, params);<br> emit ExecAction(contents);<br> }<br>function _execute(<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params) private {<br> for (uint256 i = 0; i < targets.length; i++) {<br> Address.valuedCallWithNoReturn(targets[i], params[i], values[i]);<br> }<br> }<br>// ###################<br> // ## ROMKeeper ##<br> // ###################<br>function setMaxQtyOfMembers(uint max) external onlyDK {<br> IROMKeeper(_keepers[4]).setMaxQtyOfMembers(max);<br> }<br>function setPayInAmt(uint seqOfShare, uint amt, uint expireDate, bytes32 hashLock) external onlyDK {<br> IROMKeeper(_keepers[4]).setPayInAmt(seqOfShare, amt, expireDate, hashLock);<br> }<br>function requestPaidInCapital(bytes32 hashLock, string memory hashKey) external {<br> IROMKeeper(_keepers[4]).requestPaidInCapital(hashLock, hashKey);<br> }<br>function withdrawPayInAmt(bytes32 hashLock, uint seqOfShare) external onlyDK {<br> IROMKeeper(_keepers[4]).withdrawPayInAmt(hashLock, seqOfShare);<br> }<br>function payInCapital(uint seqOfShare, uint amt) external payable {<br> IROMKeeper(_keepers[4]).payInCapital(seqOfShare, amt, msg.value, msg.sender);<br> }<br>// ###################<br> // ## GMMKeeper ##<br> // ###################<br>function nominateDirector(uint256 seqOfPos, uint candidate) external {<br> IGMMKeeper(_keepers[5]).nominateDirector(seqOfPos, candidate, msg.sender);<br> }<br>function createMotionToRemoveDirector(uint256 seqOfPos) external {<br> IGMMKeeper(_keepers[5]).createMotionToRemoveDirector(seqOfPos, msg.sender);<br> }<br>function proposeDocOfGM(uint doc, uint seqOfVR, uint executor) external {<br> IGMMKeeper(_keepers[5]).proposeDocOfGM(doc, seqOfVR, executor, msg.sender);<br> }<br>function createActionOfGM(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor) external {<br> IGMMKeeper(_keepers[5]).createActionOfGM(<br> seqOfVR,<br> targets,<br> values,<br> params,<br> desHash,<br> executor,<br> msg.sender);<br> }<br>function proposeToDeprecateGK(address payable receiver) external {<br> IGMMKeeper(_keepers[5]).proposeToDeprecateGK(receiver, msg.sender);<br> }<br>function entrustDelegaterForGeneralMeeting(uint256 seqOfMotion, uint delegate) external {<br> IGMMKeeper(_keepers[5]).entrustDelegaterForGeneralMeeting(seqOfMotion, delegate, msg.sender);<br> }<br>function proposeMotionToGeneralMeeting(uint256 seqOfMotion) external{<br> IGMMKeeper(_keepers[5]).proposeMotionToGeneralMeeting(seqOfMotion, msg.sender);<br> }<br>function castVoteOfGM(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash) external {<br> IGMMKeeper(_keepers[5]).castVoteOfGM(seqOfMotion, attitude, sigHash, msg.sender);<br> }<br>function voteCountingOfGM(uint256 seqOfMotion) external {<br> IGMMKeeper(_keepers[5]).voteCountingOfGM(seqOfMotion, msg.sender);<br> }<br>function execActionOfGM(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion) external {<br> uint contents = IGMMKeeper(_keepers[5]).execActionOfGM(<br> seqOfVR,<br> targets,<br> values,<br> params,<br> desHash,<br> seqOfMotion,<br> msg.sender);<br> _execute(targets, values, params);<br> emit ExecAction(contents);<br> }<br>function deprecateGK(address payable receiver, uint seqOfMotion) external {<br> IGMMKeeper(_keepers[5]).deprecateGK(receiver, seqOfMotion, msg.sender);<br>uint balanceOfCBP = _rc.balanceOf(address(this));<br> if (balanceOfCBP > 0) _rc.transfer(receiver, balanceOfCBP);<br>uint balanceOfETH = address(this).balance;<br> if (balanceOfETH > 0) Address.sendValue(receiver, balanceOfETH);<br>_info.state = 1;<br> _info.name = address(receiver).toString();<br> _info.symbol = bytes19("DEPRECATED");<br>emit DeprecateGK(receiver, balanceOfCBP, balanceOfETH);<br> }<br>// ###################<br> // ## ROAKeeper ##<br> // ###################<br>function createIA(uint256 snOfIA) external {<br> IROAKeeper(_keepers[6]).createIA(snOfIA, msg.sender);<br> }<br>function circulateIA(address body, bytes32 docUrl, bytes32 docHash) external {<br> IROAKeeper(_keepers[6]).circulateIA(body, docUrl, docHash, msg.sender);<br> }<br>function signIA(address ia, bytes32 sigHash) external {<br> IROAKeeper(_keepers[6]).signIA(ia, msg.sender, sigHash);<br> }<br>// ======== Deal Closing ========<br>function pushToCoffer(address ia, uint256 seqOfDeal, bytes32 hashLock, uint closingDeadline) <br> external{<br> IROAKeeper(_keepers[6]).pushToCoffer(ia, seqOfDeal, hashLock, closingDeadline, msg.sender);<br> }<br>function closeDeal(address ia, uint256 seqOfDeal, string memory hashKey) <br> external{<br> IROAKeeper(_keepers[6]).closeDeal(ia, seqOfDeal, hashKey);<br> }<br>function issueNewShare(address ia, uint256 seqOfDeal) external{<br> IROAKeeper(_keepers[6]).issueNewShare(ia, seqOfDeal, msg.sender);<br> }<br>function transferTargetShare(address ia, uint256 seqOfDeal) external{<br> IROAKeeper(_keepers[6]).transferTargetShare(ia, seqOfDeal, msg.sender);<br> }<br>function terminateDeal(address ia, uint256 seqOfDeal) external{<br> IROAKeeper(_keepers[6]).terminateDeal(ia, seqOfDeal, msg.sender);<br> }<br>function payOffApprovedDeal(<br> address ia,<br> uint seqOfDeal) external payable {<br> IROAKeeper(_keepers[6]).payOffApprovedDeal(ia, seqOfDeal, msg.value, msg.sender);<br> }<br>// #################<br> // ## ROOKeeper ##<br> // #################<br>function updateOracle(<br> uint256 seqOfOpt,<br> uint d1,<br> uint d2,<br> uint d3) external onlyDK {<br> IROOKeeper(_keepers[7]).updateOracle(seqOfOpt, d1, d2, d3);<br> }<br>function execOption(uint256 seqOfOpt) external{<br> IROOKeeper(_keepers[7]).execOption(seqOfOpt, msg.sender);<br> }<br>function createSwap(<br> uint256 seqOfOpt,<br> uint seqOfTarget,<br> uint paidOfTarget,<br> uint seqOfPledge) external{<br> IROOKeeper(_keepers[7]).createSwap(seqOfOpt, seqOfTarget, paidOfTarget, seqOfPledge, msg.sender);<br> }<br>function payOffSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap) external payable {<br> IROOKeeper(_keepers[7]).payOffSwap(seqOfOpt, seqOfSwap, msg.value, msg.sender);<br> }<br>function terminateSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap) external{<br> IROOKeeper(_keepers[7]).terminateSwap(seqOfOpt, seqOfSwap, msg.sender);<br> }<br>function requestToBuy(address ia, uint seqOfDeal, uint paidOfTarget, uint seqOfPledge) external{<br> IROOKeeper(_keepers[7]).requestToBuy(ia, seqOfDeal, paidOfTarget, seqOfPledge, msg.sender);<br> }<br>function payOffRejectedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap) external payable {<br> IROOKeeper(_keepers[7]).payOffRejectedDeal(ia, seqOfDeal, seqOfSwap, msg.value, msg.sender);<br> }<br>function pickupPledgedShare(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap) external {<br> IROOKeeper(_keepers[7]).pickupPledgedShare(ia, seqOfDeal, seqOfSwap, msg.sender); <br> }<br>// ###################<br> // ## ROPKeeper ##<br> // ###################<br>function createPledge(bytes32 snOfPld, uint paid, uint par, uint guaranteedAmt, uint execDays) external{<br> IROPKeeper(_keepers[8]).createPledge(snOfPld, paid, par, guaranteedAmt, execDays, msg.sender);<br> }<br>function transferPledge(uint256 seqOfShare, uint256 seqOfPld, uint buyer, uint amt) <br> external{<br> IROPKeeper(_keepers[8]).transferPledge(seqOfShare, seqOfPld, buyer, amt, msg.sender);<br> }<br>function refundDebt(uint256 seqOfShare, uint256 seqOfPld, uint amt) external{<br> IROPKeeper(_keepers[8]).refundDebt(seqOfShare, seqOfPld, amt, msg.sender);<br> }<br>function extendPledge(uint256 seqOfShare, uint256 seqOfPld, uint extDays) external{<br> IROPKeeper(_keepers[8]).extendPledge(seqOfShare, seqOfPld, extDays, msg.sender);<br> }<br>function lockPledge(uint256 seqOfShare, uint256 seqOfPld, bytes32 hashLock) external{<br> IROPKeeper(_keepers[8]).lockPledge(seqOfShare, seqOfPld, hashLock, msg.sender);<br> }<br>function releasePledge(uint256 seqOfShare, uint256 seqOfPld, string memory hashKey) external{<br> IROPKeeper(_keepers[8]).releasePledge(seqOfShare, seqOfPld, hashKey);<br> }<br>function execPledge(uint seqOfShare, uint256 seqOfPld, uint buyer, uint groupOfBuyer) external{<br> IROPKeeper(_keepers[8]).execPledge(seqOfShare, seqOfPld, buyer, groupOfBuyer, msg.sender);<br> }<br>function revokePledge(uint256 seqOfShare, uint256 seqOfPld) external{<br> IROPKeeper(_keepers[8]).revokePledge(seqOfShare, seqOfPld, msg.sender);<br> }<br>// ###################<br> // ## SHAKeeper ##<br> // ###################<br>// ======= TagAlong ========<br>function execTagAlong(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> bytes32 sigHash) external{<br> ISHAKeeper(_keepers[9]).execAlongRight(<br> ia,<br> seqOfDeal,<br> false,<br> seqOfShare,<br> paid,<br> par,<br> msg.sender,<br> sigHash);<br> }<br>// ======= DragAlong ========<br>function execDragAlong(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> bytes32 sigHash) external{<br> ISHAKeeper(_keepers[9]).execAlongRight(<br> ia,<br> seqOfDeal,<br> true,<br> seqOfShare,<br> paid,<br> par,<br> msg.sender,<br> sigHash);<br> }<br>function acceptAlongDeal(<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 sigHash) external{<br> ISHAKeeper(_keepers[9]).acceptAlongDeal(ia, seqOfDeal, msg.sender, sigHash);<br> }<br>// ======== AntiDilution ========<br>function execAntiDilution(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> bytes32 sigHash) external{<br> ISHAKeeper(_keepers[9]).execAntiDilution(ia, seqOfDeal, seqOfShare, msg.sender, sigHash);<br> }<br>function takeGiftShares(address ia, uint256 seqOfDeal) external{<br> ISHAKeeper(_keepers[9]).takeGiftShares(ia, seqOfDeal, msg.sender);<br> }<br>// ======== First Refusal ========<br>function execFirstRefusal(<br> uint256 seqOfRule,<br> uint256 seqOfRightholder,<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 sigHash) external{<br> ISHAKeeper(_keepers[9]).execFirstRefusal(seqOfRule, seqOfRightholder, ia, seqOfDeal, msg.sender, sigHash);<br> }<br>function computeFirstRefusal(<br> address ia,<br> uint256 seqOfDeal) external{<br> ISHAKeeper(_keepers[9]).computeFirstRefusal(<br> ia,<br> seqOfDeal,<br> msg.sender);<br> }<br>// ############<br> // ## Fund ##<br> // ############<br>function getCentPrice() external view returns(uint) {<br> return _rc.getCentPriceInWei(_info.currency);<br> }<br>function saveToCoffer(uint acct, uint value, bytes32 reason) external{<br>require(<br> msg.sender == _keepers[4] \|\|<br> msg.sender == _keepers[5] \|\|<br> msg.sender == _keepers[6] \|\|<br> msg.sender == _keepers[7] \|\|<br> msg.sender == _keepers[10], <br> "GK.saveToCoffer: not correct Keeper");<br>require(address(this).balance >= _coffers[0] + value,<br> "GK.saveToCoffer: insufficient Eth");<br>_coffers[acct] += value;<br> _coffers[0] += value;<br>emit SaveToCoffer(acct, value, reason);<br> }<br>function pickupDeposit() external isNormal{<br>uint caller = _msgSender(msg.sender, 18000);<br> uint value = _coffers[caller];<br>if (value > 0) {<br>_coffers[caller] = 0;<br> _coffers[0] -= value;<br>Address.sendValue(payable(msg.sender), value);<br>emit PickupDeposit(msg.sender, caller, value);<br>} else revert("GK.pickupDeposit: no balance");<br> }<br>function releaseCustody(uint from, uint to, uint amt, bytes32 reason) external isNormal {<br>require (msg.sender == _keepers[10], <br> "GK.releaseCustody: wrong Keeper");<br>uint acct = (from << 40) + from; <br>uint value = _coffers[acct];<br> require (value >= amt, "GK.releaseCusotody: insufficient");<br>_coffers[acct] -= amt;<br>if (to > 0) {<br> _coffers[to] += amt;<br> } else {<br> _coffers[0] -= amt;<br> }<br>emit ReleaseCustody(from, to, amt, reason);<br> }<br>function proposeToDistributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor) external{<br> IGMMKeeper(_keepers[5]).proposeToDistributeProfits(<br> amt, <br> expireDate, <br> seqOfVR, <br> executor, <br> msg.sender);<br> }<br>function distributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion) external{<br> IGMMKeeper(_keepers[5]).distributeProfits(<br> amt,<br> expireDate, <br> seqOfMotion,<br> msg.sender);<br>emit DistributeProfits(amt, expireDate, seqOfMotion);<br> }<br>function proposeToTransferFund(<br> bool toBMM,<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor) external{<br> if (toBMM)<br> IBMMKeeper(_keepers[3]).proposeToTransferFund(<br> to, <br> isCBP, <br> amt, <br> expireDate, <br> seqOfVR, <br> executor, <br> msg.sender);<br> else IGMMKeeper(_keepers[5]).proposeToTransferFund(<br> to, <br> isCBP, <br> amt, <br> expireDate, <br> seqOfVR, <br> executor, <br> msg.sender);<br> }<br>function transferFund(<br> bool fromBMM,<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion) external isNormal{<br> if (fromBMM)<br> IBMMKeeper(_keepers[3]).transferFund(<br> to, <br> isCBP, <br> amt, <br> expireDate, <br> seqOfMotion,<br> msg.sender);<br> else IGMMKeeper(_keepers[5]).transferFund(<br> to, <br> isCBP, <br> amt, <br> expireDate, <br> seqOfMotion, <br> msg.sender);<br>if (isCBP)<br> _rc.transfer(to, amt);<br> else {<br> require (address(this).balance >= _coffers[0] + amt,<br> "GK.tf: insufficient balance");<br>Address.sendValue(payable(to), amt);<br> }<br> }<br>receive() external payable {<br> emit ReceivedCash(msg.sender, msg.value);<br> }<br>// #################<br> // ## LOOKeeper ##<br> // #################<br>function regInvestor(uint groupRep, bytes32 idHash) external{<br> ILOOKeeper(_keepers[10]).regInvestor(msg.sender, groupRep, idHash);<br> }<br>function approveInvestor(uint userNo, uint seqOfLR) external{<br> ILOOKeeper(_keepers[10]).approveInvestor(userNo, msg.sender,seqOfLR); <br> }<br>function revokeInvestor(uint userNo, uint seqOfLR) external{<br> ILOOKeeper(_keepers[10]).revokeInvestor(userNo, msg.sender,seqOfLR); <br> }<br>function placeInitialOffer(<br> uint classOfShare,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external{<br> ILOOKeeper(_keepers[10]).placeInitialOffer(<br> msg.sender,<br> classOfShare,<br> execHours,<br> paid,<br> price,<br> seqOfLR);<br> }<br>function withdrawInitialOffer(<br> uint classOfShare,<br> uint seqOfOrder,<br> uint seqOfLR) external{<br> ILOOKeeper(_keepers[10]).withdrawInitialOffer(<br> msg.sender,<br> classOfShare,<br> seqOfOrder,<br> seqOfLR); <br> }<br>function placeSellOrder(<br> uint seqOfClass,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external{<br> ILOOKeeper(_keepers[10]).placeSellOrder(<br> msg.sender,<br> seqOfClass,<br> execHours,<br> paid,<br> price,<br> seqOfLR);<br> }<br>function withdrawSellOrder(<br> uint classOfShare,<br> uint seqOfOrder) external{<br> ILOOKeeper(_keepers[10]).withdrawSellOrder(<br> msg.sender,<br> classOfShare,<br> seqOfOrder); <br> }<br>function placeBuyOrder(uint classOfShare, uint paid, uint price, uint execHours) external payable{<br> ILOOKeeper(_keepers[10]).placeBuyOrder(<br> msg.sender,<br> classOfShare,<br> paid,<br> price,<br> execHours,<br> msg.value);<br> }<br>function withdrawBuyOrder(<br> uint classOfShare,<br> uint seqOfOrder) external {<br> ILOOKeeper(_keepers[10]).withdrawBuyOrder(<br> msg.sender,<br> classOfShare,<br> seqOfOrder); <br> }<br>// ###############<br> // ## Routing ##<br> // ###############<br>function getROC() external view returns (IRegisterOfConstitution) {<br> return IRegisterOfConstitution(_books[1]);<br> }<br>function getSHA() external view returns (IShareholdersAgreement) {<br> return IShareholdersAgreement(IRegisterOfConstitution(_books[1]).pointer());<br> }<br>function getROD() external view returns (IRegisterOfDirectors) {<br> return IRegisterOfDirectors(_books[2]);<br> }<br>function getBMM() external view returns (IMeetingMinutes) {<br> return IMeetingMinutes(_books[3]);<br> }<br>function getROM() external view returns (IRegisterOfMembers) {<br> return IRegisterOfMembers(_books[4]);<br> }<br>function getGMM() external view returns (IMeetingMinutes) {<br> return IMeetingMinutes(_books[5]);<br> }<br>function getROA() external view returns (IRegisterOfAgreements) {<br> return IRegisterOfAgreements(_books[6]);<br> }<br>function getROO() external view returns (IRegisterOfOptions) {<br> return IRegisterOfOptions(_books[7]);<br> }<br>function getROP() external view returns (IRegisterOfPledges) {<br> return IRegisterOfPledges(_books[8]);<br> }<br>function getROS() external view returns (IRegisterOfShares) {<br> return IRegisterOfShares(_books[9]);<br> }<br>function getLOO() external view returns (IListOfOrders) {<br> return IListOfOrders(_books[10]);<br> }<br>// ---- Eth ----<br>function depositOfMine(uint user) external view returns(uint) {<br> return _coffers[user];<br> }<br>function totalDeposits() external view returns(uint) {<br> return _coffers[0];<br> }<br> }<br>|
| [Contents](#toc) |

---

## IUSDKeeper.sol

---

| |
|:---|
| **contracts/comps/IUSDKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./keepers/IUsdROMKeeper.sol";<br> import "./keepers/IUsdROAKeeper.sol";<br> import "./keepers/IUsdLOOKeeper.sol";<br> import "./keepers/IUsdROOKeeper.sol";<br>import "./books/cashier/ICashier.sol";<br>interface IUSDKeeper {<br>function payInCapital(<br> ICashier.TransferAuth memory auth, uint seqOfShare, uint paid) external;<br>function payOffApprovedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal, address to) external;<br>// ---- UsdLOO ----<br>function placeInitialOffer(<br> uint classOfShare,uint execHours, uint paid,<br> uint price,uint seqOfLR) external;<br>function withdrawInitialOffer(<br> uint classOfShare, uint seqOfOrder, uint seqOfLR) external;<br>function placeSellOrder(<br> uint seqOfClass, uint execHours, uint paid,<br> uint price, uint seqOfLR) external;<br>function withdrawSellOrder(<br> uint classOfShare, uint seqOfOrder) external;<br>function placeBuyOrder(<br> ICashier.TransferAuth memory auth, uint classOfShare, uint paid, uint price, uint execHours) external;<br>function placeMarketBuyOrder(<br> ICashier.TransferAuth memory auth, uint classOfShare, uint paid, uint execHours) external;<br>function withdrawBuyOrder(<br> uint classOfShare, uint seqOfOrder) external;<br>// ---- UsdROO ----<br>function payOffSwap(<br> ICashier.TransferAuth memory auth, uint256 seqOfOpt, uint256 seqOfSwap, address to) external;<br>function payOffRejectedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal, uint seqOfSwap, address to) external;<br>// ---- Read I/O ----<br>function isKeeper(address msgSender) external view returns(bool);<br>// ---- Cash Locker ----<br>// function lockUsd(<br> // ICashier.TransferAuth memory auth, address to, uint expireDate, bytes32 lock<br> //) external;<br>// function lockConsideration(<br> // ICashier.TransferAuth memory auth, address to, uint expireDate, <br> // address counterLocker, bytes calldata payload, bytes32 hashLock<br> //) external;<br>// function unlockUsd(bytes32 lock, string memory key) external;<br>// function withdrawUsd(bytes32 lock) external;<br>// ---- RegInvestor ----<br>function regInvestor(address bKey, uint groupRep, bytes32 idHash) external;<br>} |
| [Contents](#toc) |

---

## IGeneralKeeper.sol

---

| |
|:---|
| **contracts/comps/IGeneralKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* V.0.2.4<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./common/components/IMeetingMinutes.sol";<br>import "../lib/UsersRepo.sol";<br> import "../lib/Address.sol";<br>import "./keepers/IROCKeeper.sol";<br> import "./keepers/IRODKeeper.sol";<br> import "./keepers/IBMMKeeper.sol";<br> import "./keepers/IROMKeeper.sol";<br> import "./keepers/IGMMKeeper.sol";<br> import "./keepers/IROAKeeper.sol";<br> import "./keepers/IROOKeeper.sol";<br> import "./keepers/IROPKeeper.sol";<br> import "./keepers/ISHAKeeper.sol";<br> import "./keepers/ILOOKeeper.sol";<br>import "./books/roa/IRegisterOfAgreements.sol";<br> import "./books/roc/IRegisterOfConstitution.sol";<br> import "./books/rod/IRegisterOfDirectors.sol";<br> import "./books/rom/IRegisterOfMembers.sol";<br> import "./books/roo/IRegisterOfOptions.sol";<br> import "./books/rop/IRegisterOfPledges.sol";<br> import "./books/ros/IRegisterOfShares.sol";<br> import "./books/loo/IListOfOrders.sol";<br>interface IGeneralKeeper {<br>struct CompInfo {<br> uint40 regNum;<br> uint48 regDate;<br> uint8 currency;<br> uint8 state;<br> bytes19 symbol;<br> string name;<br> }<br>// ###############<br> // ## Event ##<br> // ###############<br>event RegKeeper(uint indexed title, address indexed keeper, address indexed dk);<br> event RegBook(uint indexed title, address indexed book, address indexed dk);<br> event ExecAction(uint256 indexed contents);<br> event SaveToCoffer(uint indexed acct, uint256 indexed value, bytes32 indexed reason);<br> event PickupDeposit(address indexed to, uint indexed caller, uint indexed amt);<br> event DistributeProfits(uint indexed amt, uint indexed expireDate, uint indexed seqOfMotion);<br> event ReceivedCash(address indexed from, uint indexed amt);<br> event DeprecateGK(address indexed receiver, uint indexed balanceOfCBP, uint indexed balanceOfETH);<br> event ReleaseCustody(uint indexed from, uint indexed to, uint indexed amt, bytes32 reason);<br>// ######################<br> // ## AccessControl ##<br> // ######################<br>function setCompInfo (<br> uint8 _currency,<br> bytes19 _symbol,<br> string memory _name) external;<br>function createCorpSeal() external;<br>function getCompInfo() external view returns(CompInfo memory);<br>function getCompUser() external view returns (UsersRepo.User memory);<br>function regKeeper(uint256 title, address keeper) external;<br>function isKeeper(address caller) external view returns (bool flag);<br>function getKeeper(uint256) external view returns(address keeper);<br>function regBook(uint256 title, address keeper) external;<br>function getBook(uint256 title) external view returns (address);<br>// ##################<br> // ## ROCKeeper ##<br> // ##################<br>function createSHA(uint version) external;<br>function circulateSHA(address body, bytes32 docUrl, bytes32 docHash) external;<br>function signSHA(address sha, bytes32 sigHash) external;<br>function activateSHA(address body) external;<br>function acceptSHA(bytes32 sigHash) external;<br>// ###################<br> // ## RODKeeper ##<br> // ###################<br>function takeSeat(uint256 seqOfMotion, uint256 seqOfPos) external;<br>function removeDirector (uint256 seqOfMotion, uint256 seqOfPos) external;<br>function takePosition(uint256 seqOfMotion, uint256 seqOfPos) external;<br>function removeOfficer (uint256 seqOfMotion, uint256 seqOfPos) external;<br>function quitPosition(uint256 seqOfPos) external;<br>// ###################<br> // ## BMMKeeper ##<br> // ###################<br>function nominateOfficer(uint256 seqOfPos, uint candidate) external;<br>function createMotionToRemoveOfficer(uint256 seqOfPos) external;<br>function createMotionToApproveDoc(uint doc, uint seqOfVR, uint executor) external;<br>function createAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor) external;<br>function entrustDelegaterForBoardMeeting(uint256 seqOfMotion, uint delegate) external;<br>function proposeMotionToBoard (uint seqOfMotion) external;<br>function castVote(uint256 seqOfMotion, uint attitude, bytes32 sigHash) external;<br>function voteCounting(uint256 seqOfMotion) external;<br>function execAction(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion) external;<br>// ###################<br> // ## ROMKeeper ##<br> // ###################<br>function setMaxQtyOfMembers(uint max) external;<br>function setPayInAmt(uint seqOfShare, uint amt, uint expireDate, bytes32 hashLock) external;<br>function requestPaidInCapital(bytes32 hashLock, string memory hashKey) external;<br>function withdrawPayInAmt(bytes32 hashLock, uint seqOfShare) external;<br>function payInCapital(uint seqOfShare, uint amt) external payable;<br>// ###################<br> // ## GMMKeeper ##<br> // ###################<br>function nominateDirector(uint256 seqOfPos, uint candidate) external;<br>function createMotionToRemoveDirector(uint256 seqOfPos) external;<br>function proposeDocOfGM(uint doc, uint seqOfVR, uint executor) external;<br>function createActionOfGM(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor) external;<br>function proposeToDeprecateGK(address payable receiver) external;<br>function entrustDelegaterForGeneralMeeting(uint256 seqOfMotion, uint delegate) external;<br>function proposeMotionToGeneralMeeting(uint256 seqOfMotion) external;<br>function castVoteOfGM(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash) external;<br>function voteCountingOfGM(uint256 seqOfMotion) external;<br>function execActionOfGM(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion) external;<br>function deprecateGK(address payable receiver, uint seqOfMotion) external;<br>// ###################<br> // ## ROAKeeper ##<br> // ###################<br>function createIA(uint256 snOfIA) external;<br>function circulateIA(address body, bytes32 docUrl, bytes32 docHash) external;<br>function signIA(address ia, bytes32 sigHash) external;<br>// ======== Deal Closing ========<br>function pushToCoffer(address ia, uint256 seqOfDeal, bytes32 hashLock, uint closingDeadline) external;<br>function closeDeal(address ia, uint256 seqOfDeal, string memory hashKey) external;<br>function issueNewShare(address ia, uint256 seqOfDeal) external;<br>function transferTargetShare(address ia, uint256 seqOfDeal) external;<br>function terminateDeal(address ia, uint256 seqOfDeal) external;<br>function payOffApprovedDeal(<br> address ia,<br> uint seqOfDeal) external payable;<br>// #################<br> // ## ROOKeeper ##<br> // #################<br>function updateOracle(<br> uint256 seqOfOpt,<br> uint d1,<br> uint d2,<br> uint d3) external;<br>function execOption(uint256 seqOfOpt) external;<br>function createSwap(<br> uint256 seqOfOpt,<br> uint seqOfTarget,<br> uint paidOfTarget,<br> uint seqOfPledge) external;<br>function payOffSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap) external payable;<br>function terminateSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap) external;<br>function requestToBuy(address ia, uint seqOfDeal, uint paidOfTarget, uint seqOfPledge) external;<br>function payOffRejectedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap) external payable;<br>function pickupPledgedShare(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap) external;<br>// ###################<br> // ## ROPKeeper ##<br> // ###################<br>function createPledge(bytes32 snOfPld, uint paid, uint par, uint guaranteedAmt, uint execDays) external;<br>function transferPledge(uint256 seqOfShare, uint256 seqOfPld, uint buyer, uint amt) <br> external;<br>function refundDebt(uint256 seqOfShare, uint256 seqOfPld, uint amt) external;<br>function extendPledge(uint256 seqOfShare, uint256 seqOfPld, uint extDays) external;<br>function lockPledge(uint256 seqOfShare, uint256 seqOfPld, bytes32 hashLock) external;<br>function releasePledge(uint256 seqOfShare, uint256 seqOfPld, string memory hashKey) external;<br>function execPledge(uint seqOfShare, uint256 seqOfPld, uint buyer, uint groupOfBuyer) external;<br>function revokePledge(uint256 seqOfShare, uint256 seqOfPld) external;<br>// ###################<br> // ## SHAKeeper ##<br> // ###################<br>// ======= TagAlong ========<br>function execTagAlong(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> bytes32 sigHash) external;<br>// ======= DragAlong ========<br>function execDragAlong(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> bytes32 sigHash) external;<br>function acceptAlongDeal(<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 sigHash) external;<br>// ======== AntiDilution ========<br>function execAntiDilution(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> bytes32 sigHash) external;<br>function takeGiftShares(address ia, uint256 seqOfDeal) external;<br>// ======== First Refusal ========<br>function execFirstRefusal(<br> uint256 seqOfRule,<br> uint256 seqOfRightholder,<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 sigHash) external;<br>function computeFirstRefusal(<br> address ia,<br> uint256 seqOfDeal) external;<br>// ############<br> // ## Fund ##<br> // ############<br>function getCentPrice() external view returns(uint);<br>function saveToCoffer(uint acct, uint value, bytes32 reason) external;<br>function pickupDeposit() external;<br>function releaseCustody(uint from, uint to, uint amt, bytes32 reason) external; <br>function proposeToDistributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor) external;<br>function distributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion) external; <br>function proposeToTransferFund(<br> bool toBMM,<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor) external;<br>function transferFund(<br> bool fromBMM,<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion) external;<br>// #################<br> // ## LOOKeeper ##<br> // #################<br>function regInvestor(uint groupRep, bytes32 idHash) external;<br>function approveInvestor(uint userNo, uint seqOfLR) external;<br>function revokeInvestor(uint userNo, uint seqOfLR) external;<br>function placeInitialOffer(<br> uint classOfShare,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external;<br>function withdrawInitialOffer(<br> uint classOfShare,<br> uint seqOfOrder,<br> uint seqOfLR) external;<br>function placeSellOrder(<br> uint seqOfClass,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external;<br>function withdrawSellOrder(<br> uint classOfShare,<br> uint seqOfOrder) external; <br>function placeBuyOrder(<br> uint classOfShare, <br> uint paid, <br> uint price,<br> uint execHours ) external payable;<br>function withdrawBuyOrder(<br> uint classOfShare,<br> uint seqOfOrder) external;<br>// ###############<br> // ## Routing ##<br> // ###############<br>function getROC() external view returns (IRegisterOfConstitution);<br>function getSHA() external view returns (IShareholdersAgreement);<br>function getROD() external view returns (IRegisterOfDirectors);<br>function getBMM() external view returns (IMeetingMinutes);<br>function getROM() external view returns (IRegisterOfMembers);<br>function getGMM() external view returns (IMeetingMinutes);<br>function getROA() external view returns (IRegisterOfAgreements);<br>function getROO() external view returns (IRegisterOfOptions);<br>function getROP() external view returns (IRegisterOfPledges);<br>function getROS() external view returns (IRegisterOfShares);<br>function getLOO() external view returns (IListOfOrders);<br>function depositOfMine(uint user) external view returns(uint);<br>function totalDeposits() external view returns(uint);<br> }<br>|
| [Contents](#toc) |

---

## ROOkeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/ROOkeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IROOKeeper.sol";<br>import "../common/access/RoyaltyCharge.sol";<br>contract ROOKeeper is IROOKeeper, RoyaltyCharge {<br>// ##################<br> // ## Option ##<br> // ##################<br>function updateOracle(<br> uint256 seqOfOpt,<br> uint d1,<br> uint d2,<br> uint d3) external onlyDK {<br> _gk.getROO().updateOracle(seqOfOpt, d1, d2, d3);<br> }<br>function execOption(uint256 seqOfOpt, address msgSender)<br> external onlyDK<br> {<br> uint caller = _msgSender(msgSender, 18000);<br>_gk.getROO().execOption(seqOfOpt, caller);<br> }<br>function createSwap(<br> uint256 seqOfOpt,<br> uint seqOfTarget,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>uint closingDate = _gk.getROO().getOption(seqOfOpt).body.closingDeadline;<br>IRegisterOfOptions _roo = _gk.getROO(); <br> IRegisterOfShares _ros = _gk.getROS();<br>require(_ros.notLocked(seqOfTarget, closingDate),<br> "ROOK.CreateSwap: target share locked");<br>require(_ros.notLocked(seqOfPledge, closingDate),<br> "ROOK.CreateSwap: pledged share locked");<br>SwapsRepo.Swap memory swap = <br> _roo.createSwap(seqOfOpt, seqOfTarget, paidOfTarget, seqOfPledge, caller);<br>_ros.decreaseCleanPaid(swap.seqOfTarget, swap.paidOfTarget);<br> if (swap.isPutOpt)<br> _ros.decreaseCleanPaid(swap.seqOfPledge, swap.paidOfPledge); <br> }<br>function payOffSwap(<br> uint256 seqOfOpt, uint256 seqOfSwap, uint msgValue, address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IRegisterOfShares _ros = _gk.getROS();<br>uint centPrice = _gk.getCentPrice();<br>SwapsRepo.Swap memory swap =<br> _gk.getROO().getSwap(seqOfOpt, seqOfSwap);<br>uint valueOfDeal = centPrice \* swap.paidOfTarget \* swap.priceOfDeal / 10 \*\* 6;<br>require(msgValue >= valueOfDeal,<br> "ROOK.payOffSwap: not sufficient msgValue");<br>msgValue -= valueOfDeal;<br>uint seller = _ros.getShare(swap.seqOfTarget).head.shareholder;<br>_gk.saveToCoffer(<br> seller,valueOfDeal, <br> bytes32(0x4465706f736974436f6e73696465726174696f6e4f6653776170000000000000)); // reason: DepositConsiderationOfSwap<br>if (msgValue > 0) {<br> _gk.saveToCoffer(<br> caller, msgValue, <br> bytes32(0x4465706f73697442616c616e63654f6653776170000000000000000000000000)); // reason: DepositBalanceOfSwap<br> }<br>_payOffSwap(seqOfOpt, seqOfSwap, caller);<br> }<br>function payOffSwapInUSD(<br> uint256 seqOfOpt, uint256 seqOfSwap, uint caller) external {<br> require(msg.sender == _gk.getKeeper(14),<br> "ROOK.payOffSwapInUSD: not UsdROOKeeper");<br>_payOffSwap(seqOfOpt, seqOfSwap, caller);<br> }<br>function _payOffSwap(<br> uint seqOfOpt, uint seqOfSwap, uint caller) private {<br>IRegisterOfShares _ros = _gk.getROS();<br>SwapsRepo.Swap memory swap =<br> _gk.getROO().payOffSwap(seqOfOpt, seqOfSwap);<br>require(_ros.notLocked(swap.seqOfTarget, block.timestamp),<br> "ROOK.payOffSwap: target locked");<br>uint buyer = _ros.getShare(swap.seqOfPledge).head.shareholder;<br>require (caller == buyer, "ROOK.payOffSwap: wrong payer");<br>_ros.increaseCleanPaid(swap.seqOfTarget, swap.paidOfTarget);<br> _ros.transferShare(<br> swap.seqOfTarget, swap.paidOfTarget, swap.paidOfTarget, <br> buyer, swap.priceOfDeal, swap.priceOfDeal);<br>if (swap.isPutOpt) {<br> _ros.increaseCleanPaid(swap.seqOfPledge, swap.paidOfPledge);<br> }<br> }<br>function terminateSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000); <br>SwapsRepo.Swap memory swap = <br> _gk.getROO().terminateSwap(seqOfOpt, seqOfSwap);<br>IRegisterOfShares _ros = _gk.getROS();<br> uint seller = _ros.getShare(swap.seqOfTarget).head.shareholder;<br>require (caller == seller, "ROOK.terminateSwap: wrong ");<br>require(_ros.notLocked(swap.seqOfPledge, block.timestamp),<br> "ROOK.terminateSwap: pledge share locked");<br>_ros.increaseCleanPaid(swap.seqOfTarget, swap.paidOfTarget);<br>if(swap.isPutOpt) {<br> _ros.increaseCleanPaid(swap.seqOfPledge, swap.paidOfPledge);<br> _ros.transferShare(swap.seqOfPledge, swap.paidOfPledge, swap.paidOfPledge, <br> seller, swap.priceOfDeal, swap.priceOfDeal);<br> }<br> }<br>// ==== AgainstToBuy ====<br>function requestToBuy(<br> address ia,<br> uint seqOfDeal,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IRegisterOfShares _ros = _gk.getROS();<br>SwapsRepo.Swap memory swap =<br> IInvestmentAgreement(ia).createSwap(_gk.getROA().getFile(ia).head.seqOfMotion, <br> seqOfDeal, paidOfTarget, seqOfPledge, caller);<br>require(_ros.notLocked(swap.seqOfPledge, block.timestamp),<br> "ROOK.requestToBuy: pledge share locked");<br>_ros.decreaseCleanPaid(swap.seqOfTarget, swap.paidOfTarget);<br> _ros.decreaseCleanPaid(swap.seqOfPledge, swap.paidOfPledge);<br> }<br>function payOffRejectedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> uint msgValue,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IRegisterOfShares _ros = _gk.getROS();<br>uint centPrice = _gk.getCentPrice();<br>SwapsRepo.Swap memory swap = <br> IInvestmentAgreement(ia).getSwap(seqOfDeal, seqOfSwap);<br>uint valueOfDeal = <br> centPrice \* swap.paidOfTarget \* swap.priceOfDeal / 10 \*\* 6;<br>require(valueOfDeal <= msgValue, <br> "ROOK.payOffRejectedDeal: insufficient msgValue");<br>uint seller = _ros.getShare(swap.seqOfTarget).head.shareholder;<br>_gk.saveToCoffer(<br> seller, valueOfDeal,<br> bytes32(0x4465706f736974436f6e73696465724f6652656a65637465644465616c000000)); // reason: DepositConsiderOfRejectedDeal<br>msgValue -= valueOfDeal;<br> if (msgValue > 0) {<br> _gk.saveToCoffer(<br> caller, msgValue, <br> bytes32(0x4465706f73697442616c616e63654f6652656a65637465644465616c00000000)); // reason: DepositBalanceOfRejectedDeal<br> }<br>_payOffRejectedDeal(ia, seqOfDeal, seqOfSwap, caller);<br> }<br>function payOffRejectedDealInUSD(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> uint caller) external {<br> require(msg.sender == _gk.getKeeper(14),<br> "ROOK.payOffRejectedDealInUSD: not UsdROOKeeper");<br> _payOffRejectedDeal(ia, seqOfDeal, seqOfSwap, caller);<br> }<br>function _payOffRejectedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> uint caller) private {<br>IRegisterOfShares _ros = _gk.getROS();<br>SwapsRepo.Swap memory swap = <br> IInvestmentAgreement(ia).payOffSwap(seqOfDeal, seqOfSwap);<br>uint seqOfMotion = <br> _gk.getROA().getFile(ia).head.seqOfMotion;<br>MotionsRepo.Motion memory motion = <br> _gk.getGMM().getMotion(seqOfMotion);<br>require(motion.body.state == <br> uint8(MotionsRepo.StateOfMotion.Rejected_ToBuy));<br>require(block.timestamp < motion.body.voteEndDate + <br> uint48(motion.votingRule.execDaysForPutOpt) \* 86400, <br> "DR.payOffSwap: missed deadline");<br>require(_ros.notLocked(swap.seqOfTarget, block.timestamp),<br> "ROOK.payOffRejectedDeal: target locked");<br>_ros.increaseCleanPaid(swap.seqOfTarget, swap.paidOfTarget);<br> _ros.increaseCleanPaid(swap.seqOfPledge, swap.paidOfPledge);<br>uint40 buyer = _ros.getShare(swap.seqOfPledge).head.shareholder;<br>require(caller == buyer, "ROAK.payOffRD: not buyer");<br>_ros.transferShare(swap.seqOfTarget, swap.paidOfTarget, swap.paidOfTarget, <br> buyer, swap.priceOfDeal, swap.priceOfDeal);<br>}<br>function pickupPledgedShare(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IRegisterOfShares _ros = _gk.getROS();<br>SwapsRepo.Swap memory swap = <br> IInvestmentAgreement(ia).terminateSwap(_gk.getROA().getFile(ia).head.seqOfMotion, <br> seqOfDeal, seqOfSwap);<br>uint40 seller = _ros.getShare(swap.seqOfTarget).head.shareholder;<br>require(caller == seller, "ROAK.pickupPledgedShare: not seller");<br>require(_ros.notLocked(swap.seqOfPledge, block.timestamp),<br> "ROOK.pickUpPledged: share locked");<br>_ros.increaseCleanPaid(swap.seqOfTarget, swap.paidOfTarget);<br> _ros.increaseCleanPaid(swap.seqOfPledge, swap.paidOfPledge);<br>_ros.transferShare(swap.seqOfPledge, swap.paidOfPledge, swap.paidOfPledge, seller, swap.priceOfDeal, swap.priceOfDeal);<br>}<br>}<br>|
| [Contents](#toc) |

---

## IROPKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IROPKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../lib/PledgesRepo.sol";<br> import "../../lib/DealsRepo.sol";<br> import "../../lib/DocsRepo.sol";<br> import "../../lib/RulesParser.sol";<br> import "../../lib/InvestorsRepo.sol";<br>interface IROPKeeper {<br>// ###################<br> // ## ROPKeeper ##<br> // ###################<br>function createPledge(<br> bytes32 snOfPld,<br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays,<br> address msgSender) external;<br>function transferPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint buyer,<br> uint amt,<br> address msgSender ) external;<br>function refundDebt(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint amt,<br> address msgSender) external;<br>function extendPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint extDays,<br> address msgSender) external;<br>function lockPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> bytes32 hashLock,<br> address msgSender) external;<br>function releasePledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> string memory hashKey) external;<br>function execPledge(<br> uint seqOfShare,<br> uint256 seqOfPld,<br> uint buyer,<br> uint groupOfBuyer,<br> address msgSender) external;<br>function revokePledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld,<br> address msgSender) external;<br>}<br>|
| [Contents](#toc) |

---

## UsdROAKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/UsdROAKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IUsdROAKeeper.sol";<br>contract UsdROAKeeper is IUsdROAKeeper, RoyaltyCharge {<br>function payOffApprovedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal,<br> address to, address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 58000);<br> IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br> DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>auth.value = (deal.body.paid \* deal.head.priceOfPaid + <br> (deal.body.par - deal.body.paid) \* deal.head.priceOfPar) / 100;<br> auth.from = msgSender;<br>if (deal.head.seqOfShare > 0) {<br> require(deal.head.seller == _msgSender(to, 18000),<br> "UsdROAK.payOffApprDealInUSD: wrong payee");<br>// remark: PayOffShareTransferDeal<br> ICashier(_gk.getBook(11)).forwardUsd(auth, to, bytes32(0x5061794f666653686172655472616e736665724465616c000000000000000000));<br> } else {<br> require(_gk.getBook(11) == to,<br> "UsdROAK.payOffApprDealInUSD: wrong payee");<br>// remark: PayOffCapIncreaseDeal<br> ICashier(_gk.getBook(11)).forwardUsd(auth, to, bytes32(0x5061794f6666436170496e6372656173654465616c0000000000000000000000)); <br> }<br>IROAKeeper(_gk.getKeeper(6)).payOffApprovedDealInUSD(ia, seqOfDeal, auth.value, caller);<br> }<br> } |
| [Contents](#toc) |

---

## SHAKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/SHAKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./ISHAKeeper.sol";<br>contract SHAKeeper is ISHAKeeper, RoyaltyCharge {<br> using RulesParser for bytes32;<br>// ======== TagAlong & DragAlong ========<br>function execAlongRight(<br> address ia,<br> uint256 seqOfDeal,<br> bool dragAlong,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> address msgSender,<br> bytes32 sigHash) external onlyDK {<br>uint caller = _msgSender(msgSender, 88000);<br>IRegisterOfAgreements _roa = _gk.getROA();<br> IRegisterOfShares _ros = _gk.getROS();<br>DealsRepo.Deal memory deal = IInvestmentAgreement(ia).getDeal(seqOfDeal);<br> SharesRepo.Share memory share = _ros.getShare(seqOfShare);<br>require(deal.body.state == uint8(DealsRepo.StateOfDeal.Locked), <br> "SHAK.execAlongs: state not Locked");<br>require(!_roa.isFRClaimer(ia, caller), <br> "SHAK.execAlongs: caller is frClaimer");<br>require(!_roa.isFRClaimer(ia, share.head.shareholder), <br> "SHAK.execAlongs: shareholder is frClaimer");<br>_roa.createMockOfIA(ia);<br>_checkAlongDeal(dragAlong, ia, deal, share, caller, paid, par, _ros.getShare(deal.head.seqOfShare).head.votingWeight);<br>_roa.execAlongRight(ia, dragAlong, seqOfDeal, seqOfShare, paid, par, caller, sigHash);<br> }<br>function _checkAlongDeal(<br> bool dragAlong,<br> address ia,<br> DealsRepo.Deal memory deal,<br> SharesRepo.Share memory share,<br> uint caller,<br> uint paid,<br> uint par,<br> uint subjectVW) private view {<br>IAlongs _al = dragAlong<br> ? IAlongs(_gk.getSHA().<br> getTerm(uint8(IShareholdersAgreement.TitleOfTerm.DragAlong)))<br> : IAlongs(_gk.getSHA().<br> getTerm(uint8(IShareholdersAgreement.TitleOfTerm.TagAlong)));<br>require(<br> _al.isFollower(deal.head.seller, share.head.shareholder),<br> "SHAK.checkAlongs: NOT linked");<br>require(_al.isTriggered(ia, deal), "SHAK.checkAlongs: not triggered");<br>if (dragAlong) {<br> require(caller == deal.head.seller, "SHAK.checkAlongs: not drager");<br> } else {<br> require(caller == share.head.shareholder,<br> "SHAK.checkAlongs: not follower");<br> require(!ISigPage(ia).isBuyer(true, caller),<br> "SHAK.checkAlongs: caller is Buyer");<br> }<br>if(_al.getLinkRule(deal.head.seller).proRata) {<br> IRegisterOfMembers _rom = _gk.getROM();<br>if (_rom.basedOnPar())<br> require (par <= <br> subjectVW \* deal.body.par \* share.body.par / _rom.votesOfGroup(deal.head.seller) / 100 , <br> "SHAKeeper.checkAlong: par overflow");<br> else require (paid <=<br> subjectVW \* deal.body.paid \* share.body.paid / _rom.votesOfGroup(deal.head.seller) / 100,<br> "SHAKeeper.checkAlong: paid overflow");<br> }<br> }<br>function acceptAlongDeal(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender,<br> bytes32 sigHash) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>IRegisterOfAgreements _roa = _gk.getROA();<br> IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>require(caller == deal.body.buyer, "SHAK.AAD: not buyer");<br>DTClaims.Claim[] memory claims = _roa.acceptAlongClaims(ia, seqOfDeal);<br>uint len = claims.length;<br> while(len > 0) {<br> DTClaims.Claim memory claim = claims[len - 1];<br>SharesRepo.Share memory share = <br> _gk.getROS().getShare(claim.seqOfShare);<br>_createAlongDeal(_ia, claim, deal, share);<br>_ia.regSig(share.head.shareholder, claim.sigDate, claim.sigHash);<br> _ia.regSig(caller, uint48(block.timestamp), sigHash);<br>len--;<br> }<br>}<br>function _createAlongDeal(<br> IInvestmentAgreement _ia,<br> DTClaims.Claim memory claim,<br> DealsRepo.Deal memory deal,<br> SharesRepo.Share memory share) private {<br> DealsRepo.Deal memory aDeal;<br> aDeal.head = DealsRepo.Head({<br> typeOfDeal: claim.typeOfClaim == 0 <br> ? uint8(DealsRepo.TypeOfDeal.DragAlong) <br> : uint8(DealsRepo.TypeOfDeal.TagAlong),<br> seqOfDeal: 0,<br> preSeq: deal.head.seqOfDeal,<br> classOfShare: share.head.class,<br> seqOfShare: share.head.seqOfShare,<br> seller: share.head.shareholder,<br> priceOfPaid: deal.head.priceOfPaid,<br> priceOfPar: deal.head.priceOfPar,<br> closingDeadline: deal.head.closingDeadline,<br> votingWeight: share.head.votingWeight<br> });<br>aDeal.body = DealsRepo.Body({<br> buyer: deal.body.buyer,<br> groupOfBuyer: deal.body.groupOfBuyer,<br> paid: claim.paid,<br> par: claim.par,<br> state: uint8(DealsRepo.StateOfDeal.Locked),<br> para: 0,<br> distrWeight: deal.body.distrWeight,<br> flag: false<br> });<br>_ia.regDeal(aDeal);<br>_gk.getROS().decreaseCleanPaid(share.head.seqOfShare, claim.paid);<br> }<br>// ======== AntiDilution ========<br>function execAntiDilution(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> address msgSender,<br> bytes32 sigHash) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>IRegisterOfShares _ros = _gk.getROS();<br> IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>SharesRepo.Share memory tShare = _ros.getShare(seqOfShare);<br>require(caller == tShare.head.shareholder, "SHAK.execAD: not shareholder");<br> require(!_ia.isInitSigner(caller), "SHAK.execAD: is InitSigner");<br>require(_gk.getROA().getHeadOfFile(ia).state == <br> uint8(FilesRepo.StateOfFile.Circulated), "SHAK.execAD: wrong file state");<br>_ia.requestPriceDiff(seqOfDeal, seqOfShare);<br>IAntiDilution _ad = IAntiDilution(_gk.getSHA().getTerm(<br> uint8(IShareholdersAgreement.TitleOfTerm.AntiDilution)));<br>uint64 giftPaid = _ad.getGiftPaid(ia, seqOfDeal, tShare.head.seqOfShare);<br> uint256[] memory obligors = _ad.getObligorsOfAD(tShare.head.class);<br>DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>deal.head.typeOfDeal = uint8(DealsRepo.TypeOfDeal.FreeGift);<br> deal.head.preSeq = deal.head.seqOfDeal;<br> deal.head.seqOfDeal = 0;<br> deal.head.priceOfPar = tShare.head.seqOfShare;<br>deal.body.buyer = tShare.head.shareholder;<br> deal.body.state = uint8(DealsRepo.StateOfDeal.Locked);<br>_deductShares(obligors, _ia, deal, giftPaid, _ros, sigHash);<br>}<br>function _deductShares(<br> uint[] memory obligors,<br> IInvestmentAgreement _ia,<br> DealsRepo.Deal memory deal,<br> uint64 giftPaid,<br> IRegisterOfShares _ros,<br> bytes32 sigHash) private {<br>IRegisterOfMembers _rom = _gk.getROM();<br>deal.body.groupOfBuyer = _rom.groupRep(deal.body.buyer);<br>uint i = obligors.length;<br>while (i > 0) {<br>uint[] memory sharesInHand = _rom.sharesInHand(obligors[i - 1]);<br>uint j = sharesInHand.length;<br>while (j > 0) {<br>if (!_ros.notLocked(sharesInHand[j-1], deal.head.closingDeadline)) {<br> j--;<br> continue;<br> }<br>giftPaid = _createGift(<br> _ia,<br> deal,<br> sharesInHand[j - 1],<br> giftPaid,<br> _ros,<br> sigHash);<br>if (giftPaid == 0) break;<br> j--;<br> }<br>if (giftPaid == 0) break;<br> i--;<br> }<br> }<br>function _createGift(<br> IInvestmentAgreement _ia,<br> DealsRepo.Deal memory deal,<br> uint256 seqOfShare,<br> uint64 giftPaid,<br> IRegisterOfShares _ros,<br> bytes32 sigHash) private returns (uint64 result) { <br> SharesRepo.Share memory cShare = _ros.getShare(seqOfShare);<br>uint64 lockAmount;<br>if (cShare.body.cleanPaid > 0) {<br>lockAmount = (cShare.body.cleanPaid < giftPaid) ? cShare.body.cleanPaid : giftPaid;<br>deal.head.classOfShare = cShare.head.class;<br> deal.head.seqOfShare = cShare.head.seqOfShare;<br> deal.head.seller = cShare.head.shareholder;<br>deal.body.paid = lockAmount;<br> deal.body.par = lockAmount;<br>_ia.regDeal(deal);<br> _ia.regSig(deal.head.seller, uint48(block.timestamp), bytes32(uint(deal.head.seqOfShare)));<br> _ia.regSig(deal.body.buyer, uint48(block.timestamp), sigHash);<br>_ros.decreaseCleanPaid(cShare.head.seqOfShare, lockAmount);<br> }<br> result = giftPaid - lockAmount;<br> }<br>function takeGiftShares(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IRegisterOfShares _ros = _gk.getROS();<br> IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>require(caller == deal.body.buyer, "caller is not buyer");<br> require(_ros.notLocked(deal.head.seqOfShare, block.timestamp),<br> "SHAK.takeGift: share locked");<br>if (_ia.takeGift(seqOfDeal))<br> _gk.getROA().setStateOfFile(ia, uint8(FilesRepo.StateOfFile.Closed));<br>_ros.increaseCleanPaid(deal.head.seqOfShare, deal.body.paid);<br> _ros.transferShare(<br> deal.head.seqOfShare, <br> deal.body.paid, <br> deal.body.par, <br> deal.body.buyer, <br> deal.head.priceOfPaid, <br> deal.head.priceOfPaid);<br>SharesRepo.Share memory tShare = _ros.getShare(deal.head.priceOfPar);<br> if (tShare.head.priceOfPaid > deal.head.priceOfPaid)<br> _ros.updatePriceOfPaid(tShare.head.seqOfShare, deal.head.priceOfPaid);<br> }<br>// ======== FirstRefusal ========<br>function execFirstRefusal(<br> uint256 seqOfFRRule,<br> uint256 seqOfRightholder,<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender,<br> bytes32 sigHash) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>require(!_ia.isSeller(true, caller), <br> "SHAK.EFR: frClaimer is seller");<br>DealsRepo.Head memory headOfDeal = <br> _ia.getDeal(seqOfDeal).head;<br>RulesParser.FirstRefusalRule memory rule = <br> _gk.getSHA().getRule(seqOfFRRule).firstRefusalRuleParser();<br>require(rule.typeOfDeal == headOfDeal.typeOfDeal, <br> "SHAK.EFR: rule and deal are not same type");<br>require(<br> (rule.membersEqual && _gk.getROM().isMember(caller)) \|\| <br> rule.rightholders[seqOfRightholder] == caller,<br> "SHAK.EFR: caller NOT rightholder");<br>_gk.getROA().claimFirstRefusal(ia, seqOfDeal, caller, sigHash);<br>if (_ia.getDeal(seqOfDeal).body.state != <br> uint8(DealsRepo.StateOfDeal.Terminated))<br> _ia.terminateDeal(seqOfDeal); <br> }<br>function computeFirstRefusal(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IRegisterOfMembers _rom = _gk.getROM();<br> IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>(,, bytes32 sigHashOfSeller) = _ia.getSigOfParty(true, deal.head.seller);<br>require(_rom.isMember(caller), "SHAKeeper.computeFR: not member");<br>if (deal.head.seqOfShare != 0) {<br> deal.head.typeOfDeal = uint8(DealsRepo.TypeOfDeal.FirstRefusal);<br> } else deal.head.typeOfDeal = uint8(DealsRepo.TypeOfDeal.PreEmptive);<br>deal.head.preSeq = deal.head.seqOfDeal;<br> deal.body.state = uint8(DealsRepo.StateOfDeal.Locked);<br>FRClaims.Claim[] memory cls = <br> _gk.getROA().computeFirstRefusal(ia, seqOfDeal);<br>uint256 len = cls.length;<br> DealsRepo.Deal memory frDeal;<br> uint paid = deal.body.paid;<br> uint par = deal.body.par;<br> while (len > 0) {<br> frDeal = _createFRDeal(deal, cls[len-1], _rom);<br> if (len > 1) {<br> paid -= frDeal.body.paid;<br> par -= frDeal.body.par;<br> } else {<br> frDeal.body.paid = uint64(paid);<br> frDeal.body.par = uint64(par);<br> }<br> _regFRDeal(_ia, frDeal, cls[len-1], sigHashOfSeller);<br> len--;<br> }<br>}<br>function _createFRDeal(<br> DealsRepo.Deal memory deal,<br> FRClaims.Claim memory cl,<br> IRegisterOfMembers _rom) private view returns(DealsRepo.Deal memory frDeal) {<br>frDeal = deal;<br>frDeal.body.buyer = cl.claimer;<br> frDeal.body.groupOfBuyer = _rom.groupRep(cl.claimer);<br> frDeal.body.paid = (deal.body.paid \* cl.ratio) / 10000;<br> frDeal.body.par = (deal.body.par \* cl.ratio) / 10000;<br> }<br>function _regFRDeal(<br> IInvestmentAgreement _ia,<br> DealsRepo.Deal memory deal,<br> FRClaims.Claim memory cl,<br> bytes32 sigHashOfSeller) private {<br>_ia.regDeal(deal);<br> _ia.regSig(cl.claimer, cl.sigDate, cl.sigHash);<br>if (deal.head.seller > 0)<br> _ia.regSig(deal.head.seller, uint48(block.timestamp), sigHashOfSeller);<br> }<br> }<br>|
| [Contents](#toc) |

---

## IROCKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IROCKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../books/roc/terms/ILockUp.sol";<br> import "../common/components/ISigPage.sol";<br>import "../../lib/OfficersRepo.sol";<br> import "../../lib/RulesParser.sol";<br> import "../../lib/DocsRepo.sol";<br>interface IROCKeeper {<br>// ############<br> // ## SHA ##<br> // ############<br>function createSHA(uint version, address msgSender) external;<br>function circulateSHA(<br> address sha,<br> bytes32 docUrl,<br> bytes32 docHash,<br> address msgSender) external;<br>function signSHA(<br> address sha,<br> bytes32 sigHash,<br> address msgSender) external;<br>function activateSHA(address sha, address msgSender) external;<br>function acceptSHA(bytes32 sigHash, address msgSender) external;<br> }<br>|
| [Contents](#toc) |

---

## IUsdROAKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IUsdROAKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IROAKeeper.sol";<br>import "../books/cashier/ICashier.sol";<br> import "../books/roa/IInvestmentAgreement.sol";<br> import "../books/roc/terms/ILockUp.sol";<br>import "../../lib/InvestorsRepo.sol";<br>interface IUsdROAKeeper{<br>function payOffApprovedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal, <br> address to, address msgSender) external;<br>} |
| [Contents](#toc) |

---

## RODKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/RODKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IRODKeeper.sol";<br>contract RODKeeper is IRODKeeper, RoyaltyCharge { <br>//###############<br> //## Write ##<br> //###############<br>// ==== Directors ====<br>function takeSeat(<br> uint256 seqOfMotion,<br> uint256 seqOfPos,<br> address msgSender ) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>IMeetingMinutes _gmm = _gk.getGMM();<br>require(_gmm.getMotion(seqOfMotion).head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ElectOfficer), <br> "BODK.takeSeat: not a suitable motion");<br>_gmm.execResolution(seqOfMotion, seqOfPos, caller);<br> _gk.getROD().takePosition(seqOfPos, caller);<br> }<br>function removeDirector (<br> uint256 seqOfMotion, <br> uint256 seqOfPos,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IMeetingMinutes _gmm = _gk.getGMM();<br>require(_gmm.getMotion(seqOfMotion).head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.RemoveOfficer), <br> "BODK.removeDirector: not a suitable motion");<br>_gmm.execResolution(seqOfMotion, seqOfPos, caller);<br> _gk.getROD().removeOfficer(seqOfPos);<br> }<br>// ==== Officers ====<br>function takePosition(<br> uint256 seqOfMotion,<br> uint256 seqOfPos,<br> address msgSender ) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>IMeetingMinutes _bmm = _gk.getBMM();<br>require(_bmm.getMotion(seqOfMotion).head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ElectOfficer), <br> "BODK.takePos: not a suitable motion");<br>_bmm.execResolution(seqOfMotion, seqOfPos, caller);<br> _gk.getROD().takePosition(seqOfPos, caller);<br> }<br>function removeOfficer (<br> uint256 seqOfMotion, <br> uint256 seqOfPos,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IMeetingMinutes _bmm = _gk.getBMM();<br>require(_bmm.getMotion(seqOfMotion).head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.RemoveOfficer), <br> "BODK.removeOfficer: not a suitable motion");<br>_bmm.execResolution(seqOfMotion, seqOfPos, caller);<br> _gk.getROD().removeOfficer(seqOfPos); <br> }<br>// ==== Quit ====<br>function quitPosition(uint256 seqOfPos, address msgSender)<br> external onlyDK <br> {<br> uint caller = _msgSender(msgSender, 18000);<br> _gk.getROD().quitPosition(seqOfPos, caller);<br> }<br>}<br>|
| [Contents](#toc) |

---

## UsdROMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/UsdROMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IUsdROMKeeper.sol";<br>contract UsdROMKeeper is IUsdROMKeeper, RoyaltyCharge {<br>function payInCapital(<br> ICashier.TransferAuth memory auth,<br> uint seqOfShare, <br> uint paid, <br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 36000);<br> IRegisterOfShares _ros = _gk.getROS();<br> SharesRepo.Share memory share = _ros.getShare(seqOfShare);<br>require(share.head.shareholder == caller,<br> "UsdROMK.payInCap: not shareholder");<br>auth.from = msgSender;<br> auth.value = share.head.priceOfPaid \* paid / 100;<br>ICashier(_gk.getBook(11)).collectUsd(auth);<br>_ros.payInCapital(seqOfShare, paid);<br>emit PayInCapital(seqOfShare, paid, auth.value);<br> }<br>} |
| [Contents](#toc) |

---

## ROCKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/ROCKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IROCKeeper.sol";<br>contract ROCKeeper is IROCKeeper, RoyaltyCharge {<br> using RulesParser for bytes32;<br> using ArrayUtils for uint[];<br>// #############<br> // ## SHA ##<br> // #############<br>function createSHA(<br> uint version, <br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 18000);<br>require(_gk.getROM().isMember(caller), "not MEMBER");<br>bytes32 snOfDoc = bytes32((uint256(uint8(IRegCenter.TypeOfDoc.SHA)) << 224) +<br> uint224(version << 192)); <br>DocsRepo.Doc memory doc = _rc.createDoc(snOfDoc, msgSender);<br>IAccessControl(doc.body).initKeepers(<br> address(this),<br> address(_gk));<br>IShareholdersAgreement(doc.body).initDefaultRules();<br>_gk.getROC().regFile(DocsRepo.codifyHead(doc.head), doc.body);<br> }<br>function circulateSHA(<br> address sha,<br> bytes32 docUrl,<br> bytes32 docHash,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>require(ISigPage(sha).isParty(caller), "NOT Party of Doc");<br>require(IDraftControl(sha).isFinalized(), <br> "BOHK.CSHA: SHA not finalized");<br>IShareholdersAgreement _sha = IShareholdersAgreement(sha);<br>_sha.circulateDoc();<br>uint16 signingDays = _sha.getSigningDays();<br> uint16 closingDays = _sha.getClosingDays();<br>RulesParser.VotingRule memory vr = address(_gk.getSHA()) == address(0) <br> ? _sha.getRule(8).votingRuleParser()<br> : _gk.getSHA().getRule(8).votingRuleParser();<br>_gk.getROC().circulateFile(sha, signingDays, closingDays, vr, docUrl, docHash);<br> }<br>// ======== Sign SHA ========<br>function signSHA(<br> address sha,<br> bytes32 sigHash,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>require(ISigPage(sha).isParty(caller), "NOT Party of Doc");<br>require(<br> _gk.getROC().getHeadOfFile(sha).state == uint8(FilesRepo.StateOfFile.Circulated),<br> "SHA not in Circulated State");<br>ISigPage(sha).signDoc(true, caller, sigHash);<br> }<br>function _membersAllSigned(<br> IRegisterOfMembers _rom,<br> IShareholdersAgreement _sha) view private returns (bool) {<br> uint[] memory members = _rom.membersList();<br> uint[] memory parties = _sha.getParties();<br>if (parties.length == 0 \|\| parties.length != members.length) {<br> return false;<br> }<br>return members.fullyCoveredBy(parties);<br> }<br>function activateSHA(address sha, address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>require(ISigPage(sha).isParty(caller), "NOT Party of Doc");<br>IRegisterOfConstitution _roc = _gk.getROC();<br> IRegisterOfMembers _rom = _gk.getROM();<br>require(sha != address(0), "ROCK.actSHA: zero sha");<br> IShareholdersAgreement _sha = IShareholdersAgreement(sha);<br>uint seqOfMotion = _roc.getHeadOfFile(sha).seqOfMotion;<br>if (seqOfMotion > 0) {<br> _gk.getGMM().execResolution(<br> seqOfMotion,<br> uint(uint160(sha)),<br> caller);<br> _roc.execFile(sha);<br> } else if (_membersAllSigned(_rom, _sha)) {<br> _roc.setStateOfFile(sha, uint8(FilesRepo.StateOfFile.Closed));<br> }<br>_roc.changePointer(sha);<br>RulesParser.GovernanceRule memory gr = <br> _sha.getRule(0).governanceRuleParser();<br>if (_rom.maxQtyOfMembers() != gr.maxQtyOfMembers)<br> _rom.setMaxQtyOfMembers(gr.maxQtyOfMembers);<br>_rom.setVoteBase(gr.basedOnPar);<br>if (_rom.minVoteRatioOnChain() != gr.minVoteRatioOnChain)<br> _rom.setMinVoteRatioOnChain(gr.minVoteRatioOnChain);<br>if (_sha.hasTitle(uint8(IShareholdersAgreement.TitleOfTerm.Options))) <br> _regOptionTerms(_sha);<br>_updatePositionSetting(_sha);<br> _updateGrouping(_sha);<br> }<br>function _regOptionTerms(IShareholdersAgreement _sha) private {<br> address opts = _sha.getTerm(uint8(IShareholdersAgreement.TitleOfTerm.Options));<br> _gk.getROO().regOptionTerms(opts);<br> }<br>function _updatePositionSetting(IShareholdersAgreement _sha) private {<br> IRegisterOfDirectors _rod = _gk.getROD();<br>uint256 len = _sha.getRule(256).positionAllocateRuleParser().qtyOfSubRule;<br> uint256 i;<br> while (i < len) {<br> RulesParser.PositionAllocateRule memory rule = <br> _sha.getRule(256+i).positionAllocateRuleParser();<br>if (rule.removePos) {<br> _rod.removePosition(rule.seqOfPos);<br> } else {<br> OfficersRepo.Position memory pos = _rod.getPosition(rule.seqOfPos);<br> pos = OfficersRepo.Position({<br> title: rule.titleOfPos,<br> seqOfPos: rule.seqOfPos,<br> acct: pos.acct,<br> nominator: rule.nominator,<br> startDate: pos.startDate,<br> endDate: rule.endDate,<br> seqOfVR: rule.seqOfVR,<br> titleOfNominator: rule.titleOfNominator,<br> argu: rule.argu<br> });<br>_rod.updatePosition(pos);<br> }<br>i++;<br> } <br> }<br>function _updateGrouping(IShareholdersAgreement _sha) private {<br> IRegisterOfMembers _rom = _gk.getROM();<br>uint256 len = _sha.getRule(768).groupUpdateOrderParser().qtyOfSubRule;<br> uint256 i;<br>while (i < len) {<br> RulesParser.GroupUpdateOrder memory order = <br> _sha.getRule(768+i).groupUpdateOrderParser();<br>uint256 j; <br> if (order.addMember) {<br> while (j < 4) {<br> if (order.members[j] > 0)<br> _rom.addMemberToGroup(order.members[j], order.groupRep);<br> j++;<br> }<br> } else {<br> while (j < 4) {<br> if (order.members[j] > 0)<br> _rom.removeMemberFromGroup(order.members[j]);<br> j++;<br> }<br> }<br>i++;<br> } <br> }<br>function acceptSHA(bytes32 sigHash, address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>IShareholdersAgreement _sha = _gk.getSHA();<br> _sha.addBlank(false, true, 1, caller);<br> _sha.signDoc(false, caller, sigHash);<br> }<br> }<br>|
| [Contents](#toc) |

---

## IRODKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IRODKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../books/rod/IRegisterOfDirectors.sol";<br>interface IRODKeeper {<br>// ==== Directors ====<br>function takeSeat(<br> uint256 seqOfMotion,<br> uint256 seqOfPos,<br> address msgSender ) external;<br>function removeDirector (<br> uint256 seqOfMotion, <br> uint256 seqOfPos,<br> address msgSender) external;<br>// ==== Officers ====<br>function takePosition(<br> uint256 seqOfMotion,<br> uint256 seqOfPos,<br> address msgSender ) external;<br>function removeOfficer (<br> uint256 seqOfMotion, <br> uint256 seqOfPos,<br> address msgSender) external;<br>// ==== Quit ====<br>function quitPosition(uint256 seqOfPos, address msgSender) external;<br>}<br>|
| [Contents](#toc) |

---

## IUsdLOOKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IUsdLOOKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../books/cashier/ICashier.sol";<br> import "../books/loo/IUsdListOfOrders.sol";<br>import "../../lib/SharesRepo.sol";<br> import "../../lib/UsdOrdersRepo.sol";<br> import "../../lib/InvestorsRepo.sol";<br>interface IUsdLOOKeeper {<br>//###############<br> //## Write ##<br> //###############<br>function placeInitialOffer(<br> address msgSender, uint classOfShare,uint execHours, <br> uint paid, uint price, uint seqOfLR) external;<br>function withdrawInitialOffer(<br> address msgSender, uint classOfShare, uint seqOfOrder, uint seqOfLR ) external;<br>function placeSellOrder(<br> address msgSender, uint seqOfClass, uint execHours, <br> uint paid, uint price, uint seqOfLR) external;<br>function withdrawSellOrder(<br> address msgSender, uint classOfShare, uint seqOfOrder) external;<br>function placeBuyOrder(<br> ICashier.TransferAuth memory auth, address msgSender, <br> uint classOfShare, uint paid, uint price, uint execHours) external;<br>function placeMarketBuyOrder(<br> ICashier.TransferAuth memory auth, address msgSender, <br> uint classOfShare, uint paid, uint execHours) external;<br>function withdrawBuyOrder(<br> address msgSender, uint classOfShare, uint seqOfOrder) external;<br>}<br>|
| [Contents](#toc) |

---

## IROOKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IROOKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../lib/SwapsRepo.sol";<br>interface IROOKeeper {<br>// #################<br> // ## ROOKeeper ##<br> // #################<br>function updateOracle(<br> uint256 seqOfOpt,<br> uint d1,<br> uint d2,<br> uint d3) external;<br>function execOption(uint256 seqOfOpt, address msgSender)external;<br>function createSwap(<br> uint256 seqOfOpt,<br> uint seqOfTarget,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> address msgSender) external;<br>function payOffSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap,<br> uint msgValue,<br> address msgSender) external;<br>function payOffSwapInUSD(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap, <br> uint caller) external;<br>function terminateSwap(<br> uint256 seqOfOpt, <br> uint256 seqOfSwap,<br> address msgSender) external;<br>// ==== Swap ====<br>function requestToBuy(<br> address ia,<br> uint seqOfDeal,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> address msgSender) external;<br>function payOffRejectedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> uint msgValue,<br> address msgSender) external;<br>function payOffRejectedDealInUSD(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> uint caller) external;<br>function pickupPledgedShare(<br> address ia,<br> uint seqOfDeal,<br> uint seqOfSwap,<br> address msgSender) external;<br>}<br>|
| [Contents](#toc) |

---

## IUsdROMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IUsdROMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../books/cashier/ICashier.sol";<br>interface IUsdROMKeeper {<br>event PayInCapital(<br> uint indexed seqOfShare, uint indexed paid, uint indexed valueOfDeal);<br>function payInCapital(<br> ICashier.TransferAuth memory auth, uint seqOfShare, uint paid, address msgSender) external;<br>} |
| [Contents](#toc) |

---

## ROPKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/ROPKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IROPKeeper.sol";<br>contract ROPKeeper is IROPKeeper, RoyaltyCharge {<br> using PledgesRepo for bytes32;<br>// ###################<br> // ## ROPKeeper ##<br> // ###################<br>function _pledgerIsVerified(<br> uint pledgor) private view {<br> require (_gk.getLOO().getInvestor(pledgor).state == <br> uint8(InvestorsRepo.StateOfInvestor.Approved), <br> "ROPK.pledgorIsVerified: not");<br> }<br>function createPledge(<br> bytes32 snOfPld,<br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 66000);<br>IRegisterOfShares _ros = _gk.getROS();<br>PledgesRepo.Head memory head = snOfPld.snParser();<br>head.pledgor = _ros.getShare(head.seqOfShare).head.shareholder;<br>require(head.pledgor == caller, "BOPK.createPld: NOT shareholder");<br>require(_ros.notLocked(head.seqOfShare, block.timestamp),<br> "ROPK.createPledge: target share locked");<br>head = _gk.getROP().createPledge(<br> snOfPld,<br> paid,<br> par,<br> guaranteedAmt,<br> execDays);<br>_ros.decreaseCleanPaid(head.seqOfShare, paid);<br> }<br>function transferPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint buyer,<br> uint amt,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br> _gk.getROP().transferPledge(seqOfShare, seqOfPld, buyer, amt, caller);<br> }<br>function refundDebt(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint amt,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000); <br>PledgesRepo.Pledge memory pld = <br> _gk.getROP().refundDebt(seqOfShare, seqOfPld, amt, caller);<br>_gk.getROS().increaseCleanPaid(seqOfShare, pld.body.paid);<br> }<br>function extendPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint extDays,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br> _gk.getROP().extendPledge(seqOfShare, seqOfPld, extDays, caller); <br> }<br>function lockPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> bytes32 hashLock,<br> address msgSender) external onlyDK { <br> uint caller = _msgSender(msgSender, 58000);<br> _gk.getROP().lockPledge(seqOfShare, seqOfPld, hashLock, caller); <br> }<br>function releasePledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> string memory hashKey) external onlyDK {<br> uint64 paid = _gk.getROP().releasePledge(seqOfShare, seqOfPld, hashKey);<br> _gk.getROS().increaseCleanPaid(seqOfShare, paid);<br> }<br>function execPledge(<br> uint seqOfShare,<br> uint256 seqOfPld,<br> uint buyer,<br> uint groupOfBuyer,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>_pledgerIsVerified(buyer);<br>IRegisterOfPledges _rop = _gk.getROP();<br> _rop.execPledge(seqOfShare, seqOfPld, caller);<br>PledgesRepo.Pledge memory pld = <br> _rop.getPledge(seqOfShare, seqOfPld);<br>IRegisterOfShares _ros = _gk.getROS();<br> IRegisterOfMembers _rom = _gk.getROM();<br>require(_ros.notLocked(pld.head.seqOfShare, block.timestamp),<br> "ROPK.createPledge: share locked");<br>DealsRepo.Deal memory deal;<br>deal.head.priceOfPaid = uint32(pld.body.guaranteedAmt \* 10000 / pld.body.paid);<br> deal.head.priceOfPar = uint32(pld.body.guaranteedAmt \* 10000 / pld.body.par);<br>deal.body.buyer = uint40(buyer);<br> deal.body.groupOfBuyer = uint40(groupOfBuyer);<br>_ros.increaseCleanPaid(pld.head.seqOfShare, pld.body.paid);<br> _ros.transferShare(pld.head.seqOfShare, pld.body.paid, pld.body.par, <br> deal.body.buyer, deal.head.priceOfPaid, deal.head.priceOfPar);<br>if (deal.body.buyer != deal.body.groupOfBuyer && <br> deal.body.groupOfBuyer != _rom.groupRep(deal.body.buyer)) {<br> _rom.addMemberToGroup(deal.body.buyer, deal.body.groupOfBuyer);<br> }<br>}<br>function revokePledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IRegisterOfPledges _rop = _gk.getROP();<br>PledgesRepo.Pledge memory pld = _rop.getPledge(seqOfShare, seqOfPld);<br> require(pld.head.pledgor == caller, "BOPK.RP: not pledgor");<br>_rop.revokePledge(seqOfShare, seqOfPld, caller);<br> _gk.getROS().increaseCleanPaid(seqOfShare, pld.body.paid); <br>}<br> }<br>|
| [Contents](#toc) |

---

## UsdLOOKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/UsdLOOKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IUsdLOOKeeper.sol";<br>contract UsdLOOKeeper is IUsdLOOKeeper, RoyaltyCharge {<br> using RulesParser for bytes32;<br>//###############<br> //## Write ##<br> //###############<br>function _cashier() private view returns(ICashier) {<br> return ICashier(_gk.getBook(11));<br> }<br>function _looInUSD() private view returns(IUsdListOfOrders) {<br> return IUsdListOfOrders(_gk.getBook(13));<br> }<br>// ==== Offers ====<br>function placeInitialOffer(<br> address msgSender, uint classOfShare, uint execHours, <br> uint paid, uint price, uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IRegisterOfShares _ros = _gk.getROS();<br>RulesParser.ListingRule memory lr = <br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(_gk.getROD().hasTitle(caller, lr.titleOfIssuer),<br> "LOOKUSD.placeIO: not entitled");<br>require(lr.classOfShare == classOfShare,<br> "LOOKUSD.placeIO: wrong class");<br>require(uint32(price) >= lr.floorPrice,<br> "LOOKUSD.placeIO: lower than floor");<br>require(lr.ceilingPrice == 0 \|\|<br> uint32(price) <= lr.ceilingPrice,<br> "LOOKUSD.placeIO: higher than ceiling");<br>require (_ros.getInfoOfClass(classOfShare).body.cleanPaid +<br> paid <= uint64(lr.maxTotalPar) \* 10000, "LOOKUSD.placeIO: paid overflow");<br>_ros.increaseEquityOfClass(true, classOfShare, 0, 0, paid);<br>UsdOrdersRepo.Deal memory input;<br>input.classOfShare = uint16(classOfShare);<br> input.votingWeight = lr.votingWeight;<br> input.distrWeight = lr.distrWeight;<br> input.paid = uint64(paid);<br> input.price = uint32(price);<br> input.seller = uint40(caller);<br> input.isOffer = true;<br>_placeSellOrder(input,execHours);<br> }<br>function _placeSellOrder(<br> UsdOrdersRepo.Deal memory input, uint execHours) private {<br>(UsdOrdersRepo.Deal[] memory deals,<br> uint lenOfDeals, <br> GoldChain.Order[] memory expired, <br> uint lenOfExpired,<br> UsdOrdersRepo.Deal memory offer) = <br> _looInUSD().placeSellOrder(input, execHours);<br>if (lenOfDeals > 0) _closeDeals(deals, lenOfDeals, true);<br> if (lenOfExpired > 0) _restoreExpiredOrders(expired, lenOfExpired);<br> if (offer.price == 0 && offer.paid > 0) {<br> GoldChain.Order memory balance;<br> balance.data.classOfShare = offer.classOfShare;<br> balance.data.seqOfShare = offer.seqOfShare;<br> balance.data.pubKey = offer.to;<br> balance.node.paid = offer.paid;<br> _restoreOrder(balance);<br> }<br> }<br>function _eightToSix(uint amt) private pure returns(uint) {<br> return amt / 100;<br> }<br>function _closeDeals(UsdOrdersRepo.Deal[] memory deals, uint len, bool isOffer) private {<br>IRegisterOfShares _ros = _gk.getROS(); <br> IRegisterOfMembers _rom = _gk.getROM();<br>while (len > 0) {<br>UsdOrdersRepo.Deal memory deal = deals[len - 1];<br> len--;<br>if (deal.seqOfShare > 0) {<br>if (!_ros.notLocked(deal.seqOfShare, block.timestamp)) {<br> continue;<br> }<br>if (isOffer) {<br> // CloseOfferAgainstBid<br> _cashier().releaseUsd(<br> deal.from, deal.to, <br> _eightToSix(deal.consideration), <br> bytes32(0x436c6f73654f66666572416761696e7374426964000000000000000000000000));<br>} else { <br> // CloseBidAgainstOffer<br> _cashier().releaseUsd(<br> deal.from, deal.to, <br> _eightToSix(deal.consideration), <br> bytes32(0x436c6f7365426964416761696e73744f66666572000000000000000000000000));<br>}<br>_ros.increaseCleanPaid(deal.seqOfShare, deal.paid);<br> _ros.transferShare(<br> deal.seqOfShare,<br> deal.paid,<br> deal.paid,<br> deal.buyer,<br> deal.price,<br> 0);<br>} else {<br>if (isOffer) {<br> // remark: CloseInitOfferAgainstBid<br> _cashier().releaseUsd(<br> deal.from, <br> _gk.getBook(11),<br> _eightToSix(deal.consideration),<br> bytes32(0x436c6f7365496e69744f66666572416761696e73744269640000000000000000));<br>} else {<br> // remark: CloseBidAgainstInitOffer<br> _cashier().releaseUsd(<br> deal.from, <br> _gk.getBook(11),<br> _eightToSix(deal.consideration),<br> bytes32(0x436c6f7365426964416761696e7374496e69744f666665720000000000000000));<br>}<br>SharesRepo.Share memory share;<br>share.head = SharesRepo.Head({<br> class: deal.classOfShare,<br> seqOfShare: 0,<br> preSeq: 0,<br> issueDate: 0,<br> shareholder: deal.buyer,<br> priceOfPaid: deal.price,<br> priceOfPar: 0,<br> votingWeight: deal.votingWeight,<br> argu: 0<br> });<br>share.body = SharesRepo.Body({<br> payInDeadline: uint48(block.timestamp + 86400),<br> paid: deal.paid,<br> par: deal.paid,<br> cleanPaid: deal.paid,<br> distrWeight: deal.distrWeight<br> });<br>_ros.addShare(share);<br> }<br>if (deal.groupRep != deal.buyer && <br> deal.groupRep != _rom.groupRep(deal.buyer)) {<br> _rom.addMemberToGroup(deal.buyer, deal.groupRep);<br> }<br> }<br>}<br>function _restoreOrder(GoldChain.Order memory order) private {<br>if (order.node.isOffer) {<br> IRegisterOfShares _ros = _gk.getROS();<br> if (order.data.seqOfShare > 0) {<br> _ros.increaseCleanPaid(order.data.seqOfShare, order.node.paid);<br> } else {<br> _ros.increaseEquityOfClass(false, order.data.classOfShare, 0, 0, order.node.paid);<br> }<br> } else {<br> // remark: RefundValueOfBidOrder<br> _cashier().releaseUsd(<br> order.data.pubKey,<br> order.data.pubKey, <br> _eightToSix(order.data.margin),<br> bytes32(0x526566756e6456616c75654f664269644f726465720000000000000000000000));<br> }<br> }<br>function _restoreExpiredOrders(GoldChain.Order[] memory orders, uint len) private {<br> // uint len = orders.length;<br> while (len > 0) {<br> _restoreOrder(orders[len-1]);<br> len--;<br> }<br> } <br>function withdrawInitialOffer(<br> address msgSender, uint classOfShare, uint seqOfOrder, uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IUsdListOfOrders _loo = _looInUSD();<br>GoldChain.Order memory order = <br> _loo.getOrder(classOfShare, seqOfOrder, true);<br>require(order.data.seqOfShare == 0,<br> "LOOKUSD.withdrawInitOrder: not initOrder");<br>RulesParser.ListingRule memory lr =<br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(_gk.getROD().hasTitle(caller, lr.titleOfIssuer),<br> "LOOKUSD.withdrawInitOrder: has no title");<br>order = _loo.withdrawOrder(classOfShare, seqOfOrder, true);<br>_restoreOrder(order);<br> }<br>function placeSellOrder(<br> address msgSender, uint seqOfClass, uint execHours,<br> uint paid, uint price, uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>require (_gk.getLOO().getInvestor(caller).state == <br> uint8(InvestorsRepo.StateOfInvestor.Approved),<br> "LOOKUSD.placeSellOrder: wrong stateOfInvestor");<br>IRegisterOfShares _ros = _gk.getROS();<br>RulesParser.ListingRule memory lr = <br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(seqOfClass == lr.classOfShare,<br> "LOOKUSD.placePut: wrong class");<br>require(uint32(price) >= lr.offPrice,<br> "LOOKUSD.placePut: lower than offPrice");<br>uint[] memory sharesInhand = <br> _gk.getROM().sharesInClass(caller, lr.classOfShare);<br>uint len = sharesInhand.length;<br>while (len > 0 && paid > 0) {<br>SharesRepo.Share memory share = <br> _ros.getShare(sharesInhand[len - 1]);<br> len--;<br>if (!_ros.notLocked(share.head.seqOfShare, block.timestamp)) {<br> continue;<br> }<br>if (lr.lockupDays == 0 \|\|<br> share.head.issueDate + <br> uint48(lr.lockupDays) \* 86400 < block.timestamp) <br> {<br> if (share.body.cleanPaid > 0) {<br>UsdOrdersRepo.Deal memory input;<br>input.to = msgSender;<br> input.seller = share.head.shareholder;<br> input.classOfShare = share.head.class;<br> input.seqOfShare = share.head.seqOfShare;<br> input.price = uint32(price);<br> input.votingWeight = share.head.votingWeight;<br> input.distrWeight = share.body.distrWeight;<br> input.isOffer = true;<br>if (paid >= share.body.cleanPaid) {<br> input.paid = uint64(share.body.cleanPaid);<br> paid -=input.paid;<br> _ros.decreaseCleanPaid(share.head.seqOfShare, input.paid);<br> _placeSellOrder(input, execHours);<br> } else {<br> input.paid = uint64(paid);<br> _ros.decreaseCleanPaid(share.head.seqOfShare, input.paid);<br> _placeSellOrder(input, execHours);<br> break;<br> }<br>} <br> }<br> }<br> }<br>function withdrawSellOrder(<br> address msgSender, uint classOfShare,uint seqOfOrder) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>IUsdListOfOrders _loo = _looInUSD();<br> IRegisterOfShares _ros = _gk.getROS();<br>GoldChain.Order memory order = <br> _loo.getOrder(classOfShare, seqOfOrder, true);<br>require(order.data.seqOfShare > 0,<br> "LOOKUSD.withdrawSellOrder: zero seqOfShare");<br>SharesRepo.Share memory share =<br> _ros.getShare(order.data.seqOfShare);<br>require(share.head.shareholder == caller,<br> "LOOKUSD.withdrawSellOrder: not shareholder");<br>order = _loo.withdrawOrder(classOfShare, seqOfOrder, true);<br>_restoreOrder(order);<br> }<br>// ==== Bid ====<br>function placeBuyOrder(<br> ICashier.TransferAuth memory auth, address msgSender, <br> uint classOfShare, uint paid, uint price, uint execHours) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>InvestorsRepo.Investor memory investor = <br> _gk.getLOO().getInvestor(caller);<br>require (investor.state == <br> uint8(InvestorsRepo.StateOfInvestor.Approved),<br> "LOOKUSD.placeBuyOrder: wrong stateOfInvestor");<br>require(price > 0, "ULOOK.placeBuyOrder: zero price");<br>UsdOrdersRepo.Deal memory input;<br>input.from = msgSender;<br> input.buyer = uint40(caller);<br> input.groupRep = investor.groupRep;<br> input.classOfShare = uint16(classOfShare);<br> input.paid = uint64(paid);<br> input.price = uint32(price);<br> input.consideration = uint128(paid \* price);<br>auth.from = input.from;<br> auth.value = input.consideration / 100;<br> _placeBuyOrder(auth, input, execHours);<br> }<br>function placeMarketBuyOrder(<br> ICashier.TransferAuth memory auth, address msgSender, <br> uint classOfShare, uint paid, uint execHours) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>InvestorsRepo.Investor memory investor = <br> _gk.getLOO().getInvestor(caller);<br>require (investor.state == <br> uint8(InvestorsRepo.StateOfInvestor.Approved),<br> "LOOKUSD.placeMarketBuyOrder: wrong stateOfInvestor");<br>require(auth.value > 0, "ULOOK.placeMarketBuyOrder: zero margin");<br>UsdOrdersRepo.Deal memory input;<br>input.from = msgSender;<br> input.buyer = uint40(caller);<br> input.groupRep = investor.groupRep;<br> input.classOfShare = uint16(classOfShare);<br> input.paid = uint64(paid);<br> input.consideration = uint128(auth.value \* 100);<br>auth.from = input.from;<br> _placeBuyOrder(auth, input, execHours);<br> }<br>function _placeBuyOrder(<br> ICashier.TransferAuth memory auth, UsdOrdersRepo.Deal memory input, uint execHours) private {<br>// remark: CustodyValueOfBid<br> _cashier().custodyUsd(<br> auth, <br> bytes32(0x437573746f647956616c75654f66426964000000000000000000000000000000));<br>(UsdOrdersRepo.Deal[] memory deals,<br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> UsdOrdersRepo.Deal memory bid) = <br> _looInUSD().placeBuyOrder(input, execHours);<br>if (lenOfDeals > 0) _closeDeals(deals, lenOfDeals, false);<br> if (lenOfExpired > 0) _restoreExpiredOrders(expired, lenOfExpired);<br> if ((bid.paid == 0 \|\| bid.price == 0) && bid.consideration > 0) {<br> // remark: RefundBalanceOfBidOrder<br> _cashier().releaseUsd(<br> bid.from, <br> bid.from, <br> _eightToSix(bid.consideration), <br> bytes32(0x526566756e6442616c616e63654f664269644f72646572000000000000000000));<br> }<br> }<br>function withdrawBuyOrder(<br> address msgSender, uint classOfShare, uint seqOfOrder) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>IUsdListOfOrders _loo = _looInUSD();<br>GoldChain.Order memory order = <br> _loo.getOrder(classOfShare, seqOfOrder, false);<br>require(order.node.issuer == caller,<br> "LOOKUSD.withdrawBuyOrder: not buyer");<br>order = _loo.withdrawOrder(classOfShare, seqOfOrder, false);<br>_restoreOrder(order);<br> }<br> }<br>|
| [Contents](#toc) |

---

## ISHAKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/ISHAKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../books/roc/terms/IAntiDilution.sol";<br> import "../books/roc/terms/IAlongs.sol";<br>import "../books/roc/IShareholdersAgreement.sol";<br>import "../books/roa/IInvestmentAgreement.sol";<br>import "../common/components/IFilesFolder.sol";<br> import "../common/components/ISigPage.sol";<br>import "../../lib/RulesParser.sol";<br> import "../../lib/SharesRepo.sol";<br> import "../../lib/FRClaims.sol";<br>interface ISHAKeeper {<br>// ======== TagAlong & DragAlong ========<br>function execAlongRight(<br> address ia,<br> uint256 seqOfDeal,<br> bool dragAlong,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> address msgSender,<br> bytes32 sigHash) external;<br>function acceptAlongDeal(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender,<br> bytes32 sigHash) external;<br>// ======== AntiDilution ========<br>function execAntiDilution(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> address msgSender,<br> bytes32 sigHash) external;<br>function takeGiftShares(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) external;<br>// ======== FirstRefusal ========<br>function execFirstRefusal(<br> uint256 seqOfFRRule,<br> uint256 seqOfRightholder,<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender,<br> bytes32 sigHash) external;<br>function computeFirstRefusal(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) external;<br> }<br>|
| [Contents](#toc) |

---

## ROMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/ROMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IROMKeeper.sol";<br>contract ROMKeeper is IROMKeeper, RoyaltyCharge {<br>// ###################<br> // ## ROMKeeper ##<br> // ###################<br>function setMaxQtyOfMembers(uint max) external onlyDK {<br> _gk.getROM().setMaxQtyOfMembers(max);<br> }<br>function setPayInAmt(uint seqOfShare, uint amt, uint expireDate, bytes32 hashLock) <br> external onlyDK {<br> _gk.getROS().setPayInAmt(seqOfShare, amt, expireDate, hashLock);<br> }<br>function requestPaidInCapital(bytes32 hashLock, string memory hashKey)<br> external onlyDK {<br> _gk.getROS().requestPaidInCapital(hashLock, hashKey);<br> }<br>function withdrawPayInAmt(bytes32 hashLock, uint seqOfShare) external onlyDK {<br> _gk.getROS().withdrawPayInAmt(hashLock, seqOfShare);<br> }<br>function payInCapital(<br> uint seqOfShare, <br> uint amt,<br> uint msgValue,<br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 36000);<br>IRegisterOfShares _ros = _gk.getROS();<br>SharesRepo.Share memory share =<br> _ros.getShare(seqOfShare);<br>uint centPrice = _gk.getCentPrice();<br> uint valueOfDeal = share.head.priceOfPaid \* amt \* centPrice / 10 \*\* 6;<br>require(share.head.shareholder == caller,<br> "ROMK.payInCap: not shareholder");<br> require(valueOfDeal <= msgValue,<br> "ROMK.payInCap: insufficient amt");<br>msgValue -= valueOfDeal;<br> if (msgValue > 0) {<br> _gk.saveToCoffer(<br> caller, msgValue, <br> bytes32(0x4465706f73697442616c616e63654f66506179496e4361700000000000000000)); // reason: DepositBalanceOfPayInCap <br> }<br>_ros.payInCapital(seqOfShare, amt);<br> emit PayInCapital(seqOfShare, amt, valueOfDeal);<br> }<br>function decreaseCapital(<br> uint256 seqOfShare, <br> uint paid, <br> uint par) external onlyDK {<br> _gk.getROS().decreaseCapital(seqOfShare, paid, par);<br> }<br>function updatePaidInDeadline(<br> uint256 seqOfShare, <br> uint line) external onlyDK {<br> _gk.getROS().updatePaidInDeadline(seqOfShare, line);<br> }<br>}<br>|
| [Contents](#toc) |

---

## BMMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/BMMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IBMMKeeper.sol";<br>contract BMMKeeper is IBMMKeeper, RoyaltyCharge {<br> using RulesParser for bytes32;<br> using ArrayUtils for uint[];<br>//###############<br> //## Write ##<br> //###############<br>// ==== CreateMotion ====<br>// ---- Officers ----<br>function nominateOfficer(<br> uint256 seqOfPos,<br> uint candidate,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>IRegisterOfDirectors _rod = _gk.getROD();<br>require(_rod.hasNominationRight(seqOfPos, caller),<br> "BMMKeeper.nominateOfficer: no rights");<br>_gk.getBMM().nominateOfficer(seqOfPos, _rod.getPosition(seqOfPos).seqOfVR, candidate, caller);<br> }<br>function createMotionToRemoveOfficer(<br> uint256 seqOfPos,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>require(_gk.getROD().isDirector(caller), "BMMK: not director");<br>IRegisterOfDirectors _rod = _gk.getROD();<br>require(_rod.hasNominationRight(seqOfPos, caller),<br> "BMMK.createMotionToRemoveOfficer: no rights");<br>_gk.getBMM().createMotionToRemoveOfficer(seqOfPos, _rod.getPosition(seqOfPos).seqOfVR, caller);<br> }<br>// ---- Docs ----<br>function createMotionToApproveDoc(<br> uint doc,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000); <br> require(_gk.getROD().isDirector(caller), "BMMK: not director");<br>_gk.getBMM().createMotionToApproveDoc(doc, seqOfVR, executor, caller);<br> }<br>function proposeToTransferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 66000); <br> require(_gk.getROD().isDirector(caller), "BMMK: not director");<br>IMeetingMinutes _bmm = _gk.getBMM();<br>require (amt < uint(_gk.getSHA().getRule(0).governanceRuleParser().fundApprovalThreshold) \* 10 \*\* 18,<br> "BMMK.transferFund: amt overflow");<br>uint64 seqOfMotion = <br> _bmm.createMotionToTransferFund(to, isCBP, amt, expireDate, seqOfVR, executor, caller);<br> _bmm.proposeMotionToBoard(seqOfMotion, caller); <br> }<br>// ---- Actions ----<br>function createAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 66000); <br> require(_gk.getROD().isDirector(caller), "BMMK: not director");<br>_gk.getBMM().createAction(<br> seqOfVR,<br> targets,<br> values,<br> params,<br> desHash,<br> executor,<br> caller);<br> }<br>// ==== Cast Vote ====<br>function entrustDelegaterForBoardMeeting(<br> uint256 seqOfMotion,<br> uint delegate,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000); <br> require(_gk.getROD().isDirector(caller), "BMMK: not director");<br>_avoidanceCheck(seqOfMotion, caller);<br> _gk.getBMM().entrustDelegate(seqOfMotion, delegate, caller);<br> }<br>function proposeMotionToBoard (<br> uint seqOfMotion,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000); <br> require(_gk.getROD().isDirector(caller), "BMMK: not director");<br>_gk.getBMM().proposeMotionToBoard(seqOfMotion, caller);<br> }<br>function castVote(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000); <br>_avoidanceCheck(seqOfMotion, caller);<br> _gk.getBMM().castVoteInBoardMeeting(seqOfMotion, attitude, sigHash, caller);<br> }<br>function _avoidanceCheck(uint256 seqOfMotion, uint caller) private view {<br>MotionsRepo.Motion memory motion = _gk.getBMM().getMotion(seqOfMotion);<br>if (motion.head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ApproveDoc) &&<br> motion.head.seqOfVR < 9) <br> {<br> address doc = address(uint160(motion.contents));<br>OfficersRepo.Position[] memory poses = <br> _gk.getROD().getFullPosInfoInHand(caller);<br> uint256 len = poses.length; <br> while (len > 0) {<br> require (!ISigPage(doc).isSigner(poses[len-1].nominator), <br> "BMMK.RPC: is related party");<br> len --;<br> }<br> require (!ISigPage(doc).isSigner(caller), <br> "BMMK.RPC: is related party");<br>}<br> }<br>// ==== Vote Counting ====<br>function _nominators(IRegisterOfDirectors _rod, uint director) private view returns(uint[] memory) {<br> OfficersRepo.Position[] memory poses = <br> _rod.getFullPosInfoInHand(director);<br>uint len = poses.length;<br> uint[] memory nominators = new uint[](len);<br>while (len > 0) {<br> nominators[len-1] = poses[len-1].nominator;<br> len--;<br> }<br>return nominators;<br> }<br>function _allConsent(<br> IMeetingMinutes _bmm, <br> IRegisterOfDirectors _rod, <br> MotionsRepo.Motion memory motion,<br> BallotsBox.Case memory case0) private view returns(bool) {<br>BallotsBox.Case memory case1 = _bmm.getCaseOfAttitude(motion.head.seqOfMotion, 1); <br> uint[] memory consentVoters = case1.voters.combine(case1.principals);<br>// BallotsBox.Case memory case0 = _bmm.getCaseOfAttitude(motion.head.seqOfMotion, 0); <br> uint[] memory allVoters = case0.voters.combine(case0.principals);<br>if (allVoters.length > consentVoters.length) return false;<br>uint[] memory directors = _rod.getDirectorsList();<br> uint[] memory restDirectors = directors.minus(consentVoters);<br>if (restDirectors.length == 0) return true;<br>if (motion.head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ApproveDoc)) {<br>uint256[] memory parties = <br> ISigPage(address(uint160(motion.contents))).getParties();<br>uint[] memory affiDirectors = restDirectors.minus(parties);<br>uint len = affiDirectors.length;<br>while (len > 0) {<br> uint[] memory nominators = _nominators(_rod, affiDirectors[len-1]);<br> if (nominators.noOverlapWith(parties)) return false;<br> len--;<br> }<br>return true;<br> }<br>return false;<br> } <br>function _calBase(<br> IMeetingMinutes _bmm, <br> IRegisterOfDirectors _rod, <br> MotionsRepo.Motion memory motion,<br> MotionsRepo.VoteCalBase memory base,<br> BallotsBox.Case memory case0) private view returns(MotionsRepo.VoteCalBase memory) {<br>// BallotsBox.Case memory case0 = _bmm.getCaseOfAttitude(motion.head.seqOfMotion, 0);<br> BallotsBox.Case memory case3 = _bmm.getCaseOfAttitude(motion.head.seqOfMotion, 3);<br>uint32 numOfDirectors = uint32(_rod.getNumOfDirectors());<br> base.attendHeadRatio = uint16(case0.sumOfHead \* 10000 / numOfDirectors);<br>if (motion.votingRule.onlyAttendance) {<br> base.totalHead = case0.sumOfHead - case3.sumOfHead;<br> } else {<br> base.totalHead = numOfDirectors - case3.sumOfHead;<br> if (motion.votingRule.impliedConsent) {<br> base.supportHead = (base.totalHead - case0.sumOfHead);<br> base.attendHeadRatio = 10000;<br> }<br> }<br>if (motion.head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ApproveDoc)) <br> {<br> uint256[] memory parties = <br> ISigPage((address(uint160(motion.contents)))).getParties();<br> uint256 len = parties.length;<br>while (len > 0) {<br> uint32 voteHead = <br> uint32(_rod.getBoardSeatsOccupied(uint40(parties[len - 1])));<br>if (voteHead > 0) {<br> if (motion.votingRule.partyAsConsent) {<br>if (motion.votingRule.onlyAttendance) {<br> base.totalHead += voteHead;<br> }<br>if (!motion.votingRule.impliedConsent) {<br> base.supportHead += voteHead;<br>base.attendHeadRatio += uint16(voteHead \* 10000 / numOfDirectors);<br> }<br> } else {<br> if (!motion.votingRule.onlyAttendance) {<br> base.totalHead -= voteHead;<br> }<br>if (motion.votingRule.impliedConsent) {<br> base.supportHead -= voteHead;<br> } else {<br> base.attendHeadRatio += uint16(voteHead \* 10000 / numOfDirectors);<br> }<br>if (base.totalHead == 0)<br> base.unaniConsent = true;<br> }<br> }<br>len--;<br> } <br> }<br>return base;<br> }<br>function voteCounting(uint256 seqOfMotion, address msgSender)<br> external onlyDK<br> {<br> _msgSender(msgSender, 58000);<br>IRegisterOfDirectors _rod = _gk.getROD();<br> IMeetingMinutes _bmm = _gk.getBMM();<br>MotionsRepo.Motion memory motion = <br> _bmm.getMotion(seqOfMotion);<br>MotionsRepo.VoteCalBase memory base;<br>BallotsBox.Case memory case0 = _bmm.getCaseOfAttitude(motion.head.seqOfMotion, 0); <br>if (_allConsent(_bmm, _rod, motion, case0)) {<br> base.unaniConsent = true;<br> } else {<br> base = _calBase(_bmm, _rod, motion, base, case0);<br> }<br>IShareholdersAgreement _sha = _gk.getSHA();<br>bool quorumFlag = (address(_sha) == address(0) \|\| <br> base.attendHeadRatio >= <br> _sha.getRule(0).governanceRuleParser().quorumOfBoardMeeting);<br>_bmm.voteCounting(quorumFlag, seqOfMotion, base);<br> }<br>function transferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 38000); <br>_gk.getBMM().transferFund(<br> to,<br> isCBP,<br> amt,<br> expireDate,<br> seqOfMotion,<br> caller);<br>emit TransferFund(to, isCBP, amt, seqOfMotion, caller);<br> }<br>function execAction(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion,<br> address msgSender) external returns (uint) {<br> uint caller = _msgSender(msgSender, 18000); <br>uint len = targets.length;<br> while (len > 0) {<br> emit ExecAction(targets[len-1], values[len-1], params[len-1], seqOfMotion, caller);<br> len--;<br> }<br>return _gk.getBMM().execAction(<br> typeOfAction,<br> targets,<br> values,<br> params,<br> desHash,<br> seqOfMotion,<br> caller);<br> }<br> }<br>|
| [Contents](#toc) |

---

## GMMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/GMMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IGMMKeeper.sol";<br>import "../common/access/RoyaltyCharge.sol";<br>contract GMMKeeper is IGMMKeeper, RoyaltyCharge {<br> using RulesParser for bytes32;<br> using ArrayUtils for uint[];<br>// ################<br> // ## Motion ##<br> // ################<br>// ==== CreateMotion ====<br>// ---- Officers ----<br> function nominateDirector(<br> uint256 seqOfPos,<br> uint candidate,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 72000);<br>IRegisterOfDirectors _rod = _gk.getROD();<br>require(_rod.hasNominationRight(seqOfPos, caller),<br> "GMMK: has no right");<br>_gk.getGMM().nominateOfficer(<br> seqOfPos, <br> _rod.getPosition(seqOfPos).seqOfVR, <br> candidate, <br> caller);<br> }<br>function createMotionToRemoveDirector(<br> uint256 seqOfPos,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 116000);<br>IRegisterOfDirectors _rod = _gk.getROD();<br>require(_rod.hasNominationRight(seqOfPos, caller),<br> "GMMK: has no right");<br>_gk.getGMM().createMotionToRemoveOfficer(<br> seqOfPos, <br> _rod.getPosition(seqOfPos).seqOfVR, <br> caller);<br> }<br>function proposeDocOfGM(<br> uint doc,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 116000);<br> require(_gk.getROM().isMember(caller), "GMMK: NOT Member");<br>IMeetingMinutes _gmm = _gk.getGMM();<br>uint64 seqOfMotion = <br> _gmm.createMotionToApproveDoc(doc, seqOfVR, executor, caller);<br>_gmm.proposeMotionToGeneralMeeting(seqOfMotion, caller); <br>if (seqOfVR < 9) {<br>address addr = address(uint160(doc));<br>require(ISigPage(addr).isSigner(caller), <br> "GMMK: not signer");<br>require(ISigPage(addr).established(),<br> "GMMK: not established");<br>if (seqOfVR == 8) {<br> _gk.getROC().proposeFile(addr, seqOfMotion);<br> } else {<br> require(_gk.getROA().allClaimsAccepted(addr),<br> "GMMK: Claims outstanding");<br> _gk.getROA().proposeFile(addr, seqOfMotion);<br> }<br> }<br> }<br>function proposeToDistributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 68000);<br> require(_gk.getROM().isMember(caller) \|\| _gk.getROD().isDirector(caller), <br> "GMMK: no right");<br>IMeetingMinutes _gmm = _gk.getGMM();<br>uint64 seqOfMotion = <br> _gmm.createMotionToDistributeProfits(amt, expireDate, seqOfVR, executor, caller);<br>_gmm.proposeMotionToGeneralMeeting(seqOfMotion, caller);<br> }<br>function proposeToTransferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 99000);<br> require(_gk.getROM().isMember(caller) \|\| _gk.getROD().isDirector(caller), <br> "GMMK: no right");<br>IMeetingMinutes _gmm = _gk.getGMM();<br>uint64 seqOfMotion = <br> _gmm.createMotionToTransferFund(to, isCBP, amt, expireDate, seqOfVR, executor, caller);<br>_gmm.proposeMotionToGeneralMeeting(seqOfMotion, caller); <br> }<br>function createActionOfGM(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor,<br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 99000);<br> require(_gk.getROM().isMember(caller) \|\| _gk.getROD().isDirector(caller), <br> "GMMK: no right");<br>_gk.getGMM().createAction(<br> seqOfVR,<br> targets,<br> values,<br> params,<br> desHash,<br> executor,<br> caller);<br> }<br>function proposeToDeprecateGK(<br> address receiver,<br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 88000);<br> require(_gk.getROM().isMember(caller) \|\| _gk.getROD().isDirector(caller), <br> "GMMK: no right");<br>IMeetingMinutes _gmm = _gk.getGMM();<br>uint64 seqOfMotion = <br> _gmm.createMotionToDeprecateGK(receiver, caller);<br>_gmm.proposeMotionToGeneralMeeting(seqOfMotion, caller);<br> }<br>// ==== ProposeMotion ====<br>function entrustDelegaterForGeneralMeeting(<br> uint256 seqOfMotion,<br> uint delegate,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>_avoidanceCheck(seqOfMotion, caller);<br> _gk.getGMM().entrustDelegate(seqOfMotion, delegate, caller);<br> }<br>function proposeMotionToGeneralMeeting(<br> uint256 seqOfMotion,<br> address msgSender) external onlyKeeper {<br> uint caller = _msgSender(msgSender, 72000);<br>_gk.getGMM().proposeMotionToGeneralMeeting(seqOfMotion, caller);<br> }<br>function castVoteOfGM(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 72000);<br>_avoidanceCheck(seqOfMotion, caller);<br> _gk.getGMM().castVoteInGeneralMeeting(seqOfMotion, attitude, sigHash, caller);<br> }<br>function _avoidanceCheck(uint256 seqOfMotion, uint caller) private view {<br> MotionsRepo.Motion memory motion = _gk.getGMM().getMotion(seqOfMotion);<br>if (motion.head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ApproveDoc) && <br> motion.head.seqOfVR < 9) <br> {<br> address doc = address(uint160(motion.contents));<br> require (!ISigPage(doc).isSigner(caller),<br> "GMMK: is related party");<br> }<br> }<br>// ==== VoteCounting ====<br>function _allConsent(<br> IMeetingMinutes _gmm, <br> IRegisterOfMembers _rom, <br> MotionsRepo.Motion memory motion,<br> BallotsBox.Case memory case0) private view returns(bool) {<br>BallotsBox.Case memory case1 = _gmm.getCaseOfAttitude(motion.head.seqOfMotion, 1); <br> uint[] memory consentVoters = case1.voters.combine(case1.principals);<br>uint[] memory allVoters = case0.voters.combine(case0.principals);<br>if (allVoters.length > consentVoters.length) return false;<br>uint[] memory members = _rom.membersList();<br> uint[] memory restMembers = members.minus(consentVoters);<br>if (restMembers.length == 0) return true;<br>if (motion.head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ApproveDoc)) {<br>uint256[] memory parties = <br> ISigPage(address(uint160(motion.contents))).getParties();<br>uint[] memory vetoMembers = restMembers.minus(parties);<br>uint len = vetoMembers.length;<br>while (len > 0) { <br> if (_rom.votesAtDate(vetoMembers[len - 1], motion.body.shareRegDate) > 0) return false;<br> len--;<br> }<br>return true;<br> }<br>return false;<br> } <br>function _calBase(<br> IMeetingMinutes _gmm,<br> IRegisterOfMembers _rom,<br> MotionsRepo.Motion memory motion,<br> MotionsRepo.VoteCalBase memory base,<br> BallotsBox.Case memory case0) private view returns (MotionsRepo.VoteCalBase memory){<br>BallotsBox.Case memory case3 = _gmm.getCaseOfAttitude(motion.head.seqOfMotion, 3);<br>uint64 votesOfMembers = _rom.totalVotes();<br>base.attendWeightRatio = uint16(case0.sumOfWeight \* 10000 / votesOfMembers);<br>if (motion.votingRule.onlyAttendance) {<br>base.totalHead = (case0.sumOfHead - case3.sumOfHead);<br> base.totalWeight = (case0.sumOfWeight - case3.sumOfWeight);<br>} else {<br>base.totalHead = uint32(_rom.qtyOfMembers());<br> base.totalWeight = votesOfMembers; <br>if (motion.votingRule.impliedConsent) {<br>base.supportHead = base.totalHead - case0.sumOfHead; <br> base.supportWeight = base.totalWeight > case0.sumOfWeight<br> ? (base.totalWeight - case0.sumOfWeight)<br> : 0;<br> base.attendWeightRatio = 10000;<br> }<br>base.totalHead -= case3.sumOfHead;<br> base.totalWeight = base.totalWeight > case3.sumOfWeight<br> ? base.totalWeight - case3.sumOfWeight<br> : 0 ;<br> }<br>if (motion.head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ApproveDoc)) {<br>uint256[] memory parties = <br> ISigPage(address(uint160(motion.contents))).getParties();<br> uint256 len = parties.length;<br>while (len > 0) {<br> uint64 votesAtDate = <br> _rom.votesAtDate(parties[len - 1], motion.body.shareRegDate);<br>if (votesAtDate > 0) {<br> if (motion.votingRule.partyAsConsent) {<br>if (motion.votingRule.onlyAttendance) {<br> base.totalHead++;<br> base.totalWeight += votesAtDate;<br> }<br>if (!motion.votingRule.impliedConsent) {<br> base.supportHead ++;<br> base.supportWeight += votesAtDate;<br>base.attendWeightRatio += uint16(votesAtDate \* 10000 / votesOfMembers);<br> }<br>} else {<br>if (!motion.votingRule.onlyAttendance) {<br> base.totalHead --;<br>base.totalWeight = base.totalWeight > votesAtDate<br> ? base.totalWeight - votesAtDate<br> : 0;<br> }<br>if (motion.votingRule.impliedConsent) {<br> base.supportHead --;<br>base.supportWeight = base.supportWeight > votesAtDate<br> ? base.supportWeight - votesAtDate<br> : 0;<br> } else {<br> base.attendWeightRatio += uint16(votesAtDate \* 10000 / votesOfMembers);<br> }<br> }<br> }<br>len--;<br> } <br> }<br>return base;<br> }<br>function voteCountingOfGM(uint256 seqOfMotion, address msgSender) external onlyDK {<br> _msgSender(msgSender, 88000);<br>IRegisterOfMembers _rom = _gk.getROM();<br> IMeetingMinutes _gmm = _gk.getGMM();<br>MotionsRepo.Motion memory motion = <br> _gmm.getMotion(seqOfMotion);<br>MotionsRepo.VoteCalBase memory base;<br>BallotsBox.Case memory case0 = _gmm.getCaseOfAttitude(motion.head.seqOfMotion, 0);<br>if (_allConsent(_gmm, _rom, motion, case0)) {<br> base.unaniConsent = true;<br> } else {<br> base = _calBase(_gmm, _rom, motion, base, case0);<br> }<br>bool quorumFlag = (address(_gk.getSHA()) == address(0)\|\| <br> base.attendWeightRatio >= <br> _gk.getSHA().getRule(0).governanceRuleParser().quorumOfGM);<br>bool approved = _gmm.voteCounting(quorumFlag, seqOfMotion, base) == <br> uint8(MotionsRepo.StateOfMotion.Passed);<br>if (motion.head.seqOfVR < 9) {<br>address doc = address(uint160(motion.contents));<br>if (motion.head.seqOfVR == 8)<br> _gk.getROC().voteCountingForFile(doc, approved);<br> else _gk.getROA().voteCountingForFile(doc, approved);<br> }<br> }<br>// ==== execute ====<br>function distributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IRegisterOfMembers _rom = _gk.getROM();<br>_gk.getGMM().distributeProfits(<br> amt,<br> expireDate,<br> seqOfMotion,<br> caller);<br>uint[] memory members = _rom.membersList();<br> uint len = members.length;<br>uint totalPoints = _rom.ownersPoints().points;<br> uint sum = 0;<br>while (len > 1) {<br> uint member = members[len - 1];<br> uint pointsOfMember = _rom.pointsOfMember(member).points;<br> uint value = pointsOfMember \* amt / totalPoints;<br>// reason: DistributeProfits<br> _gk.saveToCoffer(member, value, bytes32(0x4469737472696275746550726f66697473000000000000000000000000000000));<br> sum += value;<br>len--;<br> }<br> // reason: DistributeProfits<br> _gk.saveToCoffer(members[0], amt-sum, bytes32(0x4469737472696275746550726f66697473000000000000000000000000000000));<br>emit DistributeProfits(amt, seqOfMotion, caller);<br> }<br>function transferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 76000);<br>_gk.getGMM().transferFund(<br> to,<br> isCBP,<br> amt,<br> expireDate,<br> seqOfMotion,<br> caller);<br>emit TransferFund(to, isCBP, amt, seqOfMotion, caller);<br> }<br>function execActionOfGM(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion,<br> address msgSender) external onlyDK returns (uint){<br> uint caller = _msgSender(msgSender, 36000);<br>uint len = targets.length;<br> while (len > 0) {<br> emit ExecAction(targets[len-1], values[len-1], params[len-1], seqOfMotion, caller);<br> len--;<br> }<br>return _gk.getGMM().execAction(<br> typeOfAction,<br> targets,<br> values,<br> params,<br> desHash,<br> seqOfMotion,<br> caller);<br> }<br>function deprecateGK(<br> address receiver,<br> uint seqOfMotion,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>_gk.getGMM().deprecateGK(<br> receiver,<br> seqOfMotion,<br> caller);<br> }<br>}<br>|
| [Contents](#toc) |

---

## LOOKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/LOOKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./ILOOKeeper.sol";<br>contract LOOKeeper is ILOOKeeper, RoyaltyCharge {<br> using RulesParser for bytes32;<br> using OrdersRepo for OrdersRepo.Deal;<br>event Deprecated(address applicant, uint groupRep, bytes32 idHash);<br>//###############<br> //## Write ##<br> //###############<br>// ==== Investor ====<br>function regInvestor(<br> address msgSender, uint groupRep, bytes32 idHash) external onlyDK {<br> emit Deprecated(msgSender, groupRep, idHash);<br> }<br>function regInvestor(<br> address msgSender, address bKey, uint groupRep, bytes32 idHash) external anyKeeper {<br>uint caller = _msgSender(msgSender, 18000);<br>require(msgSender != bKey, <br> "LOOK.regInvestor: same key");<br>require(caller == _msgSender(bKey, 18000), <br> "LOOK.regInvestor: wrong backupKey");<br>if (_isContract(msgSender)) {<br> require(_rc.getHeadByBody(msgSender).typeOfDoc == 20,<br> "LOOK.RegInvestor: COA applicant not GK");<br> }<br>if (_isContract(bKey)) {<br> require(_rc.getHeadByBody(bKey).typeOfDoc == 20,<br> "LOOK.RegInvestor: COA backupKey not GK");<br> }<br>_gk.getLOO().regInvestor(caller, groupRep, idHash);<br> }<br>function _isContract(address acct) private view returns (bool) {<br> uint32 size;<br> assembly {<br> size := extcodesize(acct)<br> }<br> return size != 0;<br> }<br>function approveInvestor(<br> uint userNo,<br> address msgSender,<br> uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IListOfOrders _loo = _gk.getLOO();<br>RulesParser.ListingRule memory lr = <br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(_gk.getROD().hasTitle(caller, lr.titleOfVerifier),<br> "LOOK.apprInv: no rights");<br>require(lr.maxQtyOfInvestors == 0 \|\|<br> _loo.getQtyOfInvestors() < lr.maxQtyOfInvestors,<br> "LOOK.apprInv: no quota");<br>_loo.approveInvestor(userNo, caller);<br> }<br>function revokeInvestor(<br> uint userNo,<br> address msgSender,<br> uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>RulesParser.ListingRule memory lr = <br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(_gk.getROD().hasTitle(caller, lr.titleOfVerifier),<br> "LOOK.revokeInv: wrong titl");<br>_gk.getLOO().revokeInvestor(userNo, caller);<br> }<br>// ==== Offers ====<br>function placeInitialOffer(<br> address msgSender,<br> uint classOfShare,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IRegisterOfShares _ros = _gk.getROS();<br>RulesParser.ListingRule memory lr = <br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(_gk.getROD().hasTitle(caller, lr.titleOfIssuer),<br> "LOOK.placeIO: not entitled");<br>require(lr.classOfShare == classOfShare,<br> "LOOK.placeIO: wrong class");<br>require(uint32(price) >= lr.floorPrice,<br> "LOOK.placeIO: lower than floor");<br>require(lr.ceilingPrice == 0 \|\|<br> uint32(price) <= lr.ceilingPrice,<br> "LOOK.placeIO: higher than ceiling");<br>require (_ros.getInfoOfClass(classOfShare).body.cleanPaid +<br> paid <= uint64(lr.maxTotalPar) \* 10000, "LOOK.placeIO: paid overflow");<br>_ros.increaseEquityOfClass(true, classOfShare, 0, 0, paid);<br>OrdersRepo.Deal memory input;<br>input.classOfShare = uint16(classOfShare);<br> input.votingWeight = lr.votingWeight;<br> input.distrWeight = lr.distrWeight;<br> input.paid = uint64(paid);<br> input.price = uint32(price);<br> input.seller = uint40(caller);<br> input.isOffer = true;<br> input.inEth = true;<br>_placeSellOrder(<br> input,<br> execHours,<br> _gk.getCentPrice());<br> }<br>function _placeSellOrder(<br> OrdersRepo.Deal memory input,<br> uint execHours,<br> uint centPrice ) private {<br> (OrdersRepo.Deal[] memory deals, uint lenOfDeals, GoldChain.Order[] memory expired, uint lenOfExpired, OrdersRepo.Deal memory offer) = <br> _gk.getLOO().placeSellOrder(<br> input,<br> execHours,<br> centPrice);<br> if (lenOfDeals > 0) _closeDeals(deals, true, lenOfDeals);<br> if (lenOfExpired > 0) _restoreExpiredOrders(expired, lenOfExpired);<br> if (offer.price == 0 && offer.paid > 0) {<br> GoldChain.Order memory balance;<br> balance.data.classOfShare = offer.classOfShare;<br> balance.data.seqOfShare = offer.seqOfShare;<br> balance.node.paid = offer.paid;<br> _restoreOrder(balance);<br> }<br> }<br>function _closeDeals(OrdersRepo.Deal[] memory deals, bool isOffer, uint len) private {<br>IRegisterOfShares _ros = _gk.getROS(); <br> IRegisterOfMembers _rom = _gk.getROM();<br>// uint len = deals.length;<br> while (len > 0) {<br>OrdersRepo.Deal memory deal = deals[len - 1];<br> len--;<br>if (deal.seqOfShare > 0) {<br>if (!_ros.notLocked(deal.seqOfShare, block.timestamp)) {<br> continue;<br> }<br>SharesRepo.Share memory share = _ros.getShare(deal.seqOfShare);<br>if (isOffer) {<br> _gk.releaseCustody(<br> deal.buyer, share.head.shareholder, deal.consideration,<br> bytes32(0x436c6f73654f66666572416761696e7374426964000000000000000000000000)); // reason: CloseOfferAgainstBid<br> } else {<br> _gk.saveToCoffer(<br> share.head.shareholder, deal.consideration,<br> bytes32(0x436c6f7365426964416761696e73744f66666572000000000000000000000000)); // reason: CloseBidAgainstOffer<br> }<br>_ros.increaseCleanPaid(deal.seqOfShare, deal.paid);<br> _ros.transferShare(<br> deal.seqOfShare,<br> deal.paid,<br> deal.paid,<br> deal.buyer,<br> deal.price,<br> 0);<br>} else {<br>if (isOffer) {<br> _gk.releaseCustody(<br> deal.buyer, 0, deal.consideration,<br> bytes32(0x436c6f7365496e69744f66666572416761696e73744269640000000000000000)); // reason: CloseInitOfferAgainstBid<br> } else {<br> emit CloseBidAgainstInitOffer(deal.buyer, deal.consideration);<br> }<br>SharesRepo.Share memory share;<br>share.head = SharesRepo.Head({<br> class: deal.classOfShare,<br> seqOfShare: 0,<br> preSeq: 0,<br> issueDate: 0,<br> shareholder: deal.buyer,<br> priceOfPaid: deal.price,<br> priceOfPar: 0,<br> votingWeight: deal.votingWeight,<br> argu: 0<br> });<br>share.body = SharesRepo.Body({<br> payInDeadline: uint48(block.timestamp + 86400),<br> paid: deal.paid,<br> par: deal.paid,<br> cleanPaid: deal.paid,<br> distrWeight: deal.distrWeight<br> });<br>_ros.addShare(share);<br> }<br>if (deal.groupRep != deal.buyer && <br> deal.groupRep != _rom.groupRep(deal.buyer))<br> _rom.addMemberToGroup(deal.buyer, deal.groupRep);<br> }<br>}<br>function _restoreOrder(GoldChain.Order memory order) private {<br>if (order.node.isOffer) {<br> IRegisterOfShares _ros = _gk.getROS();<br> if (order.data.seqOfShare > 0) {<br> _ros.increaseCleanPaid(order.data.seqOfShare, order.node.paid);<br> } else {<br> _ros.increaseEquityOfClass(false, order.data.classOfShare, 0, 0, order.node.paid);<br> }<br> } else {<br> _gk.releaseCustody(<br> order.node.issuer, order.node.issuer, order.data.margin,<br> bytes32(0x526566756e6456616c75654f664269644f726465720000000000000000000000)); //RefundValueOfBidOrder<br> }<br> }<br>function _restoreExpiredOrders(GoldChain.Order[] memory orders, uint len) private {<br> // uint len = orders.length;<br> while (len > 0) {<br> _restoreOrder(orders[len-1]);<br> len--;<br> }<br> } <br>function withdrawInitialOffer(<br> address msgSender,<br> uint classOfShare,<br> uint seqOfOrder,<br> uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IListOfOrders _loo = _gk.getLOO();<br>GoldChain.Order memory order = <br> _loo.getOrder(classOfShare, seqOfOrder, true);<br>require(order.data.seqOfShare == 0,<br> "LOOK.withdrawInitOrder: not initOrder");<br>RulesParser.ListingRule memory lr =<br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(_gk.getROD().hasTitle(caller, lr.titleOfIssuer),<br> "LOOK.withdrawInitOrder: has no title");<br>order = _loo.withdrawOrder(classOfShare, seqOfOrder, true);<br>_restoreOrder(order);<br> }<br>function placeSellOrder(<br> address msgSender,<br> uint seqOfClass,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>require (_gk.getLOO().getInvestor(caller).state == <br> uint8(InvestorsRepo.StateOfInvestor.Approved),<br> "LOOK.placeSellOrder: wrong stateOfInvestor");<br>IRegisterOfShares _ros = _gk.getROS();<br>RulesParser.ListingRule memory lr = <br> _gk.getSHA().getRule(seqOfLR).listingRuleParser();<br>require(seqOfClass == lr.classOfShare,<br> "LOOK.placePut: wrong class");<br>require(uint32(price) >= lr.offPrice,<br> "LOOK.placePut: lower than offPrice");<br>uint centPrice = _gk.getCentPrice();<br>uint[] memory sharesInhand = <br> _gk.getROM().sharesInClass(caller, lr.classOfShare);<br>uint len = sharesInhand.length;<br>while (len > 0 && paid > 0) {<br>SharesRepo.Share memory share = <br> _ros.getShare(sharesInhand[len - 1]);<br> len--;<br>if (!_ros.notLocked(share.head.seqOfShare, block.timestamp)) {<br> continue;<br> }<br>if(lr.lockupDays == 0 \|\|<br> share.head.issueDate + <br> uint48(lr.lockupDays) \* 86400 < block.timestamp) <br> {<br> if (share.body.cleanPaid > 0) {<br> if (paid >= share.body.cleanPaid) {<br> _createSellOrder(<br> share, <br> share.body.cleanPaid, <br> price, <br> execHours,<br> centPrice,<br> _ros);<br> paid -=share.body.cleanPaid;<br> } else {<br> _createSellOrder(<br> share, <br> paid, <br> price, <br> execHours,<br> centPrice, <br> _ros);<br> break;<br> }<br> } <br> }<br> }<br> }<br>function _createSellOrder(<br> SharesRepo.Share memory share, <br> uint paid,<br> uint price,<br> uint execHours,<br> uint centPrice,<br> IRegisterOfShares _ros) private {<br> _ros.decreaseCleanPaid(share.head.seqOfShare, paid);<br>OrdersRepo.Deal memory input;<br>input.seller = share.head.shareholder;<br> input.classOfShare = share.head.class;<br> input.seqOfShare = share.head.seqOfShare;<br> input.paid = uint64(paid);<br> input.price = uint32(price);<br> input.votingWeight = share.head.votingWeight;<br> input.distrWeight = share.body.distrWeight;<br> input.isOffer = true;<br> input.inEth = true;<br>_placeSellOrder(<br> input,<br> execHours,<br> centPrice);<br> }<br>function withdrawSellOrder(<br> address msgSender,<br> uint classOfShare,<br> uint seqOfOrder) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>IListOfOrders _loo = _gk.getLOO();<br> IRegisterOfShares _ros = _gk.getROS();<br>GoldChain.Order memory order = <br> _loo.getOrder(classOfShare, seqOfOrder, true);<br>require(order.data.seqOfShare > 0,<br> "LOOK.withdrawSellOrder: zero seqOfShare");<br>SharesRepo.Share memory share =<br> _ros.getShare(order.data.seqOfShare);<br>require(share.head.shareholder == caller,<br> "LOOK.withdrawSellOrder: not shareholder");<br>order = _loo.withdrawOrder(classOfShare, seqOfOrder, true);<br>_restoreOrder(order);<br> }<br>// ==== Bid ====<br>function placeBuyOrder(<br> address msgSender,<br> uint classOfShare,<br> uint paid,<br> uint price,<br> uint execHours,<br> uint msgValue) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br> uint centPrice = _gk.getCentPrice();<br>InvestorsRepo.Investor memory investor = <br> _gk.getLOO().getInvestor(caller);<br>require (investor.state == <br> uint8(InvestorsRepo.StateOfInvestor.Approved),<br> "LOOK.placeBuyOrder: wrong stateOfInvestor");<br>OrdersRepo.Deal memory input;<br>input.buyer = uint40(caller);<br> input.groupRep = investor.groupRep;<br> input.classOfShare = uint16(classOfShare);<br> input.paid = uint64(paid);<br> input.price = uint32(price);<br> input.consideration = uint128(msgValue);<br> input.inEth = true;<br>_placeBuyOrder(input, execHours, centPrice);<br> }<br>function _placeBuyOrder(<br> OrdersRepo.Deal memory input,<br> uint execHours,<br> uint centPrice) private {<br> (OrdersRepo.Deal[] memory deals, uint lenOfDeals, GoldChain.Order[] memory expired, uint lenOfExpired, OrdersRepo.Deal memory bid) = <br> _gk.getLOO().placeBuyOrder(<br> input,<br> execHours,<br> centPrice);<br>if (lenOfDeals > 0) _closeDeals(deals, false, lenOfDeals);<br> if (lenOfExpired > 0) _restoreExpiredOrders(expired, lenOfExpired);<br> if (bid.paid > 0 && bid.price > 0) {<br> uint acct = bid.buyer;<br> acct = (acct << 40) + acct;<br> _gk.saveToCoffer(<br> acct, bid.consideration,<br> bytes32(0x437573746f647956616c75654f664269644f7264657200000000000000000000)); // CustodyValueOfBidOrder<br> } else if (bid.consideration > 0) {<br> _gk.saveToCoffer(<br> bid.buyer, bid.consideration,<br> bytes32(0x4465706f73697442616c616e63654f664269644f726465720000000000000000)); // DepositBalanceOfBidOrder<br> }<br> }<br>function withdrawBuyOrder(<br> address msgSender,<br> uint classOfShare,<br> uint seqOfOrder) external onlyDK {<br> uint caller = _msgSender(msgSender, 88000);<br>IListOfOrders _loo = _gk.getLOO();<br>GoldChain.Order memory order = <br> _loo.getOrder(classOfShare, seqOfOrder, false);<br>require(order.node.issuer == caller,<br> "LOOK.withdrawBuyOrder: not buyer");<br>order = _loo.withdrawOrder(classOfShare, seqOfOrder, false);<br>_restoreOrder(order);<br> }<br> }<br>|
| [Contents](#toc) |

---

## IROAKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IROAKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/IDraftControl.sol";<br> import "../common/components/IFilesFolder.sol";<br> import "../common/components/ISigPage.sol";<br>import "../books/roa/IInvestmentAgreement.sol";<br> import "../books/roa/IRegisterOfAgreements.sol";<br> import "../books/roc/IShareholdersAgreement.sol";<br> import "../books/roc/terms/ILockUp.sol";<br>import "../../lib/DocsRepo.sol";<br> import "../../lib/RulesParser.sol";<br> import "../../lib/SharesRepo.sol";<br> import "../../lib/InvestorsRepo.sol";<br>interface IROAKeeper {<br>event PayOffCIDeal(uint indexed caller, uint indexed valueOfDeal);<br>// #################<br> // ## Write IO ##<br> // #################<br>function createIA(uint256 version, address msgSender) external;<br>function circulateIA(<br> address ia,<br> bytes32 docUrl,<br> bytes32 docHash,<br> address msgSender) external;<br>function signIA(<br> address ia,<br> address msgSender,<br> bytes32 sigHash) external;<br>// ==== Deal & IA ====<br>function pushToCoffer(<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 hashLock,<br> uint closingDeadline,<br> address msgSender) external;<br>function closeDeal(<br> address ia,<br> uint256 seqOfDeal,<br> string memory hashKey) external;<br>function transferTargetShare(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) external;<br>function issueNewShare(address ia, uint256 seqOfDeal, address msgSender) external;<br>function terminateDeal(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) external;<br>function payOffApprovedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint msgValue,<br> address msgSender) external; <br>function payOffApprovedDealInUSD(<br> address ia,<br> uint seqOfDeal,<br> uint valueOfDeal,<br> uint caller) external; <br>}<br>|
| [Contents](#toc) |

---

## IGMMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IGMMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../lib/MotionsRepo.sol";<br> import "../../lib/OfficersRepo.sol";<br>import "../common/components/ISigPage.sol";<br>interface IGMMKeeper {<br> event DistributeProfits(uint256 indexed sum, uint indexed seqOfMotion, uint indexed caller);<br> event TransferFund(address indexed to, bool indexed isCBP, uint indexed amt, uint seqOfMotion, uint caller);<br> event ExecAction(address indexed targets, uint indexed values, bytes indexed params, uint seqOfMotion, uint caller);<br>// ################<br> // ## Motion ##<br> // ################<br>function nominateDirector(<br> uint256 seqOfPos,<br> uint candidate,<br> address msgSender) external;<br>function createMotionToRemoveDirector(<br> uint256 seqOfPos,<br> address msgSender) external;<br>function proposeDocOfGM(uint doc, uint seqOfVR, uint executor, address msgSender) external;<br>function proposeToDistributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external;<br>function proposeToTransferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external;<br>function createActionOfGM(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor,<br> address msgSender) external;<br>function proposeToDeprecateGK(address receiver,address msgSender) external;<br>function entrustDelegaterForGeneralMeeting(uint256 seqOfMotion, uint delegate, address msgSender) external;<br>function proposeMotionToGeneralMeeting(uint256 seqOfMotion, address msgSender) external;<br>function castVoteOfGM(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> address msgSender) external;<br>function voteCountingOfGM(uint256 seqOfMotion, address msgSender) external;<br>function distributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> address msgSender) external;<br>function transferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> address msgSender) external;<br>function execActionOfGM(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion,<br> address msgSender) external returns(uint);<br>function deprecateGK(address receiver, uint seqOfMotion, address msgSender) external;<br> }<br>|
| [Contents](#toc) |

---

## UsdROOKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/UsdROOKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../common/access/RoyaltyCharge.sol";<br>import "./IUsdROOKeeper.sol";<br>contract UsdROOKeeper is IUsdROOKeeper, RoyaltyCharge {<br>function _cashier() private view returns(ICashier) {<br> return ICashier(_gk.getBook(11));<br> }<br>function payOffSwap(<br> ICashier.TransferAuth memory auth, uint256 seqOfOpt, uint256 seqOfSwap, <br> address to, address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 40000);<br>IRegisterOfShares _ros = _gk.getROS();<br> SwapsRepo.Swap memory swap = <br> _gk.getROO().getSwap(seqOfOpt, seqOfSwap);<br>uint seller = _msgSender(to, 18000);<br>require(seller == _ros.getShare(swap.seqOfTarget).head.shareholder,<br> "UsdROOK.payOffSwap: wrong payee");<br>uint valueOfDeal = swap.paidOfTarget \* swap.priceOfDeal / 100;<br>auth.from = msgSender;<br> auth.value = valueOfDeal;<br>// remark: PayOffSwap<br> _cashier().forwardUsd(<br> auth, <br> to, <br> bytes32(0x5061794f66665377617000000000000000000000000000000000000000000000));<br> emit PayOffSwap(seqOfOpt, seqOfSwap, msgSender, to, auth.value);<br>IROOKeeper(_gk.getKeeper(7)).payOffSwapInUSD(<br> seqOfOpt, seqOfSwap, caller);<br>}<br>function payOffRejectedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal, uint seqOfSwap, <br> address to, address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 40000);<br> IRegisterOfShares _ros = _gk.getROS();<br> SwapsRepo.Swap memory swap = <br> IInvestmentAgreement(ia).getSwap(seqOfDeal, seqOfSwap);<br>uint seller = _msgSender(to, 18000);<br> require(seller == _ros.getShare(swap.seqOfTarget).head.shareholder,<br> "UsdROOK.payOffSwap: wrong payee");<br>uint valueOfDeal = (swap.paidOfTarget \* swap.priceOfDeal) / 100;<br>auth.value = valueOfDeal;<br> auth.from = msgSender;<br>// remark: PayOffRejectedDeal<br> _cashier().forwardUsd(<br> auth, <br> to, <br> bytes32(0x5061794f666652656a65637465644465616c0000000000000000000000000000));<br> emit PayOffRejectedDeal(ia, seqOfDeal, seqOfSwap, msgSender, to, auth.value);<br>IROOKeeper(_gk.getKeeper(7)).payOffRejectedDealInUSD(<br> ia, seqOfDeal, seqOfSwap, caller);<br> }<br>} |
| [Contents](#toc) |

---

## ILOOKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/ILOOKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../IGeneralKeeper.sol";<br> import "../books/loo/IListOfOrders.sol";<br> import "../books/ros/IRegisterOfShares.sol";<br>import "../../lib/SharesRepo.sol";<br> import "../../lib/OrdersRepo.sol";<br> import "../../lib/InvestorsRepo.sol";<br>interface ILOOKeeper {<br>event CloseBidAgainstInitOffer(uint indexed buyer, uint indexed amt);<br>//###############<br> //## Write ##<br> //###############<br>function regInvestor(<br> address msgSender, uint groupRep, bytes32 idHash) external;<br>function regInvestor(<br> address msgSender, address bKey,uint groupRep, bytes32 idHash) external;<br>function approveInvestor(<br> uint userNo,<br> address msgSender,<br> uint seqOfLR) external;<br>function revokeInvestor(<br> uint userNo,<br> address msgSender,<br> uint seqOfLR) external;<br>function placeInitialOffer(<br> address msgSender,<br> uint classOfShare,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external;<br>function withdrawInitialOffer(<br> address msgSender,<br> uint classOfShare,<br> uint seqOfOrder,<br> uint seqOfLR) external;<br>function placeSellOrder(<br> address msgSender,<br> uint seqOfClass,<br> uint execHours,<br> uint paid,<br> uint price,<br> uint seqOfLR) external;<br>function withdrawSellOrder(<br> address msgSender,<br> uint classOfShare,<br> uint seqOfOrder) external;<br>function placeBuyOrder(<br> address msgSender,<br> uint classOfShare,<br> uint paid,<br> uint price,<br> uint execHours,<br> uint msgValue) external;<br>function withdrawBuyOrder(<br> address msgSender,<br> uint classOfShare,<br> uint seqOfOrder) external;<br>}<br>|
| [Contents](#toc) |

---

## ROAKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/ROAKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IROAKeeper.sol";<br>import "../common/access/RoyaltyCharge.sol";<br>contract ROAKeeper is IROAKeeper, RoyaltyCharge {<br> using RulesParser for bytes32;<br>// #############################<br> // ## InvestmentAgreement ##<br> // #############################<br>function createIA(uint version, address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 58000);<br>require(_gk.getROM().isMember(caller), "not MEMBER");<br>bytes32 snOfDoc = bytes32((uint(uint8(IRegCenter.TypeOfDoc.IA)) << 224) +<br> uint224(version << 192)); <br>DocsRepo.Doc memory doc = _rc.createDoc(<br> snOfDoc,<br> msgSender);<br>IAccessControl(doc.body).initKeepers(<br> address(this),<br> address(_gk));<br>_gk.getROA().regFile(DocsRepo.codifyHead(doc.head), doc.body);<br> }<br>// ======== Circulate IA ========<br>function circulateIA(<br> address ia,<br> bytes32 docUrl,<br> bytes32 docHash,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 36000);<br>require(ISigPage(ia).isParty(caller), "ROAK.md.OPO: NOT Party");<br>require(IDraftControl(ia).isFinalized(), <br> "ROAK.CIA: IA not finalized");<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>_ia.circulateDoc();<br> uint16 signingDays = _ia.getSigningDays();<br> uint16 closingDays = _ia.getClosingDays();<br>RulesParser.VotingRule memory vr = <br> _gk.getSHA().getRule(_ia.getTypeOfIA()).votingRuleParser();<br>_ia.setTiming(false, signingDays + vr.frExecDays + vr.dtExecDays + vr.dtConfirmDays, closingDays);<br>_gk.getROA().circulateFile(ia, signingDays, closingDays, vr, docUrl, docHash);<br> }<br>// ======== Sign IA ========<br>function signIA(<br> address ia,<br> address msgSender,<br> bytes32 sigHash) external onlyDK {<br>uint caller = _msgSender(msgSender, 36000);<br>require(ISigPage(ia).isParty(caller), "ROAK.md.OPO: NOT Party");<br>IRegisterOfAgreements _roa = _gk.getROA();<br>require(<br> _roa.getHeadOfFile(ia).state == uint8(FilesRepo.StateOfFile.Circulated),<br> "ROAK.signIA: wrong state");<br>_lockDealsOfParty(ia, caller);<br> ISigPage(ia).signDoc(true, caller, sigHash);<br> }<br>function _lockDealsOfParty(address ia, uint256 caller) private {<br> uint[] memory list = IInvestmentAgreement(ia).getSeqList();<br> uint256 len = list.length;<br> while (len > 0) {<br> uint seq = list[len - 1];<br> len--;<br>DealsRepo.Deal memory deal = <br> IInvestmentAgreement(ia).getDeal(seq);<br>if (deal.head.seller == caller) {<br>if (IInvestmentAgreement(ia).lockDealSubject(seq)) {<br> _gk.getROS().decreaseCleanPaid(deal.head.seqOfShare, deal.body.paid);<br> }<br>} else if (deal.body.buyer == caller) {<br>_buyerIsVerified(deal.body.buyer);<br>if (deal.head.typeOfDeal ==<br> uint8(DealsRepo.TypeOfDeal.CapitalIncrease)) {<br> IInvestmentAgreement(ia).lockDealSubject(seq);<br> }<br>}<br> }<br> }<br>// ======== Deal Closing ========<br>function pushToCoffer(<br> address ia,<br> uint256 seqOfDeal,<br> bytes32 hashLock,<br> uint closingDeadline,<br> address msgSender) external onlyDK {<br>uint caller = _msgSender(msgSender, 58000);<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>DealsRepo.Deal memory deal = <br> _ia.getDeal(seqOfDeal);<br>bool isST = (deal.head.seqOfShare != 0);<br>if (isST) {<br> require(caller == deal.head.seller, "ROAK.PTC: not seller");<br> require(_lockUpCheck(address(_ia), deal, uint48(block.timestamp)), <br> "ROAK.PTC: target share locked");<br> } else {<br> require (_gk.getROD().isDirector(caller) \|\|<br> _gk.getROM().controllor() == caller, <br> "ROAK.PTC: not director or controllor");<br> }<br>_vrAndSHACheck(_ia);<br>_ia.clearDealCP(seqOfDeal, hashLock, closingDeadline);<br> }<br>function _vrAndSHACheck(IInvestmentAgreement _ia) private view {<br>IMeetingMinutes _bmm = _gk.getBMM();<br> IMeetingMinutes _gmm = _gk.getGMM();<br> IRegisterOfAgreements _roa = _gk.getROA();<br>require(<br> _roa.getHeadOfFile(address(_ia)).state == uint8(FilesRepo.StateOfFile.Approved),<br> "BOAK.vrAndSHACheck: wrong state");<br>uint256 typeOfIA = _ia.getTypeOfIA();<br>IShareholdersAgreement _sha = _gk.getSHA();<br>RulesParser.VotingRule memory vr = <br> _sha.getRule(typeOfIA).votingRuleParser();<br>uint seqOfMotion = _roa.getHeadOfFile(address(_ia)).seqOfMotion;<br>if (vr.amountRatio > 0 \|\| vr.headRatio > 0) {<br> if (vr.authority == 1)<br> require(_gmm.isPassed(seqOfMotion), <br> "ROAK.vrCheck: rejected by GM");<br> else if (vr.authority == 2)<br> require(_bmm.isPassed(seqOfMotion), <br> "ROAK.vrCheck: rejected by Board");<br> else if (vr.authority == 3)<br> require(_gmm.isPassed(seqOfMotion) && <br> _bmm.isPassed(seqOfMotion), <br> "ROAK.vrCheck: rejected by GM or Board");<br> else revert("ROAK.vrCheck: authority overflow");<br> }<br> }<br>function _closeDeal(IInvestmentAgreement _ia, DealsRepo.Deal memory deal) private {<br> if (deal.head.seqOfShare > 0) {<br> _shareTransfer(_ia, deal.head.seqOfDeal);<br> } else {<br> _issueNewShare(_ia, deal.head.seqOfDeal);<br> }<br> }<br>function closeDeal(<br> address ia,<br> uint256 seqOfDeal,<br> string memory hashKey) external onlyDK {<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>if (_ia.closeDeal(deal.head.seqOfDeal, hashKey))<br> _gk.getROA().execFile(ia);<br>_closeDeal(_ia, deal);<br> }<br>function _lockUpCheck(<br> address _ia,<br> DealsRepo.Deal memory deal,<br> uint48 closingDate) private view returns(bool) {<br>IShareholdersAgreement _sha = _gk.getSHA();<br>if (!_sha.hasTitle(uint8(IShareholdersAgreement.TitleOfTerm.LockUp))) {<br> return true;<br> }<br>address lu = _sha.getTerm(uint8(IShareholdersAgreement.TitleOfTerm.LockUp));<br>if (closingDate > 0) {<br> deal.head.closingDeadline = closingDate;<br> }<br>if (!ILockUp(lu).isTriggered(deal)) {<br> return true;<br> } else if (ILockUp(lu).isExempted(_ia, deal)) {<br> return true;<br> }<br>return false;<br> }<br>function _buyerIsVerified(uint buyer) private view {<br> require (_gk.getLOO().getInvestor(buyer).state == <br> uint8(InvestorsRepo.StateOfInvestor.Approved), <br> "ROAK.buyerIsVerified: not");<br> }<br>function _shareTransfer(IInvestmentAgreement _ia, uint256 seqOfDeal) private {<br>IRegisterOfShares _ros = _gk.getROS();<br> IRegisterOfMembers _rom = _gk.getROM();<br>DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>_buyerIsVerified(deal.body.buyer);<br>require (_lockUpCheck(address(_ia), deal, uint48(block.timestamp)),<br> "ROAK._ST: share locked");<br>require(_checkAlong(_ia, seqOfDeal), "ROAK.shareTransfer: Along Deal Open");<br>_ros.increaseCleanPaid(deal.head.seqOfShare, deal.body.paid);<br> _ros.transferShare(deal.head.seqOfShare, deal.body.paid, deal.body.par, <br> deal.body.buyer, deal.head.priceOfPaid, deal.head.priceOfPar);<br>if (deal.body.buyer != deal.body.groupOfBuyer && <br> deal.body.groupOfBuyer != _rom.groupRep(deal.body.buyer)) <br> _rom.addMemberToGroup(deal.body.buyer, deal.body.groupOfBuyer);<br> }<br>function _checkAlong(IInvestmentAgreement _ia, uint seqOfDeal) private view returns(bool) {<br> uint[] memory seqList = _ia.getSeqList();<br> uint len = seqList.length;<br> while (len > 0) {<br> DealsRepo.Deal memory deal = _ia.getDeal(seqList[len - 1]);<br> if ((deal.head.typeOfDeal == uint8(DealsRepo.TypeOfDeal.TagAlong) \|\|<br> deal.head.typeOfDeal == uint8(DealsRepo.TypeOfDeal.DragAlong)) &&<br> deal.head.preSeq == uint16(seqOfDeal) &&<br> deal.body.state != uint8(DealsRepo.StateOfDeal.Closed)) <br> {<br> return false;<br> }<br> len--;<br> }<br> return true;<br> }<br>function issueNewShare(address ia, uint256 seqOfDeal, address msgSender) public onlyDK {<br>uint caller = _msgSender(msgSender, 58000);<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>require(_gk.getROD().isDirector(caller) \|\|<br> _gk.getROM().controllor() == caller, <br> "ROAK.issueNewShare: not director or controllor");<br>_vrAndSHACheck(_ia);<br>if (_ia.directCloseDeal(seqOfDeal)) _gk.getROA().execFile(ia);<br>_issueNewShare(_ia, seqOfDeal);<br> }<br>function _issueNewShare(IInvestmentAgreement _ia, uint seqOfDeal) private {<br>IRegisterOfShares _ros = _gk.getROS();<br> IRegisterOfMembers _rom = _gk.getROM();<br>DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>_buyerIsVerified(deal.body.buyer);<br>SharesRepo.Share memory share;<br>share.head = SharesRepo.Head({<br> seqOfShare: 0,<br> preSeq: 0,<br> class: deal.head.classOfShare,<br> issueDate: uint48(block.timestamp),<br> shareholder: deal.body.buyer,<br> priceOfPaid: deal.head.priceOfPaid,<br> priceOfPar: deal.head.priceOfPar,<br> votingWeight: deal.head.votingWeight,<br> argu: 0<br> });<br>share.body = SharesRepo.Body({<br> payInDeadline: uint48(block.timestamp) + 43200,<br> paid: deal.body.paid,<br> par: deal.body.par,<br> cleanPaid: deal.body.paid,<br> distrWeight: deal.body.distrWeight<br> });<br>_ros.addShare(share);<br>if (deal.body.buyer != deal.body.groupOfBuyer &&<br> deal.body.groupOfBuyer != _rom.groupRep(deal.body.buyer))<br> _rom.addMemberToGroup(deal.body.buyer, deal.body.groupOfBuyer);<br> }<br>function transferTargetShare(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) public onlyDK {<br>uint caller = _msgSender(msgSender, 58000);<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>require(<br> caller == _ia.getDeal(seqOfDeal).head.seller,<br> "ROAK.TTS: not seller");<br>_vrAndSHACheck(_ia);<br>if (_ia.directCloseDeal(seqOfDeal))<br> _gk.getROA().execFile(ia);<br>_shareTransfer(_ia, seqOfDeal);<br> }<br>function terminateDeal(<br> address ia,<br> uint256 seqOfDeal,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 18000);<br>IRegisterOfAgreements _roa = _gk.getROA();<br>DealsRepo.Deal memory deal = IInvestmentAgreement(ia).getDeal(seqOfDeal);<br>require(<br> caller == deal.head.seller,<br> "ROAK.TD: NOT seller");<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br>uint8 state = _roa.getHeadOfFile(ia).state;<br>if ((state < uint8(FilesRepo.StateOfFile.Proposed) &&<br> block.timestamp >= _roa.terminateStartpoint(ia)) \|\| <br> (state == uint8(FilesRepo.StateOfFile.Rejected)) \|\|<br> (state == uint8(FilesRepo.StateOfFile.Approved) &&<br> block.timestamp >= _ia.getDeal(seqOfDeal).head.closingDeadline)) {<br> if (_ia.terminateDeal(seqOfDeal))<br> _roa.terminateFile(ia);<br> if (_ia.releaseDealSubject(seqOfDeal))<br> _gk.getROS().increaseCleanPaid(deal.head.seqOfShare, deal.body.paid); <br> } else revert("ROAK.TD: wrong state");<br> }<br>function payOffApprovedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint msgValue,<br> address msgSender) external onlyDK {<br> uint caller = _msgSender(msgSender, 58000);<br>IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br> DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>uint centPrice = _gk.getCentPrice();<br> uint valueOfDeal = centPrice \* (deal.body.paid \* deal.head.priceOfPaid + <br> (deal.body.par - deal.body.paid) \* deal.head.priceOfPar) / 10 \*\* 6;<br>require(valueOfDeal <= msgValue, "ROAK.payApprDeal: insufficient msgValue");<br>if (deal.head.seqOfShare > 0) {<br> _gk.saveToCoffer(<br> deal.head.seller, valueOfDeal, <br> bytes32(0x4465706f736974436f6e73696465726174696f6e4f6653544465616c00000000)); // DepositConsiderationOfSTDeal <br> } else {<br> emit PayOffCIDeal(caller, valueOfDeal);<br> }<br>msgValue -= valueOfDeal;<br> if (msgValue > 0) {<br> _gk.saveToCoffer(<br> caller, msgValue,<br> bytes32(0x4465706f73697442616c616e63654f664f54434465616c000000000000000000)); // DepositBalanceOfOTCDeal <br> } <br>_payOffApprovedDeal(ia, seqOfDeal, valueOfDeal, caller);<br> }<br>function payOffApprovedDealInUSD(<br> address ia,<br> uint seqOfDeal,<br> uint valueOfDeal,<br> uint caller) external {<br> require(msg.sender == _gk.getKeeper(12),<br> "ROAK.payOffApprovedDealInUSD: not UsdROAK ");<br>_payOffApprovedDeal(ia, seqOfDeal, valueOfDeal, caller);<br> }<br>function _payOffApprovedDeal(<br> address ia,<br> uint seqOfDeal,<br> uint valueOfDeal,<br> uint caller) private {<br> IInvestmentAgreement _ia = IInvestmentAgreement(ia);<br> DealsRepo.Deal memory deal = _ia.getDeal(seqOfDeal);<br>_vrAndSHACheck(_ia);<br>if (_ia.payOffApprovedDeal(seqOfDeal, valueOfDeal, caller)) <br> _gk.getROA().execFile(ia);<br>_closeDeal(_ia, deal);<br> }<br>}<br>|
| [Contents](#toc) |

---

## IROMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IROMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>interface IROMKeeper {<br>event PayInCapital(uint indexed seqOfShare, uint indexed amt, uint indexed valueOfDeal);<br>// #################<br> // ## Write IO ##<br> // #################<br>// ==== BOS funcs ====<br>function setMaxQtyOfMembers(uint max) external;<br>function setPayInAmt(uint seqOfShare, uint amt, uint expireDate, bytes32 hashLock) external;<br>function requestPaidInCapital(bytes32 hashLock, string memory hashKey) external;<br>function withdrawPayInAmt(bytes32 hashLock, uint seqOfShare) external;<br>function payInCapital(<br> uint seqOfShare, <br> uint amt, <br> uint msgValue, <br> address msgSender) external;<br>function decreaseCapital(<br> uint256 seqOfShare,<br> uint paid,<br> uint par) external;<br>function updatePaidInDeadline(uint256 seqOfShare, uint line) external;<br> }<br>|
| [Contents](#toc) |

---

## IUsdROOKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IUsdROOKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../books/cashier/ICashier.sol";<br> import "../../lib/SwapsRepo.sol";<br>interface IUsdROOKeeper{<br>event PayOffSwap(<br> uint seqOfOpt, uint seqOfSwap, address indexed from, <br> address indexed to, uint indexed valueOfDeal);<br>event PayOffRejectedDeal(<br> address ia, uint seqOfDeal, uint seqOfSwap, address indexed from, <br> address indexed to, uint indexed valueOfDeal);<br>function payOffSwap(<br> ICashier.TransferAuth memory auth, uint256 seqOfOpt, uint256 seqOfSwap, address to, address msgSender) external;<br>function payOffRejectedDeal(<br> ICashier.TransferAuth memory auth, address ia, uint seqOfDeal, <br> uint seqOfSwap, address to, address msgSender) external;<br> } |
| [Contents](#toc) |

---

## IBMMKeeper.sol

---

| |
|:---|
| **contracts/comps/keepers/IBMMKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../books/rod/IRegisterOfDirectors.sol";<br> import "../../lib/RulesParser.sol";<br>interface IBMMKeeper {<br>event TransferFund(address indexed to, bool indexed isCBP, uint indexed amt, uint seqOfMotion, uint caller);<br> event ExecAction(address indexed targets, uint indexed values, bytes indexed params, uint seqOfMotion, uint caller);<br>function nominateOfficer(<br> uint256 seqOfPos,<br> uint candidate,<br> address msgSender) external;<br>function createMotionToRemoveOfficer(<br> uint256 seqOfPos,<br> address msgSender) external;<br>// ---- Docs ----<br>function createMotionToApproveDoc(<br> uint doc,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external;<br>// ---- TransferFund ----<br>function proposeToTransferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> address msgSender) external;<br>// ---- Action ----<br>function createAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor,<br> address msgSender) external;<br>// ==== Cast Vote ====<br>function entrustDelegaterForBoardMeeting(<br> uint256 seqOfMotion,<br> uint delegate,<br> address msgSender) external;<br>function proposeMotionToBoard (<br> uint seqOfMotion,<br> address msgSender) external;<br>function castVote(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> address msgSender) external;<br>// ==== Vote Counting ====<br>function voteCounting(uint256 seqOfMotion, address msgSender) external;<br>// ==== Exec Motion ====<br>function transferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> address msgSender) external;<br>function execAction(<br> uint typeOfAction,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion,<br> address msgSender) external returns (uint);<br> }<br>|
| [Contents](#toc) |

---

## ICashier.sol

---

| |
|:---|
| **contracts/comps/books/cashier/ICashier.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../center/ERC20/IUSDC.sol";<br>import "../../../lib/UsdLockersRepo.sol";<br>interface ICashier {<br>struct TransferAuth{<br> address from;<br> address to;<br> uint256 value;<br> uint256 validAfter;<br> uint256 validBefore;<br> bytes32 nonce;<br> uint8 v;<br> bytes32 r;<br> bytes32 s;<br> }<br>event ReceiveUsd(address indexed from, uint indexed amt);<br>event ReceiveUsd(address indexed from, uint indexed amt, bytes32 indexed remark);<br>event ForwardUsd(address indexed from, address indexed to, uint indexed amt, bytes32 remark);<br>event CustodyUsd(address indexed from, uint indexed amt, bytes32 indexed remark);<br>event ReleaseUsd(address indexed from, address indexed to, uint indexed amt, bytes32 remark);<br>event TransferUsd(address indexed to, uint indexed amt, bytes32 indexed remark);<br>event DistributeUsd(uint indexed amt);<br>event PickupUsd(address indexed msgSender, uint indexed caller, uint indexed value);<br>//###############<br> //## Write ##<br> //###############<br>function collectUsd(TransferAuth memory auth) external;<br>function collectUsd(TransferAuth memory auth, bytes32 remark) external;<br>function forwardUsd(TransferAuth memory auth, address to, bytes32 remark) external;<br>function custodyUsd(TransferAuth memory auth, bytes32 remark) external;<br>function releaseUsd(address from, address to, uint amt, bytes32 remark) external;<br>function transferUsd(address to, uint amt, bytes32 remark) external;<br>function distributeUsd(uint amt) external;<br>function pickupUsd() external; <br>//##################<br> //## Read I/O ##<br> //##################<br>function custodyOf(address acct) external view returns(uint);<br>function totalEscrow() external view returns(uint);<br>function totalDeposits() external view returns(uint);<br>function depositOfMine(uint user) external view returns(uint); <br>function balanceOfComp() external view returns(uint);<br> }<br>|
| [Contents](#toc) |

---

## Cashier.sol

---

| |
|:---|
| **contracts/comps/books/cashier/Cashier.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./ICashier.sol";<br>import "../../common/access/RoyaltyCharge.sol";<br>contract Cashier is ICashier, RoyaltyCharge {<br>mapping(address => uint) private _coffers;<br> // userNo => balance<br> mapping(uint => uint) private _lockers;<br>//###############<br> //## Write ##<br> //###############<br>function _usd() private view returns(IUSDC) {<br> return IUSDC(_gk.getBook(12));<br> }<br>function _transferWithAuthorization(TransferAuth memory auth) private {<br> _usd().transferWithAuthorization(<br> auth.from, <br> address(this), <br> auth.value,<br> auth.validAfter, <br> auth.validBefore, <br> auth.nonce, <br> auth.v,<br> auth.r,<br> auth.s);<br> }<br>function collectUsd(TransferAuth memory auth) external anyKeeper {<br> _transferWithAuthorization(auth);<br> emit ReceiveUsd(auth.from, auth.value);<br> }<br>function collectUsd(TransferAuth memory auth, bytes32 remark) external anyKeeper {<br> _transferWithAuthorization(auth);<br> emit ReceiveUsd(auth.from, auth.value, remark);<br> }<br>function forwardUsd(TransferAuth memory auth, address to, bytes32 remark) external anyKeeper{<br> _transferWithAuthorization(auth);<br> emit ForwardUsd(auth.from, to, auth.value, remark);<br>require(_usd().transfer(to, auth.value),<br> "Cashier.forwardUsd: transfer failed");<br> }<br>function custodyUsd(TransferAuth memory auth, bytes32 remark) external anyKeeper {<br> _transferWithAuthorization(auth);<br> _coffers[auth.from] += auth.value;<br> _coffers[address(0)] += auth.value;<br>emit CustodyUsd(auth.from, auth.value, remark);<br> }<br>function releaseUsd(address from, address to, uint amt, bytes32 remark) external anyKeeper {<br> require(_coffers[from] >= amt,<br> "Cashier.ReleaseUsd: insufficient amt");<br>_coffers[from] -= amt;<br> _coffers[address(0)] -= amt;<br>emit ReleaseUsd(from, to, amt, remark);<br>require(_usd().transfer(to, amt),<br> "Cashier.releaseUsd: transfer failed");<br> }<br>function transferUsd(address to, uint amt, bytes32 remark) external anyKeeper {<br>require(balanceOfComp() >= amt,<br> "Cashier.transferUsd: insufficient amt");<br>emit TransferUsd(to, amt, remark);<br>require(_usd().transfer(to, amt),<br> "Cashier.transferUsd: transfer failed"); <br> }<br>function distributeUsd(uint amt) external {<br>require(msg.sender == address(_gk), <br> "Cashier.DistrUsd: not GK");<br>require(balanceOfComp() >= amt,<br> "Cashier.DistrUsd: insufficient amt");<br>IRegisterOfMembers _rom = _gk.getROM();<br>uint[] memory members = _rom.membersList();<br> uint len = members.length;<br>uint totalPoints = _rom.ownersPoints().points;<br> uint sum = 0;<br>while (len > 1) {<br> uint member = members[len - 1];<br> uint pointsOfMember = _rom.pointsOfMember(member).points;<br> uint value = pointsOfMember \* amt / totalPoints;<br>_lockers[member] += value;<br> _lockers[0] += value;<br>sum += value;<br>len--;<br> }<br>_lockers[members[0]] += (amt - sum);<br> _lockers[0] += (amt - sum);<br>emit DistributeUsd(amt);<br> }<br>function pickupUsd() external {<br>uint caller = _msgSender(msg.sender, 18000);<br> uint value = _lockers[caller];<br>if (value > 0) {<br>_lockers[caller] = 0;<br> _lockers[0] -= value;<br>emit PickupUsd(msg.sender, caller, value);<br>require(_usd().transfer(msg.sender, value),<br> "Cashier.PickupUsd: transfer failed");<br>} else revert("Cashier.pickupDeposit: no balance");<br> }<br>//##################<br> //## Read I/O ##<br> //##################<br>function custodyOf(address acct) external view returns(uint) {<br> return _coffers[acct];<br> }<br>function totalEscrow() external view returns(uint) {<br> return _coffers[address(0)];<br> }<br>function totalDeposits() external view returns(uint) {<br> return _lockers[0];<br> }<br>function depositOfMine(uint user) external view returns(uint) {<br> return _lockers[user];<br> }<br>function balanceOfComp() public view returns(uint) {<br> uint amt = _usd().balanceOf(address(this)); <br> return amt - _coffers[address(0)] - _lockers[0];<br> }<br> }<br>|
| [Contents](#toc) |

---

## IRegisterOfOptions.sol

---

| |
|:---|
| **contracts/comps/books/roo/IRegisterOfOptions.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>import "../roc/terms/IOptions.sol";<br> import "../../../lib/OptionsRepo.sol";<br> import "../../../lib/SwapsRepo.sol";<br>pragma solidity ^0.8.8;<br>interface IRegisterOfOptions {<br>// ################<br> // ## Event ##<br> // ################<br>event CreateOpt(uint256 indexed seqOfOpt, bytes32 indexed codeOfOpt);<br>event IssueOpt(uint256 indexed seqOfOpt, uint indexed issueDate);<br>event AddObligorIntoOpt(uint256 indexed seqOfOpt, uint256 indexed obligor);<br>event RemoveObligorFromOpt(uint256 indexed seqOfOpt, uint256 indexed obligor);<br>event UpdateOracle(uint256 indexed seqOfOpt, uint indexed data1, uint indexed data2, uint data3);<br>event ExecOpt(uint256 indexed seqOfOpt);<br>event RegSwap(uint256 indexed seqOfOpt, bytes32 indexed snOfSwap);<br>event PayOffSwap(uint256 indexed seqOfOpt, bytes32 indexed snOfSwap);<br>event TerminateSwap(uint256 indexed seqOfOpt, uint indexed seqOfSwap);<br>// ################<br> // ## Write ##<br> // ################<br>function createOption(<br> bytes32 sn,<br> bytes32 snOfCond,<br> uint rightholder,<br> uint paid,<br> uint par) external returns(OptionsRepo.Head memory head);<br>function issueOption(OptionsRepo.Option memory opt) external;<br>function regOptionTerms(address opts) external;<br>function addObligorIntoOption(uint256 seqOfOpt, uint256 obligor) external;<br>function removeObligorFromOption(uint256 seqOfOpt, uint256 obligor) external;<br>function updateOracle(<br> uint256 seqOfOpt,<br> uint d1,<br> uint d2,<br> uint d3) external;<br>function execOption(uint256 seqOfOpt, uint caller) external;<br>function createSwap(<br> uint256 seqOfOpt,<br> uint seqOfTarget,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> uint caller) external returns (SwapsRepo.Swap memory swap);<br>function payOffSwap(<br> uint seqOfOpt,<br> uint seqOfSwap) external returns (SwapsRepo.Swap memory swap);<br>function terminateSwap(<br> uint seqOfOpt,<br> uint seqOfSwap) external returns (SwapsRepo.Swap memory swap);<br>// ################<br> // ## Read I/O ##<br> // ################<br>function counterOfOptions() external view returns (uint32);<br>function qtyOfOptions() external view returns (uint);<br>function isOption(uint256 seqOfOpt) external view returns (bool);<br>function getOption(uint256 seqOfOpt) external view<br> returns (OptionsRepo.Option memory opt);<br>function getAllOptions() external view returns (OptionsRepo.Option[] memory);<br>function isRightholder(uint256 seqOfOpt, uint256 acct) external view returns (bool);<br>function isObligor(uint256 seqOfOpt, uint256 acct) external view returns (bool);<br>function getObligorsOfOption(uint256 seqOfOpt)<br> external view returns (uint256[] memory);<br>function getSeqListOfOptions() external view returns(uint[] memory);<br>// ==== Swap ====<br> function counterOfSwaps(uint256 seqOfOpt)<br> external view returns (uint16);<br>function sumPaidOfTarget(uint256 seqOfOpt)<br> external view returns (uint64);<br>function isSwap(uint256 seqOfOpt, uint256 seqOfSwap)<br> external view returns (bool); <br>function getSwap(uint256 seqOfOpt, uint256 seqOfSwap)<br> external view returns (SwapsRepo.Swap memory swap);<br>function getAllSwapsOfOption(uint256 seqOfOpt)<br> external view returns (SwapsRepo.Swap[] memory);<br>function allSwapsClosed(uint256 seqOfOpt)<br> external view returns (bool);<br>// ==== oracles ====<br>function getOracleAtDate(uint256 seqOfOpt, uint date)<br> external view returns (Checkpoints.Checkpoint memory);<br>function getLatestOracle(uint256 seqOfOpt) external <br> view returns(Checkpoints.Checkpoint memory);<br>function getAllOraclesOfOption(uint256 seqOfOpt)<br> external view returns (Checkpoints.Checkpoint[] memory);<br>// ==== Value ====<br>function checkValueOfSwap(uint seqOfOpt, uint seqOfSwap)<br> external view returns (uint);<br>}<br>|
| [Contents](#toc) |

---

## RegisterOfOptions.sol

---

| |
|:---|
| **contracts/comps/books/roo/RegisterOfOptions.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegisterOfOptions.sol";<br>import "../../common/access/AccessControl.sol";<br>contract RegisterOfOptions is IRegisterOfOptions, AccessControl {<br> using OptionsRepo for OptionsRepo.Repo;<br>OptionsRepo.Repo private _repo;<br>// ################<br> // ## Write I/O ##<br> // ################<br>function createOption(<br> bytes32 sn,<br> bytes32 snOfCond,<br> uint rightholder,<br> uint paid,<br> uint par) external onlyKeeper returns(OptionsRepo.Head memory head) {<br> head = _repo.createOption(sn, snOfCond, rightholder, paid, par);<br> emit CreateOpt(head.seqOfOpt, OptionsRepo.codifyHead(head));<br> }<br>function issueOption(OptionsRepo.Option memory opt) external onlyKeeper <br> {<br> uint issueDate = _repo.issueOption(opt);<br> emit IssueOpt(opt.head.seqOfOpt, issueDate);<br> }<br>function regOptionTerms(address opts) external onlyKeeper {<br>OptionsRepo.Option[] memory optsList = IOptions(opts).getAllOptions();<br>uint len = optsList.length;<br>while (len > 0) {<br> OptionsRepo.Option memory opt = optsList[len - 1]; <br>opt.head.issueDate = uint48(block.timestamp);<br> opt.body.state = uint8(OptionsRepo.StateOfOpt.Issued);<br>uint256[] memory obligors = <br> IOptions(opts).getObligorsOfOption(opt.head.seqOfOpt);<br>opt.head = _repo.regOption(opt);<br>_repo.addObligorsIntoOption(opt.head.seqOfOpt, obligors);<br>emit CreateOpt(opt.head.seqOfOpt, OptionsRepo.codifyHead(opt.head));<br>len--;<br> }<br> }<br>function addObligorIntoOption(uint256 seqOfOpt, uint256 obligor) external onlyDK {<br> if (_repo.addObligorIntoOption(seqOfOpt, obligor))<br> emit AddObligorIntoOpt(seqOfOpt, obligor);<br> }<br>function removeObligorFromOption(uint256 seqOfOpt, uint256 obligor) external onlyDK {<br> if (_repo.removeObligorFromOption(seqOfOpt, obligor))<br> emit RemoveObligorFromOpt(seqOfOpt, obligor);<br> }<br>// ==== Exec Option ====<br>function updateOracle(<br> uint256 seqOfOpt,<br> uint d1,<br> uint d2,<br> uint d3) external onlyDK {<br> _repo.updateOracle(seqOfOpt, d1, d2, d3);<br> emit UpdateOracle(seqOfOpt, d1, d2, d3);<br> }<br>function execOption(uint256 seqOfOpt, uint caller) external onlyKeeper {<br> _repo.execOption(seqOfOpt, caller);<br> emit ExecOpt(seqOfOpt);<br> }<br>function createSwap(<br> uint256 seqOfOpt,<br> uint seqOfTarget,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> uint caller) external onlyKeeper returns (SwapsRepo.Swap memory swap) {<br> swap = _repo.createSwap(seqOfOpt, seqOfTarget, paidOfTarget, seqOfPledge, caller, _gk.getROS());<br> emit RegSwap(seqOfOpt, SwapsRepo.codifySwap(swap));<br> }<br>function payOffSwap(<br> uint seqOfOpt,<br> uint seqOfSwap<br> // uint msgValue,<br> // uint centPrice) external returns (SwapsRepo.Swap memory swap) {<br> swap = _repo.payOffSwap(seqOfOpt, seqOfSwap);<br> emit PayOffSwap(seqOfOpt, SwapsRepo.codifySwap(swap));<br> }<br>function terminateSwap(<br> uint seqOfOpt,<br> uint seqOfSwap) external returns (SwapsRepo.Swap memory swap){<br> swap = _repo.terminateSwap(seqOfOpt, seqOfSwap);<br> emit TerminateSwap(seqOfOpt, seqOfSwap);<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>// ==== Option ====<br>function counterOfOptions() external view returns (uint32) {<br> return _repo.counterOfOptions();<br> }<br>function qtyOfOptions() external view returns (uint) {<br> return _repo.qtyOfOptions();<br> }<br>function isOption(uint256 seqOfOpt) public view returns (bool) {<br> return _repo.isOption(seqOfOpt);<br> }<br>function getOption(uint256 seqOfOpt) external view<br> returns (OptionsRepo.Option memory opt)<br> {<br> opt = _repo.getOption(seqOfOpt);<br> }<br>function getAllOptions() external view <br> returns (OptionsRepo.Option[] memory) <br> {<br> return _repo.getAllOptions();<br> }<br>function isRightholder(uint256 seqOfOpt, uint256 acct) <br> external view returns (bool)<br> {<br> return _repo.isRightholder(seqOfOpt, acct);<br> }<br>function isObligor(uint256 seqOfOpt, uint256 acct) external view<br> returns (bool) <br> { <br> return _repo.isObligor(seqOfOpt, acct);<br> }<br>function getObligorsOfOption(uint256 seqOfOpt)<br> external view returns (uint256[] memory)<br> {<br> return _repo.getObligorsOfOption(seqOfOpt);<br> }<br>function getSeqListOfOptions() external view returns(uint[] memory) {<br> return _repo.getSeqList();<br> }<br>// ==== Swap ====<br> function counterOfSwaps(uint256 seqOfOpt)<br> external view returns (uint16) <br> {<br> return _repo.counterOfSwaps(seqOfOpt);<br> }<br>function sumPaidOfTarget(uint256 seqOfOpt)<br> external view returns (uint64) <br> {<br> return _repo.sumPaidOfTarget(seqOfOpt);<br> }<br>function isSwap(uint256 seqOfOpt, uint256 seqOfSwap)<br> public view returns (bool) <br> {<br> return _repo.isSwap(seqOfOpt, seqOfSwap);<br> }<br>function getSwap(uint256 seqOfOpt, uint256 seqOfSwap)<br> external view returns (SwapsRepo.Swap memory)<br> {<br> return _repo.getSwap(seqOfOpt, seqOfSwap);<br> }<br>function getAllSwapsOfOption(uint256 seqOfOpt)<br> external view returns (SwapsRepo.Swap[] memory)<br> {<br> return _repo.getAllSwapsOfOption(seqOfOpt);<br> }<br>function allSwapsClosed(uint256 seqOfOpt)<br> external view returns (bool)<br> {<br> return _repo.allSwapsClosed(seqOfOpt);<br> }<br>// ==== Oracles ====<br>function getOracleAtDate(uint256 seqOfOpt, uint date)<br> external<br> view<br> returns (Checkpoints.Checkpoint memory)<br> {<br> return _repo.getOracleAtDate(seqOfOpt, date);<br> }<br>function getLatestOracle(uint256 seqOfOpt) external <br> view returns(Checkpoints.Checkpoint memory)<br> {<br> return _repo.getLatestOracle(seqOfOpt);<br> }<br>function getAllOraclesOfOption(uint256 seqOfOpt)<br> external<br> view<br> returns (Checkpoints.Checkpoint[] memory) <br> {<br> return _repo.getAllOraclesOfOption(seqOfOpt);<br> }<br>// ==== Value ====<br>function checkValueOfSwap(uint seqOfOpt, uint seqOfSwap)<br> external view returns (uint)<br> {<br> SwapsRepo.Swap memory swap = _repo.getSwap(seqOfOpt, seqOfSwap);<br> uint centPrice = _gk.getCentPrice();<br> return centPrice \* swap.paidOfTarget \* swap.priceOfDeal / 10 \*\* 6;<br> }<br>}<br>|
| [Contents](#toc) |

---

## RegisterOfAgreements.sol

---

| |
|:---|
| **contracts/comps/books/roa/RegisterOfAgreements.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegisterOfAgreements.sol";<br>import "../../common/components/FilesFolder.sol";<br>contract RegisterOfAgreements is IRegisterOfAgreements, FilesFolder {<br> using DTClaims for DTClaims.Claims;<br> using DTClaims for DTClaims.Head;<br> using FRClaims for FRClaims.Claims;<br> using FilesRepo for FilesRepo.Repo;<br> using TopChain for TopChain.Chain;<br>// ia => frClaims<br> mapping(address => FRClaims.Claims) private _frClaims;<br> // ia => dtClaims<br> mapping(address => DTClaims.Claims) private _dtClaims;<br> // ia => mockResults<br> mapping(address => TopChain.Chain) private _mockOfIA;<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== FirstRefusal ====<br>function claimFirstRefusal(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 caller,<br> bytes32 sigHash) external onlyKeeper {<br> require(block.timestamp < _repo.frExecDeadline(ia),<br> "ROA.claimFR: missed frExecDeadline");<br> _frClaims[ia].claimFirstRefusal(seqOfDeal, caller, sigHash);<br> emit ClaimFirstRefusal(ia, seqOfDeal, caller);<br> }<br>function computeFirstRefusal(<br> address ia,<br> uint256 seqOfDeal) external onlyKeeper returns (FRClaims.Claim[] memory output) {<br> require(block.timestamp >= _repo.frExecDeadline(ia),<br> "ROA.computeFR: not reached frExecDeadline");<br> output = _frClaims[ia].computeFirstRefusal(seqOfDeal, _gk.getROM());<br> emit ComputeFirstRefusal(ia, seqOfDeal);<br> }<br>// ==== DragAlong & TagAlong ====<br>function execAlongRight(<br> address ia,<br> bool dragAlong,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> uint256 caller,<br> bytes32 sigHash) external onlyKeeper {<br> require(block.timestamp >= _repo.frExecDeadline(ia),<br> "ROA.execDT: not reached frExecDeadline");<br> require(block.timestamp < _repo.dtExecDeadline(ia),<br> "ROA.execDT: missed dtExecDeadline");<br>_dtClaims[ia].execAlongRight(dragAlong, seqOfDeal, seqOfShare, paid, par, caller, sigHash);<br>DTClaims.Head memory head = DTClaims.Head({<br> seqOfDeal: uint16(seqOfDeal),<br> dragAlong: dragAlong,<br> seqOfShare: uint32(seqOfShare),<br> paid: uint64(paid),<br> par: uint64(par),<br> caller: uint40(caller),<br> para: 0,<br> argu: 0<br> });<br>emit ExecAlongRight(ia, head.codifyHead(), sigHash);<br> }<br>function acceptAlongClaims(<br> address ia, <br> uint seqOfDeal) external onlyKeeper returns(DTClaims.Claim[] memory) {<br> require(block.timestamp >= _repo.dtExecDeadline(ia),<br> "ROA.execDT: not reached frExecDeadline");<br>emit AcceptAlongClaims(ia, seqOfDeal);<br> return _dtClaims[ia].acceptAlongClaims(seqOfDeal);<br> }<br>// ==== Mock ====<br>function createMockOfIA(address ia) external onlyKeeper {<br> if (_mockOfIA[ia].qtyOfMembers() == 0) {<br> (TopChain.Node[] memory list, TopChain.Para memory para) = <br> _gk.getROM().getSnapshot();<br> _mockOfIA[ia].restoreChain(list, para);<br> _mockOfIA[ia].mockDealsOfIA(IInvestmentAgreement(ia), _gk.getROS());<br> }<br> }<br>//###############<br> //## Read I/O ##<br> //###############<br>// ==== FR Claims ====<br>function hasFRClaims(address ia, uint seqOfDeal) external view returns (bool) {<br> return _frClaims[ia].isDeal(seqOfDeal);<br> }<br>function isFRClaimer(address ia, uint256 acct) external view returns (bool)<br> {<br> return _frClaims[ia].isClaimer(acct);<br> }<br>function getSubjectDealsOfFR(address ia) external view returns(uint[] memory) {<br> return _frClaims[ia].getDeals();<br> }<br>function getFRClaimsOfDeal(address ia, uint256 seqOfDeal)<br> external view returns(FRClaims.Claim[] memory) <br> {<br> return _frClaims[ia].getClaimsOfDeal(seqOfDeal);<br> }<br>function allFRClaimsAccepted(address ia) external view returns (bool) {<br> return _frClaims[ia].allAccepted();<br> } <br>// ==== DT Claims ====<br>function hasDTClaims(address ia, uint256 seqOfDeal) <br> public view returns(bool)<br> {<br> return _dtClaims[ia].hasClaim(seqOfDeal);<br> }<br>function getSubjectDealsOfDT(address ia) <br> public view returns(uint256[] memory)<br> {<br> return _dtClaims[ia].getDeals();<br> }<br>function getDTClaimsOfDeal(address ia, uint256 seqOfDeal)<br> external view returns(DTClaims.Claim[] memory)<br> {<br> return _dtClaims[ia].getClaimsOfDeal(seqOfDeal);<br> }<br>function getDTClaimForShare(address ia, uint256 seqOfDeal, uint256 seqOfShare)<br> external view returns(DTClaims.Claim memory)<br> {<br> return _dtClaims[ia].getClaimForShare(seqOfDeal, seqOfShare);<br> }<br>function allDTClaimsAccepted(address ia) external view returns(bool) {<br> return _dtClaims[ia].allAccepted();<br> }<br>// ==== Mock Results ====<br>function mockResultsOfIA(address ia)<br> external view<br> returns (uint40 controllor, uint16 ratio) <br> {<br> TopChain.Chain storage mock = _mockOfIA[ia];<br>controllor = mock.head();<br> ratio = uint16 (mock.votesOfGroup(controllor) / mock.totalVotes());<br> }<br>function mockResultsOfAcct(address ia, uint256 acct)<br> external view<br> returns (uint40 groupRep, uint16 ratio) <br> {<br> TopChain.Chain storage mock = _mockOfIA[ia];<br>groupRep = mock.rootOf(acct);<br> ratio = uint16 (mock.votesOfGroup(groupRep) / mock.totalVotes());<br> }<br>// ==== allClaimsAccepted ====<br>function allClaimsAccepted(address ia) external view returns(bool) {<br> return (_dtClaims[ia].allAccepted() && _frClaims[ia].allAccepted());<br> }<br> }<br>|
| [Contents](#toc) |

---

## InvestmentAgreement.sol

---

| |
|:---|
| **contracts/comps/books/roa/InvestmentAgreement.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../common/components/SigPage.sol";<br>import "./IInvestmentAgreement.sol";<br>contract InvestmentAgreement is IInvestmentAgreement, SigPage {<br> using DealsRepo for DealsRepo.Repo;<br> using SigsRepo for SigsRepo.Page;<br>DealsRepo.Repo private _repo;<br>//#################<br> //## Write I/O ##<br> //#################<br>function addDeal(<br> bytes32 sn,<br> uint buyer,<br> uint groupOfBuyer,<br> uint paid,<br> uint par,<br> uint distrWeight) external onlyAttorney() {<br> _repo.addDeal(sn, buyer, groupOfBuyer, paid, par, distrWeight);<br> // emit AddDeal(seqOfDeal);<br> }<br>function regDeal(DealsRepo.Deal memory deal) <br> external attorneyOrKeeper returns(uint16 seqOfDeal) <br> {<br> seqOfDeal = _repo.regDeal(deal);<br>if (!isFinalized()) {<br> if (deal.head.seller != 0) _sigPages[0].addBlank(false, seqOfDeal, deal.head.seller);<br> _sigPages[0].addBlank(true, seqOfDeal, deal.body.buyer);<br> } else {<br> if (deal.head.seller != 0) _sigPages[1].addBlank(false, seqOfDeal, deal.head.seller);<br> _sigPages[1].addBlank(true, seqOfDeal, deal.body.buyer);<br> } <br>emit RegDeal(seqOfDeal);<br> }<br>function delDeal(uint256 seq) external onlyAttorney {<br>DealsRepo.Deal memory deal = _repo.deals[seq];<br>if (_repo.delDeal(seq)) {<br> if (deal.head.seller != 0) {<br> _sigPages[0].removeBlank(deal.head.seqOfDeal, deal.head.seller);<br> }<br> _sigPages[0].removeBlank(deal.head.seqOfDeal, deal.body.buyer);<br> }<br> }<br>function lockDealSubject(uint256 seq) external onlyKeeper returns (bool flag) {<br> flag = _repo.lockDealSubject(seq);<br> }<br>function releaseDealSubject(uint256 seq)<br> external onlyDK returns (bool flag)<br> {<br> flag = _repo.releaseDealSubject(seq);<br> }<br>function clearDealCP(<br> uint256 seq,<br> bytes32 hashLock,<br> uint closingDeadline) external onlyDK {<br> _repo.clearDealCP(seq, hashLock, closingDeadline);<br> emit ClearDealCP(seq, hashLock, closingDeadline);<br> }<br>function closeDeal(uint256 seq, string memory hashKey)<br> external<br> onlyDK<br> returns (bool flag)<br> { <br> flag = _repo.closeDeal(seq, hashKey);<br> emit CloseDeal(seq, hashKey);<br> }<br>function directCloseDeal(uint256 seq)<br> external<br> onlyDK<br> returns (bool flag)<br> { <br> flag = _repo.directCloseDeal(seq);<br> emit CloseDeal(seq, '');<br> }<br>function terminateDeal(uint256 seqOfDeal) <br> external onlyKeeper returns(bool flag)<br> {<br> flag = _repo.terminateDeal(seqOfDeal);<br> emit TerminateDeal(seqOfDeal);<br> }<br>function takeGift(uint256 seq)<br> external onlyKeeper returns (bool flag)<br> {<br> flag = _repo.takeGift(seq);<br> emit CloseDeal(seq, "0");<br> }<br>function finalizeIA() external {<br> _repo.calTypeOfIA();<br> lockContents();<br> }<br>// ==== Swap ====<br>function createSwap (<br> uint seqOfMotion,<br> uint seqOfDeal,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> uint caller) external onlyKeeper returns(SwapsRepo.Swap memory swap) {<br>swap = _repo.createSwap(seqOfMotion, seqOfDeal, paidOfTarget, <br> seqOfPledge, caller, _gk.getROS(), _gk.getGMM());<br>emit CreateSwap(seqOfDeal, SwapsRepo.codifySwap(swap));<br> }<br>function payOffSwap(<br> uint seqOfDeal,<br> uint seqOfSwap) external onlyKeeper returns(SwapsRepo.Swap memory swap){<br> swap = _repo.payOffSwap(seqOfDeal, seqOfSwap);<br> emit PayOffSwap(seqOfDeal, seqOfSwap);<br> }<br>function terminateSwap(<br> uint seqOfMotion,<br> uint seqOfDeal,<br> uint seqOfSwap) external onlyKeeper returns (SwapsRepo.Swap memory swap){<br> swap = _repo.terminateSwap(seqOfMotion, seqOfDeal, <br> seqOfSwap, _gk.getGMM());<br> emit TerminateSwap(seqOfDeal, seqOfSwap); <br> }<br>function payOffApprovedDeal(<br> uint seqOfDeal,<br> uint msgValue,<br> uint caller) external returns (bool flag){<br> flag = _repo.payOffApprovedDeal(seqOfDeal, caller);<br> emit PayOffApprovedDeal(seqOfDeal, msgValue);<br> }<br>function requestPriceDiff(<br> uint seqOfDeal,<br> uint seqOfShare) external onlyKeeper {<br> _repo.requestPriceDiff(seqOfDeal, seqOfShare);<br> }<br>// #################################<br> // ## Read I/O ##<br> // #################################<br>function getTypeOfIA() external view returns (uint8) {<br> return _repo.getTypeOfIA();<br> }<br>function getDeal(uint256 seqOfDeal) external view returns (DealsRepo.Deal memory)<br> {<br> return _repo.getDeal(seqOfDeal);<br> }<br>function getSeqList() external view returns (uint[] memory) {<br> return _repo.getSeqList();<br> }<br>// ==== Swap ====<br>function getSwap(uint seqOfDeal, uint256 seqOfSwap)<br> external view returns (SwapsRepo.Swap memory)<br> {<br> return _repo.getSwap(seqOfDeal, seqOfSwap);<br> }<br>function getAllSwaps(uint seqOfDeal)<br> external view returns (SwapsRepo.Swap[] memory)<br> {<br> return _repo.getAllSwaps(seqOfDeal);<br> }<br>function allSwapsClosed(uint seqOfDeal)<br> external view returns (bool)<br> {<br> return _repo.allSwapsClosed(seqOfDeal);<br> } <br>// ==== Value ====<br>function checkValueOfSwap(uint seqOfDeal, uint seqOfSwap)<br> external view returns(uint)<br> {<br> SwapsRepo.Swap memory swap = _repo.getSwap(seqOfDeal, seqOfSwap); <br> uint centPrice = _gk.getCentPrice();<br> return centPrice \* swap.paidOfTarget \* swap.priceOfDeal / 10 \*\* 6;<br> // return _repo.checkValueOfSwap(seqOfDeal, seqOfSwap, _gk.getCentPrice());<br> }<br>function checkValueOfDeal(uint seqOfDeal)<br> external view returns (uint)<br> {<br> return _repo.checkValueOfDeal(seqOfDeal, _gk.getCentPrice());<br> }<br> }<br>|
| [Contents](#toc) |

---

## IRegisterOfAgreements.sol

---

| |
|:---|
| **contracts/comps/books/roa/IRegisterOfAgreements.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../common/components/IFilesFolder.sol";<br> import "./IInvestmentAgreement.sol";<br>import "../../../lib/DTClaims.sol";<br> import "../../../lib/FRClaims.sol";<br> import "../../../lib/TopChain.sol";<br>interface IRegisterOfAgreements is IFilesFolder {<br>//#################<br> //## Event ##<br> //#################<br>event ClaimFirstRefusal(address indexed ia, uint256 indexed seqOfDeal, uint256 indexed caller);<br>event AcceptAlongClaims(address indexed ia, uint indexed seqOfDeal);<br>event ExecAlongRight(address indexed ia, bytes32 indexed snOfDTClaim, bytes32 sigHash);<br>event ComputeFirstRefusal(address indexed ia, uint256 indexed seqOfDeal);<br>//#################<br> //## Write I/O ##<br> //#################<br>// ======== RegisterOfAgreements ========<br>function claimFirstRefusal(<br> address ia,<br> uint256 seqOfDeal,<br> uint256 caller,<br> bytes32 sigHash) external;<br>function computeFirstRefusal(<br> address ia,<br> uint256 seqOfDeal) external returns (FRClaims.Claim[] memory output);<br>function execAlongRight(<br> address ia,<br> bool dragAlong,<br> uint256 seqOfDeal,<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> uint256 caller,<br> bytes32 sigHash) external;<br>function acceptAlongClaims(<br> address ia, <br> uint seqOfDeal) external returns(DTClaims.Claim[] memory);<br>function createMockOfIA(address ia) external;<br>//################<br> //## Read ##<br> //################<br>// ==== FR Claims ====<br>function hasFRClaims(address ia, uint seqOfDeal) external view returns (bool);<br>function isFRClaimer(address ia, uint256 acct) external returns (bool);<br>function getSubjectDealsOfFR(address ia) external view returns(uint[] memory);<br>function getFRClaimsOfDeal(address ia, uint256 seqOfDeal)<br> external view returns(FRClaims.Claim[] memory);<br>function allFRClaimsAccepted(address ia) external view returns (bool);<br>// ==== DT Claims ====<br>function hasDTClaims(address ia, uint256 seqOfDeal) <br> external view returns(bool);<br>function getSubjectDealsOfDT(address ia)<br> external view returns(uint256[] memory);<br>function getDTClaimsOfDeal(address ia, uint256 seqOfDeal)<br> external view returns(DTClaims.Claim[] memory);<br>function getDTClaimForShare(address ia, uint256 seqOfDeal, uint256 seqOfShare)<br> external view returns(DTClaims.Claim memory);<br>function allDTClaimsAccepted(address ia) external view returns(bool);<br>// ==== Mock Results ====<br>function mockResultsOfIA(address ia) <br> external view <br> returns (uint40 controllor, uint16 ratio);<br>function mockResultsOfAcct(address ia, uint256 acct) <br> external view <br> returns (uint40 groupRep, uint16 ratio);<br>// ==== AllClaimsAccepted ====<br>function allClaimsAccepted(address ia) external view returns(bool);<br>}<br>|
| [Contents](#toc) |

---

## IInvestmentAgreement.sol

---

| |
|:---|
| **contracts/comps/books/roa/IInvestmentAgreement.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/SwapsRepo.sol";<br> import "../../../lib/DealsRepo.sol";<br>import "../../common/components/ISigPage.sol";<br>interface IInvestmentAgreement is ISigPage {<br>//##################<br> //## Event ##<br> //##################<br>event RegDeal(uint indexed seqOfDeal);<br>event ClearDealCP(<br> uint256 indexed seq,<br> bytes32 indexed hashLock,<br> uint indexed closingDeadline);<br>event CloseDeal(uint256 indexed seq, string indexed hashKey);<br>event TerminateDeal(uint256 indexed seq);<br>event CreateSwap(uint seqOfDeal, bytes32 snOfSwap);<br>event PayOffSwap(uint seqOfDeal, uint seqOfSwap);<br>event TerminateSwap(uint seqOfDeal, uint seqOfSwap);<br>event PayOffApprovedDeal(uint seqOfDeal, uint msgValue);<br>//##################<br> //## Write I/O ##<br> //##################<br>// ======== InvestmentAgreement ========<br>function addDeal(<br> bytes32 sn,<br> uint buyer,<br> uint groupOfBuyer,<br> uint paid,<br> uint par,<br> uint distrWeight) external;<br>function regDeal(DealsRepo.Deal memory deal) external returns(uint16 seqOfDeal);<br>function delDeal(uint256 seq) external;<br>function lockDealSubject(uint256 seq) external returns (bool flag);<br>function releaseDealSubject(uint256 seq) external returns (bool flag);<br>function clearDealCP(uint256 seq, bytes32 hashLock, uint closingDeadline) external;<br>function closeDeal(uint256 seq, string memory hashKey)<br> external returns (bool flag);<br>function directCloseDeal(uint256 seq) external returns (bool flag);<br>function terminateDeal(uint256 seqOfDeal) external returns(bool);<br>function takeGift(uint256 seq) external returns(bool);<br>function finalizeIA() external;<br>// ==== Swap ====<br>function createSwap (<br> uint seqOfMotion,<br> uint seqOfDeal,<br> uint paidOfTarget,<br> uint seqOfPledge,<br> uint caller) external returns(SwapsRepo.Swap memory swap);<br>function payOffSwap(<br> uint seqOfDeal,<br> uint seqOfSwap) external returns(SwapsRepo.Swap memory swap);<br>function terminateSwap(<br> uint seqOfMotion,<br> uint seqOfDeal,<br> uint seqOfSwap) external returns (SwapsRepo.Swap memory swap);<br>function payOffApprovedDeal(<br> uint seqOfDeal,<br> uint msgValue,<br> uint caller) external returns (bool flag);<br>function requestPriceDiff(<br> uint seqOfDeal,<br> uint seqOfShare) external;<br>// #####################<br> // ## Read I/O ##<br> // #####################<br>// ======== InvestmentAgreement ========<br> function getTypeOfIA() external view returns (uint8);<br>function getDeal(uint256 seq) external view returns (DealsRepo.Deal memory);<br>function getSeqList() external view returns (uint[] memory);<br>// ==== Swap ====<br>function getSwap(uint seqOfDeal, uint256 seqOfSwap)<br> external view returns (SwapsRepo.Swap memory);<br>function getAllSwaps(uint seqOfDeal)<br> external view returns (SwapsRepo.Swap[] memory);<br>function allSwapsClosed(uint seqOfDeal)<br> external view returns (bool);<br>function checkValueOfSwap(uint seqOfDeal, uint seqOfSwap)<br> external view returns(uint);<br>function checkValueOfDeal(uint seqOfDeal)<br> external view returns (uint);<br>}<br>|
| [Contents](#toc) |

---

## IRegisterOfShares.sol

---

| |
|:---|
| **contracts/comps/books/ros/IRegisterOfShares.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/SharesRepo.sol";<br> import "../../../lib/LockersRepo.sol";<br>import "../rom/IRegisterOfMembers.sol";<br>interface IRegisterOfShares {<br>//##################<br> //## Event ##<br> //##################<br>event IssueShare(bytes32 indexed shareNumber, uint indexed paid, uint indexed par);<br>event TransferShare(bytes32 indexed shareNumber, bytes32 indexed newShareNumber, uint indexed paid, uint par);<br>event PayInCapital(uint256 indexed seqOfShare, uint indexed amount);<br>event SubAmountFromShare(uint256 indexed seqOfShare, uint indexed paid, uint indexed par);<br>event DeregisterShare(uint256 indexed seqOfShare);<br>event UpdatePriceOfPaid(uint indexed seqOfShare, uint indexed newPrice);<br>event UpdatePaidInDeadline(uint256 indexed seqOfShare, uint indexed paidInDeadline);<br>event DecreaseCleanPaid(uint256 indexed seqOfShare, uint indexed paid);<br>event IncreaseCleanPaid(uint256 indexed seqOfShare, uint indexed paid);<br>event SetPayInAmt(bytes32 indexed headSn, bytes32 indexed hashLock);<br>event WithdrawPayInAmt(uint indexed seqOfShare, uint indexed amount);<br>event IncreaseEquityOfClass(bool indexed isIncrease, uint indexed class, uint indexed amt);<br>//##################<br> //## Write I/O ##<br> //##################<br>function issueShare(<br> bytes32 shareNumber, <br> uint payInDeadline, <br> uint paid, <br> uint par, <br> uint distrWeight) external;<br>function addShare(SharesRepo.Share memory share) external;<br>function setPayInAmt(uint seqOfShare, uint amt, uint expireDate, bytes32 hashLock) external;<br>function requestPaidInCapital(bytes32 hashLock, string memory hashKey) external;<br>function withdrawPayInAmt(bytes32 hashLock, uint seqOfShare) external;<br>function payInCapital(uint seqOfShare, uint amt) external;<br>function transferShare(<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> uint to,<br> uint priceOfPaid,<br> uint priceOfPar) external;<br>function decreaseCapital(uint256 seqOfShare, uint paid, uint par) external;<br>// ==== CleanPaid ====<br>function decreaseCleanPaid(uint256 seqOfShare, uint paid) external;<br>function increaseCleanPaid(uint256 seqOfShare, uint paid) external;<br>// ==== State & PaidInDeadline ====<br>function updatePriceOfPaid(uint seqOfShare, uint newPrice) external;<br>function updatePaidInDeadline(uint256 seqOfShare, uint paidInDeadline) external;<br>// ==== EquityOfClass ====<br>function increaseEquityOfClass(<br> bool isIncrease,<br> uint classOfShare,<br> uint deltaPaid,<br> uint deltaPar,<br> uint deltaCleanPaid) external;<br>function restoreShares(SharesRepo.Share[] memory shares, SharesRepo.Share[] memory classes) external;<br>// ##################<br> // ## Read I/O ##<br> // ##################<br>function counterOfShares() external view returns (uint32);<br>function counterOfClasses() external view returns (uint16);<br>// ==== SharesRepo ====<br>function isShare(<br> uint256 seqOfShare) external view returns (bool);<br>function getShare(<br> uint256 seqOfShare) external view returns (<br> SharesRepo.Share memory);<br>function getQtyOfShares() external view returns (uint);<br>function getSeqListOfShares() external view returns (uint[] memory);<br>function getSharesList() external view returns (SharesRepo.Share[] memory);<br>function getShareZero() external view returns (SharesRepo.Share memory);<br>// ---- Class ---- <br>function getQtyOfSharesInClass(<br> uint classOfShare) external view returns (uint);<br>function getSeqListOfClass(<br> uint classOfShare) external view returns (uint[] memory);<br>function getInfoOfClass(<br> uint classOfShare) external view returns (SharesRepo.Share memory);<br>function getSharesOfClass(<br> uint classOfShare) external view returns (SharesRepo.Share[] memory);<br>function getPremium() external view returns (uint);<br>// ==== PayInCapital ====<br>function getLocker(<br> bytes32 hashLock) external view returns (LockersRepo.Locker memory);<br>function getLocksList() external view returns (bytes32[] memory);<br>// ==== NotLocked ====<br>function notLocked(<br> uint seqOfShare,<br> uint closingDate) external view returns(bool);<br>}<br>|
| [Contents](#toc) |

---

## RegisterOfShares.sol

---

| |
|:---|
| **contracts/comps/books/ros/RegisterOfShares.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegisterOfShares.sol";<br> import "../../common/access/AnyKeeper.sol";<br>contract RegisterOfShares is IRegisterOfShares, AnyKeeper {<br> using LockersRepo for LockersRepo.Repo;<br> using LockersRepo for bytes32;<br> using SharesRepo for SharesRepo.Repo;<br> using SharesRepo for SharesRepo.Share;<br> using SharesRepo for SharesRepo.Head;<br> using SharesRepo for uint256;<br>SharesRepo.Repo private _repo;<br> LockersRepo.Repo private _lockers;<br>//##################<br> //## Write I/O ##<br> //##################<br>// ==== IssueShare ====<br>function issueShare(<br> bytes32 shareNumber, <br> uint payInDeadline, <br> uint paid,<br> uint par,<br> uint distrWeight) external anyKeeper {<br>SharesRepo.Share memory share =<br> SharesRepo.createShare(shareNumber, payInDeadline, paid, par, distrWeight);<br>addShare(share);<br> }<br>function addShare(<br> SharesRepo.Share memory share) public anyKeeper {<br>IRegisterOfMembers _rom = _gk.getROM();<br>share = _repo.addShare(share);<br> _repo.increaseEquityOfClass(<br> true,<br> share.head.class,<br> share.body.paid,<br> share.body.par,<br> 0);<br>_rom.addMember(share.head.shareholder);<br> _rom.capIncrease(<br> share.head.votingWeight,<br> share.body.distrWeight,<br> share.body.paid,<br> share.body.par,<br> true);<br> _rom.addShareToMember(share);<br>emit IssueShare(<br> share.head.codifyHead(), <br> share.body.paid, <br> share.body.par);<br> }<br>// ==== PayInCapital ====<br>function setPayInAmt(<br> uint seqOfShare, <br> uint amt, <br> uint expireDate, <br> bytes32 hashLock) external onlyDK {<br>SharesRepo.Share storage share = <br> _repo.shares[seqOfShare];<br>LockersRepo.Head memory head = <br> LockersRepo.Head({<br> from: share.head.seqOfShare,<br> to: share.head.shareholder,<br> expireDate: uint48(expireDate),<br> value: uint128(amt)<br> });<br>_lockers.lockPoints(head, hashLock);<br>emit SetPayInAmt(LockersRepo.codifyHead(head), hashLock);<br> }<br>function requestPaidInCapital(<br> bytes32 hashLock, <br> string memory hashKey) external onlyDK {<br>LockersRepo.Head memory head = <br> _lockers.pickupPoints(hashLock, hashKey, 0);<br>if (head.value > 0) {<br>SharesRepo.Share storage share = <br> _repo.shares[head.from];<br>_payInCapital(share, head.value);<br> }<br> }<br>function withdrawPayInAmt(<br> bytes32 hashLock, <br> uint seqOfShare) external onlyDK {<br>LockersRepo.Head memory head = <br> _lockers.withdrawDeposit(hashLock, seqOfShare);<br>emit WithdrawPayInAmt(head.from, head.value);<br> }<br>function payInCapital(<br> uint seqOfShare, <br> uint amt) external anyKeeper {<br>SharesRepo.Share storage share = <br> _repo.shares[seqOfShare];<br>_payInCapital(share, amt);<br> }<br>// ==== TransferShare ====<br>function transferShare(<br> uint256 seqOfShare,<br> uint paid,<br> uint par,<br> uint to,<br> uint priceOfPaid,<br> uint priceOfPar) external anyKeeper {<br>IRegisterOfMembers _rom = _gk.getROM();<br>SharesRepo.Share storage share = _repo.shares[seqOfShare];<br>require(share.head.shareholder != to,<br> "ROS.transferShare: self deal");<br>SharesRepo.Share memory newShare;<br>newShare.head = SharesRepo.Head({<br> seqOfShare: 0,<br> preSeq: share.head.seqOfShare,<br> class: share.head.class,<br> issueDate: 0,<br> shareholder: uint40(to),<br> priceOfPaid: uint32(priceOfPaid),<br> priceOfPar: uint32(priceOfPar),<br> votingWeight: share.head.votingWeight,<br> argu: 0<br> });<br>newShare.body = SharesRepo.Body({<br> payInDeadline: share.body.payInDeadline,<br> paid: uint64(paid),<br> par: uint64(par),<br> cleanPaid: uint64(paid),<br> distrWeight: share.body.distrWeight<br> }); <br>_decreaseShareAmt(share, paid, par);<br>_rom.addMember(to);<br>newShare = _repo.regShare(newShare);<br>_rom.addShareToMember(newShare);<br>emit TransferShare(<br> share.head.codifyHead(),<br> newShare.head.codifyHead(),<br> paid,<br> par);<br> }<br>// ==== DecreaseCapital ====<br>function decreaseCapital(<br> uint256 seqOfShare,<br> uint paid,<br> uint par) external onlyDK {<br>SharesRepo.Share storage share = <br> _repo.shares[seqOfShare];<br>_repo.increaseEquityOfClass(<br> false,<br> share.head.class,<br> paid,<br> par,<br> 0);<br>_gk.getROM().capIncrease(<br> share.head.votingWeight, <br> share.body.distrWeight,<br> paid, <br> par,<br> false);<br>_decreaseShareAmt(share, paid, par);<br> }<br>// ==== cleanAmt ====<br>function decreaseCleanPaid(<br> uint256 seqOfShare, <br> uint paid) external {<br>require(msg.sender == address(_gk.getROP()) \|\|<br> _isKeeper(msg.sender), <br> "ROS.decrClean: access denied");<br>_repo.increaseCleanPaid(<br> false,<br> seqOfShare,<br> paid);<br>emit DecreaseCleanPaid(seqOfShare, paid);<br> }<br>function increaseCleanPaid(<br> uint256 seqOfShare, <br> uint paid) external {<br>require(msg.sender == address(_gk.getROP()) \|\|<br> _isKeeper(msg.sender), "ROS.DCA: neither keeper nor ROP");<br>_repo.increaseCleanPaid(<br> true,<br> seqOfShare,<br> paid);<br>emit IncreaseCleanPaid(seqOfShare, paid);<br> }<br>// ==== State & PaidInDeadline ====<br>function updatePriceOfPaid(<br> uint seqOfShare,<br> uint newPrice) external anyKeeper {<br> _repo.updatePriceOfPaid(seqOfShare, newPrice);<br> emit UpdatePriceOfPaid(seqOfShare, newPrice);<br> }<br>function updatePaidInDeadline(<br> uint256 seqOfShare, <br> uint deadline) external onlyDK {<br>_repo.updatePayInDeadline(seqOfShare, deadline);<br> emit UpdatePaidInDeadline(seqOfShare, deadline);<br> }<br>// ==== EquityOfClass ====<br>function increaseEquityOfClass(<br> bool isIncrease,<br> uint classOfShare,<br> uint deltaPaid,<br> uint deltaPar,<br> uint deltaCleanPaid) external anyKeeper {<br> _repo.increaseEquityOfClass(<br> isIncrease,<br> classOfShare,<br> deltaPaid,<br> deltaPar,<br> deltaCleanPaid);<br>uint amt = (deltaPaid << 128) + uint128(deltaPar << 64) + uint64(deltaCleanPaid);<br>emit IncreaseEquityOfClass(isIncrease, classOfShare, amt);<br> }<br>// ==== private funcs ====<br>function _payInCapital(<br> SharesRepo.Share storage share, <br> uint amount) private {<br>IRegisterOfMembers _rom = _gk.getROM();<br>_repo.payInCapital(share.head.seqOfShare, amount);<br> _repo.increaseEquityOfClass(<br> true,<br> share.head.class,<br> amount,<br> 0,<br> 0);<br>_rom.capIncrease(<br> share.head.votingWeight,<br> share.body.distrWeight,<br> amount, <br> 0,<br> true);<br>_rom.increaseAmtOfMember(<br> share.head.shareholder,<br> share.head.votingWeight,<br> share.body.distrWeight,<br> amount, <br> 0, <br> true);<br>emit PayInCapital(share.head.seqOfShare, amount);<br> }<br>function _decreaseShareAmt(<br> SharesRepo.Share storage share, <br> uint paid, <br> uint par) private {<br>IRegisterOfMembers _rom = _gk.getROM();<br>if (par == share.body.par) {<br>_rom.removeShareFromMember(share);<br>emit DeregisterShare(share.head.seqOfShare);<br>} else {<br>_rom.increaseAmtOfMember(<br> share.head.shareholder,<br> share.head.votingWeight,<br> share.body.distrWeight,<br> paid,<br> par,<br> false);<br>emit SubAmountFromShare(share.head.seqOfShare, paid, par);<br> }<br>_repo.subAmtFromShare(share.head.seqOfShare, paid, par);<br> }<br>function restoreShares(<br> SharesRepo.Share[] memory shares,<br> SharesRepo.Share[] memory classes) external onlyDK {<br> _repo.restoreRepo(shares, classes);<br> }<br>// #################<br> // ## Read I/O ##<br> // #################<br>function counterOfShares() external view returns (uint32) {<br> return _repo.counterOfShares();<br> }<br>function counterOfClasses() external view returns (uint16) {<br> return _repo.counterOfClasses();<br> }<br>// ==== SharesRepo ====<br>function isShare(<br> uint256 seqOfShare) external view returns (bool) {<br> return _repo.isShare(seqOfShare);<br> }<br>function getShare(<br> uint256 seqOfShare) external view returns (<br> SharesRepo.Share memory) {<br> return _repo.getShare(seqOfShare);<br> }<br>function getQtyOfShares() external view returns (uint) {<br> return _repo.getQtyOfShares();<br> }<br>function getSeqListOfShares() external view returns (uint[] memory) {<br> return _repo.getSeqListOfShares();<br> }<br>function getSharesList() external view returns (SharesRepo.Share[] memory) {<br> return _repo.getSharesList();<br> }<br>function getShareZero() external view returns (SharesRepo.Share memory) {<br> return _repo.getShareZero();<br> }<br>// ---- Class ---- <br>function getQtyOfSharesInClass(<br> uint classOfShare) external view returns (uint) {<br> return _repo.getQtyOfSharesInClass(classOfShare);<br> }<br>function getSeqListOfClass(<br> uint classOfShare) external view returns (uint[] memory) {<br> return _repo.getSeqListOfClass(classOfShare);<br> }<br>function getInfoOfClass(<br> uint classOfShare) external view returns (SharesRepo.Share memory) {<br> return _repo.getInfoOfClass(classOfShare);<br> }<br>function getSharesOfClass(<br> uint classOfShare) external view returns (SharesRepo.Share[] memory) {<br> return _repo.getSharesOfClass(classOfShare);<br> }<br>function getPremium() external view returns (uint) {<br> return _repo.getPremium();<br> }<br>// ==== PayInCapital ====<br>function getLocker(<br> bytes32 hashLock) external view returns (LockersRepo.Locker memory) {<br> return _lockers.getLocker(hashLock);<br> }<br>function getLocksList() external view returns (bytes32[] memory) {<br> return _lockers.getSnList();<br> }<br>// ==== NotLocked ====<br> function notLocked(<br> uint seqOfShare,<br> uint closingDate) external view returns(bool) {<br> IShareholdersAgreement _sha = _gk.getSHA();<br>if (!_sha.hasTitle(uint8(IShareholdersAgreement.TitleOfTerm.LockUp))){<br> return true;<br> }<br>address lu = _sha.getTerm(uint8(IShareholdersAgreement.TitleOfTerm.LockUp));<br>DealsRepo.Deal memory deal;<br>deal.head.typeOfDeal = 2;<br> deal.head.seqOfShare = uint32(seqOfShare); <br> deal.head.closingDeadline = uint48(closingDate);<br>if (!ILockUp(lu).isTriggered(deal)) {<br> return true;<br> }<br>return false; <br> }<br> }<br>|
| [Contents](#toc) |

---

## ListOfProjects.sol

---

| |
|:---|
| **contracts/comps/books/lop/ListOfProjects.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../center/access/Ownable.sol";<br>import "./IListOfProjects.sol";<br> import "../../../lib/Address.sol";<br>contract ListOfProjects is IListOfProjects, Ownable {<br> using TeamsRepo for TeamsRepo.Repo;<br>TeamsRepo.Repo private _pop;<br> uint8 private _currency;<br>function _msgSender(uint price) private returns (uint40 usr) {<br> usr = _rc.getUserNo(<br> msg.sender, <br> price \* (10 \*\* 10), <br> _rc.getAuthorByBody(address(this)));<br> }<br>// ###################<br> // ## Write I/O ##<br> // ###################<br>function setManager(uint acct) external onlyOwner {<br> _pop.setManager(acct);<br> emit SetManager(acct);<br> }<br>function setCurrency(uint8 currency) external onlyOwner {<br> _currency = currency;<br> emit SetCurrency(currency);<br> }<br>// ---- Project ----<br>function setBudget(uint budget) external {<br> _pop.setBudget(_msgSender(18000), budget);<br> emit SetBudget(budget);<br> }<br>function fixBudget() external {<br> _pop.fixBudget(_msgSender(18000));<br> }<br>function increaseBudget(uint deltaAmt) external {<br> _pop.increaseBudget(_msgSender(18000), deltaAmt);<br> emit IncreaseBudget(deltaAmt);<br> }<br>// ---- Team ----<br>function createTeam(uint budget) external {<br> _pop.createTeam(_msgSender(18000), budget);<br> }<br>function updateTeam(uint seqOfTeam,uint budget) external {<br> _pop.updateTeam(_msgSender(18000), seqOfTeam, budget);<br> }<br>function enrollTeam(uint seqOfTeam) external {<br> _pop.enrollTeam(_msgSender(18000), seqOfTeam);<br> emit EnrollTeam(seqOfTeam);<br> }<br>function replaceLeader(uint seqOfTeam, uint leader) external {<br> _pop.replaceLeader(_msgSender(18000), seqOfTeam, leader);<br> emit ReplaceLeader(seqOfTeam, leader);<br> }<br>function increaseTeamBudget(uint seqOfTeam,uint delta) external {<br> _pop.increaseTeamBudget(_msgSender(18000), seqOfTeam, delta);<br> }<br>// ---- Member ----<br>function enrollMember(<br> uint seqOfTeam,<br> uint userNo,<br> uint rate,<br> uint budget) external {<br> _pop.enrollMember(_msgSender(18000), seqOfTeam, userNo, rate, budget);<br> } <br>function removeMember(uint seqOfTeam, uint userNo) external {<br> _pop.removeMember(_msgSender(18000), seqOfTeam, userNo);<br> }<br>function restoreMember(uint seqOfTeam, uint userNo) external {<br> _pop.restoreMember(_msgSender(18000), seqOfTeam, userNo);<br> }<br>function increaseMemberBudget(<br> uint seqOfTeam,<br> uint userNo,<br> uint delta) external {<br> _pop.increaseMemberBudget(_msgSender(18000), seqOfTeam, userNo, delta);<br> }<br>function adjustSalary(<br> uint seqOfTeam,<br> uint userNo,<br> bool increase,<br> uint delta) external {<br> _pop.adjustSalary(_msgSender(18000), seqOfTeam, userNo, increase, delta);<br> }<br>// ---- Work ----<br>function applyWorkingHour(uint seqOfTeam, uint hrs) external {<br> _pop.applyWorkingHour(_msgSender(18000), seqOfTeam, hrs);<br> }<br>function verifyMemberWork(<br> uint seqOfTeam,<br> uint userNo,<br> uint ratio) external {<br> _pop.verifyMemberWork(_msgSender(18000), seqOfTeam, userNo, ratio);<br> emit VerifyMemberWork(seqOfTeam, userNo, ratio);<br> }<br>function verifyTeamWork(uint seqOfTeam, uint ratio) external {<br> _pop.verifyTeamWork(_msgSender(18000), seqOfTeam, ratio);<br> emit VerifyTeamWork(seqOfTeam, ratio);<br> }<br>function payWages() external payable {<br> uint amt = msg.value;<br> uint exRate = _rc.getCentPriceInWei(_currency);<br> _pop.distributePayment(amt, exRate);<br> emit PayWages(amt, exRate);<br> }<br>function pickupDeposit(uint amt) external {<br> _pop.pickupDeposit(_msgSender(18000), amt);<br> address caller = msg.sender;<br> Address.sendValue(payable(caller), amt);<br> emit PickupDeposit(caller, amt);<br> }<br>// ##################<br> // ## Read I/O ##<br> // ##################<br>function getCurrency() external view returns(uint8) {<br> return _currency;<br> }<br>function isManager(uint acct) external view returns(bool) {<br> return _pop.isManager(acct);<br> }<br>function getProjectInfo() external view returns(TeamsRepo.Member memory) {<br> return _pop.getProjectInfo();<br> }<br>// ---- Teams ----<br>function qtyOfTeams () external view returns(uint) {<br> return _pop.qtyOfTeams();<br> }<br>function getListOfTeams() external view returns(uint[] memory) {<br> return _pop.getListOfTeams();<br> }<br>function teamIsEnrolled(uint seqOfTeam) external view returns(bool) {<br> return _pop.teamIsEnrolled(seqOfTeam);<br> }<br>// ---- TeamInfo ----<br>function isTeamLeader(uint acct, uint seqOfTeam) external view returns(bool) {<br> return _pop.isTeamLeader(acct, seqOfTeam);<br> }<br>function getTeamInfo(uint seqOfTeam) external view returns(TeamsRepo.Member memory info) {<br> return _pop.getTeamInfo(seqOfTeam);<br> }<br>// ---- Member ----<br>function isMember(uint acct,uint seqOfTeam) external view returns (bool) {<br> return _pop.isMember(acct, seqOfTeam);<br> }<br>function isEnrolledMember(uint acct,uint seqOfTeam) external view returns (bool) {<br> return _pop.isEnrolledMember(acct, seqOfTeam);<br> }<br>function getTeamMembersList(uint seqOfTeam) external view returns(uint[] memory) {<br> return _pop.getTeamMembersList(seqOfTeam);<br> }<br>function getMemberInfo(uint acct, uint seqOfTeam) external view <br> returns (TeamsRepo.Member memory m) <br> {<br> m = _pop.getMemberInfo(acct, seqOfTeam);<br> }<br>function getMembersOfTeam(uint seqOfTeam) external view <br> returns (TeamsRepo.Member[] memory ls)<br> {<br> return ls = _pop.getMembersOfTeam(seqOfTeam);<br> }<br>// ---- Payroll ----<br>function getPayroll() external view returns (uint[] memory list) {<br> return _pop.getPayroll();<br> }<br>function inPayroll(uint acct) external view returns(bool) {<br> return _pop.inPayroll(acct);<br> }<br>function getBalanceOf(uint acct) external view returns(uint) {<br> return _pop.getBalanceOf(acct);<br> }<br>} |
| [Contents](#toc) |

---

## IListOfProjects.sol

---

| |
|:---|
| **contracts/comps/books/lop/IListOfProjects.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/TeamsRepo.sol";<br>interface IListOfProjects {<br>event SetManager(uint indexed manager);<br> event SetCurrency(uint indexed currency);<br>event SetBudget(uint indexed budget);<br> event IncreaseBudget(uint indexed deltaAmt);<br>event EnrollTeam(uint indexed seqOfTeam);<br> event ReplaceLeader(uint indexed seqOfTeam, uint indexed leader);<br>event VerifyMemberWork(uint indexed seqOfTeam, uint indexed userNo, uint indexed ratio);<br> event VerifyTeamWork(uint indexed seqOfTeam, uint indexed ratio);<br>event PayWages(uint indexed amt, uint indexed exRate);<br> event PickupDeposit(address indexed caller, uint indexed amt);<br>///////////////////<br> // Write I/O //<br> ///////////////////<br>function setManager(uint acct) external;<br>function setCurrency(uint8 currency) external;<br>// ---- Project ----<br>function setBudget(uint budget) external;<br>function fixBudget() external;<br>function increaseBudget(uint deltaAmt) external;<br>// ---- Team ----<br>function createTeam(uint budget) external;<br>function updateTeam(uint seqOfTeam, uint budget) external;<br>function enrollTeam(uint seqOfTeam) external;<br>function replaceLeader(uint seqOfTeam, uint leader) external;<br>function increaseTeamBudget(uint seqOfTeam,uint deltaQty) external;<br>// ---- Member ----<br>function enrollMember(<br> uint seqOfTeam,<br> uint userNo,<br> uint rate,<br> uint estimated) external;<br>function removeMember(uint seqOfTeam, uint userNo) external;<br>function restoreMember(uint seqOfTeam, uint userNo) external;<br>function increaseMemberBudget(<br> uint seqOfTeam,<br> uint userNo,<br> uint delta) external;<br>// ---- Work ----<br>function applyWorkingHour(uint seqOfTeam, uint hrs) external;<br>function verifyMemberWork(<br> uint seqOfTeam,<br> uint userNo,<br> uint ratio) external;<br>function verifyTeamWork(uint seqOfTeam, uint ratio) external;<br>function payWages() external payable;<br>function pickupDeposit(uint amt) external;<br>///////////////////<br> // Read I/O //<br> ///////////////////<br>function getCurrency() external view returns(uint8);<br>function isManager(uint acct) external view returns(bool);<br>function getProjectInfo() external view returns(TeamsRepo.Member memory);<br>// ---- Teams ----<br>function qtyOfTeams () external view returns(uint);<br>function getListOfTeams() external view returns(uint[] memory);<br>function teamIsEnrolled(uint seqOfTeam) external view returns(bool);<br>// ---- TeamInfo ----<br>function isTeamLeader(uint acct, uint seqOfTeam) external view returns(bool);<br>function getTeamInfo(uint seqOfTeam) external view returns(TeamsRepo.Member memory info);<br>// ---- Member ----<br>function isMember(uint acct,uint seqOfTeam) external view returns (bool);<br>function isEnrolledMember(uint acct,uint seqOfTeam) external view returns (bool);<br>function getTeamMembersList(uint seqOfTeam) external view returns(uint[] memory);<br>function getMemberInfo(uint acct, uint seqOfTeam) external view <br> returns (TeamsRepo.Member memory m);<br>function getMembersOfTeam(uint seqOfTeam) external view <br> returns (TeamsRepo.Member[] memory ls);<br>// ---- Payroll ----<br>function getPayroll() external view returns (uint[] memory list);<br>function inPayroll(uint acct) external view returns(bool);<br>function getBalanceOf(uint acct) external view returns(uint);<br>} |
| [Contents](#toc) |

---

## RegisterOfDirectors.sol

---

| |
|:---|
| **contracts/comps/books/rod/RegisterOfDirectors.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegisterOfDirectors.sol";<br> import "../../common/access/AccessControl.sol";<br>contract RegisterOfDirectors is IRegisterOfDirectors, AccessControl {<br> using OfficersRepo for OfficersRepo.Repo;<br>OfficersRepo.Repo private _repo;<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== PositionSetting ====<br> function createPosition(bytes32 snOfPos) external onlyKeeper { <br> _repo.createPosition(snOfPos);<br> emit AddPosition(snOfPos);<br> }<br>function updatePosition(OfficersRepo.Position memory pos) external onlyKeeper {<br> _repo.addPosition(pos);<br> emit AddPosition(OfficersRepo.codifyPosition(pos));<br> }<br>function removePosition(uint256 seqOfPos) external onlyKeeper {<br> if (_repo.removePosition(seqOfPos))<br> emit RemovePosition(seqOfPos);<br> }<br>// ---- Officers ----<br>function takePosition (uint256 seqOfPos, uint caller) external onlyDK()<br> {<br> if (_repo.takePosition(seqOfPos, caller)) <br> emit TakePosition(seqOfPos, caller);<br> }<br>function quitPosition (uint256 seqOfPos, uint caller) external onlyDK<br> {<br> if (_repo.quitPosition(seqOfPos, caller))<br> emit QuitPosition(seqOfPos, caller);<br> }<br>function removeOfficer (uint256 seqOfPos) external onlyDK()<br> {<br> if (_repo.vacatePosition(seqOfPos))<br> emit RemoveOfficer(seqOfPos);<br> }<br>//################<br> //## Read ##<br> //################<br>// ==== Positions ====<br>function posExist(uint256 seqOfPos) external view returns (bool) {<br> return _repo.posExist(seqOfPos);<br> }<br>function isOccupied(uint256 seqOfPos) external view returns (bool) {<br> return _repo.isOccupied(seqOfPos);<br> } <br>function getPosition(uint256 seqOfPos) external view <br> returns (OfficersRepo.Position memory) <br> {<br> return _repo.getPosition(seqOfPos);<br> }<br>// ==== Managers ====<br>function isManager(uint256 acct) external view returns (bool) {<br> return _repo.isManager(acct);<br> }<br>function getNumOfManagers() external view returns (uint256) {<br> return _repo.getNumOfManagers();<br> }<br>function getManagersList() external view returns (uint256[] memory) {<br> return _repo.getManagersList();<br> }<br>function getManagersPosList() external view returns(uint[] memory) {<br> return _repo.getManagersPosList();<br> }<br>// ==== Directors ====<br>function isDirector(uint256 acct) external view returns (bool) {<br> return _repo.isDirector(acct);<br> }<br>function getNumOfDirectors() external view returns (uint256) {<br> return _repo.getNumOfDirectors();<br> }<br>function getDirectorsList() external view <br> returns (uint256[] memory) <br> {<br> return _repo.getDirectorsList();<br> }<br>function getDirectorsPosList() external view <br> returns (uint256[] memory) <br> {<br> return _repo.getDirectorsPosList();<br> }<br>// ==== Executives ====<br>function hasPosition(uint256 acct, uint256 seqOfPos)<br> external view returns(bool)<br> {<br> return _repo.hasPosition(acct, seqOfPos);<br> }<br>function getPosInHand(uint256 acct) <br> external view returns (uint256[] memory) <br> {<br> return _repo.getPosInHand(acct);<br> }<br>function getFullPosInfoInHand(uint acct) <br> external view returns (OfficersRepo.Position[] memory) <br> {<br> return _repo.getFullPosInfoInHand(acct);<br> }<br>function hasTitle(uint acct, uint title) external view returns (bool flag)<br> {<br> flag = _repo.hasTitle(acct, title, _gk.getROM());<br> }<br>function hasNominationRight(uint seqOfPos, uint acct) external view returns (bool)<br> {<br> return _repo.hasNominationRight(seqOfPos, acct, _gk.getROM());<br> }<br>// ==== seatsCalculator ====<br>function getBoardSeatsOccupied(uint acct) external view <br> returns (uint256)<br> {<br> return _repo.getBoardSeatsOccupied(acct);<br> }<br> }<br>|
| [Contents](#toc) |

---

## IRegisterOfDirectors.sol

---

| |
|:---|
| **contracts/comps/books/rod/IRegisterOfDirectors.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../common/components/IMeetingMinutes.sol";<br>import "../../../lib/OfficersRepo.sol";<br>interface IRegisterOfDirectors {<br>//###################<br> //## events ##<br> //##################<br>event AddPosition(bytes32 indexed snOfPos);<br>event RemovePosition(uint256 indexed seqOfPos);<br>event TakePosition(uint256 indexed seqOfPos, uint256 indexed caller);<br>event QuitPosition(uint256 indexed seqOfPos, uint256 indexed caller);<br>event RemoveOfficer(uint256 indexed seqOfPos);<br>//#################<br> //## Write I/O ##<br> //#################<br>function createPosition(bytes32 snOfPos) external;<br>function updatePosition(OfficersRepo.Position memory pos) external;<br>function removePosition(uint256 seqOfPos) external;<br>function takePosition (uint256 seqOfPos, uint caller) external;<br>function quitPosition (uint256 seqOfPos, uint caller) external; <br>function removeOfficer (uint256 seqOfPos) external;<br>//################<br> //## Read ##<br> //################<br>// ==== Positions ====<br>function posExist(uint256 seqOfPos) external view returns (bool);<br>function isOccupied(uint256 seqOfPos) external view returns (bool);<br>function getPosition(uint256 seqOfPos) external view <br> returns (OfficersRepo.Position memory);<br>// ==== Managers ====<br>function isManager(uint256 acct) external view returns (bool);<br>function getNumOfManagers() external view returns (uint256); <br>function getManagersList() external view returns (uint256[] memory);<br>function getManagersPosList() external view returns(uint[] memory);<br>// ==== Directors ====<br>function isDirector(uint256 acct) external view returns (bool);<br>function getNumOfDirectors() external view returns (uint256);<br>function getDirectorsList() external view <br> returns (uint256[] memory);<br>function getDirectorsPosList() external view <br> returns (uint256[] memory);<br>// ==== Executives ====<br>function hasPosition(uint256 acct, uint256 seqOfPos)<br> external view returns(bool);<br>function getPosInHand(uint256 acct) <br> external view returns (uint256[] memory);<br>function getFullPosInfoInHand(uint acct) <br> external view returns (OfficersRepo.Position[] memory);<br>function hasTitle(uint acct, uint title) <br> external returns (bool flag);<br>function hasNominationRight(uint seqOfPos, uint acct) <br> external view returns (bool);<br>// ==== seatsCalculator ====<br>function getBoardSeatsOccupied(uint acct) external view <br> returns (uint256);<br>}<br>|
| [Contents](#toc) |

---

## RegisterOfConstitution.sol

---

| |
|:---|
| **contracts/comps/books/roc/RegisterOfConstitution.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegisterOfConstitution.sol";<br>import "../../common/components/FilesFolder.sol";<br>contract RegisterOfConstitution is IRegisterOfConstitution, FilesFolder {<br>address private _pointer;<br>//##################<br> //## Write I/O ##<br> //##################<br>function changePointer(address body) external onlyDK {<br> if (_pointer != address(0)) <br> setStateOfFile(_pointer, uint8(FilesRepo.StateOfFile.Revoked));<br> _pointer = body;<br> emit ChangePointer(body);<br> }<br>//################<br> //## Read ##<br> //################<br>function pointer() external view returns (address) {<br> return _pointer;<br> }<br> }<br>|
| [Contents](#toc) |

---

## IShareholdersAgreement.sol

---

| |
|:---|
| **contracts/comps/books/roc/IShareholdersAgreement.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../common/components/ISigPage.sol";<br> import "../../../lib/EnumerableSet.sol";<br> import "../../../lib/DocsRepo.sol";<br>interface IShareholdersAgreement is ISigPage {<br>enum TitleOfTerm {<br> ZeroPoint,<br> AntiDilution, // 1<br> LockUp, // 2<br> DragAlong, // 3<br> TagAlong, // 4<br> Options // 5<br> }<br>// ==== Rules ========<br>/\*<br> \| Seq \| Type \| Abb \| Description \| <br> \| 0 \| GovernanceRule \| GR \| Board Constitution and General Rules of GM \| <br> \| 1 \| VotingRuleOfGM \| CI \| VR for Capital Increase \|<br> \| 2 \| \| SText \| VR for External Share Transfer \|<br> \| 3 \| \| STint \| VR for Internal Share Transfer \|<br> \| 4 \| \| 1+3 \| VR for CI & STint \|<br> \| 5 \| \| 2+3 \| VR for SText & STint \|<br> \| 6 \| \| 1+2+3 \| VR for CI & SText & STint \|<br> \| 7 \| \| 1+2 \| VR for CI & SText \|<br> \| 8 \| \| SHA \| VR for Update SHA \|<br> \| 9 \| \| O-Issue-GM \| VR for Ordinary Issues of GeneralMeeting \|<br> \| 10 \| \| S-Issue-GM \| VR for Special Issues Of GeneralMeeting \|<br> \| 11 \| VotingRuleOfBoard \| CI \| VR for Capital Increase \|<br> \| 12 \| \| SText \| VR for External Share Transfer \|<br> \| 13 \| \| STint \| VR for Internal Share Transfer \|<br> \| 14 \| \| 1+3 \| VR for CI & STint \|<br> \| 15 \| \| 2+3 \| VR for SText & STint \|<br> \| 16 \| \| 1+2+3 \| VR for CI & SText & STint \|<br> \| 17 \| \| 1+2 \| VR for CI & SText \|<br> \| 18 \| \| SHA \| VR for Update SHA \|<br> \| 19 \| \| O-Issue-B \| VR for Ordinary Issues Of Board \|<br> \| 20 \| \| S-Issue-B \| VR for Special Issues Of Board \|<br> \| 21 \| UnilateralDecision\| UniDecPower \| UnilateralDicisionPowerWithoutVoting \|<br> ...<br>\| 256 \| PositionAllocateRule \| PA Rule \| Management Positions' Allocation Rules \|<br> ...<br>\| 512 \| FirstRefusalRule \| FR for CI...\| FR rule for Investment Deal \|<br> ...<br>\| 768 \| GroupUpdateOrder \| GroupUpdate \| Grouping Members as per their relationship \|<br> ...<br>\| 1024 \| ListingRule \| ListingRule \| Listing Rule for Share Issue & Transfer \|<br> ...<br>\*/<br>struct TermsRepo {<br> // title => body<br> mapping(uint256 => address) terms;<br> EnumerableSet.UintSet seqList;<br> }<br>struct RulesRepo {<br> // seq => rule<br> mapping(uint256 => bytes32) rules;<br> EnumerableSet.UintSet seqList;<br> }<br>//##################<br> //## Write ##<br> //##################<br>/\*\*<br> \* @dev Create a clone contract as per the template type number (`typeOfDoc`) <br> \* and its version number (`version`).<br> \* Note `typeOfDoc` and `version` shall be bigger than zero.<br> \*/<br> function createTerm(uint typeOfDoc, uint version) external;<br>/\*\*<br> \* @dev Remove tracking of a clone contract from mapping as per its template <br> \* type number (`typeOfDoc`). <br> \*/<br> function removeTerm(uint typeOfDoc) external;<br>/\*\*<br> \* @dev Add a pre-defined `rule` into the Rules Mapping (seqNumber => rule)<br> \* Note a sequence number (`seqNumber`) of the `rule` SHALL be able to be parsed by <br> \* RuleParser library, and such `seqNumber` shall be used as the search key to <br> \* retrieve the rule from the Rules Mapping.<br> \*/<br> function addRule(bytes32 rule) external;<br>/\*\*<br> \* @dev Remove tracking of a rule from the Rules Mapping as per its sequence <br> \* number (`seq`). <br> \*/<br> function removeRule(uint256 seq) external;<br>/\*\*<br> \* @dev Initiate the Shareholders Agreement with predefined default rules. <br> \*/<br> function initDefaultRules() external;<br>/\*\*<br> \* @dev Transfer special Roles having write authorities to address "Zero",<br> \* so as to fix the contents of the Shareholders Agreement avoiding any further <br> \* revision by any EOA. <br> \*/<br> function finalizeSHA() external;<br>//################<br> //## Read ##<br> //################<br>// ==== Terms ====<br>/\*\*<br> \* @dev Returns whether a specific Term numbered as `title` exist <br> \* in the current Shareholders Agreemnt.<br> \*/<br> function hasTitle(uint256 title) external view returns (bool);<br>/\*\*<br> \* @dev Returns total quantities of Terms in the current <br> \* Shareholders Agreemnt.<br> \*/<br> function qtyOfTerms() external view returns (uint256);<br>/\*\*<br> \* @dev Returns total quantities of Terms stiputed in the current <br> \* Shareholders Agreemnt.<br> \*/<br> function getTitles() external view returns (uint256[] memory);<br>/\*\*<br> \* @dev Returns the contract address of the specific Term <br> \* numbered as `title` from the Terms Mapping of the Shareholders Agreemnt.<br> \*/<br> function getTerm(uint256 title) external view returns (address);<br>// ==== Rules ====<br>/\*\*<br> \* @dev Returns whether a specific Rule numbered as `seq` exist <br> \* in the current Shareholders Agreemnt.<br> \*/ <br> function hasRule(uint256 seq) external view returns (bool);<br>/\*\*<br> \* @dev Returns total quantities of Rules in the current <br> \* Shareholders Agreemnt.<br> \*/<br> function qtyOfRules() external view returns (uint256);<br>/\*\*<br> \* @dev Returns total quantities of Rules stiputed in the current <br> \* Shareholders Agreemnt.<br> \*/<br> function getRules() external view returns (uint256[] memory);<br>/\*\*<br> \* @dev Returns the specific Rule numbered as `seq` from the Rules Mapping<br> \* of the Shareholders Agreemnt.<br> \*/<br> function getRule(uint256 seq) external view returns (bytes32);<br> }<br>|
| [Contents](#toc) |

---

## IRegisterOfConstitution.sol

---

| |
|:---|
| **contracts/comps/books/roc/IRegisterOfConstitution.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../common/components/IFilesFolder.sol";<br>interface IRegisterOfConstitution is IFilesFolder{<br>//##############<br> //## Event ##<br> //##############<br>event ChangePointer(address indexed pointer);<br>//#############<br> //## Write ##<br> //#############<br>function changePointer(address body) external;<br>//################<br> //## Read ##<br> //################<br>function pointer() external view returns (address);<br> }<br>|
| [Contents](#toc) |

---

## ShareholdersAgreement.sol

---

| |
|:---|
| **contracts/comps/books/roc/ShareholdersAgreement.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* v0.2.4 <br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IShareholdersAgreement.sol";<br> import "../../common/components/SigPage.sol";<br>contract ShareholdersAgreement is IShareholdersAgreement, SigPage {<br> using EnumerableSet for EnumerableSet.UintSet; <br>TermsRepo private _terms;<br> RulesRepo private _rules;<br>//####################<br> //## modifier ##<br> //####################<br>modifier titleExist(uint256 title) {<br> require(<br> hasTitle(title),<br> "SHA.mf.TE: title not exist");<br> _;<br> }<br>//##################<br> //## Write I/O ##<br> //##################<br>function createTerm(uint title, uint version)<br> external<br> onlyGC<br> {<br> address gc = msg.sender;<br>uint typeOfDoc = title > 3 ? 21 + title : 22 + title;<br>bytes32 snOfDoc = bytes32((typeOfDoc << 224) + uint224(version << 192));<br>DocsRepo.Doc memory doc = _rc.createDoc(snOfDoc, address(this));<br>IAccessControl(doc.body).initKeepers(<br> address(this),<br> address(_gk));<br>IDraftControl(doc.body).setRoleAdmin(bytes32("Attorneys"), gc);<br>_terms.terms[title] = doc.body;<br> _terms.seqList.add(title);<br> }<br>function removeTerm(uint title) external onlyAttorney {<br> if (_terms.seqList.remove(title)) {<br> delete _terms.terms[title];<br> }<br> }<br>// ==== Rules ====<br>function addRule(bytes32 rule) external onlyAttorney {<br> _addRule(rule);<br> }<br>function _addRule(bytes32 rule) private {<br> uint seqOfRule = uint16(uint(rule) >> 240);<br>_rules.rules[seqOfRule] = rule;<br> _rules.seqList.add(seqOfRule);<br> }<br>function removeRule(uint256 seq) external onlyAttorney {<br> if (_rules.seqList.remove(seq)) {<br> delete _rules.rules[seq];<br> }<br> }<br>function initDefaultRules() external onlyDK {<br>bytes32[] memory rules = new bytes32[](15); <br>// DefualtGovernanceRule<br> rules[0] = bytes32(uint(0x000000000003e800000d0503e8003213880500241388000000000000140101f4));<br>// DefaultVotingRules<br> rules[1] = bytes32(uint(0x00010c010100001a0b000001000f08070e010100000000000000000000000000));<br> rules[2] = bytes32(uint(0x00020c020100001388000100010f08070e010107000000000000000000000000));<br> rules[3] = bytes32(uint(0x00030c030100000000000101000008070e010107000000000000000000000000));<br> rules[4] = bytes32(uint(0x00040c040100001a0b000001000f08070e010100000000000000000000000000));<br> rules[5] = bytes32(uint(0x00050c050100001388000100010f08070e010100000000000000000000000000));<br> rules[6] = bytes32(uint(0x00060c060100001a0b000001000f08070e010100000000000000000000000000));<br> rules[7] = bytes32(uint(0x00070c070100001a0b000001000f08070e010100000000000000000000000000));<br> rules[8] = bytes32(uint(0x00080c080100001a0b000001000000001d010100000000000000000000000000));<br> rules[9] = bytes32(uint(0x00090c090100001388010000000000001d010100000000000000000000000000));<br> rules[10] = bytes32(uint(0x000a0c0a0100001a0b010000000000001d010100000000000000000000000000));<br> rules[11] = bytes32(uint(0x000b0c0b02138800000100000000000009010100000000000000000000000000));<br> rules[12] = bytes32(uint(0x000c0c0c021a0b00000100000000000009010100000000000000000000000000));<br>// DefaultFirstRefusalRules<br> rules[13] = bytes32(uint(0x0200020101010100000000000000000000000000000000000000000000000000));<br> rules[14] = bytes32(uint(0x0201020202010100000000000000000000000000000000000000000000000000));<br>uint len = 15;<br> while (len > 0) {<br> _addRule(rules[len - 1]);<br> len--;<br> }<br>}<br>// ==== Finalize SHA ====<br>function finalizeSHA() external {<br>uint[] memory titles = getTitles();<br> uint len = titles.length;<br>while (len > 0) {<br> IDraftControl(_terms.terms[titles[len-1]]).lockContents();<br> len --;<br> }<br>lockContents();<br> }<br>//################<br> //## Read ##<br> //################<br>// ==== Terms ====<br>function hasTitle(uint256 title) public view returns (bool) {<br> return _terms.seqList.contains(title);<br> }<br>function qtyOfTerms() external view returns (uint256) {<br> return _terms.seqList.length();<br> }<br>function getTitles() public view returns (uint256[] memory) {<br> return _terms.seqList.values();<br> }<br>function getTerm(uint256 title) external view titleExist(title) returns (address) {<br> return _terms.terms[title];<br> }<br>// ==== Rules ====<br>function hasRule(uint256 seq) external view returns (bool) {<br> return _rules.seqList.contains(seq);<br> }<br>function qtyOfRules() external view returns (uint256) {<br> return _rules.seqList.length();<br> }<br>function getRules() external view returns (uint256[] memory) {<br> return _rules.seqList.values();<br> }<br>function getRule(uint256 seq) external view returns (bytes32) {<br> return _rules.rules[seq];<br> }<br> }<br>|
| [Contents](#toc) |

---

## LockUp.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/LockUp.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../common/access/DraftControl.sol";<br>import "./ILockUp.sol";<br>contract LockUp is ILockUp, DraftControl {<br> using ArrayUtils for uint256[];<br> using EnumerableSet for EnumerableSet.UintSet;<br>// default expire date as "2105-09-19"<br> uint48 constant _REMOTE_FUTURE = 4282732800;<br>// lockers[0].keyHolders: ssnList;<br> // seqOfShare => Locker<br> mapping(uint256 => Locker) private _lockers;<br>// ################<br> // ## Write I/O ##<br> // ################<br>function setLocker(uint256 seqOfShare, uint dueDate) external onlyAttorney {<br> _lockers[seqOfShare].dueDate = uint48(dueDate) == 0 ? _REMOTE_FUTURE : uint48(dueDate);<br> _lockers[0].keyHolders.add(seqOfShare);<br> }<br>function delLocker(uint256 seqOfShare) external onlyAttorney {<br> if (_lockers[0].keyHolders.remove(seqOfShare)) {<br> delete _lockers[seqOfShare];<br> }<br> }<br>function addKeyholder(uint256 seqOfShare, uint256 keyholder) external onlyAttorney {<br> require(seqOfShare != 0, "LU.addKeyholder: zero seqOfShare");<br> _lockers[seqOfShare].keyHolders.add(keyholder);<br> }<br>function removeKeyholder(uint256 seqOfShare, uint256 keyholder) external onlyAttorney {<br> require(seqOfShare != 0, "LU.removeKeyholder: zero seqOfShare");<br> _lockers[seqOfShare].keyHolders.remove(keyholder);<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>function isLocked(uint256 seqOfShare) public view returns (bool) {<br> return _lockers[0].keyHolders.contains(seqOfShare);<br> }<br>function getLocker(uint256 seqOfShare)<br> external<br> view<br> returns (uint48 dueDate, uint256[] memory keyHolders)<br> {<br> dueDate = _lockers[seqOfShare].dueDate;<br> keyHolders = _lockers[seqOfShare].keyHolders.values();<br> }<br>function lockedShares() external view returns (uint256[] memory) {<br> return _lockers[0].keyHolders.values();<br> }<br>// ################<br> // ## Term ##<br> // ################<br>function isTriggered(DealsRepo.Deal memory deal) public view returns (bool) {<br>if (<br> deal.head.typeOfDeal > 1 &&<br> isLocked(deal.head.seqOfShare) &&<br> _lockers[deal.head.seqOfShare].dueDate >= deal.head.closingDeadline) return true;<br>return false;<br> }<br>function _isExempted(DealsRepo.Deal memory deal, uint256[] memory agreedParties)<br> private<br> view<br> returns (bool)<br> {<br> if (!isTriggered(deal)) return true;<br>Locker storage locker = _lockers[deal.head.seqOfShare];<br>uint256[] memory holders = locker.keyHolders.values();<br> uint256 len = holders.length;<br>if (len == 0 \|\| len > agreedParties.length) {<br> return false;<br> } else {<br> return holders.fullyCoveredBy(agreedParties);<br> }<br> }<br>function isExempted(address ia, DealsRepo.Deal memory deal) external view returns (bool) {<br>uint seqOfMotion = _gk.getROA().getHeadOfFile(ia).seqOfMotion;<br>uint256[] memory parties = ISigPage(ia).getParties();<br>BallotsBox.Case memory consentCase = _gk.getGMM().getCaseOfAttitude(seqOfMotion, 1);<br>uint256[] memory supporters = <br> consentCase.voters.combine(consentCase.principals).merge(parties);<br>return _isExempted(deal, supporters);<br> }<br>}<br>|
| [Contents](#toc) |

---

## ILockUp.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/ILockUp.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../../lib/ArrayUtils.sol";<br> import "../../../../lib/BallotsBox.sol";<br> import "../../../../lib/DealsRepo.sol";<br> import "../../../../lib/EnumerableSet.sol";<br>import "../../../common/components/ISigPage.sol";<br>interface ILockUp {<br>struct Locker {<br> uint48 dueDate;<br> EnumerableSet.UintSet keyHolders;<br> }<br>// ################<br> // ## Write ##<br> // ################<br>function setLocker(uint256 seqOfShare, uint dueDate) external;<br>function delLocker(uint256 seqOfShare) external;<br>function addKeyholder(uint256 seqOfShare, uint256 keyholder) external;<br>function removeKeyholder(uint256 seqOfShare, uint256 keyholder) external;<br>// ################<br> // ## Read I/O ##<br> // ################<br>function isLocked(uint256 seqOfShare) external view returns (bool);<br>function getLocker(uint256 seqOfShare)<br> external<br> view<br> returns (uint48 dueDate, uint256[] memory keyHolders);<br>function lockedShares() external view returns (uint256[] memory);<br>function isTriggered(DealsRepo.Deal memory deal) external view returns (bool);<br>function isExempted(address ia, DealsRepo.Deal memory deal) external view returns (bool);<br>}<br>|
| [Contents](#toc) |

---

## IAlongs.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/IAlongs.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../../lib/LinksRepo.sol";<br>interface IAlongs {<br>// ################<br> // ## Write ##<br> // ################<br>function addDragger(bytes32 rule, uint256 dragger) external;<br>function removeDragger(uint256 dragger) external;<br>function addFollower(uint256 dragger, uint256 follower) external;<br>function removeFollower(uint256 dragger, uint256 follower) external;<br>// ###############<br> // ## Read I/O ##<br> // ###############<br>function isDragger(uint256 dragger) external view returns (bool);<br>function getLinkRule(uint256 dragger) external view <br> returns (RulesParser.LinkRule memory);<br>function isFollower(uint256 dragger, uint256 follower)<br> external view returns (bool);<br>function getDraggers() external view returns (uint256[] memory);<br>function getFollowers(uint256 dragger) external view returns (uint256[] memory);<br>function priceCheck(<br> DealsRepo.Deal memory deal) external view returns (bool);<br>function isTriggered(address ia, DealsRepo.Deal memory deal) external view returns (bool);<br> }<br>|
| [Contents](#toc) |

---

## Alongs.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/Alongs.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../common/access/DraftControl.sol";<br> import "./IAlongs.sol";<br>contract Alongs is IAlongs, DraftControl {<br> using LinksRepo for LinksRepo.Repo;<br>LinksRepo.Repo private _repo;<br>// ###############<br> // ## Write I/O ##<br> // ###############<br>function addDragger(bytes32 rule, uint256 dragger) external onlyAttorney {<br> _repo.addDragger(rule, dragger, _gk.getROM());<br> }<br>function removeDragger(uint256 dragger) external onlyAttorney {<br> _repo.removeDragger(dragger);<br> }<br>function addFollower(uint256 dragger, uint256 follower) external onlyAttorney {<br> _repo.addFollower(dragger, follower);<br> }<br>function removeFollower(uint256 dragger, uint256 follower) external onlyAttorney {<br> _repo.removeFollower(dragger, follower);<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>function isDragger(uint256 dragger) external view returns (bool) {<br> return _repo.isDragger(dragger, _gk.getROM());<br> }<br>function getLinkRule(uint256 dragger) external view returns (RulesParser.LinkRule memory) {<br> return _repo.getLinkRule(dragger, _gk.getROM());<br> }<br>function isFollower(uint256 dragger, uint256 follower)<br> external view returns (bool)<br> {<br> return _repo.isFollower(dragger, follower, _gk.getROM());<br> }<br>function getDraggers() external view returns (uint256[] memory) {<br> return _repo.getDraggers();<br> }<br>function getFollowers(uint256 dragger) external view returns (uint256[] memory) {<br> return _repo.getFollowers(dragger, _gk.getROM());<br> }<br>function priceCheck(<br> DealsRepo.Deal memory deal) public view returns (bool) {<br> return _repo.priceCheck(deal, _gk.getROS(), _gk.getROM());<br> }<br>// #############<br> // ## Term ##<br> // #############<br>function isTriggered(address ia, DealsRepo.Deal memory deal) public view returns (bool) {<br>IRegisterOfMembers _rom = _gk.getROM();<br> IRegisterOfAgreements _roa = _gk.getROA();<br>if (_roa.getHeadOfFile(ia).state != uint8(FilesRepo.StateOfFile.Circulated))<br> return false;<br>if (deal.head.typeOfDeal ==<br> uint8(DealsRepo.TypeOfDeal.CapitalIncrease) \|\|<br> deal.head.typeOfDeal == uint8(DealsRepo.TypeOfDeal.PreEmptive)) return false;<br>if (!_repo.isDragger(deal.head.seller, _rom)) return false;<br>RulesParser.LinkRule memory rule = <br> _repo.getLinkRule(deal.head.seller, _rom);<br>if (rule.triggerDate > 0 && <br> (block.timestamp < rule.triggerDate \|\|<br> block.timestamp >= rule.triggerDate + uint(rule.effectiveDays)\*86400))<br> return false;<br>if (rule.triggerType == uint8(LinksRepo.TriggerTypeOfAlongs.NoConditions))<br> return true;<br>uint40 controllor = _rom.controllor();<br> if (controllor != _rom.groupRep(deal.head.seller)) <br> return false;<br>(uint40 newControllor, uint16 shareRatio) = _roa.mockResultsOfIA(ia);<br> if (controllor == newControllor && shareRatio > rule.shareRatioThreshold) <br> return false;<br>return priceCheck(deal);<br> }<br> }<br>|
| [Contents](#toc) |

---

## AntiDilution.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/AntiDilution.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../common/access/DraftControl.sol";<br>import "./IAntiDilution.sol";<br>contract AntiDilution is IAntiDilution, DraftControl {<br> using EnumerableSet for EnumerableSet.UintSet;<br>Ruler private _ruler;<br>// #################<br> // ## Modifier ##<br> // #################<br>modifier onlyMarked(uint256 class) {<br> require(isMarked(class), "AD.mf.OM: class not marked");<br> _;<br> }<br>// ################<br> // ## Write I/O ##<br> // ################<br>function addBenchmark(uint256 class, uint price) external onlyAttorney { <br>require (class > 0, "AD.AB: zero class");<br> require (price > 0, "AD.AB: zero price");<br>_ruler.marks[class].classOfShare = uint16(class);<br> _ruler.marks[class].floorPrice = uint32(price);<br>_ruler.classes.add(class);<br> }<br>function removeBenchmark(uint256 class) external onlyAttorney {<br> if (_ruler.classes.remove(class)) <br> delete _ruler.marks[class];<br> }<br>function addObligor(uint256 class, uint256 obligor) external onlyMarked(class) onlyAttorney {<br> _ruler.marks[class].obligors.add(obligor);<br> }<br>function removeObligor(uint256 class, uint256 obligor) external onlyMarked(class) onlyAttorney {<br> _ruler.marks[class].obligors.remove(obligor);<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>function isMarked(uint256 class) public view returns (bool flag) {<br> flag = _ruler.classes.contains(class);<br> }<br>function getClasses() external view returns (uint256[] memory) {<br> return _ruler.classes.values();<br> }<br>function getFloorPriceOfClass(uint256 class)<br> public<br> view<br> returns (uint32 price)<br> {<br> price = _ruler.marks[class].floorPrice;<br> }<br>function isObligor(uint256 class, uint256 acct) external view returns (bool flag)<br> {<br> flag = _ruler.marks[class].obligors.contains(acct);<br> }<br>function getObligorsOfAD(uint256 class)<br> external<br> view<br> returns (uint256[] memory)<br> {<br> return _ruler.marks[class].obligors.values();<br> }<br>function getGiftPaid(address ia, uint256 seqOfDeal, uint256 seqOfShare)<br> external<br> view<br> returns (uint64)<br> {<br> DealsRepo.Deal memory deal = <br> IInvestmentAgreement(ia).getDeal(seqOfDeal);<br>SharesRepo.Share memory share = <br> _gk.getROS().getShare(seqOfShare);<br>require (isTriggered(deal, share.head.class), "AD.getGiftPaid: AD not triggered");<br>uint32 floorPrice = getFloorPriceOfClass(share.head.class);<br>require (share.head.priceOfPaid >= floorPrice, "AD.getGiftPaid: price of target share lower than floor");<br>return (share.body.paid \* floorPrice / deal.head.priceOfPaid - share.body.paid);<br> }<br>// ################<br> // ## Term ##<br> // ################<br>function isTriggered(DealsRepo.Deal memory deal, uint class) public view returns (bool) {<br>if (deal.head.typeOfDeal != uint8(DealsRepo.TypeOfDeal.CapitalIncrease)) <br> return false;<br>if (deal.head.priceOfPaid < getFloorPriceOfClass(class)) return true;<br>return false;<br> }<br> }<br>|
| [Contents](#toc) |

---

## Options.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/Options.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../common/access/DraftControl.sol";<br>import "./IOptions.sol";<br>contract Options is IOptions, DraftControl {<br> using OptionsRepo for OptionsRepo.Repo;<br> using OptionsRepo for OptionsRepo.Option;<br> using OptionsRepo for OptionsRepo.Head;<br> using OptionsRepo for bytes32;<br> using EnumerableSet for EnumerableSet.Bytes32Set;<br> using EnumerableSet for EnumerableSet.UintSet;<br>OptionsRepo.Repo private _repo;<br>// ################<br> // ## Write I/O ##<br> // ################<br>function createOption(<br> bytes32 snOfOpt,<br> bytes32 snOfCond,<br> uint rightholder,<br> uint paid,<br> uint par) external onlyAttorney returns (OptionsRepo.Head memory head) {<br> head = _repo.createOption(snOfOpt, snOfCond, rightholder, paid, par);<br> }<br>function delOption(uint256 seqOfOpt) external onlyAttorney returns(bool flag){<br> flag = _repo.removeOption(seqOfOpt);<br> }<br>function addObligorIntoOpt(<br> uint256 seqOfOpt,<br> uint256 obligor) external onlyAttorney returns (bool flag) {<br> if (isOption(seqOfOpt)) <br> flag = _repo.records[seqOfOpt].obligors.add(obligor);<br> }<br>function removeObligorFromOpt(<br> uint256 seqOfOpt,<br> uint256 obligor) external onlyAttorney returns (bool flag) {<br> if (isOption(seqOfOpt)) <br> flag = _repo.records[seqOfOpt].obligors.remove(obligor);<br> }<br>// ################<br> // ## Read I/O ##<br> // ################<br>// ==== Option ====<br>function counterOfOptions() external view returns (uint32) {<br> return _repo.counterOfOptions();<br> }<br>function qtyOfOptions() external view returns (uint) {<br> return _repo.qtyOfOptions();<br> }<br>function isOption(uint256 seqOfOpt) public view returns (bool) {<br> return _repo.isOption(seqOfOpt);<br> }<br>function getOption(uint256 seqOfOpt) external view<br> returns (OptionsRepo.Option memory option) <br> {<br> return _repo.getOption(seqOfOpt);<br> }<br>function getAllOptions() external view returns (OptionsRepo.Option[] memory) <br> {<br> return _repo.getAllOptions();<br> }<br>// ==== Obligor ====<br>function isObligor(uint256 seqOfOpt, uint256 acct) external <br> view returns (bool) <br> {<br> return _repo.isObligor(seqOfOpt, acct);<br> }<br>function getObligorsOfOption(uint256 seqOfOpt) external view<br> returns (uint256[] memory)<br> {<br> return _repo.getObligorsOfOption(seqOfOpt);<br> }<br>function getSeqList() external view returns(uint[] memory) {<br> return _repo.getSeqList();<br> }<br>}<br>|
| [Contents](#toc) |

---

## IAntiDilution.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/IAntiDilution.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../../lib/DealsRepo.sol";<br>interface IAntiDilution {<br>struct Benchmark{<br> uint16 classOfShare;<br> uint32 floorPrice;<br> EnumerableSet.UintSet obligors; <br> }<br>struct Ruler {<br> // classOfShare => Benchmark<br> mapping(uint256 => Benchmark) marks;<br> EnumerableSet.UintSet classes; <br> }<br>// ################<br> // ## Write ##<br> // ################<br>function addBenchmark(uint256 class, uint price) external;<br>function removeBenchmark(uint256 class) external;<br>function addObligor(uint256 class, uint256 obligor) external;<br>function removeObligor(uint256 class, uint256 obligor) external;<br>// ############<br> // ## read ##<br> // ############<br>function isMarked(uint256 class) external view returns (bool flag);<br>function getClasses() external view returns (uint256[] memory);<br>function getFloorPriceOfClass(uint256 class) external view<br> returns (uint32 price);<br>function getObligorsOfAD(uint256 class)<br> external view returns (uint256[] memory);<br>function isObligor(uint256 class, uint256 acct) <br> external view returns (bool flag);<br>function getGiftPaid(address ia, uint256 seqOfDeal, uint256 seqOfShare)<br> external view returns (uint64 gift);<br>function isTriggered(DealsRepo.Deal memory deal, uint seqOfShare) external view returns (bool);<br> }<br>|
| [Contents](#toc) |

---

## IOptions.sol

---

| |
|:---|
| **contracts/comps/books/roc/terms/IOptions.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../../lib/OptionsRepo.sol";<br> import "../../../../lib/EnumerableSet.sol";<br>interface IOptions {<br>// ################<br> // ## Write I/O ##<br> // ################<br>function createOption(<br> bytes32 snOfOpt,<br> bytes32 snOfCond,<br> uint rightholder,<br> uint paid,<br> uint par) external returns (OptionsRepo.Head memory head); <br>function delOption(uint256 seqOfOpt) external returns(bool flag);<br>function addObligorIntoOpt(<br> uint256 seqOfOpt,<br> uint256 obligor) external returns (bool flag);<br>function removeObligorFromOpt(<br> uint256 seqOfOpt,<br> uint256 obligor) external returns (bool flag);<br>// ################<br> // ## Read I/O ##<br> // ################<br>// ==== Option ====<br>function counterOfOptions() external view returns (uint32);<br>function qtyOfOptions() external view returns (uint);<br>function isOption(uint256 seqOfOpt) external view returns (bool);<br>function getOption(uint256 seqOfOpt) external view<br> returns (OptionsRepo.Option memory option); <br>function getAllOptions() external view returns (OptionsRepo.Option[] memory);<br>// ==== Obligor ====<br>function isObligor(uint256 seqOfOpt, uint256 acct) external <br> view returns (bool); <br>function getObligorsOfOption(uint256 seqOfOpt) external view<br> returns (uint256[] memory);<br>// ==== snOfOpt ====<br> function getSeqList() external view returns(uint[] memory);<br>}<br>|
| [Contents](#toc) |

---

## RegisterOfMembers.sol

---

| |
|:---|
| **contracts/comps/books/rom/RegisterOfMembers.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegisterOfMembers.sol";<br>import "../../common/access/AnyKeeper.sol";<br>contract RegisterOfMembers is IRegisterOfMembers, AnyKeeper {<br> using MembersRepo for MembersRepo.Repo;<br> using TopChain for TopChain.Chain;<br> using Checkpoints for Checkpoints.History;<br>MembersRepo.Repo private _repo;<br>//##################<br> //## Modifier ##<br> //##################<br>modifier onlyROS() {<br> require(msg.sender == address(_gk.getROS()),<br> "ROM.onlyROS: not");<br> _;<br> }<br>//#################<br> //## Write I/O ##<br> //#################<br>// ---- Options Setting ----<br>function setMaxQtyOfMembers(uint max) external anyKeeper {<br> _repo.chain.setMaxQtyOfMembers(max);<br> emit SetMaxQtyOfMembers(max);<br> }<br>function setMinVoteRatioOnChain(uint min) external {<br> require(msg.sender == _gk.getKeeper(1),<br> "ROM.OnlyROCKeeper: not");<br> _repo.chain.setMinVoteRatioOnChain(min);<br> emit SetMinVoteRatioOnChain(min);<br> }<br>function setVoteBase(bool _basedOnPar) external {<br> require(msg.sender == _gk.getKeeper(1),<br> "ROM.OnlyROCKeeper: not");<br>IRegisterOfShares _ros = _gk.getROS();<br>if (_repo.setVoteBase(_ros, _basedOnPar)) <br> emit SetVoteBase(_basedOnPar);<br> }<br>function capIncrease(<br> uint votingWeight,<br> uint distrWeight,<br> uint paid,<br> uint par,<br> bool isIncrease) external onlyROS {<br>_repo.increaseAmtOfCap(votingWeight, distrWeight, paid, par, isIncrease);<br>if (isIncrease) emit CapIncrease(votingWeight, paid, par, distrWeight);<br> else emit CapDecrease(votingWeight, paid, par, distrWeight);<br> }<br>function addMember(uint256 acct) external onlyROS {<br> if (_repo.addMember(acct))<br> emit AddMember(acct, _repo.chain.qtyOfMembers());<br> }<br>function addShareToMember(<br> SharesRepo.Share memory share) external onlyROS {<br>_repo.addShareToMember(share.head);<br>_repo.increaseAmtOfMember(<br> share.head.shareholder, <br> share.head.votingWeight, <br> share.body.distrWeight,<br> share.body.paid, <br> share.body.par, <br> true);<br>emit AddShareToMember(share.head.seqOfShare, share.head.shareholder);<br> }<br>function removeShareFromMember(<br> SharesRepo.Share memory share) external onlyROS {<br>_repo.increaseAmtOfMember(<br> share.head.shareholder, <br> share.head.votingWeight, <br> share.body.distrWeight, <br> share.body.paid, <br> share.body.par, <br> false);<br>_repo.removeShareFromMember(share.head);<br>if (_repo.qtyOfSharesInHand(share.head.shareholder) == 0) <br> _repo.delMember(share.head.shareholder);<br>emit RemoveShareFromMember(share.head.seqOfShare, share.head.shareholder); <br> }<br>function increaseAmtOfMember(<br> uint acct,<br> uint votingWeight,<br> uint distrWeight,<br> uint deltaPaid,<br> uint deltaPar,<br> bool isIncrease) public onlyROS {<br>_repo.increaseAmtOfMember(<br> acct,<br> votingWeight,<br> distrWeight,<br> deltaPaid,<br> deltaPar,<br> isIncrease);<br>emit ChangeAmtOfMember(<br> acct,<br> deltaPaid,<br> deltaPar,<br> isIncrease);<br> }<br>function addMemberToGroup(uint acct, uint root) external anyKeeper {<br> _repo.chain.top2Sub(acct, root);<br> emit AddMemberToGroup(acct, root);<br> }<br>function removeMemberFromGroup(uint256 acct) external anyKeeper {<br> uint root = _repo.chain.rootOf(acct);<br> uint256 next = _repo.chain.nextNode(acct);<br>_repo.chain.sub2Top(acct);<br> emit RemoveMemberFromGroup(acct, root);<br> if (acct == root) emit ChangeGroupRep(root, next);<br> }<br>// ==== Restore ====<br>function restoreSharesInRom(SharesRepo.Share[] memory shares) external onlyDK{<br> _repo.restoreSharesInRepo(shares);<br> }<br>function restoreTopChainInRom(<br> TopChain.Node[] memory list, TopChain.Para memory para) external onlyDK {<br> _repo.chain.restoreChain(list, para);<br> }<br>function restoreVotesHistoryInRom(<br> uint acct, Checkpoints.Checkpoint[] memory list,<br> Checkpoints.Checkpoint memory distrPts) external onlyDK {<br> MembersRepo.Member storage member = _repo.members[acct];<br> member.votesInHand.restoreHistory(list);<br> member.votesInHand.updateDistrPoints(distrPts.rate, distrPts.paid, distrPts.par, distrPts.points);<br> }<br>// ##################<br> // ## Read I/O ##<br> // ##################<br>// ---- membersList ----<br>function isMember(uint256 acct) external view returns (bool) {<br> return _repo.isMember(acct);<br> }<br>function qtyOfMembers() external view returns (uint) {<br> return _repo.qtyOfMembers();<br> }<br>function membersList() external view returns (uint256[] memory) {<br> return _repo.membersList();<br> }<br>function sortedMembersList() external view returns (uint256[] memory) {<br> return _repo.chain.sortedMembersList();<br> }<br>function qtyOfTopMembers() external view returns (uint) {<br> return _repo.chain.qtyOfTopMembers();<br> }<br>function topMembersList() external view returns (uint[] memory) {<br> return _repo.chain.topMembersList();<br> }<br>// ---- Cap & Equity ----<br>function ownersEquity() <br> external view <br> returns(Checkpoints.Checkpoint memory) <br> {<br> return _repo.ownersEquity();<br> }<br>function ownersPoints() <br> external view <br> returns(Checkpoints.Checkpoint memory) <br> {<br> return _repo.ownersPoints();<br> }<br>function capAtDate(uint date)<br> external view<br> returns (Checkpoints.Checkpoint memory)<br> {<br> return _repo.capAtDate(date); <br> }<br>function ownersEquityHistory() external view <br> returns (Checkpoints.Checkpoint[] memory)<br> {<br> return _repo.ownersEquityHistory();<br> }<br>function equityOfMember(uint256 acct)<br> external view<br> returns (Checkpoints.Checkpoint memory)<br> {<br> return _repo.equityOfMember(acct);<br> }<br>function pointsOfMember(uint256 acct)<br> external view<br> returns (Checkpoints.Checkpoint memory)<br> {<br> return _repo.pointsOfMember(acct);<br> }<br>function equityAtDate(uint256 acct, uint date)<br> external view<br> returns (Checkpoints.Checkpoint memory)<br> {<br> return _repo.equityAtDate(acct, date);<br> }<br>function votesInHand(uint256 acct)<br> external<br> view<br> returns (uint64)<br> {<br> require(_repo.isMember(acct), "ROM.votesInHand: not member");<br> return _repo.chain.nodes[acct].amt;<br> }<br>function votesAtDate(uint256 acct, uint date)<br> external view<br> returns (uint64)<br> {<br> return _repo.votesAtDate(acct, date);<br> }<br>function votesHistory(uint acct)<br> external view <br> returns (Checkpoints.Checkpoint[] memory)<br> {<br> return _repo.votesHistory(acct);<br> }<br>// ---- ShareNum ----<br>function qtyOfSharesInHand(uint acct)<br> external view returns(uint)<br> {<br> return _repo.qtyOfSharesInHand(acct);<br> }<br>function sharesInHand(uint256 acct)<br> external view<br> returns (uint[] memory)<br> {<br> return _repo.sharesInHand(acct);<br> }<br>// ---- Class ---- <br>function qtyOfSharesInClass(uint acct, uint class)<br> external view returns(uint)<br> {<br> return _repo.qtyOfSharesInClass(acct, class);<br> }<br>function sharesInClass(uint256 acct, uint class)<br> external view<br> returns (uint[] memory)<br> {<br> return _repo.sharesInClass(acct, class);<br> }<br>function isClassMember(uint256 acct, uint class)<br> external view returns(bool)<br> {<br> return _repo.isClassMember(acct, class);<br> }<br>function classesBelonged(uint acct)<br> external view returns(uint[] memory)<br> {<br> return _repo.classesBelonged(acct);<br> }<br>function qtyOfClassMember(uint class)<br> external view returns(uint) <br> {<br> return _repo.qtyOfClassMember(class);<br> }<br>function getMembersOfClass(uint class)<br> external view returns(uint256[] memory)<br> {<br> return _repo.getMembersOfClass(class);<br> }<br>// ---- TopChain ----<br>function basedOnPar() external view returns (bool) {<br> return _repo.chain.basedOnPar();<br> }<br>function maxQtyOfMembers() external view returns (uint32) {<br> return _repo.chain.maxQtyOfMembers();<br> }<br>function minVoteRatioOnChain() external view returns (uint32) {<br> return _repo.chain.minVoteRatioOnChain();<br> }<br>function totalVotes() external view returns (uint64) {<br> return _repo.chain.totalVotes();<br> }<br>function controllor() external view returns (uint40) {<br> return _repo.chain.head();<br> }<br>function tailOfChain() external view returns (uint40) {<br> return _repo.chain.tail();<br> }<br>function headOfQueue() external view returns (uint40) {<br> return _repo.chain.headOfQueue();<br> }<br>function tailOfQueue() external view returns (uint40) {<br> return _repo.chain.tailOfQueue();<br> }<br>// ==== group ====<br>function groupRep(uint256 acct) external view returns (uint40) {<br> return _repo.chain.rootOf(acct);<br> }<br>function votesOfGroup(uint256 acct) external view returns (uint64) {<br> return _repo.chain.votesOfGroup(acct);<br> }<br>function deepOfGroup(uint256 acct) external view returns (uint256) {<br> return _repo.chain.deepOfBranch(acct);<br> }<br>function membersOfGroup(uint256 acct)<br> external<br> view<br> returns (uint256[] memory)<br> {<br> return _repo.chain.membersOfGroup(acct);<br> }<br>function qtyOfGroupsOnChain() external view returns (uint32) {<br> return _repo.chain.qtyOfBranches();<br> }<br>function qtyOfGroups() external view returns (uint256) {<br> return _repo.chain.qtyOfGroups();<br> }<br>function affiliated(uint256 acct1, uint256 acct2)<br> external<br> view<br> returns (bool)<br> {<br> return _repo.chain.affiliated(acct1, acct2);<br> }<br>// ==== snapshot ====<br>function getSnapshot() external view returns (TopChain.Node[] memory, TopChain.Para memory) {<br> return _repo.chain.getSnapshot();<br> }<br> }<br>|
| [Contents](#toc) |

---

## IRegisterOfMembers.sol

---

| |
|:---|
| **contracts/comps/books/rom/IRegisterOfMembers.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/Checkpoints.sol";<br> import "../../../lib/MembersRepo.sol";<br> import "../../../lib/SharesRepo.sol";<br> import "../../../lib/TopChain.sol";<br>interface IRegisterOfMembers {<br> //##################<br> //## Event ##<br> //##################<br>event SetVoteBase(bool indexed basedOnPar);<br>event CapIncrease(uint indexed votingWeight, uint indexed paid, uint indexed par, uint distrWeight);<br>event CapDecrease(uint indexed votingWeight, uint indexed paid, uint indexed par, uint distrWeight);<br>event SetMaxQtyOfMembers(uint indexed max);<br>event SetMinVoteRatioOnChain(uint indexed min);<br>event SetAmtBase(bool indexed basedOnPar);<br>event AddMember(uint256 indexed acct, uint indexed qtyOfMembers);<br>event AddShareToMember(uint indexed seqOfShare, uint indexed acct);<br>event RemoveShareFromMember(uint indexed seqOfShare, uint indexed acct);<br>event ChangeAmtOfMember(<br> uint indexed acct,<br> uint indexed paid,<br> uint indexed par,<br> bool increase);<br>event AddMemberToGroup(uint indexed acct, uint indexed root);<br>event RemoveMemberFromGroup(uint256 indexed acct, uint256 indexed root);<br>event ChangeGroupRep(uint256 indexed orgRep, uint256 indexed newRep);<br>//#################<br> //## Write I/O ##<br> //#################<br>function setMaxQtyOfMembers(uint max) external;<br>function setMinVoteRatioOnChain(uint min) external;<br>function setVoteBase(bool _basedOnPar) external;<br>function capIncrease(<br> uint votingWeight, <br> uint distrWeight,<br> uint paid, <br> uint par, <br> bool isIncrease) external;<br>function addMember(uint256 acct) external;<br>function addShareToMember(<br> SharesRepo.Share memory share) external;<br>function removeShareFromMember(<br> SharesRepo.Share memory share) external;<br>function increaseAmtOfMember(<br> uint acct,<br> uint votingWeight,<br> uint distrWeight,<br> uint deltaPaid,<br> uint deltaPar,<br> bool isIncrease) external ;<br>function addMemberToGroup(uint acct, uint root) external;<br>function removeMemberFromGroup(uint256 acct) external;<br>function restoreSharesInRom(SharesRepo.Share[] memory shares) external;<br>function restoreTopChainInRom(TopChain.Node[] memory list, TopChain.Para memory para) external;<br>function restoreVotesHistoryInRom(<br> uint acct, Checkpoints.Checkpoint[] memory list,<br> Checkpoints.Checkpoint memory distrPts) external;<br>// ##############<br> // ## Read ##<br> // ##############<br>function isMember(uint256 acct) external view returns (bool);<br>function qtyOfMembers() external view returns (uint);<br>function membersList() external view returns (uint256[] memory);<br>function sortedMembersList() external view returns (uint256[] memory);<br>function qtyOfTopMembers() external view returns (uint);<br>function topMembersList() external view returns (uint[] memory);<br>// ---- Cap & Equity ----<br>function ownersEquity() external view <br> returns(Checkpoints.Checkpoint memory);<br>function ownersPoints() external view <br> returns(Checkpoints.Checkpoint memory);<br>function capAtDate(uint date) external view<br> returns (Checkpoints.Checkpoint memory);<br>function ownersEquityHistory() external view <br> returns (Checkpoints.Checkpoint[] memory);<br>function equityOfMember(uint256 acct) external view<br> returns (Checkpoints.Checkpoint memory);<br>function pointsOfMember(uint256 acct) external view<br> returns (Checkpoints.Checkpoint memory);<br>function equityAtDate(uint acct, uint date) <br> external view returns(Checkpoints.Checkpoint memory);<br>function votesInHand(uint256 acct)<br> external view returns (uint64);<br>function votesAtDate(uint256 acct, uint date)<br> external view<br> returns (uint64);<br>function votesHistory(uint acct)<br> external view <br> returns (Checkpoints.Checkpoint[] memory);<br>// ---- ShareNum ----<br>function qtyOfSharesInHand(uint acct)<br> external view returns(uint);<br>function sharesInHand(uint256 acct)<br> external view<br> returns (uint[] memory);<br>// ---- Class ---- <br>function qtyOfSharesInClass(uint acct, uint class)<br> external view returns(uint);<br>function sharesInClass(uint256 acct, uint class)<br> external view returns (uint[] memory);<br>function isClassMember(uint256 acct, uint class)<br> external view returns(bool);<br>function classesBelonged(uint acct)<br> external view returns(uint[] memory);<br>function qtyOfClassMember(uint class)<br> external view returns(uint);<br>function getMembersOfClass(uint class)<br> external view returns(uint256[] memory);<br>// ---- TopChain ----<br>function basedOnPar() external view returns (bool);<br>function maxQtyOfMembers() external view returns (uint32);<br>function minVoteRatioOnChain() external view returns (uint32);<br>function totalVotes() external view returns (uint64);<br>function controllor() external view returns (uint40);<br>function tailOfChain() external view returns (uint40);<br>function headOfQueue() external view returns (uint40);<br>function tailOfQueue() external view returns (uint40);<br>// ==== group ====<br>function groupRep(uint256 acct) external view returns (uint40);<br>function votesOfGroup(uint256 acct) external view returns (uint64);<br>function deepOfGroup(uint256 acct) external view returns (uint256);<br>function membersOfGroup(uint256 acct)<br> external view<br> returns (uint256[] memory);<br>function qtyOfGroupsOnChain() external view returns (uint32);<br>function qtyOfGroups() external view returns (uint256);<br>function affiliated(uint256 acct1, uint256 acct2)<br> external view<br> returns (bool);<br>// ==== snapshot ====<br>function getSnapshot() external view returns (TopChain.Node[] memory, TopChain.Para memory);<br> }<br>|
| [Contents](#toc) |

---

## IRegisterOfPledges.sol

---

| |
|:---|
| **contracts/comps/books/rop/IRegisterOfPledges.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/PledgesRepo.sol";<br>interface IRegisterOfPledges {<br>//##################<br> //## Event ##<br> //##################<br>event CreatePledge(<br> uint256 indexed seqOfShare,<br> uint256 indexed seqOfPld,<br> uint256 creditor,<br> uint256 indexed paid,<br> uint256 par);<br>event TransferPledge(<br> uint256 indexed seqOfShare,<br> uint256 indexed seqOfPld,<br> uint256 indexed newSeqOfPld,<br> uint256 buyer,<br> uint256 paid,<br> uint256 par);<br>event RefundDebt(<br> uint256 indexed seqOfShare,<br> uint256 indexed seqOfPld,<br> uint256 indexed refundAmt);<br>event ExtendPledge(<br> uint256 indexed seqOfShare,<br> uint256 indexed seqOfPld,<br> uint256 indexed extDays);<br>event LockPledge(uint256 indexed seqOfShare, uint256 indexed seqOfPld, bytes32 indexed hashLock);<br>event ReleasePledge(uint256 indexed seqOfShare, uint256 indexed seqOfPld, string indexed hashKey);<br>event ExecPledge(uint256 indexed seqOfShare, uint256 indexed seqOfPld);<br>event RevokePledge(uint256 indexed seqOfShare, uint256 indexed seqOfPld);<br>//##################<br> //## Write I/O ##<br> //##################<br>function createPledge(<br> bytes32 snOfPld,<br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays) external returns(PledgesRepo.Head memory head);<br>function issuePledge(<br> PledgesRepo.Head memory head,<br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays) external returns(PledgesRepo.Head memory regHead);<br>function regPledge(<br> PledgesRepo.Pledge memory pld) external returns(PledgesRepo.Head memory head);<br>function transferPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint buyer,<br> uint amt,<br> uint caller) external returns (PledgesRepo.Pledge memory newPld);<br>function refundDebt(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint amt,<br> uint caller) external returns (PledgesRepo.Pledge memory newPld);<br>function extendPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint extDays,<br> uint caller) external;<br>// ==== Lock/Release/Exec/Revoke ====<br>function lockPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> bytes32 hashLock,<br> uint caller) external;<br>function releasePledge(uint256 seqOfShare, uint256 seqOfPld, string memory hashKey)<br> external returns (uint64);<br>function execPledge(<br> uint seqOfShare, <br> uint256 seqOfPld,<br> uint caller) external;<br>function revokePledge(uint256 seqOfShare, uint256 seqOfPld, uint caller)<br> external; <br>//################<br> //## Read ##<br> //################<br>function counterOfPledges(uint256 seqOfShare) <br> external view returns (uint16);<br>function isPledge(uint256 seqOfShare, uint256 seqOfPld) <br> external view returns (bool);<br>function getSNList() external view<br> returns(bytes32[] memory);<br>function getPledge(uint256 seqOfShare, uint256 seqOfPld)<br> external view returns (PledgesRepo.Pledge memory);<br>function getPledgesOfShare(uint256 seqOfShare) <br> external view returns (PledgesRepo.Pledge[] memory);<br>function getAllPledges() external view <br> returns (PledgesRepo.Pledge[] memory);<br>}<br>|
| [Contents](#toc) |

---

## RegisterOfPledges.sol

---

| |
|:---|
| **contracts/comps/books/rop/RegisterOfPledges.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IRegisterOfPledges.sol";<br>import "../../common/access/AccessControl.sol";<br>contract RegisterOfPledges is IRegisterOfPledges, AccessControl {<br> using PledgesRepo for PledgesRepo.Repo;<br> using PledgesRepo for PledgesRepo.Pledge;<br>PledgesRepo.Repo private _repo;<br>//##################<br> //## Write I/O ##<br> //##################<br>function createPledge(<br> bytes32 snOfPld,<br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays) external onlyDK returns(PledgesRepo.Head memory head){<br> head = _repo.createPledge(<br> snOfPld,<br> paid,<br> par,<br> guaranteedAmt,<br> execDays);<br>emit CreatePledge(<br> head.seqOfShare,<br> head.seqOfPld,<br> head.creditor,<br> paid,<br> par);<br> }<br>function issuePledge(<br> PledgesRepo.Head memory head,<br> uint paid,<br> uint par,<br> uint guaranteedAmt,<br> uint execDays) external onlyKeeper returns(PledgesRepo.Head memory regHead)<br> {<br> regHead = _repo.issuePledge(<br> head, <br> paid,<br> par,<br> guaranteedAmt,<br> execDays);<br>emit CreatePledge(<br> head.seqOfShare,<br> head.seqOfPld,<br> head.creditor,<br> paid,<br> par);<br> }<br>function regPledge(<br> PledgesRepo.Pledge memory pld) external onlyKeeper returns(PledgesRepo.Head memory head){<br> head = _repo.regPledge(pld);<br>emit CreatePledge(<br> pld.head.seqOfShare, <br> head.seqOfPld, <br> pld.head.creditor,<br> pld.body.paid, <br> pld.body.par );<br> }<br>// ==== Transfer Pledge ====<br>function transferPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint buyer,<br> uint amt,<br> uint caller) external onlyKeeper returns (PledgesRepo.Pledge memory newPld)<br> {<br> require(buyer > 0, "ROP.transferPld: zero buyer");<br>newPld = _repo.splitPledge(seqOfShare, seqOfPld, buyer, amt, caller);<br>emit TransferPledge(<br> newPld.head.seqOfShare, <br> seqOfPld,<br> newPld.head.seqOfPld, <br> newPld.head.creditor,<br> newPld.body.paid, <br> newPld.body.par );<br> }<br>// ==== Update Pledge ====<br>function refundDebt(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint amt,<br> uint caller) external onlyKeeper returns (PledgesRepo.Pledge memory newPld)<br> {<br> newPld = _repo.splitPledge(seqOfShare, seqOfPld, 0, amt, caller);<br>emit RefundDebt(seqOfShare, seqOfPld, amt);<br> }<br>function extendPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> uint extDays,<br> uint caller) external onlyKeeper {<br> _repo.pledges[seqOfShare][seqOfPld].extendPledge(extDays, caller);<br> emit ExtendPledge(seqOfShare, seqOfPld, extDays);<br> }<br>// ==== Lock/Release/Exec/Revoke ====<br>function lockPledge(<br> uint256 seqOfShare,<br> uint256 seqOfPld,<br> bytes32 hashLock,<br> uint caller) external onlyKeeper {<br> _repo.pledges[seqOfShare][seqOfPld].lockPledge(hashLock, caller);<br> emit LockPledge(seqOfShare, seqOfPld, hashLock);<br> }<br>function releasePledge(<br> uint256 seqOfShare, <br> uint256 seqOfPld, <br> string memory hashKey) external onlyKeeper returns (uint64) {<br> PledgesRepo.Pledge storage pld = _repo.pledges[seqOfShare][seqOfPld];<br> pld.releasePledge(hashKey); <br> emit ReleasePledge(seqOfShare, seqOfPld, hashKey);<br> return pld.body.paid;<br> }<br>function execPledge(uint256 seqOfShare, uint256 seqOfPld, uint caller)<br> external onlyKeeper <br> {<br> _repo.pledges[seqOfShare][seqOfPld].execPledge(caller);<br> emit ExecPledge(seqOfShare, seqOfPld);<br> }<br>function revokePledge(uint256 seqOfShare, uint256 seqOfPld, uint caller)<br> external onlyKeeper {<br> _repo.pledges[seqOfShare][seqOfPld].revokePledge(caller);<br> emit RevokePledge(seqOfShare, seqOfPld);<br> }<br>//################<br> //## Read ##<br> //################<br>function counterOfPledges(uint256 seqOfShare) <br> external view returns (uint16) <br> {<br> return _repo.counterOfPld(seqOfShare);<br> }<br>function isPledge(uint256 seqOfShare, uint256 seqOfPledge) <br> external view returns (bool) <br> {<br> return _repo.isPledge(seqOfShare, seqOfPledge);<br> }<br>function getSNList() external view returns(bytes32[] memory)<br> {<br> return _repo.getSNList();<br> }<br>function getPledge(uint256 seqOfShare, uint256 seqOfPld)<br> external view returns (PledgesRepo.Pledge memory)<br> {<br> return _repo.getPledge(seqOfShare, seqOfPld);<br> }<br>function getPledgesOfShare(uint256 seqOfShare) <br> external view returns (PledgesRepo.Pledge[] memory) <br> {<br> return _repo.getPledgesOfShare(seqOfShare);<br> }<br>function getAllPledges() external view <br> returns (PledgesRepo.Pledge[] memory)<br> {<br> return _repo.getAllPledges();<br> }<br>}<br>|
| [Contents](#toc) |

---

## IUsdListOfOrders.sol

---

| |
|:---|
| **contracts/comps/books/loo/IUsdListOfOrders.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/UsdOrdersRepo.sol";<br> import "../../../lib/GoldChain.sol";<br> import "../../../lib/InvestorsRepo.sol";<br> import "../../../lib/EnumerableSet.sol";<br>interface IUsdListOfOrders {<br>//################<br> //## Events ##<br> //################<br>event OrderPlaced(bytes32 indexed fromSn, bytes32 indexed toSn, bytes32 indexed qtySn, bool isOffer);<br>event OrderWithdrawn(bytes32 indexed head, bytes32 indexed body, bool indexed isOffer);<br>event DealClosed(bytes32 indexed fromSn, bytes32 indexed toSn, bytes32 qtySn, uint indexed consideration);<br>event OrderExpired(bytes32 indexed head, bytes32 indexed body, bool indexed isOffer);<br>//#################<br> //## Write I/O ##<br> //#################<br>function placeSellOrder(<br> UsdOrdersRepo.Deal memory input,<br> uint execHours) external returns(<br> UsdOrdersRepo.Deal[] memory deals, <br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> UsdOrdersRepo.Deal memory offer);<br>function placeBuyOrder(<br> UsdOrdersRepo.Deal memory input,<br> uint execHours) external returns (<br> UsdOrdersRepo.Deal[] memory deals, <br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> UsdOrdersRepo.Deal memory bid);<br>function withdrawOrder(<br> uint classOfShare,<br> uint seqOfOrder,<br> bool isOffer) external returns(GoldChain.Order memory order);<br>//################<br> //## Read I/O ##<br> //################<br>// ==== Deals ====<br>function counterOfOrders(<br> uint classOfShare, bool isOffer) external view returns (uint32);<br>function headOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32);<br>function tailOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32);<br>function lengthOfList(<br> uint classOfShare, bool isOffer) external view returns (uint);<br>function getSeqList(<br> uint classOfShare, bool isOffer) external view returns (uint[] memory);<br>// ==== Order ====<br>function isOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (bool);<br>function getOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (GoldChain.Order memory);<br>function getOrders(<br> uint classOfShare, bool isOffer) external view returns (GoldChain.Order[] memory);<br>// ==== Class ====<br> function isClass(uint classOfShare) external view returns(bool);<br>function getClassesList() external view returns(uint[] memory);<br> }<br>|
| [Contents](#toc) |

---

## UsdListOfOrders.sol

---

| |
|:---|
| **contracts/comps/books/loo/UsdListOfOrders.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IUsdListOfOrders.sol";<br> import "../../common/access/AccessControl.sol";<br>contract UsdListOfOrders is IUsdListOfOrders, AccessControl {<br> using UsdOrdersRepo for UsdOrdersRepo.Repo;<br> using UsdOrdersRepo for UsdOrdersRepo.Deal;<br> using GoldChain for GoldChain.Chain;<br> using GoldChain for GoldChain.Node;<br> using GoldChain for GoldChain.Data;<br> using EnumerableSet for EnumerableSet.UintSet;<br>mapping (uint => UsdOrdersRepo.Repo) private _ordersOfClass;<br> EnumerableSet.UintSet private _classesList;<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== Order ====<br>function placeSellOrder(<br> UsdOrdersRepo.Deal memory input, uint execHours) external onlyDK returns(<br> UsdOrdersRepo.Deal[] memory deals, <br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> UsdOrdersRepo.Deal memory offer) {<br> _classesList.add(input.classOfShare);<br>(deals, lenOfDeals, expired, lenOfExpired, offer) = <br> _ordersOfClass[input.classOfShare].placeSellOrder(<br> input,<br> execHours);<br>if (lenOfDeals > 0) _logDeals(deals, lenOfDeals);<br> if (lenOfExpired > 0) _logExpired(expired, false, lenOfExpired);<br> if (offer.price > 0) _logOrder(offer, true);<br> }<br>function _bpToDt(uint amt) private pure returns(uint) {<br> return amt \* 10 \*\* 10;<br> }<br>function _logOrder(UsdOrdersRepo.Deal memory order, bool isOffer) private {<br> (bytes32 fromSn, bytes32 toSn, bytes32 qtySn) = order.codifyDeal();<br> emit OrderPlaced(fromSn, toSn, qtySn, isOffer);<br> }<br>function _logDeals(UsdOrdersRepo.Deal[] memory deals, uint len) private {<br> // uint len = deals.length;<br> while (len > 0) {<br> (bytes32 fromSn, bytes32 toSn, bytes32 qtySn) = <br> deals[len - 1].codifyDeal();<br> emit DealClosed(fromSn, toSn, qtySn, _bpToDt(deals[len - 1].consideration));<br> len--;<br> }<br> }<br>function _logExpired(GoldChain.Order[] memory expired, bool isOffer, uint len) private {<br> // uint len = expired.length;<br> while (len > 0) {<br> emit OrderExpired(expired[len - 1].node.codifyNode(),<br> expired[len - 1].data.codifyData(), isOffer);<br> len--;<br> }<br> }<br>function placeBuyOrder(<br> UsdOrdersRepo.Deal memory input,<br> uint execHours) external onlyDK returns (<br> UsdOrdersRepo.Deal[] memory deals,<br> uint lenOfDeals, <br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> UsdOrdersRepo.Deal memory bid) {<br>_classesList.add(input.classOfShare);<br>(deals, lenOfDeals, expired, lenOfExpired, bid) = <br> _ordersOfClass[input.classOfShare].placeBuyOrder(<br> input,<br> execHours);<br>if (lenOfDeals > 0) _logDeals(deals, lenOfDeals);<br> if (lenOfExpired > 0) _logExpired(expired, true, lenOfExpired);<br> if (bid.price > 0) _logOrder(bid, false);<br> }<br>function withdrawOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external onlyDK returns(GoldChain.Order memory order) {<br>if (!_classesList.contains(classOfShare)) return order;<br>order = _ordersOfClass[classOfShare].withdrawOrder(<br> seqOfOrder, isOffer);<br>emit OrderWithdrawn(<br> order.node.codifyNode(), order.data.codifyData(), isOffer);<br> }<br>//################<br> //## Read I/O ##<br> //################<br>// ==== Chain ====<br>function counterOfOrders(<br> uint classOfShare, bool isOffer) external view returns (uint32) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].counterOfOrders(isOffer);<br> }<br>function headOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].headOfList(isOffer);<br> }<br>function tailOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].tailOfList(isOffer);<br> }<br>function lengthOfList(<br> uint classOfShare, bool isOffer) external view returns (uint) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].lengthOfList(isOffer);<br> }<br>function getSeqList(<br> uint classOfShare, bool isOffer) external view returns (uint[] memory list) {<br> if (!_classesList.contains(classOfShare)) return list;<br> list = _ordersOfClass[classOfShare].getSeqList(isOffer);<br> }<br>// ==== Order ====<br>function isOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (bool) {<br> if (!_classesList.contains(classOfShare)) return false;<br> return _ordersOfClass[classOfShare].isOrder(isOffer, seqOfOrder);<br> }<br>function getOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (GoldChain.Order memory order) {<br> if (!_classesList.contains(classOfShare)) return order;<br> order = _ordersOfClass[classOfShare].getOrder(isOffer, seqOfOrder);<br> }<br>function getOrders(<br> uint classOfShare, bool isOffer) external view returns (GoldChain.Order[] memory list) {<br> if (!_classesList.contains(classOfShare)) return list;<br> list = _ordersOfClass[classOfShare].getOrders(isOffer);<br> }<br>// ==== Class ====<br> function isClass(uint classOfShare) external view returns(bool) {<br> return _classesList.contains(classOfShare);<br> }<br>function getClassesList() external view returns(uint[] memory) {<br> return _classesList.values();<br> }<br>}<br>|
| [Contents](#toc) |

---

## IListOfOrders.sol

---

| |
|:---|
| **contracts/comps/books/loo/IListOfOrders.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/OrdersRepo.sol";<br> import "../../../lib/GoldChain.sol";<br> import "../../../lib/InvestorsRepo.sol";<br> import "../../../lib/EnumerableSet.sol";<br>interface IListOfOrders {<br>//################<br> //## Events ##<br> //################<br>event RegInvestor(uint indexed investor, uint indexed groupRep, bytes32 indexed idHash);<br>event ApproveInvestor(uint indexed investor, uint indexed verifier);<br>event RevokeInvestor(uint indexed investor, uint indexed verifier);<br>event OrderPlaced(bytes32 indexed sn, bool indexed isOffer);<br>event OrderWithdrawn(bytes32 indexed head, bytes32 indexed body, bool indexed isOffer);<br>event DealClosed(bytes32 indexed deal, uint indexed consideration);<br>event OrderExpired(bytes32 indexed head, bytes32 indexed body, bool indexed isOffer);<br>//#################<br> //## Write I/O ##<br> //#################<br>function regInvestor(<br> uint acct,<br> uint groupRep,<br> bytes32 idHash) external;<br>function approveInvestor(<br> uint userNo,<br> uint verifier) external;<br>function revokeInvestor(<br> uint userNo,<br> uint verifier) external;<br>function restoreInvestorsRepo(<br> InvestorsRepo.Investor[] memory list, uint qtyOfInvestors) external;<br>function placeSellOrder(<br> OrdersRepo.Deal memory input,<br> uint execHours,<br> uint centPriceInWei) external returns(<br> OrdersRepo.Deal[] memory deals,<br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> OrdersRepo.Deal memory offer);<br>function placeBuyOrder(<br> OrdersRepo.Deal memory input,<br> uint execHours,<br> uint centPriceInWei) external returns (<br> OrdersRepo.Deal[] memory deals, <br> uint lenOfDeals, <br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> OrdersRepo.Deal memory bid);<br>function withdrawOrder(<br> uint classOfShare,<br> uint seqOfOrder,<br> bool isOffer) external returns(GoldChain.Order memory order);<br>//################<br> //## Read I/O ##<br> //################<br>// ==== Investor ====<br>function isInvestor(<br> uint userNo) external view returns(bool);<br>function getInvestor(<br> uint userNo) external view returns(InvestorsRepo.Investor memory);<br>function getQtyOfInvestors() <br> external view returns(uint);<br>function investorList() <br> external view returns(uint[] memory);<br>function investorInfoList() <br> external view returns(InvestorsRepo.Investor[] memory);<br>// ==== Deals ====<br>function counterOfOrders(<br> uint classOfShare, bool isOffer) external view returns (uint32);<br>function headOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32);<br>function tailOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32);<br>function lengthOfList(<br> uint classOfShare, bool isOffer) external view returns (uint);<br>function getSeqList(<br> uint classOfShare, bool isOffer) external view returns (uint[] memory);<br>// ==== Order ====<br>function isOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (bool);<br>function getOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (GoldChain.Order memory);<br>function getOrders(<br> uint classOfShare, bool isOffer) external view returns (GoldChain.Order[] memory);<br>// ==== Class ====<br> function isClass(uint classOfShare) external view returns(bool);<br>function getClassesList() external view returns(uint[] memory);<br> }<br>|
| [Contents](#toc) |

---

## ListOfOrders.sol

---

| |
|:---|
| **contracts/comps/books/loo/ListOfOrders.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IListOfOrders.sol";<br> import "../../common/access/AccessControl.sol";<br>contract ListOfOrders is IListOfOrders, AccessControl {<br> using OrdersRepo for OrdersRepo.Repo;<br> using OrdersRepo for OrdersRepo.Deal;<br> using GoldChain for GoldChain.Chain;<br> using GoldChain for GoldChain.Node;<br> using GoldChain for GoldChain.Data;<br> using EnumerableSet for EnumerableSet.UintSet;<br> using InvestorsRepo for InvestorsRepo.Repo;<br>InvestorsRepo.Repo private _investors;<br>mapping (uint => OrdersRepo.Repo) private _ordersOfClass;<br> EnumerableSet.UintSet private _classesList;<br>//#################<br> //## Write I/O ##<br> //#################<br>// ==== Investor ====<br>function regInvestor(<br> uint userNo,<br> uint groupRep,<br> bytes32 idHash) external onlyDK {<br> _investors.regInvestor(userNo, groupRep, idHash);<br> emit RegInvestor(userNo, groupRep, idHash);<br> }<br>function approveInvestor(<br> uint userNo,<br> uint verifier) external onlyDK {<br> _investors.approveInvestor(userNo, verifier);<br> emit ApproveInvestor(userNo, verifier);<br> } <br>function revokeInvestor(<br> uint userNo,<br> uint verifier) external onlyDK {<br> _investors.revokeInvestor(userNo, verifier);<br> emit RevokeInvestor(userNo, verifier);<br> }<br>function restoreInvestorsRepo(<br> InvestorsRepo.Investor[] memory list, uint qtyOfInvestors) external onlyDK {<br> _investors.restoreRepo(list, qtyOfInvestors);<br> }<br>// ==== Order ====<br>function placeSellOrder(<br> OrdersRepo.Deal memory input,<br> uint execHours,<br> uint centPriceInWei) external onlyDK returns(<br> OrdersRepo.Deal[] memory deals,<br> uint lenOfDeals,<br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> OrdersRepo.Deal memory offer) {<br> _classesList.add(input.classOfShare);<br>(deals, lenOfDeals, expired, lenOfExpired, offer) = _ordersOfClass[input.classOfShare].placeSellOrder(<br> input,<br> execHours,<br> centPriceInWei);<br>if (lenOfDeals > 0) _logDeals(deals, lenOfDeals);<br> if (lenOfExpired > 0) _logExpired(expired, false, lenOfExpired);<br> if (offer.price > 0) _logOrder(offer, true);<br> }<br>function _logOrder(OrdersRepo.Deal memory order, bool isOffer) private {<br> emit OrderPlaced(order.codifyBrief(), isOffer);<br> }<br>function _logDeals(OrdersRepo.Deal[] memory deals, uint len) private {<br> while (len > 0) {<br> emit DealClosed(deals[len - 1].codifyBrief(), deals[len - 1].consideration);<br> len--;<br> }<br> }<br>function _logExpired(GoldChain.Order[] memory expired, bool isOffer, uint len) private {<br> while (len > 0) {<br> emit OrderExpired(expired[len - 1].node.codifyNode(),<br> expired[len - 1].data.codifyData(), isOffer);<br> len--;<br> }<br> }<br>function placeBuyOrder(<br> OrdersRepo.Deal memory input,<br> uint execHours,<br> uint centPriceInWei) external onlyDK returns (<br> OrdersRepo.Deal[] memory deals, <br> uint lenOfDeals, <br> GoldChain.Order[] memory expired,<br> uint lenOfExpired,<br> OrdersRepo.Deal memory bid) {<br>_classesList.add(input.classOfShare);<br>(deals, lenOfDeals, expired, lenOfExpired, bid) = _ordersOfClass[input.classOfShare].placeBuyOrder(<br> input,<br> execHours,<br> centPriceInWei);<br>if (lenOfDeals > 0) _logDeals(deals, lenOfDeals);<br> if (lenOfExpired > 0) _logExpired(expired, true, lenOfExpired);<br> if (bid.price > 0) _logOrder(bid, false);<br> }<br>function withdrawOrder(<br> uint classOfShare,<br> uint seqOfOrder,<br> bool isOffer) external onlyDK returns(GoldChain.Order memory order) {<br>if (!_classesList.contains(classOfShare)) return order;<br>order = _ordersOfClass[classOfShare].withdrawOrder(<br> seqOfOrder, isOffer);<br>emit OrderWithdrawn(<br> order.node.codifyNode(), order.data.codifyData(), isOffer);<br> }<br>//################<br> //## Read I/O ##<br> //################<br>// ==== Investor ====<br>function isInvestor(<br> uint userNo) external view returns(bool) {<br> return _investors.isInvestor(userNo);<br> }<br>function getInvestor(<br> uint userNo) external view returns(InvestorsRepo.Investor memory) {<br> return _investors.getInvestor(userNo);<br> }<br>function getQtyOfInvestors() <br> external view returns(uint) <br> {<br> return _investors.getQtyOfInvestors();<br> }<br>function investorList() <br> external view returns(uint[] memory) <br> {<br> return _investors.investorList();<br> }<br>function investorInfoList() <br> external view returns(InvestorsRepo.Investor[] memory) <br> {<br> return _investors.investorInfoList();<br> }<br>// ==== Chain ====<br>function counterOfOrders(<br> uint classOfShare, bool isOffer) external view returns (uint32) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].counterOfOrders(isOffer);<br> }<br>function headOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].headOfList(isOffer);<br> }<br>function tailOfList(<br> uint classOfShare, bool isOffer) external view returns (uint32) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].tailOfList(isOffer);<br> }<br>function lengthOfList(<br> uint classOfShare, bool isOffer) external view returns (uint) {<br> if (!_classesList.contains(classOfShare)) return 0;<br> return _ordersOfClass[classOfShare].lengthOfList(isOffer);<br> }<br>function getSeqList(<br> uint classOfShare, bool isOffer) external view returns (uint[] memory list) {<br> if (!_classesList.contains(classOfShare)) return list;<br> list = _ordersOfClass[classOfShare].getSeqList(isOffer);<br> }<br>// ==== Order ====<br>function isOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (bool) {<br> if (!_classesList.contains(classOfShare)) return false;<br> return _ordersOfClass[classOfShare].isOrder(isOffer, seqOfOrder);<br> }<br>function getOrder(<br> uint classOfShare, uint seqOfOrder, bool isOffer) external view returns (GoldChain.Order memory order) {<br> if (!_classesList.contains(classOfShare)) return order;<br> order = _ordersOfClass[classOfShare].getOrder(isOffer, seqOfOrder);<br> }<br>function getOrders(<br> uint classOfShare, bool isOffer) external view returns (GoldChain.Order[] memory list) {<br> if (!_classesList.contains(classOfShare)) return list;<br> list = _ordersOfClass[classOfShare].getOrders(isOffer);<br> }<br>// ==== Class ====<br> function isClass(uint classOfShare) external view returns(bool) {<br> return _classesList.contains(classOfShare);<br> }<br>function getClassesList() external view returns(uint[] memory) {<br> return _classesList.values();<br> }<br>}<br>|
| [Contents](#toc) |

---

## IDraftControl.sol

---

| |
|:---|
| **contracts/comps/common/access/IDraftControl.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/RolesRepo.sol";<br>interface IDraftControl {<br>// ##################<br> // ## Event ##<br> // ##################<br>event SetRoleAdmin(bytes32 indexed role, address indexed acct); <br>event LockContents();<br>// ##################<br> // ## Write ##<br> // ##################<br>function setRoleAdmin(bytes32 role, address acct) external;<br>function grantRole(bytes32 role, address acct) external;<br>function revokeRole(bytes32 role, address acct) external;<br>function renounceRole(bytes32 role) external;<br>function abandonRole(bytes32 role) external;<br>function lockContents() external;<br>// ##################<br> // ## Read I/O ##<br> // ##################<br>function isFinalized() external view returns (bool);<br>function getRoleAdmin(bytes32 role) external view returns (address);<br>function hasRole(bytes32 role, address acct) external view returns (bool);<br>}<br>|
| [Contents](#toc) |

---

## DraftControl.sol

---

| |
|:---|
| **contracts/comps/common/access/DraftControl.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* V.0.2.4<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IDraftControl.sol";<br> import "./AccessControl.sol";<br>contract DraftControl is IDraftControl, AccessControl {<br> using RolesRepo for RolesRepo.Repo;<br>bytes32 private constant _ATTORNEYS = bytes32("Attorneys");<br> RolesRepo.Repo private _roles;<br>// ################<br> // ## Modifier ##<br> // ################<br>modifier onlyGC {<br> require(_roles.getRoleAdmin(_ATTORNEYS) == <br> msg.sender,"AC.onlyGC: NOT");<br> _;<br> }<br>modifier onlyAttorney {<br> require(_roles.hasRole(_ATTORNEYS, msg.sender),<br> "AC.onlyAttorney: NOT");<br> _;<br> }<br>modifier attorneyOrKeeper {<br> require(_roles.hasRole(_ATTORNEYS, msg.sender) \|\|<br> _gk.isKeeper(msg.sender),<br> "AC.md.attorneyOrKeeper: NOT");<br> _;<br> }<br>// #################<br> // ## Write ##<br> // #################<br>function setRoleAdmin(bytes32 role, address acct) external onlyOwner {<br> _roles.setRoleAdmin(role, acct);<br> emit SetRoleAdmin(role, acct);<br> }<br>function grantRole(bytes32 role, address acct) external {<br> _roles.grantRole(role, acct, msg.sender);<br> }<br>function revokeRole(bytes32 role, address acct) external {<br> _roles.revokeRole(role, acct, msg.sender);<br> }<br>function renounceRole(bytes32 role) external {<br> _roles.renounceRole(role, msg.sender);<br> }<br>function abandonRole(bytes32 role) external onlyOwner {<br> _roles.abandonRole(role);<br> }<br>function lockContents() public onlyOwner {<br> require(_dk.state == 1, <br> "AC.lockContents: wrong state");<br>_roles.abandonRole(_ATTORNEYS);<br> setNewOwner(address(0));<br> _dk.state = 2;<br>emit LockContents();<br> }<br>// ##############<br> // ## Read ##<br> // ##############<br>function isFinalized() public view returns (bool) {<br> return _dk.state == 2;<br> }<br>function getRoleAdmin(bytes32 role) public view returns (address) {<br> return _roles.getRoleAdmin(role);<br> }<br>function hasRole(bytes32 role, address acct) public view returns (bool) {<br> return _roles.hasRole(role, acct);<br> }<br>}<br>|
| [Contents](#toc) |

---

## AnyKeeper.sol

---

| |
|:---|
| **contracts/comps/common/access/AnyKeeper.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./AccessControl.sol";<br> import "../../IUSDKeeper.sol";<br>contract AnyKeeper is AccessControl {<br>function _isKeeper(address msgSender) internal view returns(bool) {<br> // uint i = 1;<br> // address keeper = _gk.getKeeper(i);<br>if (msgSender == _dk.addr) {<br> return true;<br> }<br>// while(keeper != address(0)) {<br> // if (keeper == msgSender) {<br> // return true;<br> // }<br> // i++;<br> // keeper = _gk.getKeeper(i);<br> // }<br>return IUSDKeeper(_gk.getKeeper(15)).isKeeper(msgSender);<br> }<br>modifier anyKeeper() {<br> require(_isKeeper(msg.sender),<br> "AnyKeeper: not");<br> _;<br> }<br>} |
| [Contents](#toc) |

---

## RoyaltyCharge.sol

---

| |
|:---|
| **contracts/comps/common/access/RoyaltyCharge.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2025 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./AnyKeeper.sol";<br> import "../../../lib/DocsRepo.sol";<br>contract RoyaltyCharge is AnyKeeper {<br>event ChargeRoyalty(<br> uint indexed typeOfDoc, uint version, uint indexed rate, <br> uint indexed user, uint author);<br>function _msgSender(<br> address msgSender,<br> uint rate) internal returns(uint40 usr) {<br> DocsRepo.Head memory head = _rc.getHeadByBody(address(this));<br> head.author = _rc.getAuthorByBody(address(this));<br> usr = _rc.getUserNo(<br> msgSender, rate \* (10 \*\* 10), head.author);<br> emit ChargeRoyalty(<br> head.typeOfDoc, head.version, rate, usr, head.author);<br> }<br> } |
| [Contents](#toc) |

---

## IAccessControl.sol

---

| |
|:---|
| **contracts/comps/common/access/IAccessControl.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../IGeneralKeeper.sol";<br>interface IAccessControl {<br>// ##################<br> // ## Event ##<br> // ##################<br>event SetDirectKeeper(address indexed keeper);<br>event SetNewGK(address indexed gk);<br>// ##################<br> // ## Write ##<br> // ##################<br>function initKeepers(address dk,address gk) external;<br>function setNewGK(address gk) external;<br>function setDirectKeeper(address keeper) external;<br>function takeBackKeys(address target) external;<br>// ##################<br> // ## Read I/O ##<br> // ##################<br>function getDK() external view returns (address);<br> }<br>|
| [Contents](#toc) |

---

## AccessControl.sol

---

| |
|:---|
| **contracts/comps/common/access/AccessControl.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* V.0.2.4<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IAccessControl.sol";<br> import "../../../center/access/Ownable.sol";<br>contract AccessControl is IAccessControl, Ownable {<br>Admin internal _dk;<br> IGeneralKeeper internal _gk;<br>// ################<br> // ## Modifier ##<br> // ################<br>modifier onlyDK {<br> require(_dk.addr == msg.sender,<br> "AC.onlyDK: not");<br> _;<br> }<br>modifier onlyKeeper {<br> require(_gk.isKeeper(msg.sender) \|\| <br> _dk.addr == msg.sender, <br> "AC.onlyKeeper: NOT");<br> _;<br> }<br>// #################<br> // ## Write ##<br> // #################<br>function initKeepers(address dk,address gk) external {<br> require(_dk.state == 0, <br> "AC.initKeepers: already inited");<br> _dk.addr = dk;<br> _gk = IGeneralKeeper(gk);<br> _dk.state = 1;<br> }<br>function setNewGK(address gk) external onlyDK {<br> _gk = IGeneralKeeper(gk);<br> emit SetNewGK(gk);<br> }<br>function setDirectKeeper(address acct) external onlyDK {<br> _dk.addr = acct;<br> emit SetDirectKeeper(acct);<br> }<br>function takeBackKeys (address target) external onlyDK {<br> IAccessControl(target).setDirectKeeper(msg.sender);<br> }<br>// ##############<br> // ## Read ##<br> // ##############<br>function getDK() external view returns (address) {<br> return _dk.addr;<br> }<br> }<br>|
| [Contents](#toc) |

---

## SigPage.sol

---

| |
|:---|
| **contracts/comps/common/components/SigPage.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./ISigPage.sol";<br>import "../access/DraftControl.sol";<br>contract SigPage is ISigPage, DraftControl {<br> using ArrayUtils for uint256[];<br> using EnumerableSet for EnumerableSet.UintSet;<br> using SigsRepo for SigsRepo.Page;<br>SigsRepo.Page[2] internal _sigPages;<br>//#############<br> //## Write ##<br> //#############<br>function circulateDoc() external onlyKeeper {<br> _sigPages[0].circulateDoc();<br> _sigPages[1].circulateDoc();<br> emit CirculateDoc();<br> }<br>function setTiming(bool initPage, uint signingDays, uint closingDays) <br> external attorneyOrKeeper<br> {<br> initPage ? _sigPages[0].setTiming(signingDays, closingDays) :<br> _sigPages[1].setTiming(signingDays, closingDays);<br> }<br>function addBlank(bool initPage, bool beBuyer, uint256 seqOfDeal, uint256 acct)<br> external attorneyOrKeeper<br> {<br> initPage ? _sigPages[0].addBlank(beBuyer, seqOfDeal, acct) :<br> _sigPages[1].addBlank(beBuyer, seqOfDeal, acct);<br> }<br>function removeBlank(bool initPage, uint256 seqOfDeal, uint256 acct)<br> external attorneyOrKeeper<br> {<br> initPage ? _sigPages[0].removeBlank(seqOfDeal, acct) :<br> _sigPages[1].removeBlank(seqOfDeal, acct);<br> }<br>function signDoc(bool initPage, uint256 caller, bytes32 sigHash)<br> external onlyKeeper<br> {<br> if (initPage) {<br> _sigPages[0].signDoc(caller, sigHash);<br> } else {<br> _sigPages[1].signDoc(caller, sigHash);<br> }<br> }<br>function regSig(uint256 signer, uint sigDate, bytes32 sigHash)<br> external onlyKeeper returns (bool flag)<br> {<br> flag = _sigPages[1].regSig(signer, sigDate, sigHash);<br> }<br>//##################<br> //## read I/O ##<br> //##################<br>function getParasOfPage(bool initPage) external view<br> returns (SigsRepo.Signature memory) <br> {<br> return initPage ? _sigPages[0].blanks[0].sig :<br> _sigPages[1].blanks[0].sig;<br> }<br>function circulated() external view returns(bool) {<br> return _sigPages[0].circulated();<br> }<br>function established() external view<br> returns (bool flag) <br> {<br> flag = _sigPages[1].buyers.length() > 0 <br> ? _sigPages[1].established() && _sigPages[0].established() <br> : _sigPages[0].established();<br> }<br>function getCirculateDate() external view returns(uint48) {<br> return _sigPages[0].getCirculateDate();<br> }<br>function getSigningDays() external view returns(uint16) {<br> return _sigPages[0].getSigningDays();<br> }<br>function getClosingDays() external view returns(uint16) {<br> return _sigPages[0].getClosingDays();<br> }<br>function getSigDeadline() external view returns(uint48) {<br> return _sigPages[0].getSigDeadline();<br> }<br>function getClosingDeadline() external view returns(uint48) {<br> return _sigPages[0].getClosingDeadline();<br> }<br>function isBuyer(bool initPage, uint256 acct)<br> public view returns(bool flag)<br> {<br> flag = initPage ? _sigPages[0].buyers.contains(acct) :<br> _sigPages[1].buyers.contains(acct);<br> }<br>function isSeller(bool initPage, uint256 acct)<br> public view returns(bool flag)<br> {<br> flag = initPage ? _sigPages[0].sellers.contains(acct) :<br> _sigPages[1].sellers.contains(acct);<br> }<br>function isParty(uint256 acct) external view returns (bool flag) {<br> flag = _sigPages[0].buyers.contains(acct) \|\|<br> _sigPages[0].sellers.contains(acct) \|\|<br> _sigPages[1].buyers.contains(acct) \|\|<br> _sigPages[1].sellers.contains(acct);<br> }<br>function isInitSigner(uint256 acct)<br> external view returns (bool flag) <br> {<br> flag = _sigPages[0].isSigner(acct);<br> }<br>function isSigner(uint256 acct)<br> external view returns (bool flag) <br> {<br> flag = _sigPages[0].isSigner(acct) \|\|<br> _sigPages[1].isSigner(acct);<br> }<br>function getBuyers(bool initPage)<br> public view returns (uint256[] memory buyers)<br> {<br> buyers = initPage <br> ? _sigPages[0].buyers.values() <br> : _sigPages[1].buyers.values();<br> }<br>function getSellers(bool initPage)<br> public view returns (uint256[] memory sellers)<br> {<br> sellers = initPage <br> ? _sigPages[0].sellers.values()<br> : _sigPages[1].sellers.values();<br> }<br>function getParties() external view<br> returns (uint256[] memory parties)<br> {<br> uint256[] memory buyers = <br> getBuyers(true).merge(getBuyers(false));<br>uint256[] memory sellers = <br> getSellers(true).merge(getSellers(false));<br>parties = buyers.merge(sellers);<br> }<br>function getSigOfParty(bool initPage, uint256 acct) <br> external view<br> returns (<br> uint256[] memory seqOfDeals, <br> SigsRepo.Signature memory sig,<br> bytes32 sigHash) {<br> if (initPage) {<br> return _sigPages[0].sigOfParty(acct);<br> } else {<br> return _sigPages[1].sigOfParty(acct);<br> }<br> }<br>function getSigsOfPage(bool initPage) <br> external view<br> returns (<br> SigsRepo.Signature[] memory sigsOfBuyer, <br> SigsRepo.Signature[] memory sigsOfSeller) <br> {<br> if (initPage) {<br> return _sigPages[0].sigsOfPage();<br> } else {<br> return _sigPages[1].sigsOfPage();<br> }<br> }<br> }<br>|
| [Contents](#toc) |

---

## FilesFolder.sol

---

| |
|:---|
| **contracts/comps/common/components/FilesFolder.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "./IFilesFolder.sol";<br>import "../access/AccessControl.sol";<br>contract FilesFolder is IFilesFolder, AccessControl {<br> using FilesRepo for FilesRepo.Repo;<br>FilesRepo.Repo internal _repo;<br>//##################<br> //## Write I/O ##<br> //##################<br>function regFile(bytes32 snOfDoc, address body)<br> external onlyKeeper<br> {<br> if (_repo.regFile(snOfDoc, body)) <br> emit UpdateStateOfFile(body, uint8(FilesRepo.StateOfFile.Created));<br> }<br>function circulateFile(<br> address body,<br> uint16 signingDays,<br> uint16 closingDays,<br> RulesParser.VotingRule memory vr,<br> bytes32 docUrl,<br> bytes32 docHash) external onlyKeeper {<br> _repo.circulateFile(body, signingDays, closingDays, vr, docUrl, docHash);<br> emit UpdateStateOfFile(body, uint8(FilesRepo.StateOfFile.Circulated));<br> }<br>function proposeFile(<br> address body,<br> uint64 seqOfMotion) external onlyKeeper {<br> _repo.proposeFile(body, seqOfMotion);<br> emit UpdateStateOfFile(body, uint8(FilesRepo.StateOfFile.Proposed));<br> }<br>function voteCountingForFile(<br> address body,<br> bool approved) external onlyKeeper {<br> _repo.voteCountingForFile(body, approved);<br> emit UpdateStateOfFile(body, approved ? <br> uint8(FilesRepo.StateOfFile.Approved) : <br> uint8(FilesRepo.StateOfFile.Rejected));<br> }<br>function execFile(<br> address body) public onlyDK {<br> _repo.execFile(body);<br> emit UpdateStateOfFile(body, uint8(FilesRepo.StateOfFile.Closed));<br> }<br>function terminateFile(<br> address body) public onlyDK {<br> _repo.terminateFile(body);<br> emit UpdateStateOfFile(body, uint8(FilesRepo.StateOfFile.Revoked));<br> }<br>function setStateOfFile(address body, uint state) public onlyKeeper {<br> _repo.setStateOfFile(body, state);<br> emit UpdateStateOfFile(body, state);<br> }<br>//##################<br> //## read I/O ##<br> //##################<br>function signingDeadline(address body) external view returns (uint48) {<br> return _repo.signingDeadline(body);<br> }<br>function closingDeadline(address body) external view returns (uint48) { <br> return _repo.closingDeadline(body);<br> }<br>function frExecDeadline(address body) external view returns (uint48) {<br> return _repo.frExecDeadline(body);<br> }<br>function dtExecDeadline(address body) external view returns (uint48) {<br> return _repo.dtExecDeadline(body);<br> }<br>function terminateStartpoint(address body) external view returns (uint48) {<br> return _repo.terminateStartpoint(body);<br> }<br>function votingDeadline(address body) external view returns (uint48) {<br> return _repo.votingDeadline(body);<br> } <br>function isRegistered(address body) external view returns (bool) {<br> return _repo.isRegistered(body);<br> }<br>function qtyOfFiles() external view returns (uint256) {<br> return _repo.qtyOfFiles();<br> }<br>function getFilesList() external view returns (address[] memory) {<br> return _repo.getFilesList();<br> }<br>function getFile(address body) external view returns (FilesRepo.File memory) {<br> return _repo.getFile(body);<br> } <br>function getHeadOfFile(address body)<br> public view returns (FilesRepo.Head memory head)<br> {<br> head = _repo.getHeadOfFile(body);<br> }<br>}<br>|
| [Contents](#toc) |

---

## IFilesFolder.sol

---

| |
|:---|
| **contracts/comps/common/components/IFilesFolder.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/FilesRepo.sol";<br> import "../../../lib/RulesParser.sol";<br>interface IFilesFolder {<br>//#############<br> //## Event ##<br> //#############<br>event UpdateStateOfFile(address indexed body, uint indexed state);<br>//#################<br> //## Write I/O ##<br> //#################<br>function regFile(bytes32 snOfDoc, address body) external;<br>function circulateFile(<br> address body,<br> uint16 signingDays,<br> uint16 closingDays,<br> RulesParser.VotingRule memory vr,<br> bytes32 docUrl,<br> bytes32 docHash) external;<br>function proposeFile(address body, uint64 seqOfMotion) external;<br>function voteCountingForFile(address body, bool approved) external;<br>function execFile(address body) external;<br>function terminateFile(address body) external;<br>function setStateOfFile(address body, uint state) external;<br>//##################<br> //## read I/O ##<br> //##################<br>function signingDeadline(address body) external view returns (uint48);<br>function closingDeadline(address body) external view returns (uint48);<br>function frExecDeadline(address body) external view returns (uint48);<br>function dtExecDeadline(address body) external view returns (uint48);<br>function terminateStartpoint(address body) external view returns (uint48);<br>function votingDeadline(address body) external view returns (uint48);<br>function isRegistered(address body) external view <br> returns (bool);<br>function qtyOfFiles() external view <br> returns (uint256);<br>function getFilesList() external view <br> returns (address[] memory);<br>function getFile(address body) external view <br> returns (FilesRepo.File memory);<br>function getHeadOfFile(address body) external view <br> returns (FilesRepo.Head memory head);<br>}<br>|
| [Contents](#toc) |

---

## ISigPage.sol

---

| |
|:---|
| **contracts/comps/common/components/ISigPage.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/ArrayUtils.sol";<br> import "../../../lib/EnumerableSet.sol";<br> import "../../../lib/SigsRepo.sol";<br>interface ISigPage {<br>event CirculateDoc();<br>//##################<br> //## Write I/O ##<br> //##################<br>function circulateDoc() external;<br>function setTiming(bool initPage, uint signingDays, uint closingDays) external;<br>function addBlank(bool initPage, bool beBuyer, uint256 seqOfDeal, uint256 acct)<br> external;<br>function removeBlank(bool initPage, uint256 seqOfDeal, uint256 acct)<br> external;<br>function signDoc(bool initPage, uint256 caller, bytes32 sigHash) <br> external; <br>function regSig(uint256 signer, uint sigDate, bytes32 sigHash)<br> external returns(bool flag);<br>//##################<br> //## read I/O ##<br> //##################<br>function getParasOfPage(bool initPage) external view <br> returns (SigsRepo.Signature memory);<br>function circulated() external view returns(bool);<br>function established() external view<br> returns (bool flag);<br>function getCirculateDate() external view returns(uint48);<br>function getSigningDays() external view returns(uint16);<br>function getClosingDays() external view returns(uint16);<br>function getSigDeadline() external view returns(uint48);<br>function getClosingDeadline() external view returns(uint48);<br>function isBuyer(bool initPage, uint256 acct)<br> external view returns(bool flag);<br>function isSeller(bool initPage, uint256 acct)<br> external view returns(bool flag);<br>function isParty(uint256 acct)<br> external view returns(bool flag);<br>function isInitSigner(uint256 acct)<br> external view returns (bool flag);<br>function isSigner(uint256 acct)<br> external view returns (bool flag);<br>function getBuyers(bool initPage)<br> external view returns (uint256[] memory buyers);<br>function getSellers(bool initPage)<br> external view returns (uint256[] memory sellers);<br>function getParties() external view<br> returns (uint256[] memory parties);<br>function getSigOfParty(bool initParty, uint256 acct) external view<br> returns (<br> uint256[] memory seqOfDeals, <br> SigsRepo.Signature memory sig,<br> bytes32 sigHash);<br>function getSigsOfPage(bool initPage) external view<br> returns (<br> SigsRepo.Signature[] memory sigsOfBuyer, <br> SigsRepo.Signature[] memory sigsOfSeller);<br> }<br>|
| [Contents](#toc) |

---

## IMeetingMinutes.sol

---

| |
|:---|
| **contracts/comps/common/components/IMeetingMinutes.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../../../lib/BallotsBox.sol";<br> import "../../../lib/MotionsRepo.sol";<br> import "../../../lib/RulesParser.sol";<br> import "../../../lib/DelegateMap.sol";<br>interface IMeetingMinutes {<br>//##################<br> //## events ##<br> //##################<br>event CreateMotion(bytes32 indexed snOfMotion, uint256 indexed contents);<br>event ProposeMotionToGeneralMeeting(uint256 indexed seqOfMotion, uint256 indexed proposer);<br>event ProposeMotionToBoard(uint256 indexed seqOfMotion, uint256 indexed proposer);<br>event EntrustDelegate(uint256 indexed seqOfMotion, uint256 indexed delegate, uint256 indexed principal);<br>event CastVoteInGeneralMeeting(uint256 indexed seqOfMotion, uint256 indexed caller, uint indexed attitude, bytes32 sigHash); <br>event CastVoteInBoardMeeting(uint256 indexed seqOfMotion, uint256 indexed caller, uint indexed attitude, bytes32 sigHash); <br>event VoteCounting(uint256 indexed seqOfMotion, uint8 indexed result); <br>event ExecResolution(uint256 indexed seqOfMotion, uint256 indexed caller);<br>//#################<br> //## Write I/O ##<br> //#################<br>function nominateOfficer(<br> uint256 seqOfPos,<br> uint seqOfVR,<br> uint canidate,<br> uint nominator) external returns(uint64);<br>function createMotionToRemoveOfficer(<br> uint256 seqOfPos,<br> uint seqOfVR,<br> uint nominator ) external returns(uint64);<br>function createMotionToApproveDoc(<br> uint doc,<br> uint seqOfVR,<br> uint executor,<br> uint proposer ) external returns(uint64);<br>function createMotionToDistributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> uint proposer) external returns (uint64);<br>function createMotionToTransferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> uint proposer) external returns (uint64);<br>function createAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor,<br> uint proposer) external returns(uint64);<br>function createMotionToDeprecateGK(address receiver,uint proposer) external returns(uint64);<br>function proposeMotionToGeneralMeeting(<br> uint256 seqOfMotion,<br> uint proposer) external;<br>function proposeMotionToBoard (<br> uint seqOfMotion,<br> uint caller) external;<br>function entrustDelegate(<br> uint256 seqOfMotion,<br> uint delegate, <br> uint principal) external;<br>// ==== Vote ====<br>function castVoteInGeneralMeeting(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> uint256 caller) external;<br>function castVoteInBoardMeeting(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> uint256 caller) external;<br>// ==== UpdateVoteResult ====<br>function voteCounting(bool flag0, uint256 seqOfMotion, MotionsRepo.VoteCalBase memory base) <br> external returns(uint8);<br>// ==== ExecResolution ====<br>function execResolution(uint256 seqOfMotion, uint256 contents, uint caller)<br> external;<br>function distributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> uint caller) external;<br>function transferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> uint caller) external;<br>function execAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion,<br> uint caller) external returns(uint contents);<br>function deprecateGK(address receiver, uint seqOfMotion, uint executor) external;<br>//################<br> //## Read ##<br> //################<br>// ==== Motions ====<br>function isProposed(uint256 seqOfMotion) external view returns (bool);<br>function voteStarted(uint256 seqOfMotion) external view returns (bool);<br>function voteEnded(uint256 seqOfMotion) external view returns (bool);<br>// ==== Delegate ====<br>function getVoterOfDelegateMap(uint256 seqOfMotion, uint256 acct)<br> external view returns (DelegateMap.Voter memory);<br>function getDelegateOf(uint256 seqOfMotion, uint acct)<br> external view returns (uint);<br>// ==== motion ====<br>function getMotion(uint256 seqOfMotion)<br> external view returns (MotionsRepo.Motion memory motion);<br>// ==== voting ====<br>function isVoted(uint256 seqOfMotion, uint256 acct) external view returns (bool);<br>function isVotedFor(<br> uint256 seqOfMotion,<br> uint256 acct,<br> uint atti) external view returns (bool);<br>function getCaseOfAttitude(uint256 seqOfMotion, uint atti)<br> external view returns (BallotsBox.Case memory);<br>function getBallot(uint256 seqOfMotion, uint256 acct)<br> external view returns (BallotsBox.Ballot memory);<br>function isPassed(uint256 seqOfMotion) external view returns (bool);<br>function getSeqList() external view returns (uint[] memory);<br>}<br>|
| [Contents](#toc) |

---

## MeetingMinutes.sol

---

| |
|:---|
| **contracts/comps/common/components/MeetingMinutes.sol** |
| <br>// SPDX-License-Identifier: UNLICENSED<br>/\* \*<br> \*<br> \* Copyright (c) 2021-2024 LI LI @ JINGTIAN & GONGCHENG.<br> \*<br> \* This WORK is licensed under ComBoox SoftWare License 1.0, a copy of which <br> \* can be obtained at:<br> \* [https://github.com/paul-lee-attorney/comboox]<br> \*<br> \* THIS WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT <br> \* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED <br> \* TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. IN NO <br> \* EVENT SHALL ANY CONTRIBUTOR BE LIABLE TO YOU FOR ANY DAMAGES.<br> \*<br> \* YOU ARE PROHIBITED FROM DEPLOYING THE SMART CONTRACTS OF THIS WORK, IN WHOLE <br> \* OR IN PART, FOR WHATEVER PURPOSE, ON ANY BLOCKCHAIN NETWORK THAT HAS ONE OR <br> \* MORE NODES THAT ARE OUT OF YOUR CONTROL.<br> \* \*/<br>pragma solidity ^0.8.8;<br>import "../access/AccessControl.sol";<br>import "./IMeetingMinutes.sol";<br>contract MeetingMinutes is IMeetingMinutes, AccessControl {<br> using MotionsRepo for MotionsRepo.Repo;<br> using RulesParser for bytes32;<br>MotionsRepo.Repo private _repo;<br>//##################<br> //## Write ##<br> //##################<br>function _addMotion(<br> uint typeOfMotion,<br> uint seqOfVR,<br> uint creator,<br> uint executor,<br> uint contents) private returns (uint64) {<br> MotionsRepo.Head memory head = MotionsRepo.Head({<br> typeOfMotion: uint8(typeOfMotion),<br> seqOfMotion: 0,<br> seqOfVR: uint16(seqOfVR),<br> creator: uint40(creator),<br> executor: uint40(executor),<br> createDate: 0,<br> data: 0<br> });<br>head = _repo.addMotion(head, contents);<br> emit CreateMotion(MotionsRepo.codifyHead(head), contents);<br> return head.seqOfMotion;<br> }<br>function nominateOfficer(<br> uint seqOfPos,<br> uint seqOfVR,<br> uint candidate,<br> uint nominator ) external onlyDK returns(uint64) {<br>return _addMotion(<br> uint8(MotionsRepo.TypeOfMotion.ElectOfficer),<br> seqOfVR,<br> nominator,<br> candidate, <br> seqOfPos);<br> }<br>function createMotionToRemoveOfficer(<br> uint256 seqOfPos,<br> uint seqOfVR,<br> uint nominator ) external onlyDK returns(uint64) {<br>return _addMotion(<br> uint8(MotionsRepo.TypeOfMotion.RemoveOfficer),<br> seqOfVR,<br> nominator,<br> nominator,<br> seqOfPos);<br> }<br>function createMotionToApproveDoc(<br> uint doc,<br> uint seqOfVR,<br> uint executor,<br> uint proposer ) external onlyKeeper returns(uint64) {<br>return _addMotion(<br> uint8(MotionsRepo.TypeOfMotion.ApproveDoc),<br> seqOfVR,<br> proposer,<br> executor,<br> doc);<br> }<br>function createMotionToDistributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> uint proposer) external onlyDK returns (uint64) {<br> uint contents = _hashPayment(address(0), false, amt, expireDate);<br> return _addMotion(<br> uint8(MotionsRepo.TypeOfMotion.DistributeProfits),<br> seqOfVR,<br> proposer,<br> executor,<br> contents);<br> }<br>function createMotionToTransferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfVR,<br> uint executor,<br> uint proposer) external onlyDK returns (uint64) {<br> uint contents = _hashPayment(to, isCBP, amt, expireDate);<br> return _addMotion(<br> uint8(MotionsRepo.TypeOfMotion.TransferFund),<br> seqOfVR,<br> proposer,<br> executor,<br> contents);<br> }<br>function _hashPayment(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate) private pure returns(uint) {<br> return <br> uint256(<br> keccak256(<br> abi.encode(to, isCBP, amt, expireDate)));<br> }<br>function createAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint executor,<br> uint proposer) external onlyDK returns (uint64){<br>uint256 contents = _hashAction(<br> seqOfVR,<br> targets,<br> values,<br> params,<br> desHash);<br>return _addMotion(<br> uint8(MotionsRepo.TypeOfMotion.ApproveAction),<br> seqOfVR,<br> proposer,<br> executor,<br> contents);<br> }<br>function _hashAction(<br> uint256 seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash) private pure returns (uint256) {<br> return<br> uint256(<br> keccak256(<br> abi.encode(seqOfVR, targets, values, params, desHash)));<br> }<br>function createMotionToDeprecateGK(<br> address receiver,<br> uint proposer) external onlyKeeper returns(uint64) {<br> return _addMotion(<br> uint8(MotionsRepo.TypeOfMotion.DeprecateGK),<br> 10,<br> proposer,<br> proposer,<br> uint(uint160(receiver)));<br> }<br>function proposeMotionToGeneralMeeting(<br> uint256 seqOfMotion,<br> uint proposer) external onlyKeeper {<br>IShareholdersAgreement _sha = _gk.getSHA();<br>_repo.proposeMotionToGeneralMeeting(seqOfMotion, _sha, _gk.getROM(), _gk.getROD(), proposer);<br> emit ProposeMotionToGeneralMeeting(seqOfMotion, proposer);<br> }<br>function proposeMotionToBoard (<br> uint seqOfMotion,<br> uint caller) external onlyDK {<br>IShareholdersAgreement _sha = _gk.getSHA();<br>_repo.proposeMotionToBoard(seqOfMotion, _sha, _gk.getROD(), caller);<br> emit ProposeMotionToBoard(seqOfMotion, caller);<br> }<br>// ==== delegate ====<br>function entrustDelegate(<br> uint256 seqOfMotion,<br> uint delegate, <br> uint principal) external onlyDK { <br> if (_repo.entrustDelegate(<br> seqOfMotion,<br> delegate,<br> principal,<br> _gk.getROM(),<br> _gk.getROD()))<br> emit EntrustDelegate(seqOfMotion, delegate, principal);<br> }<br>// ==== Vote ====<br>function castVoteInGeneralMeeting(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> uint256 caller) external onlyDK {<br> _repo.castVoteInGeneralMeeting(seqOfMotion, caller, attitude, sigHash, _gk.getROM());<br> emit CastVoteInGeneralMeeting(seqOfMotion, caller, attitude, sigHash);<br> }<br>function castVoteInBoardMeeting(<br> uint256 seqOfMotion,<br> uint attitude,<br> bytes32 sigHash,<br> uint256 caller) external onlyDK {<br> _repo.castVoteInBoardMeeting(seqOfMotion, caller, attitude, sigHash, _gk.getROD());<br> emit CastVoteInBoardMeeting(seqOfMotion, caller, attitude, sigHash);<br> }<br>// ==== UpdateVoteResult ====<br>function voteCounting(bool flag0, uint256 seqOfMotion, MotionsRepo.VoteCalBase memory base) <br> external onlyDK returns(uint8 result)<br> { <br> result = _repo.voteCounting(flag0, seqOfMotion, base);<br> emit VoteCounting(seqOfMotion, result); <br> }<br>// ==== ExecResolution ====<br>function execResolution(uint256 seqOfMotion, uint256 contents, uint caller)<br> public onlyKeeper <br> {<br> _repo.execResolution(seqOfMotion, contents, caller);<br> emit ExecResolution(seqOfMotion, caller);<br> }<br>function distributeProfits(<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> uint caller) external onlyDK {<br>require(block.timestamp < expireDate, <br> "MM.distrProf: missed deadline");<br>require(_repo.getMotion(seqOfMotion).head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.DistributeProfits), <br> "MM.distrProf: wrong typeOfMotion");<br>uint contents = _hashPayment(address(0), false, amt, expireDate);<br>execResolution(seqOfMotion, contents, caller);<br> }<br>function transferFund(<br> address to,<br> bool isCBP,<br> uint amt,<br> uint expireDate,<br> uint seqOfMotion,<br> uint caller) external onlyDK {<br>require(block.timestamp < expireDate, <br> "MM.TF: missed deadline");<br>require(_repo.getMotion(seqOfMotion).head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.TransferFund), <br> "MM.TF: wrong typeOfMotion");<br>uint contents = _hashPayment(to, isCBP, amt, expireDate);<br>execResolution(seqOfMotion, contents, caller);<br> }<br>function execAction(<br> uint seqOfVR,<br> address[] memory targets,<br> uint256[] memory values,<br> bytes[] memory params,<br> bytes32 desHash,<br> uint256 seqOfMotion,<br> uint caller) external onlyDK returns (uint contents) {<br>MotionsRepo.Motion memory motion = <br> _repo.getMotion(seqOfMotion);<br>require(motion.head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.ApproveAction), <br> "MM.EA: wrong typeOfMotion");<br>contents = _hashAction(<br> seqOfVR,<br> targets,<br> values,<br> params,<br> desHash);<br>execResolution(seqOfMotion, contents, caller);<br> }<br>function deprecateGK(address receiver, uint seqOfMotion, uint executor) external onlyDK{<br> require(_repo.getMotion(seqOfMotion).head.typeOfMotion == <br> uint8(MotionsRepo.TypeOfMotion.DeprecateGK), <br> "MM.DeprecateGK: wrong typeOfMotion");<br>uint contents = uint(uint160(receiver));<br>execResolution(seqOfMotion, contents, executor);<br> }<br>//################<br> //## Read ##<br> //################<br>// ==== Motions ====<br>function isProposed(uint256 seqOfMotion) public view returns (bool) {<br> return _repo.isProposed(seqOfMotion);<br> }<br>function voteStarted(uint256 seqOfMotion) external view returns (bool) {<br> return _repo.voteStarted(seqOfMotion);<br> }<br>function voteEnded(uint256 seqOfMotion) external view returns (bool){<br> return _repo.voteEnded(seqOfMotion);<br> }<br>// ==== Delegate ====<br>function getVoterOfDelegateMap(uint256 seqOfMotion, uint256 acct)<br> external view returns (DelegateMap.Voter memory)<br> {<br> return _repo.getVoterOfDelegateMap(seqOfMotion, acct);<br> }<br>function getDelegateOf(uint256 seqOfMotion, uint acct)<br> external view returns (uint)<br> {<br> return _repo.getDelegateOf(seqOfMotion, acct);<br> }<br>// ==== motion ====<br>function getMotion(uint256 seqOfMotion)<br> external view returns (MotionsRepo.Motion memory motion)<br> {<br> motion = _repo.getMotion(seqOfMotion);<br> }<br>// ==== voting ====<br>function isVoted(uint256 seqOfMotion, uint256 acct) external view returns (bool) <br> {<br> return _repo.isVoted(seqOfMotion, acct);<br> }<br>function isVotedFor(<br> uint256 seqOfMotion,<br> uint256 acct,<br> uint atti) external view returns (bool) {<br> return _repo.isVotedFor(seqOfMotion, acct, atti);<br> }<br>function getCaseOfAttitude(uint256 seqOfMotion, uint atti)<br> external view returns (BallotsBox.Case memory)<br> {<br> return _repo.getCaseOfAttitude(seqOfMotion, atti);<br> }<br>function getBallot(uint256 seqOfMotion, uint256 acct)<br> external view returns (BallotsBox.Ballot memory)<br> {<br> return _repo.getBallot(seqOfMotion, acct);<br> }<br>function isPassed(uint256 seqOfMotion) external view returns (bool) {<br> return _repo.isPassed(seqOfMotion);<br> }<br>// ==== SeqList ====<br>function getSeqList() external view returns (uint[] memory) {<br> return _repo.getSeqList();<br> }<br>}<br>|
| [Contents](#toc) |

---

## Ex-32

&nbsp;&nbsp;&nbsp;&nbsp; **Undertaking of Founding Member**

I, <u>Li Li</u>, the Founding Member of <u>ComBoox DAO LLC (the "**Company**")</u> , hereby irrevocably undertake to use my best efforts to advance fiat currency payments required under third-party service agreements of the Company.

&nbsp;&nbsp;&nbsp;&nbsp; Executed this day of <u>September 28</u>, 2025.

 <u>/s/ Li Li</u> <br> Li Li

&nbsp;&nbsp;&nbsp;&nbsp; Founding Member <br> ComBoox DAO LLC