EthereumCommonwealth / Cold-staking

BSD 4-Clause "Original" or "Old" License
21 stars 19 forks source link

Possible lost of CLO #7

Closed k06a closed 6 years ago

k06a commented 6 years ago

Remove debug method to avoid CLO coin losts: https://github.com/EthereumCommonwealth/Cold-staking/blob/863846e510299b8cb07bab38c0b60d1bd78e9947/ColdStaking.sol#L162

Auditing smart contracts in live stream: https://www.youtube.com/watch?v=efZY3_COaiE

Your CryptoManiacs :)

k06a commented 6 years ago

You need to create separate method with only_treasurer modifier to refill balance by treasurer:

function deposit() public payable only_treasurer {
    emit TreasurerDeposited(msg.sender, msg.value);
}
Dexaran commented 6 years ago

Not only Treasurer must have access to this function. We assume that some users may want to donate too.

Most of the projects have "official donation wallet". We have Treasury (if someone wants to donate for CLO dev team) and Staking Contract (if someone wants to donate for CLO community).

k06a commented 6 years ago

Treasurer itself could be used for donations, hope no one will call this method for a mistake.