The document discusses blockchain transactions and components. It begins with recapping blocks and consensus protocols in blockchains like Bitcoin. It then discusses different types of crypto assets that can be represented on blockchains as tokens, including currencies, digital entities, and representations of real-world assets. The document outlines different types of transactions on blockchains like Bitcoin and Aeternity, including paying to public keys and multi-signature transactions. It also discusses cryptographic methods used for signing transactions like public/private key cryptography and Merkle trees. Finally, it provides an exercise on creating, signing, and verifying transactions as well as modifying a smart contract for a free-for-all account.
A Quick Start To Blockchain by Seval CaprazSeval Çapraz
Blockchain is one of the most innovative discoveries of the past century.
The first cryptocurrency, Bitcoin, was proposed in 2008 by Satoshi Nakamoto with a white paper.
How Blockchain and Cryptocurrency works.Waleed Ahmed
A blockchain is a way of storing data so that cannot be changed anymore. This is called immutability and a very useful feature when dealing with very important data like bank records or transactions.
This presentation will teach you the simplest methodology of how blockchain works.
The presentation will give the basic idea about what is blockchain technology, it's architecture, main features, types of blockchain network and other things that will make your fundamentals clear.
This presentation goes over consensus fundamentals, what consensus algorithms are used in Hyperledger blockchain projects today and how do they work. This presentation was presented at the April 2nd SF Hyperledger Meetup @ PubNub.
A Quick Start To Blockchain by Seval CaprazSeval Çapraz
Blockchain is one of the most innovative discoveries of the past century.
The first cryptocurrency, Bitcoin, was proposed in 2008 by Satoshi Nakamoto with a white paper.
How Blockchain and Cryptocurrency works.Waleed Ahmed
A blockchain is a way of storing data so that cannot be changed anymore. This is called immutability and a very useful feature when dealing with very important data like bank records or transactions.
This presentation will teach you the simplest methodology of how blockchain works.
The presentation will give the basic idea about what is blockchain technology, it's architecture, main features, types of blockchain network and other things that will make your fundamentals clear.
This presentation goes over consensus fundamentals, what consensus algorithms are used in Hyperledger blockchain projects today and how do they work. This presentation was presented at the April 2nd SF Hyperledger Meetup @ PubNub.
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...Blockchain Council
Blockchain Council is a renowned platform providing all the certification and Blockchain courses that will help you make an established career in this field.
The fundamental security properties of blockchain originate from both bitcoin architecture and cryptography advances. the proficiency of the cryptographic chain of blocks was advanced giving birth to various inborn security qualities.
How Blockchain Is Different From Cryptocurrency?Endive Software
Yes, there are some differences, but at the core Blockchain and Cryptocurrency are interconnected. Bitcoin (Cryptocurrency) is the first and most successful application of Blockchain. Initially, they were used interchangeably, but with advancement, some differences can be noticed.
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Svetlin Nakov
Consensus Algorithms
Dr. Svetlin Nakov at CryptoBlockCon - Las Vegas (11 Dec 2018)
In this talk the speaker Svetlin Nakov explains very briefly the concepts of decentralized consensus and blockchain consensus algorithms, along with examples from popular blockchain networks and DLT ledgers:
The concept of Byzantine Fault Tolerance (BFT)
The role of consensus algorithms in decentralized systems and blockchains
Proof-of-work consensus (PoW), mining, pools, hash power, ASIC mining, etc.
Proof-of-stake (PoS) and its variants: DPoS (delegated PoS), RPoS (randomized PoS), LPoS (leased PoS), PoI (proof of importance)
Practical Byzantine Fault Tolerance (PBFT) and FBA (federated byzantine agreement)
Proof-of-Authority (POA)
Non-blockchain consensus, asynchronous byzantine fault tolerance (aBFT) and Hashgraph
The presentation slides for a blockchain event - All About TenX Cryptopayment Technology, Lightning Network & Bitcoin Mining.
Presenter: Sun Sagong
Venue: Tenx (Singapore)
Date: 07Feb2018
This slide is a entry level introduction to blockchain security, it illustrates the current status of the issue, summarises attack methodology, and reviewed a few past hack cases.
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Svetlin Nakov
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Speaker: Dr. Svetlin Nakov (co-founder of SoftUni)
Multisig Wallets. Sign / Execute Transactions. Implementation in Bitcoin and Ethereum
Single-User-Managed Wallets: Problems
Multi-Signature Wallets: Concepts
Multi-Signature Wallets in Bitcoin
Multi-Signature Wallets in Ethereum
The Gnosis Multisig Wallet: Demo
Slides, demos and videos: https://nakov.com/blog/2018/09/26/speaker-at-the-blockchain-technology-conference-2018-berlin/
Apart from Proof of Work there are many other Consensus Mechanisms being discussed. What are they and what are their pros and cons. (Proof of Stake, Proof of Elapsed Time, Proof of Authority, Proof of Burn, Proof of Authority, Byzantine Fault Tolerance, Proof of Importance)
Blockchain technology is being touted as the Next Big Thing, seemingly capable of great feats of strength and perhaps even curing the common cold. But what exactly is it and how could it contribute to a security program? This session will describe how blockchain works, define its value proposition, and identify specific use cases where blockchain makes sense and some where it doesn't. Along the way, we will discuss similar capabilities and technologies that accomplish the objectives.
Blockchain technology is a distributed ledger platform that provides open and transparent transaction information with integrity and non-repudiation based on modern cryptography. It is also the technology behind many cryptocurrencies. This presentation will give fundamental knowledge on how blockchain works, its cryptography implementation, cryptocurrency definition and related terms and also blockchain use cases.
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...Blockchain Council
Blockchain Council is a renowned platform providing all the certification and Blockchain courses that will help you make an established career in this field.
The fundamental security properties of blockchain originate from both bitcoin architecture and cryptography advances. the proficiency of the cryptographic chain of blocks was advanced giving birth to various inborn security qualities.
How Blockchain Is Different From Cryptocurrency?Endive Software
Yes, there are some differences, but at the core Blockchain and Cryptocurrency are interconnected. Bitcoin (Cryptocurrency) is the first and most successful application of Blockchain. Initially, they were used interchangeably, but with advancement, some differences can be noticed.
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Svetlin Nakov
Consensus Algorithms
Dr. Svetlin Nakov at CryptoBlockCon - Las Vegas (11 Dec 2018)
In this talk the speaker Svetlin Nakov explains very briefly the concepts of decentralized consensus and blockchain consensus algorithms, along with examples from popular blockchain networks and DLT ledgers:
The concept of Byzantine Fault Tolerance (BFT)
The role of consensus algorithms in decentralized systems and blockchains
Proof-of-work consensus (PoW), mining, pools, hash power, ASIC mining, etc.
Proof-of-stake (PoS) and its variants: DPoS (delegated PoS), RPoS (randomized PoS), LPoS (leased PoS), PoI (proof of importance)
Practical Byzantine Fault Tolerance (PBFT) and FBA (federated byzantine agreement)
Proof-of-Authority (POA)
Non-blockchain consensus, asynchronous byzantine fault tolerance (aBFT) and Hashgraph
The presentation slides for a blockchain event - All About TenX Cryptopayment Technology, Lightning Network & Bitcoin Mining.
Presenter: Sun Sagong
Venue: Tenx (Singapore)
Date: 07Feb2018
This slide is a entry level introduction to blockchain security, it illustrates the current status of the issue, summarises attack methodology, and reviewed a few past hack cases.
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Svetlin Nakov
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Speaker: Dr. Svetlin Nakov (co-founder of SoftUni)
Multisig Wallets. Sign / Execute Transactions. Implementation in Bitcoin and Ethereum
Single-User-Managed Wallets: Problems
Multi-Signature Wallets: Concepts
Multi-Signature Wallets in Bitcoin
Multi-Signature Wallets in Ethereum
The Gnosis Multisig Wallet: Demo
Slides, demos and videos: https://nakov.com/blog/2018/09/26/speaker-at-the-blockchain-technology-conference-2018-berlin/
Apart from Proof of Work there are many other Consensus Mechanisms being discussed. What are they and what are their pros and cons. (Proof of Stake, Proof of Elapsed Time, Proof of Authority, Proof of Burn, Proof of Authority, Byzantine Fault Tolerance, Proof of Importance)
Blockchain technology is being touted as the Next Big Thing, seemingly capable of great feats of strength and perhaps even curing the common cold. But what exactly is it and how could it contribute to a security program? This session will describe how blockchain works, define its value proposition, and identify specific use cases where blockchain makes sense and some where it doesn't. Along the way, we will discuss similar capabilities and technologies that accomplish the objectives.
Blockchain technology is a distributed ledger platform that provides open and transparent transaction information with integrity and non-repudiation based on modern cryptography. It is also the technology behind many cryptocurrencies. This presentation will give fundamental knowledge on how blockchain works, its cryptography implementation, cryptocurrency definition and related terms and also blockchain use cases.
Are you interested to know about how blockchain works? Then This PPT might help you.
It explains BlockChain Technology, How it work and its applications.
Blockchain technology can revolutionise the provision of decentralised Applications Dapps, as well as help IoT systems to boot to reduce the cost of this development, the stakeholders to determine how to distribute benefits and take into account five basic principles:
• Potential effects of technology on IoT systems
• Organisational changes
• Secure the correct data
• Financing electronic IoT systems
• Security and privacy of user data
Understanding Proof of Work (PoW) and Proof of Stake (PoS) AlgorithmsGautam Anand
We will focus on understanding "Proof of Stake (PoS)" Algorithm, how it different from "Proof of Work" algorithm, the performance benefits and security overview. We will also discuss the upcoming blockchain protocols that are planning to move to PoS.
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsIngo Weber
In this keynote, delivered at the Blockchain Forum of BPM 2019, I summarized and reflected on research on BPM and blockchain over the last four years, including model-driven engineering, process execution, and analysis and process mining. I also covered selected use cases and applications, as well as recent insights on adoption. The keynote closed with a discussion of open research questions.
The Impact and Potential of Blockchain on the Banking SectorPECB
This session will explore how Blockchain technology can solve the 4 major pain points in financial technologies: High maintenance and support costs, Out-dated IT systems, Need for manual reconciliation and Systems that don’t “talk” to each other.
Main points covered:
• What Is Blockchain technology?
• What Blockchain technology can do?
• What Blockchain technology cannot do?
• Anatomy of a Blockchain solution
• Ideal Blockchain use cases for banks
Presenter:
Our presenter for this webinar is Rohas Nagpal, is a Blockchain evangelist and Chief Blockchain Architect of Primechain Technologies Pvt. Ltd. Rohas comes from a cybercrime investigation and security background and has been working in that field since the mid-1990s. He co-founded Asian School of Cyber Laws in 1999 and has investigated cybercrimes & data breaches for hundreds of organizations across most industry and Government sectors. He has assisted the Government of India in framing draft rules and regulations under the Information Technology Act.
Organizer: Ardian Berisha
Date: April 18th, 2018
Plenary Talk at ICEIC 2019
Pullman Auckland Hotel, Auckland, New Zealand
Jan. 23th (Wed) 2019, 11:00 ~ 12:30
http://iceic.org/2019/
Abstract
In the year 2018, we have witnessed the surge and the fall of crypto-currencies. With the surge, blockchain the new technology behind cryptocurrencies, and its idealistic footprint of advanced thoughts, blockchainism it can be perhaps called, came to enthrall our minds. Thousands of new ambitious projects have been conceived and fast activated with the worldwide frenzy of new funding through initial coin offerings a novel funding mechanism in the blockchain world. Decentralized societies, equal accesses to valuable resources, reducing the cost of middleman, freed individuals from hierarchical organizations, and reducing the spread in inequalities are some of those advanced thoughts. But the fall came; the market value for Bitcoin has collapsed more than 7 times from its peak-value; that of Ethereum has plummeted more than 12 times. These two power houses which have supported those progressive projects are now torn apart. Recent New York Times report reads, “Blockchain: What’s it good for? Absolutely nothing, report finds.” Another one reads, The Blockchain Is a Reminder of the Internet’s Failure. The same utopian promises that bloomed during the Internet’s early days are back. Be afraid.“ Should this be the end of our pursue to change and make a better world with blockchains? Obviously not. In this presentation, I would like to talk about the reality of blockchain technology and how distant it is from the ideals. With this accessment, I would like to present some of novel research progresses we made in year 2018 and talk about further research ideas to pursue in year 2019.
Presentation for Asian Financial Markets and Institutions, October 2016, HKU MBA Program. Covers basics of blockchain and distributed ledgers and discusses some current and potential applications.
A short 101 on blockchain and cryptocurrencies - What is blockchain? How to get started investing in crypto? Tactical tips for keeping your investment secure. Presentation for Blockchain & Cryptocurrency Meetup at WeWork San Francisco, Oct 23 2017.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
2. Outline
1. Blockchain components and protocols
1. Recap: blocks and consensus
2. Types of assets
3. Transactions: types and signing
2. Cryptographic methods used in blockchains
3. Exercise: continue ongoing smart contract development exercise
4. Recap: blocks and consensus
Blockchain: creating a fixed order of blocks of transactions using
p2p time-stamping by Proof of Work:
1. Everybody can create blocks + hashes.
2. But: hashing is made difficult.
3. Broadcast blocks to all known nodes (recursively)
4. Consensus: the longest chain always wins.
Sources: Bitcoin: A Peer-to-Peer Electronic Cash System. Nakamoto, 2008, https://bitcoin.org/bitcoin.pdf,
https://en.wikipedia.org/wiki/Blockchain
7. Crypto Assets
Types of crypto/digital assets:
• “Natively" digital:
• Crypto currencies like Bitcoin
• Other ditigal entities like cryptokitties
• Representation of a real-world asset
• Land ownership
• Art usage rights
• Concert tickets
• …
Source: https://www.stateofthedapps.com/dapps/cryptokitties
Source: https://blockgeeks.com/guides/smart-contracts/
8. Tokens
Assets are represented on the blockchain via smart contracts as
tokens. A token
• is issued and transferred via its defining smart contract and
• represents rights and/or obligations to some asset and therefore
has some value.
Source: https://hackernoon.com/the-token-handbook-a80244a6aacb
NB: a crypto currency is the native token of a blockchain, where the blockchain
implementation itself can be viewed as a sort of native smart contract.
9. Transactions on Bitcoin
Transaction types: depending on the blockchain.
Bitcoin:
• Pay to PubKey Hash: sending Bitcoin to an
address
• Pay to PubKey: assigning newly mined Bitcoin
• Pay to Script Hash: sends an amount to a
“script hash”, which can then be claimed by
the recipient by providing that script.
• Multi-Signature: multiple signatures required
to spend
• (a few more exotic ones) Source: https://blockgeeks.com/bitcoin-transactions/
10. Transactions on Æternity
Æternity: two main types:
1. Data transactions:
• Spend: transfer of Æ
• Oracle: creation, registration,
responses
• Naming: claiming, updating,
transferring, revoking
• Channels: creation, closing, settling
2. Smart contracts: compile, deploy, call
Source: elixir-node source code
12. Public/Private Key Cryptography for Signing Transactions
Source: https://www.slideshare.net/easel1/django-cryptography/16-Asymmetric_Nway_encrypt_decrypt_sign
13. Implementation in elixir-node
Source: elixir-node source code
NB: when using cryptography in application, always use standard crypto libraries
unless you’re learning, doing crypto research or building a crypto library.
14. Public/Private Key Cryptography Methods
• Mathematical functions which are
1. easy to compute but
2. hard to compute the reverse.
• Examples:
• Exponentiation over finite fields (Diffie–Hellman, DH),
key agreement only
• Exponentiation modulo a product of 2 large primes
(RSA)
• Discrete logarithm (ElGamal, DSA)
• Elliptic Curve, i.e. discrete logarithm of a random
elliptic curve elements
• more secure, fast, smaller keys
• widely used in blockchain
https://arstechnica.com/information-technology/2013/10/a-relatively-easy-to-
understand-primer-on-elliptic-curve-cryptography/2/
19. Exercise: Free for All Contract
1. https://github.com/aeternity/protocol/blob/master/contracts/sophia.md
2. Example: free-for-all account:
contract Test =
record state = {balance : int}
public function init() : state = {balance = 0}
public stateful function add(amount: int) = put(state{balance @ b = b + amount})
public function getBalance() = state.balance
public stateful function withdraw(amount: int) =
if(amount < state.balance)
put(state{balance @ b = b - amount})
amount
else
0
20. Exercise: Free for All Contract
Exercise:
1. Use actual tokens transfer instead of just assigning ints
2. Everybody has their own balance and add, getBalance and withdraw
work only for the caller’s balance.