sir-josh / Hackable-smart-contract

A one time hackable smart contract that models after a vending machine

Home Page:https://rinkeby.etherscan.io/address/0x331da523ae70e0057f6fa168aaa841bd872b7b18

Repository from Github https://github.comsir-josh/Hackable-smart-contractRepository from Github https://github.comsir-josh/Hackable-smart-contract

Hackable smart contract

This is a one time hackable smart contract that models after a vending machine(that gives out only peanut).

Just like the traditional vending machine, users will first deposit before buying peanuts from the contract, the least amount you can deposit before using the vending machine is 0.1 ether, this is because each peanut price is pegged at 0.1 ether. Users can also deposit more than the minimum amount requirement, purchase peanuts and withdraw any of their balance left from the contract.

Nonetheless there is a bug in the contract. The contract has a reserve balance of 1 ether, any hacker can penetrate this contract.

Figure out the bug in the contract and use it to your advantage.

VendingMachine: deployed to: https://goerli.etherscan.io/address/0x00f4b86F1aa30a7434774f6Bc3CEe6435aE78174

Feel free to attack.

About

A one time hackable smart contract that models after a vending machine

https://rinkeby.etherscan.io/address/0x331da523ae70e0057f6fa168aaa841bd872b7b18


Languages

Language:JavaScript 53.3%Language:Solidity 46.7%