## Problem

Two things that have slowed down the global adoption of web3 are user experience and developer experience issues. There have been significant strides in the former with the emergence of UX products like biconomy, web3auth, etc . Bonadocs is taking the lead with the latter by giving builders the best experience possible to develop and distribute new protocols/dapps and integrate effectively with existing protocols.

The major problems builders’ face today includes: 

- Collaboration between internal web3 engineering teams is fragmented.
- Smart contract documentation and interactions is complex.
- Integrations for simple and complex workflows is a nightmare.
- Testing for smart contracts is still mostly manual.
- Smart contract security and hacks is a big issue in web3 leading to loss of funds.
- Gas fees is still an obstacle to onboarding the next billion users.

**Details**: Collaborating between teams on smart contract integrations is currently a time-consuming affair. This comes down to two difficult tasks:

- Documentation
- Integration

Documenting smart contracts is hard. Most smart contracts have complex workflows. Multiple smart contract method calls and transactions are required to complete certain complex actions. For example, executing a Swap action on Uniswap involves at least two calls for most tokens: approve tokens (approve), execute swap (transferFrom). Each workflow needs to be properly documented.

Integration is also a nightmare because few contracts are ever documented well
enough. However, that's not the only reason. Even when the contract is adequately
documented, testing workflows to observe the behavior in different scenarios is a necessary part of integration. For both solidity and dapp developers.

One more thing to note is that, **Contract security** is exclusively assessed from the point of audits that happen post-deployment; which is very expensive. This means devs have to pay for this high  audit cost before determining if their project actually solves the user’s problems or even figure out their business model. 

Finally, as we scale, we need to further reduce the cost of gas required to interact with our dapps. L2s have allowed us build on chains that have low gas fees, but that’s not enough. We need to ensure the contract itself requires a negligible amount of gas fee to easily onboard new users.

## Solution

Bonadocs is building the future of secure smart contract development and distribution. It's a collaborative tool for documentation, organization, facilitating contract interactions for simple & complex workflows. This also includes an AI co-pilot for crafting gas-efficient and secure contract flows.

### Documentation

**Docgen:** This allows developers to automatically generate a beautiful and interactive documentation website for your project directly from your development environment; using a hardhat plugin.

Demo: https://www.loom.com/share/672398e483364eaa87303529736de709

### Integration & Distribution

**Bonadocs Widget:** For context, when reading Lido’s documentation, you have the explanation of the protocol contracts, but in order to interact with the verified contracts, you’d have to go to etherscan or simulate on hardhat. The goal of the widget is to enable developers to interact with the contract methods as a widget directly within the docs.

This allows developers to seamlessly interact with the protocol’s contracts without switching to other external tools. The idea is that the widget will replace the function code sections where the function names are usually written. By using the widget rather than just text function names and signatures, developers can actually interact with those functions directly from the page. In some of the guides, there's usually a more workflow-like usage that requires more than one contract method to complete the action. Adding the widget to the page would help developers understand the docs better by letting them simulate interactions with the contracts and see the results and emitted logs.

Demo: https://www.loom.com/share/9affc4deecde438cb108efb4bd188c1c

![Screenshot 2024-01-27 at 08.38.48.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/2b0bda16-60a5-4f0b-b45a-1c6f815280ee/a87c15f7-3dca-4f78-a5db-f63433389c52/Screenshot_2024-01-27_at_08.38.48.png)

**Bonadocs Editor (For Teams):** Create projects, aggregate your contracts, enable internal/external teams to document, collaborate, interact with contracts, automate testing, and simulate complex workflows.

Features:

- Project creation directly from the command line.
- Project collaboration
- Protocol Playground
- Contract interaction (mainnet/simulation)
- Actions’ code editor - This allows users to interact with their smart contracts using a Javascript environment; just like they’re on the frontend of the application.
- Inbuilt Docgen/Widget
- Event logs
- Automatically creating NPM libraries for smart contracts in a project. This makes it absolutely easy for any frontend/dapp developer to call the contract methods/actions because it’ll be abstracted into library methods.
    
    ![Screenshot 2024-01-27 at 08.46.03.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/2b0bda16-60a5-4f0b-b45a-1c6f815280ee/414fa998-b5df-485b-8063-7b3659dbc36a/Screenshot_2024-01-27_at_08.46.03.png)
    

**Bonadocs Protocol Registry:** The protocol registry allows networks share a list of protocols existing on their network. Each protocol links to an editor that allows devs interact with their contract methods and dapp actions.

![Screenshot 2024-01-27 at 08.40.31.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/2b0bda16-60a5-4f0b-b45a-1c6f815280ee/639bf9f0-fead-49c4-b81a-f20bfe848146/Screenshot_2024-01-27_at_08.40.31.png)

Also, another use-case we are looking to explore is to help protocols sell or distribute their protocols to other protocols and dApps using automatically generated interactive demos and UI for their smart contracts. This is very important today as more protocols/dapps begin to build on foundational protocols like Uniswap, Lido, Farcaster, etc. This creates a more intuitive way to onboard developers by showcasing real-life usage outside the documentation. This can be used by Sales folks for outreaches or even PMs for internal alignment across teams. 

We believe this can have a major ripple effect in terms of the growth of consumer dapps and collaborations with web2 products (inclu. attestation in AI products). 

It can expand the web3 market through protocol startups by helping to productize their smart contracts to third-party startups (web3/web2), similar to web2 API startups like Message bird or Twilio.

### Security

To expand, the security tool is linked to your vscode (similar to github copilot), so once you write code, it alerts you of security vulnerabilities in your smart contracts.

So it's more of a workflow thing rather than waiting till the end of your entire code deployment for a security audit.

It basically leverages AI by learning from many security audit reports and is able to detect such patterns in your smart contract code.

### Development & Scalability

Smart Contract Automated Testing: Automatically generate tests from contract code. It improves productivity by generating tests. Technically, if the generated tests do not align with your intended logic, you can be sure that your written logic is faulty.
Gas optimization tool for contracts: It’s a feature leveraging AI that’s linked to vscode and allows engineers to perform automated gas audits on their smart contracts and suggests ways to cut down gas costs.