Skip to content

DanielGuarnizo/Block-Chain-Simulation-Bitcoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Block-Chain-Simulation

Abstract

The Bitcoin simulation model presented in this report aims to replicate the fundamental aspects of a decentralized digital currency system. The model incorporates key elements, including agents, miners, transactions, and blockchains. While this simulation is a simplification of the complex real-world Bitcoin system, it serves as a valuable tool for understanding basic concepts and dynamics.

Introduction

The Bitcoin simulation model is designed to provide insights into the operation of a decentralized cryptocurrency system. It offers a simplified representation of the interactions between agents, who perform transactions, and miners, who validate transactions by mining blocks. The report discusses the model's structure, key components, and the insights it can offer into Bitcoin-like systems.

Model Description

The Bitcoin simulation model consists of the following key components: $ ./tree-md .

Agents

  • Agents represent participants in the Bitcoin network.
  • They have balances and can initiate transactions with other agents.
  • Balances are initially set, and agents randomly select other agents for transactions.
  • Transactions are executed with limited amounts, and the balance is updated accordingly. $ ./tree-md .

Miners

  • Miners are responsible for validating transactions and creating new blocks.
  • They select the longest blockchain to mine on, validate transactions, and receive mining rewards.
  • Miners also participate in transactions, acting as both validators and recipients. $ ./tree-md .

Transactions

  • Transactions represent the transfer of bitcoins from one agent to another.
  • They include sender and receiver information along with the transaction amount.
  • Transactions are added to the blockchain for validation. $ ./tree-md .

Blockchain

  • Blockchains store transactions in a chain of blocks.
  • Each block contains a set of transactions.
  • Miners compete to add new blocks to the blockchain.
  • The longest blockchain is considered the valid chain. $ ./tree-md .

System Description

The Bitcoin simulation model emulates a simplified version of the Bitcoin system:

  • Agents initiate transactions by selecting random peers.
  • Miners validate transactions, create new blocks, and receive rewards.
  • Blockchains grow as new blocks are added.
  • Balances of agents and miners change with each transaction and reward. The system operates continuously, demonstrating the dynamic nature of Bitcoin-like systems.

Simulation Examples

Watch the video

Balances Over Time

  • As transactions occur, agent and miner balances fluctuate.
  • Balances gradually increase due to mining rewards. $ ./tree-md .

Emergence of Blockchains

  • Multiple blockchains may emerge, but the longest chain prevails.
  • The competition among miners to extend the longest chain is observed. $ ./tree-md .

Transaction Frequency

  • The simulation showcases the frequent occurrence of transactions.
  • Agents exchange bitcoins at a rapid pace. $ ./tree-md .

Mining Rewards

  • Miners receive rewards for adding blocks.
  • The impact of mining rewards on miner balances is evident. $ ./tree-md .

Discussion

The Bitcoin simulation model provides valuable insights into the behavior of a decentralized digital currency system. Notable observations include:

  • The role of miners in validating transactions and securing the network.
  • The impact of mining rewards on miner participation and incentives.
  • The importance of the longest blockchain in determining the valid transaction history.
  • The frequent exchange of bitcoins among agents, reflecting the dynamism of the system. However, it is important to acknowledge the simplifying assumptions made in the model. Real-world Bitcoin systems are far more complex and include factors such as network delays, variable mining rewards, and sophisticated transaction validation rules.

Conclusion

In conclusion, the Bitcoin simulation model offers a simplified yet insightful representation of the essential dynamics in decentralized digital currency systems. It provides a foundation for exploring key concepts and understanding the interactions between agents, miners, and blockchains. While this model is a valuable educational tool, it is essential to

recognize its limitations and the need for further research to capture the full complexity of real-world cryptocurrency systems.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages