  This paper investigates an endogenous security architecture for computation
offloading in the Internet of Things (IoT), where the blockchain technology
enables the traceability of malicious behaviors, and the task data uploading
link from sensors to small base station (SBS) is protected by intelligent
reflecting surface (IRS)-assisted physical layer security (PLS). After
receiving task data, the SBS allocates computational resources to help sensors
perform the task. The existing computation offloading schemes usually focus on
network performance improvement, such as energy consumption minimization, and
neglect the Gas fee paid by sensors, resulting in the discontent of high Gas
payers. Here, we design a Gas-oriented computation offloading scheme that
guarantees the degree of satisfaction of sensors, while aiming to reduce energy
consumption. Also, we deduce the ergodic secrecy rate of IRS-assisted PLS
transmission that can represent the global secrecy performance to allocate
computational resources. The simulations show that the proposed scheme ensures
that the node paying higher Gas gets stronger computational resources, and just
raises $4\%$ energy consumption in comparison with energy consumption
minimization schemes.
