SlideShare a Scribd company logo
1 of 14
Download to read offline
How do transactions work?
Pavel Kravchenko
Lecture 3
Plan
Terms
What is transaction
What is included there
Change and fee
Creation of the transaction
How can you spend the result
Terms
tx – transaction
txid – id of a transaction. Is used to search a transaction in
blockchain
Script – the name of the script language that describes
how a client should validate transactions
UTXO - Unspent Transaction Output – transactions output
Wallet – key pair
Address – public key
Transaction format
Transaction – a signed piece of data that authorizes
the sending of funds from one account to another
Service information – identifies the transaction and
allows implementing it correctly
Input – information about where the sender got
money from and proof that sender owns this money
Output – information about where money is flowing to
Transaction always spends money from
previous transaction
identifier of transaction
amount of inputs and
outputs
hash of transaction
that is spent here
signature of the sender
and their public key
amount of money that
is transferred
address where money
goes
Most important fields
Input
Account has no “balance”
There is a list of not spent transactions (cheques)
Input indicates which previous transaction
should be spent
Input contains also a signature of the sender
Transaction that contains 2 inputs and 2 outputs
Change and fee
All the money from previous transaction (you can find
this amount if you look up previous transaction) is
spent in the current one
Difference between money that input has and output
spends is considered a fee and is taken by miners
If you don’t want to pay high fee :) you have to create
output that returns change for you (thats why
transactions with many outputs are needed)
Change money is sent to address that you control
How transaction with change is formed
Combining your unspent transactions
If none of the unspent transactions that you have
(UTXO) contains enough money to pay - you have to
combine a few
Here transactions with a few inputs are needed
Money are summed up (and fee paid to miners is
calculated in the same way - difference between
total input and total output)
Your wallet (a piece of software) contains key pairs -
that is money that you control
How transactions spend money
notice that each
transaction pays 10k
satoshi as a fee
Summary
Every balance which is received or sent should be tied to the
address
Every address may be associated with the wallet. All the rest –
non-spendable, the coins that are sent to them – are lost
The balance that can be spent was always received from the wallet
The coins received to the address are not mixed – they are used
separately (or in a combination) in the moment when they are
spent
If the sum of all inputs is more, than the sum of outputs, the
change is considered to be a commission
Questions?
kravchenkopo@gmail.com
ideateam_macuser
ua.linkedin.com/in/pkravchenko/

More Related Content

What's hot

What's hot (20)

Basic introduction in blockchain, smart contracts, permissioned ledgers
Basic introduction in blockchain, smart contracts, permissioned ledgersBasic introduction in blockchain, smart contracts, permissioned ledgers
Basic introduction in blockchain, smart contracts, permissioned ledgers
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
 
All about Bitcoins!
All about Bitcoins!All about Bitcoins!
All about Bitcoins!
 
Bitcoin presentation slides
Bitcoin presentation slidesBitcoin presentation slides
Bitcoin presentation slides
 
Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum) Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum)
 
Smart Contract & Ethereum
Smart Contract & EthereumSmart Contract & Ethereum
Smart Contract & Ethereum
 
Blockchain and Cryptocurrencies
Blockchain and CryptocurrenciesBlockchain and Cryptocurrencies
Blockchain and Cryptocurrencies
 
Cryptocurrency
CryptocurrencyCryptocurrency
Cryptocurrency
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
An Introduction to Blockchain Technology
An Introduction to Blockchain Technology An Introduction to Blockchain Technology
An Introduction to Blockchain Technology
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
 
Cryptocurrency
Cryptocurrency  Cryptocurrency
Cryptocurrency
 
Cryptocurrency
CryptocurrencyCryptocurrency
Cryptocurrency
 
Cryptocurrency
CryptocurrencyCryptocurrency
Cryptocurrency
 
Ethereum
EthereumEthereum
Ethereum
 
Ethereum
EthereumEthereum
Ethereum
 

Similar to How do bitcoin transactions work?

Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docxBitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
jasoninnes20
 
trestor-whitepaper-voting
trestor-whitepaper-votingtrestor-whitepaper-voting
trestor-whitepaper-voting
Kunal Dixit
 
