W-20200228: Wallets
Create a simple command-line cryptocurrency wallet that can generate new addresses, sign transactions, and send coins to other addresses on a test blockchain network. The wallet should be able to stor...
View Solutions →A high-quality educational dataset of blockchain and cryptography programming challenges. Each task includes a detailed problem statement, constraints, security notes, and complete solutions in 7 programming languages with English explanations.
Test your skills with these blockchain and cryptography tasks
Create a simple command-line cryptocurrency wallet that can generate new addresses, sign transactions, and send coins to other addresses on a test blockchain network. The wallet should be able to stor...
View Solutions →Design and implement a simple digital signature system for verifying messages. Your system should allow a user to sign a message with their private key, and anyone else to verify that signature using ...
View Solutions →Create a simple lottery smart contract where users can buy tickets by sending Ether. Each ticket costs a predefined amount of Ether (e.g., 0.1 ETH). The smart contract should allow one user to draw th...
View Solutions →You are tasked with auditing a simple Ether Wallet smart contract written in Solidity. Your goal is to identify potential security flaws, particularly focusing on reentrancy attacks, and propose solut...
View Solutions →You are tasked with implementing a simplified Merkle Tree structure in Python. Your implementation should include methods to add data elements, compute the root hash of the tree, and verify if a speci...
View Solutions →You are tasked with implementing a simple Merkle Tree for a list of transaction hashes in a blockchain system. A Merkle Tree is a binary tree in which every leaf node is labeled with the hash of a dat...
View Solutions →Design and implement a simple decentralized exchange (DEX) smart contract on the Ethereum blockchain that allows users to swap two ERC20 tokens. The DEX should include functionalities for adding/remov...
View Solutions →You are tasked with developing a simple decentralized exchange (DEX) where users can swap two ERC-20 tokens: TokenA and TokenB. Your DEX will include a liquidity pool that allows users to add or remov...
View Solutions →You are tasked with creating a simple ERC-721 compliant smart contract for an NFT collection representing unique digital art pieces. Your contract should include functionalities to mint new NFTs, tran...
View Solutions →Design and implement a simple Proof of Work (PoW) algorithm for a blockchain network. Your task is to create a Python function that simulates the mining process by finding a nonce such that the hash o...
View Solutions →You are tasked with creating a simple digital signature system using SHA-256 as the hash function and RSA for signing. Your program should allow users to generate an RSA key pair, sign a message with ...
View Solutions →You are tasked with developing a simple digital signature system for verifying the authenticity of messages. Your system should use asymmetric cryptography, specifically RSA key pairs to sign and veri...
View Solutions →You are tasked with creating a custom ERC-20 token named \"EduCoin\" on the Ethereum blockchain. Your EduCoin should have the following features: 1. The total supply of EduCoin is limited to 1,000,000...
View Solutions →You are tasked with implementing a simple blockchain in Python that uses SHA-256 as its hash function. Your blockchain will consist of blocks, each containing an index, timestamp, data, previous hash,...
View Solutions →You are tasked with developing a simple Ethereum smart contract for a decentralized charity fund. The contract allows users to donate Ether, and the owner of the contract can withdraw funds to help th...
View Solutions →You are tasked with developing a simple ERC20 token contract for a new cryptocurrency called EduCoin. The contract should allow users to mint tokens, transfer them between addresses, and check balance...
View Solutions →You are tasked with implementing a simplified version of a Merkle Tree. A Merkle Tree is a binary tree in which each non-leaf node is the hash of its two children, and the leaves contain hashes of dat...
View Solutions →Create a custom ERC-20 token named 'EduCoin' that includes the following functionalities: 1. The contract should have a mint function accessible only by the contract owner to issue tokens. 2. Implemen...
View Solutions →You are tasked with developing a simple cryptocurrency wallet application. Your wallet should be capable of generating new addresses, storing private keys securely, and sending transactions to the blo...
View Solutions →You are tasked with developing a simple decentralized lottery smart contract using Solidity. This contract should allow users to enter the lottery by paying an entry fee, and one winner will be random...
View Solutions →You are tasked with developing a simplified cryptocurrency wallet application that can generate new addresses, store private keys securely, and sign transactions. Your wallet should be able to handle ...
View Solutions →Design and implement a simple digital signature system using asymmetric cryptography. Your task is to create two programs: one for signing messages with a private key, and another for verifying signat...
View Solutions →Implement a simple proof-of-work (PoW) algorithm in Python. The goal is to find a nonce that, when concatenated with a given string and then hashed using SHA-256, produces a hash starting with at leas...
View Solutions →In this task, you are given a simplified version of an Ethereum smart contract that is supposed to manage user deposits and withdrawals. Your goal is to identify the security vulnerability present in ...
View Solutions →You are tasked with developing a simple blockchain wallet application that can generate a new wallet (a pair of public and private keys), sign transactions, and display the address associated with the...
View Solutions →You are tasked with developing a simple decentralized liquidity pool for an ERC20 token called "CryptoCoin". The liquidity pool will allow users to deposit and withdraw their CryptoCoins in exchange f...
View Solutions →You are tasked with creating a simple ERC-721 compliant non-fungible token (NFT) smart contract on the Ethereum blockchain. Your NFT will represent unique digital art pieces that can be bought, sold, ...
View Solutions →You are tasked with securing a simple Ethereum smart contract designed for a decentralized lottery system. The current implementation is vulnerable to reentrancy attacks, which can allow attackers to ...
View Solutions →You are tasked with creating a simple voting smart contract for an organization's general meeting. The contract should allow the chairperson to add voters, and each voter can cast one vote for one of ...
View Solutions →You are tasked with creating a simple smart contract that simulates a basic lottery system. The contract should allow users to participate by sending an amount of Ether, and the winner will be selecte...
View Solutions →You are tasked with developing a smart contract for an Ethereum-based token exchange platform. The contract should allow users to deposit and withdraw Ether, as well as trade tokens. However, during t...
View Solutions →Design a simple digital signature scheme using hash functions and symmetric encryption. Your task is to create a function that takes a message, a secret key, and produces a digital signature. The digi...
View Solutions →In this task, you will develop a simple blockchain simulation using the Proof of Stake (PoS) consensus mechanism. Your system should allow for validator registration and selection based on their stake...
View Solutions →You are tasked with auditing a simple Solidity smart contract designed for a decentralized lottery system. The contract allows users to enter by sending Ether and has a function to distribute the priz...
View Solutions →You are tasked with developing a simple voting smart contract using Solidity. This contract should allow voters to cast their votes for one of three predefined candidates. Each voter is allowed to vot...
View Solutions →