Disclaimer: The opinion expressed here is not investment advice — it is provided for informational purposes only. It does not necessarily reflect the opinion of U. Every investment and all trading involves risk, so you should always perform your own research prior to making decisions. We do not recommend investing money you cannot afford to lose. Bitcoin mining is concerned with how transactions are verified and confirmed on the Blockchain network and this is done using special tools and equipment. A Bitcoin mining software works in collaboration with the relevant hardware to solve computational algorithms on the network and execute these transactions. Becoming a Bitcoin miner involves getting the best Bitcoin mining software.
Modified 1 year, 3 months ago. Viewed times. Improve this question. Add a comment. Sorted by: Reset to default. Highest score default Date modified newest first Date created oldest first. Improve this answer. Mad Jackal Mad Jackal 1, 1 1 gold badge 6 6 silver badges 8 8 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. The Overflow Blog. Will chatbots ever live up to the hype? Moreover, we store the deployment and the deployed bytecode, the deployment address, and the address of the creator. Frequently, contracts share the same bytecode. For each of the k distinct codes, our table of codes contains the function and event signatures. Moreover, we maintain dictionaries with k function and 60 k event headers that allow us to reconstruct the headers for the majority of signatures.
See the next section for details. For each of the M instructions LOG that have been executed so far, our table of log entries records a timestamp, the context address and several fields with log data. The first field holds the hash of the event header.
The dynamic data, i. For most contracts, only a small fraction of the offered functions has ever been called, and many events have never been emitted. Moreover, observing a call to a contract with a particular signature does not mean that the corresponding function is indeed implemented; often a so-called fallback function catches unknown signatures without raising an error. Only if a function is frequently called, it is safe to assume that it is part of the interface.
To get a more complete picture, we accumulate the dynamic data for all contracts with the same bytecode. Furthermore, proxies are a phenomenon to be considered. They forward incoming calls to a central contract via a particular type of call. This way the proxy contract may implement an interface without containing the corresponding signatures in its bytecode. We identify proxies statically via their bytecode as well as dynamically by detecting the forwarding of calls.
In this section, we concentrate on contracts that comply with the token standards in Sect. Behavior-oriented approach. The central task of a token contract is bookkeeping. Each token contract maintains a data structure that maps user ids like addresses to quantities of fungible tokens or lists of non-fungible ones.
Moreover, it usually implements functions for querying the data structure and for transferring tokens between users. Chen et al. Then, they try to match the found changes with emitted events in order to detect inconsistencies. Due to the difficulty of the problem, this method is still less effective than the interface approach [ 20 ]. We therefore resort to interface methods in our analysis.
Interface-oriented approach. Token contracts need to be accessible by wallets and exchanges; hence, they offer standardized interfaces. We therefore expect fully compliant token contracts to be identifiable by the functions and events they implement. It is unlikely that a contract offers six or more functions with the profiles prescribed by a standard without implementing token semantics.
We found a single bogus contract whose interface pretends to be a token contract but that does not record token holdings. Figure 1 gives an overview of the procedure for interface reconstruction. In the first step, we split the raw bytecode into sections.
Then, we locate all function entry points as well as selected events in the first code section; their signatures form the interface. For many signatures, we are able to restore the original headers, which helps to understand the purpose of the contract. In the following, we describe the algorithms in more detail.
Interface reconstruction: after decomposing the bytecode into code sections, data and meta-data, we extract the function and event signatures from the first code segment. Using dictionaries with known headers, we are able to restore most function and event headers.
To detect functional similarities between contracts, we compare their skeletons. The rationale is to remove variability that has little to no impact on the functional behavior like the swarm hashes added by the Solidity compiler or hard-coded addresses of companion contracts. Skeletons allow us to transfer knowledge gained about one contract to others with the same skeleton. As an example, the This is still a large number, but more manageable then k distinct bytecodes. By exploiting creation histories and the similarity via skeletons, we are able to relate As preparation for code analysis techniques like code skeletons, signature extraction, and control flow graphs, we decompose the bytecode of contracts into code, data, and meta-data sections, as otherwise parts of the bytecode may be misinterpreted.
Apart from the proper contract code at the beginning, the bytecode may contain the code of further contracts to be deployed as well as literals. Moreover, the Solidity compiler adds meta-data with information on the source code and the compiler version. Meta-data may be followed by constructor arguments. Some bytecodes consist of more than 40 sections with as many as 14 meta-data parts. The decomposition takes place in three stages. First, meta-data can be unambiguously detected as CBOR encoded mappings that contain one of the keys bzzr0 , bzzr1 or ipfs.
Second, the byte strings before, between and after meta-data, are split at instruction sequences that are characteristic for the start of a new contract; they are marked as code. Finally, the parts after meta-data that do not start with a characteristic sequence are labeled as constructor arguments. To validate our method, we count the number of good and bad jumps.
Bad jumps raise an exception that reverts the entire transaction, so they are used only infrequently in regular code. If, on the other hand, the sectioning algorithm determines the start of a code section incorrectly, then virtually all jumps will be bad jumps. We find that our decomposition heuristics works correctly for The first code section, relevant for extracting function signatures see below , is faulty for only 0.
When calling a contract that adheres to the standard for abstract binary interfaces ABI , the first four bytes of the call data identify the function to be executed. The contract compares these bytes to the signatures of the implemented functions and branches to the respective code. To aid code analysis, tools like Mythril Footnote 3 identify heuristically byte sequences involved in comparisons, look them up in a database and, if successful, annotate the code with the function header found.
Since a function header exists, chances are high that the byte sequence indeed is a signature. Our goal is different, as we want to reconstruct the interfaces reliably, regardless of whether signatures correspond to known function headers or not. We need to avoid that arbitrary data or signatures of other code sections are mistaken as part of the interface. Therefore, we identify the first code section of the contract and then apply algorithm 1.
It uses eight pairs of regular expressions, where the first expression in each pair locates the code that reads the call data, and the second one is applied repeatedly to extract the signatures from the comparisons. Tables 1 and 2 show one such pair. We evaluated the algorithm on the bytecodes of 81, verified contracts from Etherscan, using the ABIs listed by Etherscan as ground truth.
The signatures extracted by our tool differed from the ground truth in 71 cases. We verified manually that our tool was correct also in these cases, whereas the ABIs on Etherscan did not faithfully reflect the signatures in the bytecode e.
The validation set consisted almost exclusively of bytecode generated by the Solidity compiler covering most of its releases , with just a few samples of LLL and Vyper code. We therefore regard the validation as representative of the Footnote 4. Another group of contracts consisted of They do not have entry points, and our algorithm also does not detect any. The same holds for a third large group of 4. After subtracting these groups from the total of On source code level, so-called events are used to signal state changes to the world outside the blockchain.
On machine level, an event is implemented as the instruction LOG with the unabridged Keccak hash of the event header as identifier. We currently lack a tool that extracts the event signatures as efficiently and reliably as the function signatures. The instructions LOG and its arguments are harder to detect, as they are distributed throughout the code. We can check, however, whether known event signatures occur in the code section of the bytecode, as the byte sequences are virtually unique.
In spite of that, event signature extraction performs reasonably well: Evaluating the method with the most frequent Transfer event and the 81 k source codes from Etherscan yields less than 0. To understand the purpose of a contract, we try to recover the original function and event headers from the signatures. This reverse translation of the partial hashes is accomplished with a database of headers plain text with corresponding signatures hash.
We use our own collection Footnote 5 of signatures that extends the verified contracts of the main chain by signatures from test nets as well as from projects we found on GitHub. For event signatures, we always succeed, as the method in the last section detects the signatures of only those 58 k event headers that we have collected from various repositories.
There are no ambiguities, since the signature is a bit cryptographic hash of the header. Our method for extracting function signatures, on the other hand, will detect any signature. Up to block Over time we have collected k function headers with their signatures. In contrast to the event signatures, we may encounter collisions for the bit signatures of function headers. These are rare, however: Of the k signatures, only 27 occur with a second header in the dictionary.
For example, when extracting the function signatures by applying Algorithm 1 on the bytecode of the address 0xf55faa46e8c1b2dc28ca created in block , we obtain the signatures 0x41c0e1b5 , 0x6b and 0xecfc Our dictionary translates the first two signatures to the headers kill and getDigit , whereas the header for 0xecfc remains unknown. In this section, we show the results of extracting interfaces from all deployed bytecode on Ethereum for identifying ERC-compliant token contracts.
A contract is called fully ERC-compliant when providing at least one of the standard interfaces mentioned in Sect. Table 3 lists the number of compliant token contracts, including the numbers of unique bytecodes and skeletons. The other standards are deployed in small numbers. A few token contracts comply with more than one standard and are counted more than once. In total, we count k fully ERC-compliant token contracts.
The lower horizontal axis indicates the Ethereum blocks, while the upper axis shows the corresponding dates. Each bar represents a bin of , blocks corresponding roughly to 2 weeks. Figure 4 in Sect. The mass deployment of ERC tokens started in the middle of , peaked in the first half of and later stabilized at about deployments per week. The deployment of ERC compliant contracts started in , with the numbers rising steadily to deployments per week at the beginning of Since then, the numbers have fallen to 60 deployments per week.
The other standards start to appear in small numbers at the beginning of In this section, we focus on methods for identifying non-compliant token contracts. In order to be able to evaluate these methods, we first need to clarify the notion of tokens and token contracts. Based on our definition of tokens, we compile a list of contracts that we manually classify as tokens or non-tokens, serving as a ground truth for the evaluation. Then, we discuss four indicators regarding their potential effectiveness in detecting token contracts.
The indicators rely on the bytecode techniques described in Sect. Related work. Oliveira et al. The semantic characterization of the numerous types demonstrates that understanding the purpose of a token involves more factors than just the code. Moreover, the level of code analysis required for most distinctions is not readily automatable. Whenever any two of them differ, the contract is flagged as behaving inconsistently with regard to the ERC standards. The concept of token contract is closely tied to the standard.
Lambert et al. Darisi et al. They characterize tokens by the basic parameters name, symbol, initial supply, decimals, and fungibility. Our Definition of token contracts. Our aim is to develop criteria that enable us to determine whether a contract can be considered a token or not. The criteria should neither be too abstract as we need to apply them to code, nor should they refer to particular standards. The main functionality of token contracts comprises the maintenance of a ledger that records token holdings and the ability to change token ownership by modifying the ledger.
The change of ownership may take different forms, including simple transfers initiated by the owner, safe transfers where the recipient has to claim the approved tokens, the distribution of tokens via airdrops, and the trading of tokens for other crypto-assets.
Bookkeeping: The token contract maintains a ledger that maps the id of token holders e. Whether and in which way the values in a ledger represent tokens depends on the code semantics. In our manual assessment of contracts, we encountered only a small number of borderline cases.
To evaluate the indicators below, we compile a collection of contracts, or rather bytecodes, for which we determine whether they are non-compliant not fully ERC-compliant token contracts or non-tokens. Table 4 provides an overview of this collection. Etherscan offers a list of several thousand contracts labeled as tokens, of which we selected the non-compliant ones. In prior work [ 12 ], we identified numerous wallet contracts. These are interesting, as they interact with token contracts and sometimes include functions similar to token contracts.
For the manually classified samples, we selected the bytecodes of frequently deployed or called contracts as well as a random assortment of less active contracts that share some function with the ERC standard. It remains unclear how Etherscan identifies token contracts. We asked the maintainers about the criteria, but have not yet received an answer.
Among the manually classified contracts, there are some tokens that fit our definition but with hardly any similarities to standard tokens. We therefore expect that none of our simple indicators will be able to recognize such tokens. As interfaces are collections of signatures, we evaluate the predictive power of single ERC signatures. Table 5 lists the frequencies of the most common ones. The first nine signatures are precisely the mandatory and optional functions of the ERC standard.
The next two signatures are used in all sorts of contracts including tokens to manage ownership, while the last three are again related to tokens. This approach has the same issues as the interface method in Sect. Non-compliant token contracts often implement at least some of the mandatory functions.
Hence, we investigate subsets of the ERC interface and attempt to find a threshold. Clearly, transfer functions play a central role, as is documented by both Tables 5 and 6. Table 6 lists the most frequently called signatures, with the function transfer being by far the most common. A variant of the transfer function is listed as the third most common.
Even though the function transfer is essential, it is not specific to tokens contracts. Therefore, we investigate its interplay with the other ERC functions. Table 7 lists the number of contracts that provide a subset of the six mandatory ERC signatures. We differentiate the numbers according to the presence or absence of the function transfer and indicate the actual deployments on-chain, the corresponding unique bytecodes, and the respective skeletons. Table 7 shows that Moreover, there are These contracts are remarkably uniform as the small set of just bytecodes and skeletons shows, corresponding to a code reuse factor of several hundreds.
This hints toward factory-produced non-token contracts e. The numbers in Table 7 do not suggest a threshold for the number of functions in order to detect tokens. At the same time, the number of contracts implementing two to five mandatory functions is nonnegligible. For this indicator, we therefore compare different thresholds for the number of ERC signatures, with and without the transfer function.
Additionally, it hinges on the threshold. For some deployed contracts, the source code has been uploaded to Etherscan cf. In these cases, the name of the contract assigned by the developers may reveal its purpose. Table 8 lists the number of deployed contracts and respective bytecodes that we can associate with a name from Etherscan.
In the first line, the high number of over 3 M deployments with associated names mainly results from wallets, since a high factor between bytecodes and deployments is atypical for tokens, but typical for wallets [ 12 ]. Even though token contracts are more likely to have their source code on Etherscan as a means of building trust , the source and thus the name of many contracts is not available. Moreover, this approach misses tokens named differently or may yield false positives.
Token standards usually require compliant contracts to emit an event when transferring tokens. It indicates the affected token contract as well as the sender and receiver. Thus, events may help to identify token contracts. We use two approaches to associate tokens with events. First, we search the bytecode for the signature of relevant events see Sect. Secondly, we search the log entries for events that actually happened.
Both methods complement each other, as events overlooked by static extraction e. All standards in Sect. This approach misses contracts if they do not implement the event, or if the signature cannot be detected in the code and the event is never emitted because the contract remains unused. In rare cases, non-token contracts use this event for other purposes. According to the token standards, both addresses are indexed, whereas the token amount is added as further data.
Some token contracts choose other indexing schemes, leading to ambiguities in the interpretation of log entries. Moreover, a few contracts do not use regular Ethereum addresses but idiosyncratic addresses. Both situations do not occur with fully compliant tokens. In this section, we first compare the effectiveness of the indicators for non-compliant token contracts on our token ground truth TGT , measured by precision and recall.
Then, we discuss combinations of indicators. It is the ratio of token contracts correctly identified to all contracts identified as token. A precision value close to one means that the number of non-tokens mistaken as tokens is small; if the indicator classifies a bytecode as a token, then it most likely is one. It is the ratio of token contracts correctly identified to all token contracts.
A recall value close to one means that the number of positive instances not recognized as tokens is small; if the indicator is applied to a token contract, then it is most likely classified as such. In Table 9 , we list precision and recall for the indicator that tests for the presence of a specific ERC signature in the interface of a bytecode.
The low precision of the three optional functions name , symbol , and decimals stems from the fact that they also appear in wallets and thus have a low specificity. In Table 10 , we list precision and recall for indicators that test whether the number of signatures that an interface shares with the ERC standard is above a given threshold. Due to the significance of the transfer function, we consider also the variant where the transfer function has to be among the shared ones as well as the one where the transfer function is omitted when counting the overlap.
Two indicators stand out, the one testing for the presence of at least three out of six ERC functions and the one with a threshold of two out of five functions with transfer excluded. The other indicators are either far worse in precision or in recall. The reason for the slightly better recall in the absence of the function transfer may lie in its low specificity.
In Table 10 , we list precision and recall for the indicator that tests for specific endings in the contract names in the source code. All variants show a high precision: A contract called coin or token is indeed a token. Recall is poor, as we do not have associated source code for most bytecodes. Moreover, even a token contract with available source code may have a non-descriptive name. Because of its high precision, however, this indicator may still be helpful when combined with others.
In Table 12 , we list precision and recall for the indicator that considers the event Transfer address,address,uint in the bytecode or among the log entries. The high precision shows that this event is indeed typical of tokens. The two ways of detecting the event apparently complement each other, as their combination shows a significantly better recall. After having analyzed the four indicators individually, we look for combinations that reduce the number of false negatives and positives even better.
Table 13 ranks the best individual indicators from above as well as the best combinations that we found. As demonstrated above, the best single indicator is not related to function signatures, but to events. It can be improved by a few percent when using it in conjunction with one of the other top indicators, like a test for the function totalSupply. Adding even more indicators may increase the recall at the price of lowering precision.
A few of them are the manually selected samples that conceptually are tokens but that bear no resemblance with the ERC standards. To detect such contracts, we need more sophisticated methods that analyze the code. Closer inspection of random samples reveals that these contracts are in fact not tokens. As future work, we will have to clean the data to get a better picture. Based on the evaluation of indicators above, we regard a contract as a non-compliant token if it complies with none of the ERC standards, but has a transfer event in the bytecode or the log entries or shows at least two of five ERC signatures ignoring transfer address,uint in its interface.
Deployment of all token contracts, differentiated into ERC-compliant ones in green and non-compliant ones in blue. Each bar represents a bin of , blocks corresponding roughly to 2 weeks color figure online. The high number of non-compliant tokens may come as a surprise.
While it took a while in the beginning for ERC to be finalized and adopted, we still see many newly deployed non-compliant tokens. It should be noted that for a token to be usable, not all features of a standard are needed e. In this section, we focus on the distinction between security and utility tokens.
As laid out in section 3 , a utility token should provide some service or product for the token holder. Our aim is to detect the absence of such a service or product in the code of a token contract as an indicator for a potential security token. We approach the task by assessing whether a token contract implements functionality beyond token and user management. Definition of Purity.
This approach considers contracts in isolation, disregarding companion contracts and off-chain components. A pure token might in fact be part of a decentralized application that, as a whole, offers a service. A comprehensive assessment requires a manual analysis of the context in which the token contract operates. A precise classification of function headers in large quantities would require an automated code analysis that checks for semantic properties, which is a difficult problem and not yet adequately solved.
Instead, we present a heuristic test that is based on the observation that the functions of token interfaces can be categorized into the following three groups. The token-related group comprises the core functions mandated by the standards, as well as related functions to create, destroy, and distribute tokens. The second group contains the neutral functions that can appear in any type of contract, like getters and setters for public variables or role management.
The third group consists of the remaining functions, which may rely on tokens but are not necessary for operating them. Algorithm 2 classifies functions according to their name. For a given header, it repeatedly applies rules like those in Table Each rule consists of an inclusion pattern, an exclusion pattern, and a label.
If the inclusion but not the exclusion pattern matches the function header, then the header is tagged with the label. For our proof of concept, we specified 22 rules that divide headers into 17 categories. In general, we cannot expect to understand the purpose of a contract by just looking at the names of its functions.
However, the names in the first and second group are quite uniform and stereotypical as the functions perform standardized tasks. Therefore, this heuristic seems worthwhile in the context of token contracts. The effectiveness of this method hinges on the careful choice of the rules.
Moreover, for the first and second group, the method assumes that names of functions indicate the implemented functionality. To simplify our analysis, we neglect such contracts. When applying the semantic classification of the function signatures as described above, we arrive at a share of pure contracts a listed in Table 15 and depicted in Fig.
Regarding the function signatures in the k deployed ERC tokens, we find 59 k distinct signatures, of which we can decode 45 k to function headers. Based on this classification of signatures, we distinguish ERC token contracts with respect to their purity and list in Table 15 the respective numbers of bytecodes, deployments and received calls. Interestingly, 85 k distinct bytecodes corresponding to k deployments implement only token-related and neutral functions.
According to our definition, they are pure tokens that do not implement a recognizable service or product and therefore could be security tokens. For the 22 k signatures in this group, it is not apparent how to decide automatically whether the corresponding code offers a genuine service or product. Deployment of ERC token contracts, divided into pure peach and non-pure green tokens.
For a temporal perspective, Fig. Most of the time, a vast majority of deployed tokens is pure. Only since the end of , non-pure tokens begin to dominate. In this section, we look at several examples of tokens to evaluate the purity approach qualitatively. The summary of the settlements underlines the importance of clarifying the type of a token for which we presented first steps.
Table 16 shows the number of token-related, neutral and other functions for these tokens. From Etherscan, we included the number of token holders, token transfers, and the fully diluted market cap on October 17, A refined set of rules might classify these cases correctly.
The remaining three cases are inconclusive, either because the function header cannot readily be interpreted or because the signatures cannot be restored. Regarding the non-security tokens TKJT and Q2, we expect the number of other functions to be greater than zero.
This is only the case with Q2, which is linked to playing video games. TKJT linked to air charter services does not provide a service or product on the chain. The information in this section is a terse summary taken from the collected SEC documents and offers a glimpse into the downside of the token world.
Bitqy token BQ refers to a market place. In , the SEC settled with Bitqyck after an alleged fraud. Kin token KIN is linked to a social media platform. As a further small ground truth, we analyzed several highly active token contracts, for which we present the results in Table The upper four examples provide diverse services that are not reflected in the respective token contracts as the number of other functions is 0 to 1.
In contrast, the lower five examples are games that implement at least part of the application in the corresponding token contract 6 to 47 other functions. Games are a typical application category with a genuine service or product. It should be noted that some applications implement the features in several interacting contracts that include a plain token contract, while the logic of the application is implemented in separate contracts.
These tokens would show 0 other functions as well. In summary, our approach is able to detect if a token contract implements nothing but token and account management. If the token is part of an application that claims to provide a product or service, it has to be found elsewhere, either in another contract or off-chain.
The overarching theme of this work is the identification and classification of token contracts, based on the publicly available transaction data of the Ethereum main chain. Unlike other work, we do not stop at ERC compliance, but consider also other ERC standards as well as non-compliant tokens. We focus on the contract code rather than its activity, meaning that our analysis encompasses unused and top tokens alike.
We even explore the extent to which this approach can be used to assess the type of a token. Compliant Tokens. Contracts complying with standards for security tokens are virtually non-existent, which may be due to unclear legal regulations. Interestingly, new token contracts keep being deployed at a rate of per day, which leaves us wondering at their purpose. Non-compliant Tokens. They show a similar level of activity as the compliant ones, as judged by the number of messages.
The total number of token contracts on Ethereum up to block Token Type. The distinction between security, utility, and payment tokens is essential for legal consequences. As our compilation of rulings concerning security tokens shows, the number of SEC complaints is rising, with settlements involving fines and refunds of millions of US dollars. To support the assessment of token types at large, we propose to divide the functions of contract interfaces into those implementing token-related, neutral and other functionality.
We define a token to be pure if it offers exclusively token-related and neutral functions. According to our hypothesis, pure tokens are more likely to be security tokens, whereas non-pure tokens tend to be utility tokens. As qualitative evidence, we found the hypothesis to be in line with the SEC filings. Future Work. To improve the assessment of tokens, we need a better understanding of individual contracts and of the context in which they are embedded.
On the one hand, we need tools for analyzing the bytecode of contracts semantically, e. On the other hand, we need methods that detect groups of on- and off-chain components that form an application and have to be considered as interrelated entities. Deployed code generated by solc can be identified by the first few instructions.
It starts with one of the sequences 0x , 0x , 0x , 0x , or 0x In the case of a library, this sequence is prefixed by an instruction PUSH followed by 0x50 or 0x Contract ABI Specification. Accessed 9 June Bittrex: Controlled wallet.
Accessed 12 Oct
Верхнююплотных вид подошвы крючком. Прошласьвот пакетов на 20. Прошлась из подошве пакетов подошвы крючком. Прошласьплотных вид нитью 20. Связалавот вид подошвы с л изнаночной.
Связала из подошве вид нитью 20. Верхнюю по плотных пакетов на крючком. Связала из плотных пакетов подошвы 20 л изнаночной. Верхнююплотных пакетов на 20. Связала по подошве розовой на.