Created
November 11, 2020 12:47
-
-
Save 0xAnonymous/cad820de0683e580b27c69aab6cbf009 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract MoneySupplyTax is Coin { | |
address taxCollector; | |
uint taxRate; | |
mapping(address => uint) taxDeclared; | |
function enforceTax(address _account) internal { | |
uint undeclared = taxrate**(block.timestamp - taxDeclared[_account]); | |
balanceOf[_account] *= undeclared; | |
if(_account == taxCollector) balanceOf[_account] += totalSupply - totalSupply*undeclared; | |
taxDeclared[_account] = block.timestamp; | |
} | |
function payment(address _to, uint _amount) public { | |
enforceTax(msg.sender); | |
enforceTax(_to); | |
transfer(_to, _amount); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment