Research Summary: Efficient Attribute-Based Smart Contract Access Control Enhanced by Reputation Assessment


  • Blockchain’s immutability can provide a trust enhancement for shared systems, including the Internet of Things (IoT).
  • However, IoT requires handling and storing enormous amounts of data.
  • Blockchain storage issues have received little attention from researchers, particularly in the areas of improving malicious behavior detection and improving the processing capabilities of smart contract-based systems.
  • The authors design and prototype an access control system based on smart contracts, integrating a credit-based misbehavior detection method to better protect an IoT system against security and privacy threats.


Liu, Yang, Terry Guo, Zhe Chen, and Xueying Jiang. “Efficient Attribute-Based Smart Contract Access Control Enhanced by Reputation Assessment.” arXiv preprint arXiv:2107.00679 (2021).

Core Research Question

How do we resolve the issue of increasingly heavy pressure on blockchain storage from massive IoT data, while also handling malicious access behaviors in the system?


  • The Internet of Things (IoT): Refers to the connection of manufactured objects to the Internet. With the sharp increase in smart devices, IoT has influenced vertical domains from industry and transportation to cities and the human body. However, with IoT devices and their complex networks, significant security and privacy concerns arise. Adversaries can gain illegal access to the devices to steal crucial data or perform malicious actions. Consequences can include privacy leaking, system failure, or even human injury.
  • Access control: An important line for guarding IoT systems against security and privacy threats. However, traditional access control schemes rely heavily on centralized authorities at the risk of a single point of failure (SPOF) and offer users no control over their data. It is essential and urgent to find effective ways to secure IoT access control.
  • Blockchain: A blockchain is a decentralized security framework with transparent, Byzantine fault-tolerant, immutable, and chronological ledgers maintained by distributed users. In recent years, it has received broad attention from both academia and industry due to its decentralized management mechanism. Many researchers have applied it to the field of access control to replace the centralized authorization entity.
  • Smart Contracts: A smart contract is an agreement that can be self-executed without involving a third party. Most smart contracts use a Turing-complete language that can implement complex logic and applications. The smart contract expression capability can be fully utilized by describing various access control models, and by storing and managing an Access Control List (ACL). These contract systems either aim to provide sufficient access control capability or focus on specific scenarios. Since little consideration is given to storage footprint, many proposed schemes result in rapid growth in blockchain volume.


  • The authors design a smart-contract architecture based on the ABAC model that can effectively minimize storage requirements on the blockchain and restrict rapid growth. Below is an overview of an Attribute-Based Access Control (ABAC) model:

(Attribute-Based Access Control (ABAC) example. Adapted from V.C. Hu et al., Guide to Attribute-Based Access Control (ABAC) Definition and Considerations, NIST Special Publication 800-162, Nat’l Institute of Standards and Technology, Jan. 2014.)

  • The authors incorporate a design for a reputation assessment mechanism that helps to prevent malicious behavior during the access control process and favors well-behaved nodes.
  • They use a modified prototype of the Quorum blockchain to validate the proposed scheme and assess its performance.
  • Using the results, they conduct a case study of a simple supply chain that moves bananas on pallets by truck from a farm to a supermarket.
  • The paper considers a three-layer system architecture:

  • This paper presents two categories of functions. The first category is basic access control functions such as attribute management, policy management, or access request processing. These are accommodated by Action Control Contracts (ACCs) and a Management Contract (MC). The second category is malicious behavior detection, which is supported by the Reputation Contract (RC).
  • The aforementioned smart contracts are detailed below in the Method section.


Access Control Contract (ACC)

  • An ACC is created and deployed for each device in the system. The ACC manages environmental attributes, resources, and policies. Processes access requests related to the device and make decisions about accepting or rejecting them.
  • An account is auto-created and receives ether (ETH) from a gateway when a new device is connected. Afterward, the gateway creates an ACC for the device and deploys it on the blockchain using the device’s account. The contract addresses of MC and RC are passed along using a constructor when the ACC is deployed.
  • Functions are provided for adding new policy items and updating or deleting existing policies. The device manager alone may delete the ACC.
  • Top-layer miners do not involve specific access operations; this mitigates their influence on the timestamp to reduce security risks.

Management Contract (MC)

  • The MC deploys upon blockchain creation.
  • After deployment, the ACC must be registered in MC.
  • The MC is responsible for managing information from the RC and device attributes (as a requestor).
  • When a device joins the blockchain network, the MC deploys the ACC associated with it and registers its attributes.
  • The management of RC includes three operations: Register, Get, and Update.
  • The management of device attributes includes four basic operations: Register, Delete, Get, and Update.
  • Deletion of the RC is not allowed.

