A Eulogy for The DAO — Part II Thomas Jay Rush Blocked Unblock Follow Following Sep 29, 2016 Introduction In this second installment of a multi-part series of articles analyzing the nearly 170,000 interactions with “The DAO” smart contract, we discuss the contract’s “Creation Period.” Previously, we presented an overview of The DAO’s lifespan. In that overview, we identified four distinct timeframes: the Creation Period, the Operational Period, the Post-Hack Period, and the Recovery Period. In this installment, we focus our attention on the Creation Period. Future installments will analyze each of the remaining three periods separately. Creation Period The DAO’s creation period lasted for 28 days from April 30, 2016 01:42:58 AM (block 1428757) when it was deployed to May 28, 2016, 09:00 (block 1599205). According to the EtherScan website, more than one billion DAO tokens were created. Because much of the smart contract’s functionality was disabled during creation, three functions dominate the logs during the period: function(), createTokenProxy(), and approve(). We find that nearly two-thirds (66.35%) of the 62,873 interactions during the Creation period were calls to the default function. A call to the default function, function(), occurs when a contract is sent ether directly. The code of the default function is quite simple: either it creates tokens by calling createTokenProxy(), or, if called after closingDate but before the end of the grace period, it sends the ether back to the caller, or, if called after the end of the grace period, it keeps the ether. Together, the two functions createTokenProxy() and function() account for 91.86% of all interactions during creation. 8.12% of the remaining interactions were approve() calls, which are discussed below. 0.02% of interactions were with other, infrequently used functions. Token Creation In the bar chart below, we present the number of times each of the three functions was called each day. The initial flurry of activity on the first day, followed by a lessening, followed by a spike near the midpoint of the period, then another lessening, leading, finally, to a period of growing interest, is easily explained, as is the change in the usage of the createTokenProxy() call relative to direct sends of ether.

Function calls per day during Creation Period

Many initial purchasers of the DAO tokens had clearly been anticipating its arrival and were ready to act on the first day. These users, one presumes, were more technically adept, which is hinted at by the significantly higher frequency of direct sends (orange bars) compared to createTokenProxy() (black bars) during the first few days of operation. One might notice that as more purchasers appeared, the difference between the number function() calls relative to createTokenProxy() calls lessens. We believe this is due to the use of tutorials explaining how to purchase tokens. Many tutorials instructed users to use the Mist browser (as opposed to say the ‘geth’ command line interface) and from there to call into the createTokenProxy() interface. Of course, this is only conjecture, but it helps explain the growing relative use of createTokenProxy(). A Simple Mistake Leads to User Confusion At the start of the creation period a single ether purchased 100 DAO tokens. Midway through the period, that ratio began a steady ten-day decrease until finally reaching 100 DAO tokens per 1.5 ether, where it remained for the last four days of the period. This behavior is explained well in this blog post and is further illustrated in the table below: This table was generated by analyzing the following code. In the code, createTokenProxy() calls into a function called divisor(), the result of which, when multiplied by 20, gives the token/wei ratio. This factor is then multiplied by the amount of ether sent to the function (msg.value) to arrive at the number of tokens to award to the caller. function createTokenProxy(address _tokenHolder) {

...

uint token = (msg.value * 20) / divisor();

extraBalance.call.value(msg.value — token)();

balances[_tokenHolder] += token;

...

} The divisor() code looks like this: // Return the divisor used to calculate the token creation

// rate during the creation phase. The number of tokens per

// wei is calculated as msg.value * 20 / divisor function divisor() constant returns (uint divisor) { if (closingTime — 2 weeks > now) {

// The fueling period starts with a 1:1 ratio

return 20; } else if (closingTime — 4 days > now) {

// Followed by 10 days with a daily creation rate

// increase of 5%

return (20 + (now — (closingTime — 2 weeks)) / (1 days)); } else {

// The last 4 days there is a constant creation rate

// ratio of 1:1.5

return 30;

}

} Looking back at the bar chart above, one may notice the users’ behavior approaching May 15th, the first day of the price increase. As expected, activity increases as the price rise approaches. Notice, however, that the greatest activity occurs on May 14th, a full day before the price increase. (Each bar represents the activity between 9:00 am the previous day and 9:00 am on the current day, so the bar labeled May 14th ends at 9:00 am, May 14th — 24 hours before the first price rise). The green-enclosed box in the table above helps explain this unexpected behavior, which is due primarily, we think, to an error on the DAO Hub website (see this DAOHub discussion and this reddit post). It seems the maintainers of the DAOHub website read the code wrong and made a miscalculation as to the first date of the price change. Alternatively, one might say that the software code itself is in error. The somewhat confusing code of divisor() passes through a different path on May 14th (i.e. closingTime - 2weeks). However, oddly, it arrives at the same result (20). It is easy to see why the error on the website was made. The extraBalance Account Referring back to the source code above, notice the second line of the createTokenProxy code where the extraBalance account is funded with the amount over the 1:100 refundable tokens of the early adopters. This account was initially intended to hold the ‘profits’ of The DAO, which were later to be distributed pro-rata by token share; however, a decision was taken at some point to refund the original late purchasers with the exact amount of ether they sent. It is not clear, exactly, how that decision was made. It certainly was not voted on by token-holders as some people think it should have been. Approve Calls The undulating green area mentioned above represents calls to the approve function, one of the few functions that were not disabled during the Creation Period. We do see something a bit surprising here. First, the existence of approve calls itself prior to the ability to actually make any transfers is unexpected, at least to this writer. Secondly, and more surprisingly, is the regularity of these function calls and the fact that they came almost entirely from four addresses. It is our belief these calls were most likely exchanges practicing or testing their software prior to the start of the Operational period.

Analysis of Approve Function Calls During Creation Period