Verified contractPartial
Bank
Address0xbce7748d5d6ee130711080d59cc25b2bc71d829b
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.1.3
- Same code
Only this contract
Details
- Compiler
- solc 0.1.3+commit.028f561d
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 222,461
- Creation transaction
- 0xe42556516c…ea17a8cec8
Bank.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Bank {
bool sent;
uint fee;
uint payout;
uint total;
uint prev;
function Bank() {
manager = msg.sender;
numDeposits = 0;
roi = 120;
feeRate = 3;
minDiff = 30;
maxDecay = 90;
}
function getBalance() constant returns (uint) {
return balances[msg.sender];
}
function getProfit() constant returns (uint) {
return _profits[msg.sender];
}
function getCumulativeProfit() constant returns (uint) {
return cumulativeProfits[msg.sender];
}
function withdraw() {
if (now - deposits[msg.sender] >= minDiff) {
if (this.balance > balances[msg.sender] + payout) {
sent = msg.sender.send(balances[msg.sender] + payout);
if (sent) {
_profits[msg.sender] = 0;
balances[msg.sender] = 0;
}
}
}
}
function reCalc() {
if (now - deposits[msg.sender] >= minDiff) {
if (balances[msg.sender] > 0) {
payout = balances[msg.sender] * 2;
_profits[msg.sender] += payout;
cumulativeProfits[msg.sender] += payout;
deposits[msg.sender] = now;
}
}
}
function getDepositDelta() constant returns (uint) {
return now - deposits[msg.sender];
}
uint public roi;
uint public feeRate;
uint public lastDepositTs;
uint public minDiff;
uint public numDeposits;
uint public maxDecay;
address public manager;
mapping (address => uint) public balances;
mapping (address => uint) public deposits;
mapping (address => uint) cumulativeProfits;
function die() {
if (msg.sender != manager) return;
msg.sender.send(this.balance - 0);
}
function deposit() {
++numDeposits;
lastDepositTs = now;
addresses[numDeposits] = msg.sender;
balances[msg.sender] += msg.value;
reCalc();
}
mapping (address => uint) public _profits;
mapping (uint => address) public addresses;
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.