Reputation Contract (RC)

  • Following MC deployment, the RC is created, deployed, and registered in the MC.
  • The RC uses “behavioral information” submitted by the ACC to calculate reputation level, rewarding or penalizing the devices accordingly.

Reputation Algorithm

  • Reputations are calculated based on all current and previous behaviors.
  • Credit of device i: C_i = \lambda_1 C_i^P - \lambda_2 C_i^N
    • C_i^P: Positive part due to normal behaviors
    • C_i^N: Negative part due to malicious behaviors
    • \lambda_1 & \lambda_2: Weights

Penalty Function

  • C_i^N = \sum_{k=0}^{m_i-1} \frac{\alpha_k}{m_i-k}
  • m_i: This refers to the number of malicious behaviors to be considered for device i.
  • k: This refers to the chronological index of malicious behavior in the past (begins at k=0).
  • \alpha_k: This is the penalty coefficient of malicious behavior k that represents severity with range 1 to 10.
  • \frac{1}{mi−k}: This functions as the weighing factor; it is variant depending on when malicious behavior appears. The impact of malicious behavior decreases gradually over time but never disappears.
  • There are three types of malicious behavior: high-frequency request (behavior ID = 1), policy check failed (behavior ID = 2), and importance check failed (behavior ID = 3).
  • Behavior cannot simultaneously belong to more than one type of malicious behavior. If there is ambiguity in categorization, then label with higher priority ID.

Reward function

  • C_i^P = min(C_{i,max}^P, \sum_{k=k_1}^{l_i}\omega_k)
  • C_{i,max}^P: This is the predefined upper limit on C_i^P and prevents unlimited reward accumulation.
  • l_i: This is the number of normal behaviors considered for device i.
  • k: This is the chronological index of past normal behaviors (k_1 is the index of the first normal behavior after the last penalty).
  • Ω_k: This is the weight of normal behavior k. There is only one type of normal behavior currently with behavior ID = 0, but the list may be expanded with more normal types.
  • Every behavior submitted automatically updates the behavior list. The penalty and reward values are recalculated to determine new credit values when updated.
  • Upon C_i^P recalculation, normal behaviors before the index k_1 are not counted again.
  • Malicious behavior records are never emptied; every penalty calculation counts all previous malicious behaviors.
  • Penalties made by the system have the effect of blocking device access requests.
  • The penalty attribute used in the MC and ACCs is the block number of the last forbid block (TLFB). This is calculated by adding forbid to the block number of the block containing the access transaction.

Other Issues

  • A device’s credit should not be related to activity level.
  • A device may not initiate a single request over a short period, but may not correspond to malicious behavior; thus, device credit value should be left unaffected.
  • A library that provides Quad-precision floating-point operations is used to correct an issue with Solidity, which does not support floating-point in performing definitions and calculations.
  • Access is requested before the last forbid block is reverted directly.

Behavior list

  • There are four parts to the behavior list: LegalBehavior, which is the normal behavior list, Misbehaviors, which is the malicious behavior list, Begin, which is the beginning index of LegalBehaviors, and TLFB, which is the last forbid block.
  • LegalBehaviors and Misbehaviors are the two most important parts. They have the same structure consisting of three parts: Behavior ID, Block number (corresponds to the moment when behavior appears), and Current weight value.
  • The behavior list can be found using the subject address (as key).
  • A reputation calculation algorithm was provided in the paper; it is designed to prevent interference made by outside users and can only be called by the ACC. There is no self-destruct operation.


The Blockchain-Based Reputed Access Control (BBRAC) system shows the potential for suppressing the growth of blockchain storage in its reputation mechanisms.

Gas Consumption

  • Accurately reflects the cost of each operation.
  • In the BBRAC scheme, subject attribute management is managed by the MC, while in Wang’s scheme, it is managed by the SC.
  • In the BBRAC scheme, resource attribute management, policy management, and access decisions are all managed by just one ACC.
  • In Wang’s scheme, resource attribute management, policy management, and access decisions are managed by object contract, policy contract, and ACC, respectively.
  • Fig. 5 shows the results based on transaction cost.

Access Time

  • Access time is a key performance metric, especially for applications with high real-time requirements. Access time depends on many factors, e.g. hardware, network, consensus choice, and communication factor, and inter-calling between contracts
  • Table IV shows the average access time of over 500 requests both with and without reputation subsystems, presenting a comparison with Wang’s scheme.

