Content uploaded by Madhusanka Liyanage
Author content
All content in this area was uploaded by Madhusanka Liyanage on Sep 05, 2023
Content may be subject to copyright.
Proof of Equation: A Novel Consensus
Algorithm for Dynamic Spectrum Access
Thiwanka Silva
Dept. of Electrical and Information Eng.
Faculty of Engineering
University of Ruhuna, Sri Lanka
eg173063@engug.ruh.ac.lk
Madhushika Bamunuge
Dept. of Electrical and Information Eng.
Faculty of Engineering
University of Ruhuna, Sri Lanka
eg173255@engug.ruh.ac.lk
Dilusha Dissanayake
Dept. of Electrical and Information Eng.
Faculty of Engineering
University of Ruhuna, Sri Lanka
eg173209@engug.ruh.ac.lk
Chatura Seneviratne
Dept. of Electrical and Information Eng.
Faculty of Engineering
University of Ruhuna, Sri Lanka
chatura@eie.ruh.ac.lk
Tharindu Gamage
Dept. of Electrical and Information Eng.
Faculty of Engineering
University of Ruhuna, Sri Lanka
tharindu@eie.ruh.ac.lk
Madhusanka Liyanage
School of Computer Science
University College of Dublin
Ireland
madhusanka.liyanage@oulu.fi
Abstract—The future communication technology is mov-
ing from 5G to 6G with the innovation of new technologies.
Blockchain (BC) is such kind of immersive technology which
gives a huge impact on the betterment of communication
technology. To fulfill the need for secure and efficient
communication, BC-based spectrum-sharing solutions can
be used in dynamic spectrum access(DSA) systems. With
the invention of cognitive radio networks, dynamic spec-
trum access(DSA) became a popular topic for the scientific
community. As the system is open to malicious attacks,
licensed spectrum owners need to be identified and veri-
fied. Spectrum misuse(spectrum violations) can be happened
due to rapid growth in spectrum sharing depending on
intermediate illegitimate users. However, existing BC-based
DSA solutions are more expensive,non-optimized, and lack
of spectrum misuse detection. This paper proposes a novel
consensus algorithm for spectrum misuse detection. The core
of the proposed ”Proof of Equation” consensus algorithm is
a consensus score calculation based on a numerical equation
with three main parameters rather than using cryptographic
calculations. Therefore the proposed consensus is energy
efficient by comparing the existing PoW consensus mech-
anism. Finally, to analyze the performance of the proposed
consensus mechanism was simulated using python scripts.
Index Terms—Blockchain, Smart Contracts, Spectrum Man-
agement, Spectrum Sharing, Dynamic Spectrum Access, Mis-
use Detection, 5G, 6G, Mobile Networks, Machine Learning
I. INTRODUCTION
In recent years, the spectral resource demand in-
creased drastically, at the same time with the develop-
ment of wireless technologies and user demand growth.
Currently, spectrum regulation authorities are practically
unable to address user demand for all its users. How-
ever, spectrum sharing is introduced to address these
issues. In this method, the spectrum can be shared based
on time, location, and space, and it can be achieved
through licensing arrangements. Even though the 4G
era has long supported spectrum sharing, a number of
difficult problems still prevent the effective application
of spectrum-sharing algorithms. Industry and academic
researchers have started to conceptualize the next gener-
ation of wireless communication systems (6G) in order
to solve these upcoming issues in 5G and 4G. When
designing future communication systems, it is always
important to have proper spectrum sharing to elimi-
nate the use of trusted third-party coordination, prevent
unauthorized access (spectrum misuse) and alteration
of radio frequency sharing records in databases and
establish strong security measures against attacks. These
requirements can be achieved by carefully integrating
BC technology with next-generation wireless communi-
cation systems.
The BC technology has shown strong evidence for im-
proving efficiency and security issues in many applica-
tion areas. [1]. The interest in BC increases due to its key
attributes such as security, anonymity, and data integrity.
Without any third-party organization, BC controls trans-
actions [2]. BC consists of consecutive blocks which are
chained together, creating a linked list. The consensus
algorithm is considered a core component of the BC
system. For the generation of the new blocks, the con-
sensus algorithm acts as a verification and measurable
mechanism to ensure the agreement states of specific
data among the distributed nodes of the BC network [3].
Proof of work(POW) and Proof of Stake(POS) are mainly
used as two consensus algorithms in BC networks. A
smart contract (SC) is a decentralized application that
executes business logic in response to events in the
BC platform. In Ethereum SCs solidity programming
language is used [4].
As mentioned, spectrum misuse is a crucial issue that
should be addressed when developing future wireless
communication systems. Current DSA systems are un-
able to monitor spectrum exploitation in real-time and
mitigate security risks. This could be seen as a critical
problem. Although the literature shows the number
of BC-enabling DSA techniques, they were unable to
address the above issues. Consensus algorithms can
be considered as key enabling features to address the
issues of the existing BC-enabled DSA solutions. When
developing consensus algorithms, it is important to pay
close attention to the communication network’s latency
and the computational costs for the network’s secondary
users with limited battery life. The current BC-based
DSA techniques use universal, all-purpose consensus
algorithms like PoW or PoS. These consensus algorithms
consume excessive computational costs and considerable
time during the mining process. Therefore, novel con-
sensus mechanisms must be designed and developed
to overcome the limitations of the existing consensus
algorithms used in DSA.
To address the mentioned research gap, this paper pro-
poses an RF sensing-enabled BC-based novel consensus
algorithm for DSA named ’Proof of Equation (PoE)’. PoE
is using a numerical equation with main three param-
eters such as sensor capability, hash proportion(stake),
and similarity score to calculate the consensus score
rather than using cryptographic calculations. Therefore
the PoE is energy efficient by comparing the existing
PoW consensus mechanism. Further, A prototype of the
PoE is implemented using Python scripts-based simula-
tion to evaluate the performance related to the scalabil-
ity, block production time, and transaction throughput.
GNU radio software has been used for sensor capability
implementation.
II. OUTLINE
The remainder of this paper can be outlined as fol-
lows. Section III discusses the current state of the art
of BC based DSA and consensus algorithms. Section
IV describes the operation of the proposed consensus
architecture. The performance evaluation is given on
Section V, and finally, conclusions are drawn in section
VI.
III. RELATED WORKS
In [4], a BC-based digital token-based approach was
introduced to track and validate the use of licensed
frequency bands in DSA. This work has used ERC721
standard (non-fungible token standard) and developed
a proof of concept (POC) solution using Ethereum BC.
When a particular frequency band (FB) is leased, the
spectral token is transferred (Ownership transfer) from
PU to SU using SC which is a special form of an SC-
named token contract. This spectral token needs to be
automatically returned to the PU after the termination
of the lease period agreed before. If multiple SUs at the
same time request the same FB, PU can select the best
bidder based on price and the lease time.
A novel direction for BC-based mobile network in-
frastructure is discussed in [5]. The key feature of the
proposed structure is the tokenization of spectrum and
network infrastructure that allows trading them with
multiple mobile network operators(MNOs) over BC. The
proposed tokenized model for spectrum, service pricing,
and infrastructure can be listed as follows,
1) The radio resource token(RRT)
2) The Infrastructure Resource token(IRT)
3) The National Cryptocurrency(NC)
In this framework, it uses five key ledgers for net-
work management with the use of above mentioned
digital currencies. Each ledger carries out a specific
task assigned to it. Generally, mobile networks have
thousands of transactions per second depending on
the user demand. Therefore the performance of all the
above ledgers completely depends on transaction speed.
The critical factor affecting blockchain performance is
the underlying consensus mechanism. Therefore suit-
able consensus algorithms have to be selected for the
mobile networks by comparing their features. After a
comparison of different consensus algorithms, Proof-of-
Formulation(PoF) is identified as the capable algorithm
for the consensus process for mobile network manage-
ment. Although PoF seems to be a capable algorithm it
is not suitable specifically for DSA. In [6], authors have
proposed a scalable, secure novel consensus algorithm
namely, Delegated Proof of Reputation(DPoR) which is
a modified version of Delegated Proof of Stake. For the
miner selection process, a reputation voting mechanism
is used in DPoR rather than a stake voting mechanism as
in DPoS. In DPoR, a reputation score is calculated for the
reputation voting mechanism. Every node must register
its account with an official address in this reputation
voting mechanism. The reputation concept in DPoR con-
sists of a combination of three factors which is defined
in 1. P, U, and R are for stake power, resource usage,
and the transaction-based reputation rating respectively.
w1+w2+w3also equals to 1.
Rep =w1P+w2U+w3R(1)
Stake power is calculated based on the account’s staked
tokens. In the DPoS consensus, the stake amount is con-
verted to the vote weight. But DPoR consensus process
uses SCs, unlike DPoS. If an account has an amount to
be used for voting, it will be moved 10% to a staking
SC every day and then converted to stake power in
DPoR. Then, an account’s CPU, RAM, and bandwidth
are considered resource usage. Transaction activity(R)
is the most significant factor in this innovation. Some
accounts can have many in/out transactions. That type
of account is much appreciated in this transaction ac-
tivity calculation process. In [7], a novel customized
consensus mechanism called proof of sense is proposed
to detect spectrum fraud in wireless networks. Unlike
other conventional algorithms like PoS and PoW, this
mechanism follows an energy-efficient way to collect
spectrum sensing data to detect spectrum violation. In
this mechanism sensing nodes(miners) have to partic-
ipate in a cryptographic key recovery phase which is
initiated by the spectrum regulator. The spectrum sen-
sor that captures this random cryptographic key first
becomes the next block creator and can forge the next
block.
The works proposed in [4] and [5] employed generic
consensus algorithms for the proposed DSA solutions.
As work done in [4] used PoW consensus mechanism
its DSA solution is less energy efficient and expen-
sive. Furthermore, the above solutions lack application-
specific consensus in their implementation and it lacks
spectrum misuse detection capability. In work [6] it
introduced a reputation-based algorithm but it is also
generic and couldn’t be used in DSA-based applications
to gain application-specific performance. The proof of
sense consensus mechanism is customized for spectrum
misuse detection in DSA. This mechanism addressed
what was missed in the above two BC systems. The main
thing missing in this algorithm was the evaluation of
spectrum data quality.
IV. OPERATION OF THE PROP OS ED CO NS EN SU S
ALGORITHM - PROOF OF EQUATION (POE)
The main objective of this study is to propose a
customized novel consensus algorithm for spectrum mis-
use detection. Figure 1 presents the overall consensus
architecture of the proposed novel consensus algorithm.
It is named as ”Proof of Equation(PoE)”, which is
scalable and secure with an acceptable decentralization.
It is developed by referring to the proof of stake con-
sensus algorithm(PoS), where stake can be defined as
the number of holdings of a wallet. The core of the
proposed PoE consensus algorithm is consensus score
calculation based on a numerical equation with main
three parameters such as sensor capability, hash pro-
portion (stake), and similarity score, rather than using
cryptographic calculations. Therefore this algorithm is
cost-effective and energy-efficient as no hash power is
consumed. Due to that reason, miners are not needed.
The numerical equation of consensus score(V) can be
defined as follows.
V=aC +bH +cS (2)
C, H and S parameters can be defined by,
•C - Sensor capability.
•H - Hash proportion/stake.
•S - Similarity score.
•Vmax = 1 and Vmin = 0
A. Obtaining Parameters
Sensor Capability(C) : A known text-embedded signal
is transmitted by the regional operator. Then, Sensors
should detect that text-embedded transmitted signal and
extract the text. At the receiver end, detection probability
is calculated. For that process, a simple algorithm is
used. By employing SC at the receiver side, the transmit-
ted text by the regulator can be obtained for comparison
with the received text. The receiver should not be able
to modify the transmitted text. By calling the SC, each
of the sensors gets the operator-transmitted raw text
value and it compares with the sensor’s received text
value. The detection probability value is calculated based
on the difference between the transmitted and received
texts(based on errors in the received text). Finally, the cal-
culated detection probability value should be assigned
to the equation in 2 as the sensor capability value (C).
The complete process for obtaining the sensor capability
value is portrayed in Figure 2.
Hash Proportion/Stake(H) Sensed data should be
uploaded to the IPFS database from time to time by
every sensor. Each sensor will receive a hash for each
data uploaded. Hash is a fixed-sized string that can be
used uniquely to identify data. The hash proportion is
calculated by the number of hash values collected by
each sensor over the number of hashes it can collect for
24 hours. Once the sensor becomes the winning node,
it can upload all pending hash values to the BC.
H=No. of hashes generated
No. of hashes It can generate in one day (3)
Similarity Score(S) Every sensor in the network receives
other sensors’ data set hashes using BC transactions.
Then, access the other sensor’s spectrum data in the
IPFS database using hash values. The similarity score
is calculated by computing the correlation coefficient
between each data set received from other sensors and
datasets of its own.
B. Parameter Combination
According to the equation 1 there are three coefficient
values a,b, and c for sensor capability, similarity score,
and Hash Proportion respectively. Sensor Capability -
Coefficient a: The coefficient a was defined using the
traffic intensity of the day. When the traffic intensity
is high, spectrum sensors in the network need a
higher capability to collect more accurate data by
spectrum sensing. When the traffic intensity is low,
this requirement can be slightly relaxed. Therefore, the
coefficient of sensor capability ”a” should have a higher
priority when the traffic intensity is high. This can be
achieved by normalizing the network traffic to the range
between 0 and 1 and getting that value for coefficient
”a”. This coefficient value needs to be applied to all
sensors in the selected area. Hash Proportion/Stake
- Coefficient b: When the number of sensors in the
area is higher, repetition of the same data sets can be
expected. This will work the other way around when
the network’s number of sensor nodes is low. Therefore,
when sensors in the network are low, Stake should
have higher priority to get the total capacity of the
sensors. Therefore stake coefficient “b” can be defined as,
b=1
Number of sensors in the system (4)
Fig. 1. Workflow of the Proposed PoE Consensus Architecture
Fig. 2. Proposed Method for The Detection Probability Calculation
The coefficient of hash proportion will be more promi-
nent when there are fewer sensors and lower when
sensors in the area are higher.
Similarity Score - Coefficient c: The similarity score
helps to eliminate malicious users in the system because
the correlation coefficient between malicious data sets
and honest sensors has a significant difference. Data
similarity coefficient “c” is crucial for all the sensors
regardless of the location and traffic density. Therefore
malicious users would not be able to have a considerable
similarity score for malicious data sets, which results in a
low consensus score for malicious users. Coefficient ”c”
sets to one to give the highest priority.
V. SIMULATION
The Proof of Equation algorithm was implemented
using the Python3 programming language. As this is a
simulation, only back-end development was carried out
using REST APIs with the Flask framework. This BC was
Fig. 3. High-level View of the Simulation
simulated by using multiple nodes which run on a local
computer.
Blockchain nodes are connected using socket commu-
nication. Every node has a wallet which used to create
transactions within the network. This digital wallet has
a public key and a private key. It is used to add digital
signatures to transactions and blocks. For the simulation,
transactions were posted to the network by executing
a python script with transactions included. Figure 3
portraits the high-level view of the simulation.
All the simulations were carried out on a laptop that
has a core i7-1165G7 CPU and 8GB RAM. Nodes in
the network were simulated by running the python
script in multiple command terminals. When a defined
number of transactions are completed in the network, the
consensus score for each transaction was calculated by
using 3 parameters. Then block creator is selected after
the consensus score calculation, and it creates the block
and adds it to the BC. When reaching the consensus in
the network, the winner’s node’s screen output as “I am
the forger,” and other nodes output as “I am not the
forger”.
This section presents the performance evaluation of
the PoE consensus algorithm. We have evaluated the
Scalability, block production time, and throughput of our
proposed PoE algorithm.
A. Scalability of PoE
Scalability in a BC network indicates the ability of a
consensus protocol to handle the increasing number of
BC nodes. In theory, PoW which is used in bitcoin has
the scalability feature to a greater extent. It can hold as
many users in the network. We started the simulation
with a network size of 4 participants, then we adjust
the network size from 4 to 10 with step 2. Furthermore,
we set the block size fixed to 500. We quantify the
average time to produce a block and results are shown
in Figure 4. We can observe that when we increase the
network size from 4 to 10 average block production time
increases slightly by millisecond. We can expect that our
protocol can provide higher scalability by observing this
bar chart.
246 8 10 12
0
50
100
150
No. of Nodes
Average Block Production Time(ms)
Fig. 4. Average Block Production Time Variation with Different Net-
work Sizes
B. Block Production Time
Next, we vary the number of transactions in a block
from 100 to 500 to measure the average time it takes
to produce a block with different network sizes. In our
simulation, we measured the block production time with
different network sizes ranging from 4 to 10. Figure
5 reveals a continual growth of block production time
with the number of transactions in a block(block size).
This is because as the block size increases block creator
needs to process more transactions. Here, Processing
tasks include Merkle tree calculation, winner IPFS hash
selection, and packaging transactions in the transaction
pool to the block. After completing the above processes,
a block will be created. Therefore, block production
time will continue to grow when block size increases.
Furthermore, we can observe that when the number of
nodes in the network increases block production time
will be increased slightly than the previous level of
nodes for the same block size. This is because when the
network size increases node with the highest consensus
score have to be found by iteration.
We have simulated the PoW and PoS consensus mech-
anisms to compare the block production time with the
PoE consensus algorithm with 100 transactions. The dif-
ficulty in PoW is set to five zeros. The results are shown
in Table I. We can observe that the PoW consensus
mechanism consumed a higher time than the other two
algorithms. Therefore it is clear that PoW is inefficient
and energy-consuming. But PoS and PoE consume very
little time to forge a block compared to PoW. Table I
reveals that PoE is around four times faster than PoS. The
reason for this is PoE has a linear equation to select the
next forger. Therefore we can conclude that the proposed
PoE is fast and efficient compared to popular algorithms
like PoS and PoW.
TABLE I
COMPARISON OF BLOCK PRODUCTION TI ME OF DIFFE REN T
CONSEN SUS MECHANISMS
Consensus Algorithm Block Production Time (s)
PoW 277.38784
PoS 0.06123
Proof of Sense [7] 9.06
PoE (Proposed) 0.03085
C. Transaction Throughput
Transaction throughput of a BC network is the num-
ber of transactions that can be processed in a unit of
time. Our proposed PoE algorithm is computationally
efficient as it uses a consensus score rather than solving a
cryptographic puzzle. In this simulation, we have incre-
mented the block size from 100 to 500 and the network
size from 4 to 10 using steps of two. Figure 6 reveals
how throughput varies in the simulated network. We
can observe that transaction throughput increases when
blocking size increases. When considering the variation
of transaction throughput with different network sizes
we can conclude that if the network size is smaller
throughput is high. This is because smaller networks
have a lower delay as it uses less bandwidth.
D. Feature Comparison
Table II summarizes a feature comparison between ex-
isting blockchain-based and non-blockchain-based spec-
trum sharing systems with the proposed system. (Here,
L→Low, M→Medium, H→High, -→Not Relevan-
t/Not Available )
100 200 300 400 500
30
45
60
75
90
105
120
135
150
Block Size
Average Block Production Time(ms)
4 Nodes
6 Nodes
8 Nodes
10 Nodes
Fig. 5. Variation of Block Production Time with Different Block Sizes
100 200 300 400 500
1,000
2,000
3,000
4,000
5,000
6,000
Block Size
Throughput
4 Nodes
6 Nodes
8 Nodes
10 Nodes
Fig. 6. Variation of Throughput with Different Block Sizes
VI. CONCLUSION
This paper introduces a novel consensus algorithm
namely, Proof of Equation(PoE) for DSA. The proposed
algorithm is based on the consensus score rather than a
cryptographic calculation. Therefore the proposed con-
sensus is energy efficient when compared with the exist-
ing PoW consensus mechanism. In PoE, the sensor with
the highest consensus score will forge the next block
in the BC. The performance of the PoE was evaluated
by considering the block production time and through-
put while increasing block size. The scalability of the
proposed consensus was also evaluated with different
network sizes. PoE was also compared with the existing
algorithms PoW and PoS related to the block production
time. The results verify that the PoE consensus algorithm
can outperform the PoW, PoS and proof of sense in terms
of block production time and throughput. Therefore, the
PoE consensus is fast and efficient for DSA and can ad-
dress the issues in existing consensus mechanisms. Addi-
tionally, the proposed mechanism is capable of collecting
TABLE II
FEATURES COMPARISON WITH KE Y REL ATED WO RKS
Features [8] [9] [10] [4] [11] [5] [12] [7] Ours
Blockchain
based
✗ ✗ ✓✓✓✓✓✓ ✓
Spectrum
Sensing
✗ ✗ ✗ ✗ ✓✗ ✗ ✓ ✓
Spectrum
Fraud
Detection
✗ ✗ ✓ ✓ ✗ ✗ ✗ ✓ ✓
Off-Chain
Storage
- - ✗✗✗✓✗✓ ✓
Tailored
Consensus
- - ✗ ✗ ✗ ✗ ✓ ✓ ✓
Data Vali-
dation
-------✗✓
Computa-
tional Cost
M L H H H H L L L
spectrum data to detect spectrum misuse. Developing
the DSA system with the proposed consensus algorithm
using hardware like Software Defined Radios(SDRs) and
raspberry pi computers is left as the future research area.
REFERENCES
[1] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,”
Decentralized Business Review, p. 21260, 2008.
[2] J. Yli-Huumo, D. Ko, S. Choi, S. Park, and K. Smolander, “Where
is current research on blockchain technology?—a systematic re-
view,” PloS one, vol. 11, no. 10, p. e0163477, 2016.
[3] J. Ye, X. Kang, Y.-C. Liang, and S. Sun, “A trust-centric privacy-
preserving blockchain for dynamic spectrum management in iot
networks,” IEEE Internet of Things Journal, 2022.
[4] T. Ariyarathna, P. Harankahadeniya, S. Isthikar, N. Pathirana,
H. D. Bandara, and A. Madanayake, “Dynamic spectrum access
via smart contracts on blockchain,” in 2019 IEEE Wireless Com-
munications and Networking Conference (WCNC). IEEE, 2019, pp.
1–6.
[5] T. Maksymyuk, J. Gazda, M. Volosin, G. Bugar, D. Horvath,
M. Klymash, and M. Dohler, “Blockchain-empowered framework
for decentralized network management in 6g,” IEEE Communica-
tions Magazine, vol. 58, no. 9, pp. 86–92, 2020.
[6] T. Do, T. Nguyen, and H. Pham, “Delegated proof of reputation:
A novel blockchain consensus,” in Proceedings of the 2019 Interna-
tional Electronics Communication Conference, 2019, pp. 90–98.
[7] P. Fernando, K. Dadallage, T. Gamage, C. Seneviratne,
A. Madanayake, and M. Liyanage, “Proof of sense: A novel
consensus mechanism for spectrum misuse detection,” IEEE
Transactions on Industrial Informatics, vol. 18, no. 12, pp. 9206–
9216, 2022.
[8] B. Cho, K. Koufos, R. J¨
antti, and S.-L. Kim, “Co-primary spectrum
sharing for inter-operator device-to-device communication,” IEEE
Journal on Selected Areas in Communications, vol. 35, no. 1, pp. 91–
105, 2017.
[9] Y. Teng, Y. Wang, and K. Horneman, “Co-primary spectrum
sharing for denser networks in local area,” in 2014 9th Interna-
tional Conference on Cognitive Radio Oriented Wireless Networks and
Communications (CROWNCOM), 2014, pp. 120–124.
[10] M. B. H. Weiss, K. Werbach, D. C. Sicker, and C. E. C. Bastidas,
“On the application of blockchains to spectrum management,”
IEEE Transactions on Cognitive Communications and Networking,
vol. 5, no. 2, pp. 193–205, 2019.
[11] K. Kotobi and S. G. Bilen, “Secure blockchains for dynamic
spectrum access: A decentralized database in moving cognitive
radio networks enhances security and user access,” IEEE Vehicular
Technology Magazine, vol. 13, no. 1, pp. 32–39, 2018.
[12] Y. Liang, C. Lu, Y. Zhao, and C. Sun, “Interference-based consen-
sus and transaction validation mechanisms for blockchain-based
spectrum management,” IEEE Access, vol. 9, pp. 90 757–90 766,
2021.