> For the complete documentation index, see [llms.txt](https://avanzo.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://avanzo.gitbook.io/whitepaper/smart-contract/smart-contract-break-down.md).

# Smart Contract Break-Down

#### Description

This particular approach for the smart contract aims to open up the investing solution to all $AVAN Holders so that they can invest, vote, and maintain the stability of the token. Investors are not allowed to fill more than 5% of the total pool value for each address and each pool, preventing whale power on DAO voting and "preventing manipulation" by giving investors equal power.

#### New Proposal

We were able to examine how investing suggestions are made in the smart contract coding we provided:

```solidity
function createProposal(uint256 _end, string calldata _proposal) public onlyOwner{
```

#### DAO voting

To ensure that investors have complete power over their investment decisions, we have "3" DAO voting for each pool. code line illustration

<pre class="language-solidity"><code class="lang-solidity">function vote(uint256 _proposal, bool _YesOrNo) public {
    struct Vote {
        uint256 end;
        string proposal;
        uint256 powerYes;
        uint256 powerNo;
<strong>    }
</strong>    mapping(uint256 => Vote) proposals; //id to proposal
    mapping(address => mapping(uint256 => bool)) hasVoted; //if user has voted on 
proposal
    uint256 runningProposals; // latest proposal id
</code></pre>

#### Fund Raising

To keep records accurate and to send annual returns to the same address in the future, all are transferred via smart contracts:

```solidity
function getInvestedIdsOf(address _add) public view returns(uint256[] memory _ids) {
        uint256 count = 0;
            for(uint256 i; i < runningCount-1; i++) {
            if(FundPool(FundList[i]).tokensOf(_add) > 0){
                _ids[count] = i;
                count++;
            }
        }
    }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://avanzo.gitbook.io/whitepaper/smart-contract/smart-contract-break-down.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