Storage Pressure

  • With blockchain applied in IoT, large devices correspond to large contracts; this results in storage pressure on the blockchain.
  • Storage pressure may be reduced by reducing contract size (selecting access model, design of contract architecture, function implementation, etc.).
  • Comparison (n: number of devices)
    • In Zhang’s scheme, an ACC is deployed by an object device that wants to control access requests initiated by a subject device. Subject-object pairs can agree on multiple access control methods; each method is implemented by one ACC. There are n object/subject devices and n(n-1) subject-object pairs generated (need to deploy n(n-1) \approx n^2 contracts).
    • In Wang’s scheme, each policy contract is created by a user, in which one policy contract corresponds to one user. Each device belongs to a single user, and with n users, n contracts need to be deployed.
  • Fig. 6: Blockchain volume versus number of devices (unit: KB)

  • Both BBRAC and Wang’s scheme use the ABAC model, outperforming Zhang’s scheme in storage consumption. As the number of devices increases, storage occupancy of BBRAC increases faster than in Wang’s scheme. This is primarily caused by a reputation subsystem. However, it is a valuable tradeoff.

Reputation Subsystem

  • The reputation subsystem has four mechanisms: reward, penalty, tolerance, and alarm. If a threshold is defined in advance, an alarm can be triggered by a Solidity event.
  • Fig. 7 shows the Impact of reward, penalty, and tolerance mechanisms. The bars correspond to a cumulative count of malicious behaviors.

  • Legitimate access accumulates reputation, while malicious behaviors decrease credit value.
  • We may make the following observations.
    • Frequent malicious behavior corresponds to a decrease in credit value.
    • Repeatedly malicious acts correspond to an exponential growth in the number of forbid blocks; the time in which a device is forbidden continues growing (log of historical malicious behaviors).
    • Malicious behavior that occurs may be tolerated if a device has accumulated high credit value.
    • This assumes accidental harmful behavior is normally caused by operational error.
    • Legitimate access accumulation may increase credit value but stays constant after reaching an upper limit.
  • In conclusion, rewards and penalties can have a positive effect under two different situations.
    • In situation 1, there are more requests to collect within a given duration (in block #) than the blockchain can manage. The Penalty mechanism may reduce the number of transactions generated by nodes with malicious behavior, resulting in more chances for well-behaved nodes.
    • In situation 2, the blockchain can collect all requests generated within a given duration. This reduces transactions due to the penalty mechanism’s assistance in lowering the blockchain’s growth rate.
  • In an experiment, the authors test the number of transactions (room) that can be saved for well-behaved nodes. The node sends access requests at fixed time intervals until there is an increase of 500 blocks. The initial credit value is set to 0, and the first 50 requests exhibit malicious behaviors that fail to pass important policy checks.
  • Without using the reputation algorithm, the number of requests sent over 500 blocks is 169. All of these requests are collected successfully, regardless of their behavior types. While using the reputation algorithm, 168 requests were sent over the same period of 500 blocks; 130 were successfully collected (i.e. 38 were blocked). This shows an increase of 22.6%, and this rate increases further as malicious behavior increases.

Discussion & Key Takeaways

  • This work provides a solution for improving access control in IoT systems and proposes an improved smart contract-based framework.
  • The ABAC model implementation uses smart contracts and reduces the number of ACCs to minimize storage requirements.
  • As shown in the experiments above, the execution times of functions such as attribute management are reduced and the growth rate of the blockchain’s volume is restricted.
  • The reputation subsystem increases access security at the contract level and improves the probability of a successful collection of transactions from well-behaved nodes by curtailing malicious nodes’ access requirements.
  • In the context of subject attribute management, this work dramatically reduces gas consumption. When compared to an ADAC, the amount of gas required for a transaction is reduced by 1,470,000 gas.


  • Storing data on the blockchain is expensive. One solution is to only store crucial data (e.g. attributes, policies) on-chain while storing the remaining data off-chain. Some researchers use cloud storage or distributed storage platforms such as IPFS and Swarm for off-chain storage. This may be implemented in the proposed system.
  • Compared with traditional models, models based on smart contracts are still very new. Some examples include an automatic update of attributes, automatic discovery of attribute permission relationships, and improvement of smart contract implementation.

This post was co-authored with @Cindy. For most of the technical questions in the comments, you can ask us!


How secure / decentralized are distributed storage platforms like IPFS and Arweave? Do you mind describing them a little in layman’s terms?

It seems like this research explored some interesting ideas regarding storage on chain.

I am also going to add to @jmcgirk’s question on security by also questioning how readily could a system like this be implemented in the next few months or so? Basically, is this solution ready for implementation or are there some concerns we should be examining and researching further?

1 Like

The original paper notes that in this model “the blockchain network is overlaid on top of the IoT network, where the IoT devices are not part of the blockchain, and this is rational because the IoT network is typically resource-constrained.”

But increasingly, the processing of IoT data has become decentralized; the data are “edge-processed” by networked sensors that have evolved to have computational abilities. This makes sense because IoT data quickly became so massive that transporting it to a centralized location (i.e., the cloud) for processing was no longer practical.

How does the security model in your paper, where “the IoT devices are not part of the blockchain” (because resource-constrained), relate to this recent development where computational resources are quickly moving to the edge of the network?


It is reported that by 2025, it is estimated that cyber crimes will cost the world $10.5 trillion each year. Cyberattacks are rising, thus everyone should be worried about cybersecurity. People tend to question, “How secure is it?”, “Can I trust it?” with every new IT innovation.

Blockchain is a new technology built to support various applications and permits the exchange of assets electronically, preserving the facts and details of a transaction without the capacity to alter such records in the future – you can only add new records.

Blockchain’s popularity has grown as people find its possibilities beyond cryptocurrencies. Blockchain’s rising popularity raises questions about its safety and trustworthiness.

In this post, we delve into some of the concerns of users and expose them to some underlining blockchain technology to resuscitate confidence in users about Access Control.

Blockchain Security

Blockchain security is a risk management solution for blockchain networks that incorporates assurance services, cybersecurity frameworks, and best practices to reduce fraud and cyber-attacks.

Consensus, cryptography, and decentralization confer inherent security on blockchain data structures. Each new piece of knowledge is inextricably linked to the previous ones.

All transactions in a block are validated and approved by a consensus process (authorized users) to guarantee their legitimacy. This typically ensures that the history of transactions cannot be altered.

Blockchain Security Challenges

The blockchain system has certain flaws. Cybercriminals have access to a variety of exploits that allow them to wreak serious harm by exploiting blockchain’s weaknesses. Some of which include the following:

Router assaults: Blockchains need real-time data transmission. Hackers can intercept ISPs’ data (Internet Service Providers). Unfortunately, blockchain users don’t notice.

Phishing: This hacking technique works with blockchain. Cybercriminals send wallet owners fake but convincing emails asking for their credentials.

Sybil strikes: Sybil attacks flood the target network with bogus identities, crashing it.

51% attack: Large public blockchains take significant computer resources to mine. If unethical miners can obtain more than 50% of a blockchain network’s mining power, they can dominate a ledger. 51% of assaults can’t affect private blockchains.

Relating it with Access Control

In the domain of computer security, access control systems are used to restrict users’ levels of access to sensitive information or valuable resources. Access control rules are often used to indicate subjects’ rights to such resources.

Authentication and authorization are required before implementing access control. Authentication verifies a user’s identity to prevent impersonation.

Even after authentication, a user may try to perform restricted actions. Authentication is required, but not enough. The authorization step assures that a user can only do authorized actions.

Policy-based, token-based, or cryptography-based are possible types. Combinations of these categories include policy-based and cryptography-based approaches and cryptography-based and token-based ones.

When an access request is made, these rules are examined with the context in which the request is made. Access controls in information systems may be implemented in a variety of ways.

More endpoints and devices such as IoTs are exposed to sensitive information as businesses develop. Access control systems use various models to enhance the security of system access to safeguard the enterprise.

The inherent security of blockchain technology makes it a viable choice for resolving the challenge of granting access control. This may be achieved by limiting access to certain regions to a select group of users.


It’s important to remember that using blockchain technology to control access in an IoT environment is a huge step forward for the technology. This is also in tandem with the result from the post on the improvement in throughput and efficiency. Although, more need to be done in the area of harmonizing policy/model for enterprise to adopt when integrating blockchain with IoT.


Good points @Jmax. How about blockchain oracles?They provide some kind of data too for blockchain systems. Are the data not in real time? Can you relate it to this to help one understand this idea better?

1 Like

Thanks @Ulysses, yes for blockchain to interact with external data sources it requires an interface of integration referred to as oracles. Oracles transmit outside data to a blockchain. The blockchain may then automatically finalize transactions. The transactions should be in real-time but the oracle function as the middleware for transmission interchange. These are generally referred to as off-chain data. Oracles are needed to connect IoT devices to blockchain environments so that businesses can use smart contracts and their many benefits. The point is that this integration is seamless and the users may not understand the underlining technology aggregation.

1 Like

@Jmax, I think that Oracles can be of various types:

  1. Outbound Oracles
  2. Inbound Oracles.
  3. Et cetera

The outbound Oracles transmit data out of blockchain systems. So in this case, I will assume we’re talking about outbound Oracles. So I think that in addition to feeding blockchains data, Oracles can allow data be transmitted through them out of blockchain systems.

However, your focus here is real time transmission which I’m trying to reconcile if these outbound oracles do not transmit in real time? Hope I’m not missing the point.

The point here is the data transmission media used to transmit data via various channels (e.g ISPs). What this implies is the data streams through the transmission media whether guided or unguided. The concern is that hackers can intercept these data and try to harvest them. Recall that encryption of data in transit will also reduce the level of exposure as well as on-chain data uses of cryptographic hashes

1 Like