Payment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & BeyondPayment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & Beyond
Alexander Kiriakou
 

Similar to How do bitcoin transactions work? (20)

Primer to smart contracts, smart property, trustless asset management
Primer to smart contracts, smart property, trustless asset managementPrimer to smart contracts, smart property, trustless asset management
Primer to smart contracts, smart property, trustless asset management
 
Hands on Ethereum - Getting Started
Hands on Ethereum - Getting StartedHands on Ethereum - Getting Started
Hands on Ethereum - Getting Started
 
Crypto101.pptx
Crypto101.pptxCrypto101.pptx
Crypto101.pptx
 
A simplified Bitcoin Implementation in GO
A simplified Bitcoin Implementation in GOA simplified Bitcoin Implementation in GO
A simplified Bitcoin Implementation in GO
 
bitcoin.pdf
bitcoin.pdfbitcoin.pdf
bitcoin.pdf
 
Satoshinakamotobitcoin
Satoshinakamotobitcoin Satoshinakamotobitcoin
Satoshinakamotobitcoin
 
bitcoin.pdf
bitcoin.pdfbitcoin.pdf
bitcoin.pdf
 
Introduction for Bitcoin. Original Pater
Introduction for Bitcoin. Original PaterIntroduction for Bitcoin. Original Pater
Introduction for Bitcoin. Original Pater
 
Bitcoin White Paper
Bitcoin White PaperBitcoin White Paper
Bitcoin White Paper
 
Bitcoin whitepaper
Bitcoin whitepaperBitcoin whitepaper
Bitcoin whitepaper
 
bitcoin.pdf
bitcoin.pdfbitcoin.pdf
bitcoin.pdf
 
Bitcoin Whitepaper
Bitcoin WhitepaperBitcoin Whitepaper
Bitcoin Whitepaper
 
Whitepaper Bitcoin: A Peer-to-Peer Electronic Cash System
Whitepaper Bitcoin: A Peer-to-Peer Electronic Cash SystemWhitepaper Bitcoin: A Peer-to-Peer Electronic Cash System
Whitepaper Bitcoin: A Peer-to-Peer Electronic Cash System
 
Fraud Detection in Real-time @ Apache Big Data con
Fraud Detection in Real-time @ Apache Big Data conFraud Detection in Real-time @ Apache Big Data con
Fraud Detection in Real-time @ Apache Big Data con
 
Fraud Detection in Real-time @ Apache Big Data Con
Fraud Detection in Real-time @ Apache Big Data ConFraud Detection in Real-time @ Apache Big Data Con
Fraud Detection in Real-time @ Apache Big Data Con
 
Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docxBitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
 
Behind the scenes of bitcoin protocol
Behind the scenes of bitcoin protocolBehind the scenes of bitcoin protocol
Behind the scenes of bitcoin protocol
 
Customer experience enhancement strategy in financial services sector
Customer experience enhancement strategy in financial services sectorCustomer experience enhancement strategy in financial services sector
Customer experience enhancement strategy in financial services sector
 
trestor-whitepaper-voting
trestor-whitepaper-votingtrestor-whitepaper-voting
trestor-whitepaper-voting
 
Payment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & BeyondPayment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & Beyond
 

More from Pavel Kravchenko, PhD

More from Pavel Kravchenko, PhD (18)

Cryptocurrency industry trends 2015
Cryptocurrency industry trends 2015Cryptocurrency industry trends 2015
Cryptocurrency industry trends 2015
 
Tokenization v2
Tokenization v2Tokenization v2
Tokenization v2
 
Tokenization
TokenizationTokenization
Tokenization
 
Blockchain for business
Blockchain for businessBlockchain for business
Blockchain for business
 
INFRA v2
INFRA v2INFRA v2
INFRA v2
 
Infra
InfraInfra
Infra
 
How does Bitcoin work?
How does Bitcoin work?How does Bitcoin work?
How does Bitcoin work?
 
What is Bitcoin?
What is Bitcoin?What is Bitcoin?
What is Bitcoin?
 
