# Initial Coin Offerings and Agile Practices
## 5 Analysis of Agile ICOs Projects
### Software Development
#### Smart Contract Code Metrics
Contracts having no function declarations can be used to define variables and data structures to be inherited by other contracts. In general, if there is no constructor, the contract will assume the default constructor. The metric Function Per Contract (FPC) represents the equivalent of the number of _method per class_ in object oriented languages. Considering each contract in the files, we found that, on average, each of them declare 4.3 functions. The maximum number of declared functions per contract is 28 and the minimum is zero. On average, each contract has functions that are long 7.8 lines (AFL). The maximum average length is 172.5. The related distribution is characterized by a high standard deviation. From these results, we can deduce that the smart contracts of Agile ICOs tend to be short programs, with a limited number of elements (contracts and functions) and with short functions. This favors easier reuse and maintenance of the code, according to [46]. In general, the development of the ICO token pass through the implementation of a standard interface called ERC20 (specifications described in [[https://theethereum.wiki/w/index.php/ERC20_](https://theethereum.wiki/w/index.php/ERC20_)]([https://theethereum.wiki/w/index.php/ERC20_](https://theethereum.wiki/w/index.php/ERC20_)) \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Metric** & **LOC** & **CPL** & **NDC** & **NDF** & **FPC** & **AFL** \\ \hline Mean & 65.59 & 0.453 & 1.961 & 6.661 & 4.291 & 7.785 \\ Median & 28 & 0.317 & 1 & 3 & 3 & 5.667 \\ St. Dev & 88.47 & 0.48 & 4.87 & 8.96 & 4.50 & 12.19 \\ Max. & 808 & 2.727 & 66 & 71 & 28 & 172.5 \\ Min. & 2 & 0 & 1 & 0 & 0 & 1 \\
1 st Qu. & 16 & 0.067 & 1 & 2 & 2 & 3 \\
3 rd Qu. & 81.75 & 0.717 & 1 & 8 & 5 & 9 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Volume metrics of smart contracts belonging to Agile ICO projects. \begin{table}
\begin{tabular}{l l} \hline \hline LOC & Lines of Code: Number of lines containing executable code \\  & Comment per Line: Number of lines containing comments \\  & divided by the number of lines of code \\  & Number of Declared Contracts in the solidity code file \\  & Number of Declared Functions in the solidity code file \\  & Functions Per Contract (number of functions in the source code \\  & file divided by the number of contracts) \\ AFL & Average function length in a solidity code file, in terms of lines \\  & of code \\ \hline Acylc & Average McCabe Cyclomatic Complexity of the functions \\  & among a solidity file \\  & The maximum McCabe Cyclomatic Complexity computed \\  & among all functions of the solidity file \\  & Sum of the single McCabe Cyclomatic for all functions \\  & complexity of the solidity file. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Definition of computed source code metrics. Token_Standard). Given the availability of already implemented ERC20 tokens, the reuse of code is commonly adopted during the creation of new tokens. The high values of standard deviation show that smart contracts are very different from each other; these results are typical of long-tail distributions, whose tails collect the highest values. For each solidity file, we computed the McCabe cyclomatic complexity [47], of all the functions implemented in it. The cyclomatic complexity measures the number of linearly independent paths through a function. We used a commercial software. In particular, we computed the cyclomatic metrics using _Understand_, by _scitools_. Cyclomatic metrics are described in [[https://scitools.com/support/cyclomatic-complexity/](https://scitools.com/support/cyclomatic-complexity/)]([https://scitools.com/support/cyclomatic-complexity/](https://scitools.com/support/cyclomatic-complexity/)). Table 5 summarizes the results related to the average, the maximum and the sum of the cyclomatic complexity of all the functions defined in each solidity file belonging to Agile ICO projects. The minimum values of these metrics are equal to zero due to the presence of contracts that do not implement any function.