## 2 Fiscal Measurement Systems and Blockchain
### Fiscal Measurement and Custody Transfer Aspects  
Fiscal measurement and custody transfer are often confusing terms in the market. Custody transfer is more related to the purchase and sale of products, through which both parties agree to meet specific rules for the oil quantification. These laws deal with matters such as inconstancy, repeatability, linearity, and metrological proof (such as calibration of measuring equipment), established in contracts. Fiscal measurement is a broader concept encompassing the volumetric quantification of product mass for taxation, sharing, and royalty purposes [11]. Commonly, fiscal measurement bases itself on technical regulations issued by regulatory bodies of concession or sharing contracts, which refer to standards published by official or even private entities. Typically, these regulations set the guidelines to help the field operators to ensure complete and accurate results [12]. For example, they outline aspects including but not limited to the assessment of pressure and temperature, uncorrected fluid flow and volume measurement, calculation algorithms for gas and oil, uncertainty estimation, and instrument and meter calibration. In a broader analysis, it is possible to conclude that both the transfer of custody and the fiscal measurement ensure that the quantification of products, crude oil, or natural gas, is as correct as possible and count with proper traceability. It is necessary to guarantee the transactions between buyers and sellers (in the case of custody transfer) or between governments and concessionaires (in respect of fiscal measurement). Both serve the same good practices applied to the quantification of these products. It is also noteworthy that, while fiscal measurement is more restricted to the fulfillment of concession contracts, custody transfer has much more extensive applications, including carriers and distributors of gaseous and liquid hydrocarbons, as well as their derivatives, reaching the final consumer. The calculation approach for the value of the product, considering the requirements of fiscal measurement or custody transfer, is divided into large groups of equipment: (a) the measuring station installed in the field and (b) the supervision station, which interfaces with the various field-measuring stations. In Figure 1, we have a diagram of a measuring station to evaluate the amount of natural gas meeting the requirements of fiscal measurement using an orifice plate as a primary element (flow calculation). In this case, we can consider that it consists of sensors, which measure the primary variables such as pressure (identified as PT in the diagram), temperature (TT), and differential pressure (PDT); the plate, which is the generating element of the differential pressure proportional to the gas flow (FT), and the flow computer (FQI), which runs an algorithm from the primary variables and flow parameterizations [13]. The flow computer is the \"recording box\" for the results of the measurement, from which one can obtain the normalized flow value of the gas at a certain pressure and base temperature, as defined in the technical regulations [14]. It is in the flow computer where events history and alarm databases, which are used in quantification, are generated [15]. The historical databases contain the average values of the primary variables, the main flow correction factors, and the parameters used in the calculations [16; 17]. These databases are protected, and the final consumer cannot modify the information. Figure 2 introduces the components of the Supervisory Station, which communicates with the various Measuring Stations installed in the production unit. This station plays an important role in the tax measurement system, which is the collection of databases generated by the flow computers. The flow computers generate these databases, but there is a limit to the storage capacity in its memory.