# PetroBlock: A Blockchain-Based Payment Mechanism for Fueling Smart Vehicles
## 2 Related Work  
This section encompasses preliminary studies related to the secure payment mechanism and refueling of the smart vehicle by harnessing smart contract and blockchain technologies. Many studies have been presented to interact blockchain with machines [14; 15; 16; 17; 18; 19; 20; 21; 22; 23]. In [24], authors proposed an automated scheme to charge the electric vehicle by taking dynamic tariff decisions in a privacy-preserved manner by exploiting distance and price information. The presented system is based on a blockchain platform where electric vehicles send a signal with a charging station's demand, similar to an auction bid. The owner of the electric vehicle opts for a specific charging station using the received supply-side offers. The proposed system is comprised of three parts: (i) the provided system finds the optimal charging station based on public bidding as a query response; (ii) the geographical position of the person is not revealed during protocol execution; (iii) the Distributed Ledger Technology (DLT) of blockchain for immutable storing of data related to the bidding of an electric vehicle. The authors in [25] developed a model for an automatic fueling system for automobiles. The presented model comprises a fuel dispenser, which is movable, including a nozzle connected with the vehicle's fuel inlet. The automatic fuel dispenses movement through a programmable unit helps it attach nozzle with a fuel inlet. The sensor implant in a car indicates the fuel dispenser's direction to the fuel inlet through signals. Smart contract to enable communication among machines is introduced in [3; 26]. The authors presented the AGasP, an IoT application for machine-to-machine gasoline payment by using a smart contract. The proposed system uses a smart contract for the payment transaction. The developed method is based on Ethereum, and allows the user to audit all interactions between the design and the blockchain platform as long as the network of blockchain exists. The third parties that are part of the payment systems are removed via AGasP, and transaction charges are waived off up to 79% in comparison to the conventional method. In [27], authors introduced a blockchain-based autonomous system that selects the most suitable charging stations for electric vehicle. The design system provides automated secure machine-to-machine payment, auction, and bidding. The system is developed on a Raspberry Pi and raspbian operating system. The proposed method is divided into three actors: a charging station, a vehicle, and a driver. The driver's responsibility is to launch the selection procedure and confirm the bid suggested by the car. The car has two entities, the infotainment system provided by the electric vehicle and the blockchain-based smart contract [27]. A mobile application based on Ethereum was developed to provide the appropriate charging bid with automated payment. In [28], authors presented the case study of an automatic payment mechanism based on the smart contract. When entering his/her car, the user's smartphone automatically synchronizes with the AutoPay service. The autonomous payment service provides trust and security through smart contracts implemented as an adapter on its blockchain interface. The AutoPay service detects current fuel status and finds the route passed by a petrol station if fuel status is low. AutoPay automatically pays the fuel bill after refueling through smart contract features. AutoPay also pays for user's car parking automatically through a smart contract when he/she goes to work. In [29], ChargeltUp case study is presented to analyze the refueling scenario for an autonomous vehicle. The proposed system is an Ethereum-based system that sends transactions through smart contracts, mainly machine-to-machine (M2M). The proposed electric car charging company architecture consists of three parts: the client (the car user), the server (the charging station), and the blockchain smart contract. Firstly, the user went to the charging station to charge his car.