  Proof of Work (PoW) has been extensively utilized as the foundation of
blockchain's security, consistency, and tamper-resistance. However, long has it
been criticized for its tremendous and inefficient utilization of computational
power and energy. In this work, we design a dual-functional blockchain
framework that uses solving optimization problems to reach consensus as an
alternative to PoW, channeling wasted resources into useful work. We model and
analyze our framework by developing discrete Markov chains, and derive the
security conditions to ensure that selfish miners behave honestly. Based on the
security conditions, we derive a lower bound for the security overhead and
analyze the trade-off between useful work efficiency and PoW safeguard. We
further dive deep into the reward function design for the proposed
dual-functional blockchain and provide practical design guidelines for reward
functions assuming concavity and linearity respectively. Finally, simulation
results are presented to validate and illustrate our analytical results.
