## 3 System Design
### Distributed Ledger for Positioning  
The localization framework we propose can provide strong reliability as distributed ledger technology is applied. Since all decisions made in the distributed ledger are made through consensus among network participants, actions that violate consensus are not possible. In addition, if a malicious node arbitrarily modifies the data or attempts to hack the system, this is almost impossible because the hashes of all blocks connected to a chain in the ledger must be modified. This allows us to keep the system safe from external threats. In addition, in a positioning system that operates in a conventional centralized manner, the main authority is usually concentrated on the main server, so if this main server goes down, there is a risk that the entire system will be paralyzed. However, our proposed decentralized localization framework solves the side effects of conventional centralized methods by decentralizing between nodes that smartly distribute trust. Moreover, this system of components with equal rights provides strong sustainability. If a single node is incapacitated by an external attack or a system error, the centralized system risks performance degradation or, in serious cases, the paralysis of the entire system. However, our proposed system has an environment that can solve problems arising from the temporary absence of a single node through dynamic allocation. For example, when an arbitrary anchor becomes incapacitated, a tag with the lowest priority from a mission perspective takes over the role of that anchor to prevent performance degradation. On the other hand, these features may also have an advantage in terms of adaptively applying to heterogeneous environments. In an environment where various topologies are formed and roles are dynamically assigned depending on the mission or environment, it is possible to respond to system development or modification without large costs. It makes sure that the applied distributed ledger does not have a negative impact on previous positioning performance, so we designed a new consensus algorithm to reduce the task load in terms of latency. In the nature of the DAG structure, where each node maintains a global state rather than maintaining a global state across the network, the number of pending transactions may increase. To improve this, we devised a new method that defines verification nodes and reaches consensus based on scores awarded through mutual approval between these nodes (in the existing method, the created transaction verifies the pending transaction). First, we assumed some facts as follows:  
1. All nodes participating in the network are connected to each other. 2. The tag is connected to at least one of the anchors or servers. 3. Anchors and servers are functionally separate expressions according to their positioning roles, but are the same logical node in a distributed network. The proposed consensus algorithm operates by two components called the _miner_ and _prover_. A _miner_ verifies transactions created in real-time and updates the verified transactions in the DAG. Afterwards, the updated information is broadcast to all _miners_ existing in the network. _Provers_ approve and confirm transactions created by _miners_ according to defined global state consensus. Global state consensus refers to the process of increasing the cumulative score, which is a newly defined parameter at a vertex of the DAG that represents a single transaction, as a _prover_ approves a single transaction. If the score exceeds the specified threshold, the global state of the transaction is updated to confirmation. The cumulative score can be expressed as:  
\[CS=2\big{(}2n-n_{total}\big{)}/n_{total} \tag{5}\]  
where \(n\) is the number of approved _provers_ and \(n_{total}\) is the total number of provers. _provers_ are all or some of the _miners_ selected, approve pending transactions in the DAG, and broadcast the fact that the transaction has been approved to all _miners_ participating in the network.