Fairmint releases its smart-contracts in Open Source

Fairmint releases its smart-contracts in Open Source

TL;DR To launch a Continuous Securities Offering, get in touch with us. However, if you're looking to build a custom approach to continuous financing or simply want a smart-contract implementing linear bonding curves, you should definitely consider re-using and integrating our smart-contracts into your product. Fairmint has put a great care into building a set of high-quality smart-contracts that will lay the foundation of continuous financing and, today, we're releasing them in Open Source under GPL v3 license.

Security is not an option

First a bit of context. When we released the initial continuous organization whitepaper in October 2018, many people reached out to know if some smart-contract was already available and - as it wasn't - proposed to start coding a 1st version themselves. At that time, we urged the community to be patient and wait until we release our own smart-contracts. Indeed, we know how difficult it is to develop solid smart-contracts.

the last thing we wanted, was to have an alpha-quality smart-contract hit the market which would have put users fund at risk and tarnished the potential of continuous financing with it.

That's why, after we secured some initial funding (with BoostVC & IDEO Ventures), we set out to build reference smart-contracts that the community (including us!) could safely rely on and that's what this post is all about: What did we do that makes us confident that our contracts are worth building upon?

Open-source

Our solidity smart-contracts are published under GPL v3 and publicly available in our github repository:

Fairmint/c-org
Smart-contracts for continuous organizations. Contribute to Fairmint/c-org development by creating an account on GitHub.
c-org smart-contracts

Even though we use our contracts to create CSOs, our smart-contracts use the terminology of the continuous organization whitepaper. As you'll see, the code is fully documented for easier understanding.

Fully specified

Not only our contracts are open source, they are also fully specified. The specification is the link between the whitepaper and the code of our smart-contracts. When in doubt about what a specific function is doing, you can always refer to the specification to understand what a function does and why it does it. You can read the full up-to-date specification here.

Specifications are important also in case people would like to code a reference implementation of the c-org smart-contract to other blockchains (ping us if you're working on this btw!).

Documented

On top of being technically specified, our smart-contract also has a high-level documentation that is readable and understandable by anyone in the form of our continuous securities offering handbook. You can refer non-technical who want a high-level overview or are keen to understand how the smart-contract works to it.

The Continuous Securities Offering Handbook
The CSO handbook. Learn about Continuous Securities Offerings and how can they help you raise capital continuously from people who love your product and mission.

100% Test coverage

Our contracts have 100% test coverage. Having 100% test coverage is not a guarantee that contracts are bug free but it definitely makes you closer to that goal. 100% test coverage means that our test suite tests 100% of the code of our smart-contract. To create our test suit, we crafted real life scenarios to test our smart-contracts against. You will find those scenarios here.

Technically audited

Although we're proud of our team and we think they're among the best in their field, but to make sure our contracts are rock solid, we commissioned Consensys Diligence, one of the most regarded smart-contract auditing company in the space, to perform a full audit of our c-org smart-contract. As you'll see, the biggest problem they flagged what a potential attack vector due to our support of ERC-777 which we simply decided to ditch to focus solely in ERC-20.

Fairmint Continuous Securities Offering Audit
Summary Project Name: C-Org Audit Client Name: Fairmint Client Contacts: Thibauld Favre, Nick Cuso Lead Auditor: John Mardlin Co-auditors: Daniel Luca, Neil McLaren, Alexander Wade Scope Repository: https://github.com/Fairmint/c-org Git commit hashes: Initial review: 14f4e3e02b1d756d4d3caad34fbe…

We had also our whitelist contract (which enables on-chain enforcement of lockups and transfer restrictions) reviewed and audited by Clément Lesaege, founder and CTO of Kleros. As you'll see, the audit did not reveal any critical vulnerability.

Fairmint Whitelist Audit
Fairmint Whitelist Smart Contract Audit Introduction This is a code audit of the Fairmint Whitelist smart contract at commit 23f76dc. Two vulnerabilities were found: Lockups are not sorted while functions assume them to be. This leads to newly added lockups to only expire after the expiration d...

Economically audited

Last but not least, we asked the Blockscience team led by Michael Zargham to audit the continuous organization model economically to make sure of its soundness. The Blockscience audit helped us identify and fix some edge cases and gave us full confidence on the robustness and viability of the continuous organization model.

If you’re interested to learn more about auditing cryptoeconomics, we discussed about it not long ago with Gonçalo Sá from Consensys Diligence and Angela from TokenEngineering.

Batteries included

Besides the c-org smart-contract, we also released our c-org-js nodejs library to make it straightforward to interact with a c-org contract.

Fairmint/c-org-js
NPM module to interact with a continuous organization - Fairmint/c-org-js
c-org-js github repository
@fairmint/c-org-js
c-org javascript library.
c-org-js npm package

Conclusion

We were extremely pleased to see the dxDAO team successfully fundraising more than 5000 eth using our smart-contracts 🎉 If your project could benefit from using a linear bonding curve, you should definitely consider reusing our fully documented and specified c-org smart-contract.