anonymity_KYC_short
anonymity_KYC_shortanonymity_KYC_short
anonymity_KYC_short
 
Введение в смарт контракты. Лекция 8
Введение в смарт контракты. Лекция 8Введение в смарт контракты. Лекция 8
Введение в смарт контракты. Лекция 8
 
Анонимность в Биткоин. Часть 1. Лекция 9
Анонимность в Биткоин. Часть 1. Лекция 9Анонимность в Биткоин. Часть 1. Лекция 9
Анонимность в Биткоин. Часть 1. Лекция 9
 
Как работает Multisignature. Лекция 7
Как работает Multisignature. Лекция 7Как работает Multisignature. Лекция 7
Как работает Multisignature. Лекция 7
 
Ledger-based системы. Альтернатива Bitcoin?
Ledger-based системы. Альтернатива Bitcoin?Ledger-based системы. Альтернатива Bitcoin?
Ledger-based системы. Альтернатива Bitcoin?
 
Как работает майнинг. Лекция 5
Как работает майнинг. Лекция 5Как работает майнинг. Лекция 5
Как работает майнинг. Лекция 5
 
Как устроен Blockchain. Лекция 4
Как устроен Blockchain. Лекция 4Как устроен Blockchain. Лекция 4
Как устроен Blockchain. Лекция 4
 
Как работают транзакции. Лекция 3
Как работают транзакции. Лекция 3Как работают транзакции. Лекция 3
Как работают транзакции. Лекция 3
 
Как устроена криптовалюта. Лекция 2
Как устроена криптовалюта. Лекция 2Как устроена криптовалюта. Лекция 2
Как устроена криптовалюта. Лекция 2
 
Вступление в Биткоин. Лекция 1.
Вступление в Биткоин. Лекция 1.Вступление в Биткоин. Лекция 1.
Вступление в Биткоин. Лекция 1.
 

Recently uploaded

Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ellan12
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 

Recently uploaded (20)

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 

How do bitcoin transactions work?

  • 1. How do transactions work? Pavel Kravchenko Lecture 3
  • 2. Plan Terms What is transaction What is included there Change and fee Creation of the transaction How can you spend the result
  • 3. Terms tx – transaction txid – id of a transaction. Is used to search a transaction in blockchain Script – the name of the script language that describes how a client should validate transactions UTXO - Unspent Transaction Output – transactions output Wallet – key pair Address – public key
  • 4. Transaction format Transaction – a signed piece of data that authorizes the sending of funds from one account to another Service information – identifies the transaction and allows implementing it correctly Input – information about where the sender got money from and proof that sender owns this money Output – information about where money is flowing to
  • 5. Transaction always spends money from previous transaction
  • 6. identifier of transaction amount of inputs and outputs hash of transaction that is spent here signature of the sender and their public key amount of money that is transferred address where money goes Most important fields
  • 7. Input Account has no “balance” There is a list of not spent transactions (cheques) Input indicates which previous transaction should be spent Input contains also a signature of the sender
  • 8. Transaction that contains 2 inputs and 2 outputs
  • 9. Change and fee All the money from previous transaction (you can find this amount if you look up previous transaction) is spent in the current one Difference between money that input has and output spends is considered a fee and is taken by miners If you don’t want to pay high fee :) you have to create output that returns change for you (thats why transactions with many outputs are needed) Change money is sent to address that you control
  • 10. How transaction with change is formed
  • 11. Combining your unspent transactions If none of the unspent transactions that you have (UTXO) contains enough money to pay - you have to combine a few Here transactions with a few inputs are needed Money are summed up (and fee paid to miners is calculated in the same way - difference between total input and total output) Your wallet (a piece of software) contains key pairs - that is money that you control
  • 12. How transactions spend money notice that each transaction pays 10k satoshi as a fee
  • 13. Summary Every balance which is received or sent should be tied to the address Every address may be associated with the wallet. All the rest – non-spendable, the coins that are sent to them – are lost The balance that can be spent was always received from the wallet The coins received to the address are not mixed – they are used separately (or in a combination) in the moment when they are spent If the sum of all inputs is more, than the sum of outputs, the change is considered to be a commission