# Blockchain-Based Federated Learning: A Survey and New Perspectives
## 4 Blockchain-Based Federated Learning: State-of-the-Art
### Model Classification for Blockchain-Based Federated Learning
#### 4.1.1 Smart Contract  
The smart contract technology of blockchain solves the trust problem between the participants of federated learning, the incentive management and allocation problem, the defense problem, and the data review problem. Through smart contracts, blockchains are able to manage interactions between participants without intermediaries or trusted third parties. In addition, smart contracts are decentralized, expanding the use of the underlying blockchain network [74]. In the distributed framework of BFL, the role of the central server is taken over by a smart contract to coordinate the workflow among all participating nodes. For example, it can publish modeling tasks and model training aggregation commands and validate updates sent by nodes. The node data are priced according to their contributions, and workers are rewarded or punished according to the content of contracts. It can also provide standards on where models come from and be transparent about the model training process.  
Using smart contracts to manage federated learning training has many benefits. First, a copy of the global model and the associated computational state is maintained on the smart contract. Model selection and aggregation are performed in a completely decentralized manner, with user nodes making their own choices to build trust between nodes. In addition, smart contracts develop relevant protocols that, in addition to providing basic definitions of reward allocation, can also enhance trust among participants [66] and motivate participants in FL to contribute more data sets [29]. Furthermore, user nodes can use the global model copy to perform model aggregation steps in each round and update the global model independently, which can promote the development of global computing while defending against attacks from malicious participants [20]. Finally, smart contracts are backed by an underlying consensus protocol, helping to ensure transparency and a fair FL process [68].  
[PERSON] et al. [63] introduced the concept of competition into BFL, using the non-default nature of smart contracts to prevent workers from deviating from the agreement and to distribute rewards reasonably. [PERSON] et al. [67] proposed a secure FL framework based on blockchain to prevent malicious participants from entering FL by creating smart contracts, so as to give full play to the non-tampering and non-breach properties of smart contracts.  
The BlockFLA framework [75] uses smart contracts to automatically detect and punish attackers through fines, and retains the communication efficiency characteristics of FL. In addition, the framework can be inserted into any aggregation function and any attacker detection algorithm and provides experimental results that show that it can successfully punish attackers by using our new attacker detection algorithm.  
In Flchain [76], global model updates were calculated, validated, validated, and stored by a blockchain network rather than a single central server. FLChain replaces the traditional FL parameter server, and its calculation results must be agreed on the chain. The participants realize the commercialization of the cooperative training model by providing a healthy market for the cooperative training model. The honest trainers obtain a fair share of the profits from the training model according to their own contributions, and the malicious trainers can be found in time and severely punished.  
SABlockFL [77] is a blockchain-FL framework based on intelligent agent systems where intelligent agents act as both peers in the blockchain network and participants in FL tasks to achieve the effectiveness of data exchange between FL-trained models.