{"action":"created","issue":{"url":"https://api.github.com/repos/EthereumCommonwealth/Roadmap/issues/51","repository_url":"https://api.github.com/repos/EthereumCommonwealth/Roadmap","labels_url":"https://api.github.com/repos/EthereumCommonwealth/Roadmap/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/EthereumCommonwealth/Roadmap/issues/51/comments","events_url":"https://api.github.com/repos/EthereumCommonwealth/Roadmap/issues/51/events","html_url":"https://github.com/EthereumCommonwealth/Roadmap/issues/51","id":364930610,"node_id":"MDU6SXNzdWUzNjQ5MzA2MTA=","number":51,"title":"Cold Staking contract","user":{"login":"Dexaran","id":26142412,"node_id":"MDQ6VXNlcjI2MTQyNDEy","avatar_url":"https://avatars1.githubusercontent.com/u/26142412?v=4","gravatar_id":"","url":"https://api.github.com/users/Dexaran","html_url":"https://github.com/Dexaran","followers_url":"https://api.github.com/users/Dexaran/followers","following_url":"https://api.github.com/users/Dexaran/following{/other_user}","gists_url":"https://api.github.com/users/Dexaran/gists{/gist_id}","starred_url":"https://api.github.com/users/Dexaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dexaran/subscriptions","organizations_url":"https://api.github.com/users/Dexaran/orgs","repos_url":"https://api.github.com/users/Dexaran/repos","events_url":"https://api.github.com/users/Dexaran/events{/privacy}","received_events_url":"https://api.github.com/users/Dexaran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":42,"created_at":"2018-09-28T15:10:28Z","updated_at":"2018-10-04T21:07:13Z","closed_at":null,"author_association":"MEMBER","body":"@yograterol @RideSolo @yuriy77k \r\n\r\nI'd like to discuss the details of further Cold Staking contract implementation here.\r\n\r\nAt the moment we have 3 proposed variants:\r\n\r\n1. [Dexaran's Cold Staking](https://github.com/EthereumCommonwealth/Cold-staking/tree/moonlight_3.1(testnet3)) ([description](https://docs.google.com/document/d/1LpRHzW7gGV1JfiXUQOmW-UEVF9TCNNWrYiItDuLgiGA/edit))\r\n\r\n2. [Yuriy's Cold Staking](https://github.com/yuriy77k/Cold-staking/blob/master/ColdStaking.sol) ([description](https://docs.google.com/document/d/1uckDVbgAj6N6Nx6Sm8-CnL_kRJTT8MZRQfVEkT01ltM/edit))\r\n\r\n3. [RideSolo's Cold Staking](https://github.com/RideSolo/Cold-staking/blob/master/ColdStaking.sol) ([description](https://drive.google.com/file/d/1fFtuQctoLtyEP-Lwlnt2x5pOuVWzZjn4/view?usp=sharing))\r\n\r\n# Overview\r\n\r\n### 1. Dexaran's Cold Staking\r\n\r\nThe first implementation of the Cold Staking protocol. Every action (new staker, reward claim) has a direct impact on the state of the contract which makes the final reward highly unpredictable.\r\n\r\nReward is computed at the moment of the claiming. Contract does not preserve the history of \"staking weights\". Reward depend on actual contract state and contract balance, thus it is independent of monetary policy. However, reward depends on claiming order (those, who claim their rewards first, earn more).\r\n\r\n**Advantages: Has a working reference implementation.**\r\n\r\n**Disadvantages: Each staker can affect others. Too unpredictable rewards.**\r\n\r\n### 2. Yuriy's Cold Staking\r\n\r\nThis implementation relies on [TotalStakingWeight](https://github.com/yuriy77k/Cold-staking/blob/master/ColdStaking.sol#L127) variable which preserves the info about how much balance should be allocated for stakers who did not claim their rewards yet.\r\n\r\nStakers cannot directly affect each other with their claims. Reward calculation is more predictable, reward only depend on the amount of staking CLO. The reward is independent of monetary policy.\r\n\r\n**Advantages: Better reward calculation**\r\n\r\n*Requires more testing.*\r\n\r\n### 3. RideSolo's Cold Staking\r\n\r\nAdvanced reward calculation formula.\r\n However, this version is more complex compared to the previous one and it relies on [hardcoded block reward](https://github.com/RideSolo/Cold-staking/blob/master/ColdStaking.sol#L50) variable. Therefore it depends on monetary policy and it will be necessary to update the contract with a hardfork at each monetary policy change. Also, it is not compatible with The First Stake proposal.\r\n\r\n**Advantages: Better reward calculation**\r\n\r\n**Disadvantages: higher complexity, depend on monetary policy, incompatible with The First Stake**\r\n\r\n# Implementation at Callisto Network\r\n\r\nI'm in favor of implementing the (2) Yuriy's Cold Staking version. It can solve all pressing problems and the implementation is not overcomplicated.\r\n\r\nI believe that it is necessary to take the following steps:\r\n\r\n1. Deploy the contract at testnet, test it and make a final decision if it is ready or not.\r\n\r\n2. Re-deploy the testnet and launch a testnet cold staking contract that will behave exactly like the final version (automatically receive block rewards, distribute staking rewards).\r\n\r\n3. Perform a security audit.\r\n\r\n4. Launch an official bug bounty.\r\n\r\n5. (optional) Make final changes if necessary. If everything is fine then the contract is ready to be used. Update the whitepaper.\r\n\r\n## P.S. \r\n\r\nI'm open to any suggestions.\r\nAny proposal, feedback, comments, constructive criticism is welcome!\r\n"},"comment":{"url":"https://api.github.com/repos/EthereumCommonwealth/Roadmap/issues/comments/427169448","html_url":"https://github.com/EthereumCommonwealth/Roadmap/issues/51#issuecomment-427169448","issue_url":"https://api.github.com/repos/EthereumCommonwealth/Roadmap/issues/51","id":427169448,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzE2OTQ0OA==","user":{"login":"Dexaran","id":26142412,"node_id":"MDQ6VXNlcjI2MTQyNDEy","avatar_url":"https://avatars1.githubusercontent.com/u/26142412?v=4","gravatar_id":"","url":"https://api.github.com/users/Dexaran","html_url":"https://github.com/Dexaran","followers_url":"https://api.github.com/users/Dexaran/followers","following_url":"https://api.github.com/users/Dexaran/following{/other_user}","gists_url":"https://api.github.com/users/Dexaran/gists{/gist_id}","starred_url":"https://api.github.com/users/Dexaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dexaran/subscriptions","organizations_url":"https://api.github.com/users/Dexaran/orgs","repos_url":"https://api.github.com/users/Dexaran/repos","events_url":"https://api.github.com/users/Dexaran/events{/privacy}","received_events_url":"https://api.github.com/users/Dexaran/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T21:07:13Z","updated_at":"2018-10-04T21:07:13Z","author_association":"MEMBER","body":"### 1. staking_threshold\r\n\r\nWe have the following statement at the [Whitepaper](https://drive.google.com/file/d/18NsazbbcMwmas7TIZRbDslIfNCVeLgBY/view): `Minimal amount: No minimal threshold.`\r\n\r\nI don't see any serious reason to change this. I think that it should be 0.\r\nHowever, we need to keep the `staking_threshold` implementation at the contract because it is intended to be reusable. I'd like to propose Cold Staking protocol for ETC as well. If it will be decided to apply any minimum threshold for some reason, then it will be easier to do this with our current implementation.\r\n\r\n### 2. round_interval\r\n\r\nI'm proposing **27 days**.\r\n\r\nOur initial implementation assumes ~1 month of locking time. Traders often make their decisions based on charts and candle closures. Therefore, it is better for them to have their coins available when the time to make a decision will come. That's why I'm proposing 27 days interval. \r\n\r\nIf you deposit your funds at the beginning of a month then you will have the opportunity to claim it back right before the closure of the (1) week candle and (2) month candle at the same time.\r\n\r\n![candle_close](https://user-images.githubusercontent.com/26142412/46502950-7ae0a080-c83a-11e8-8d21-60f9e9a95391.png)\r\n\r\n### 3. max_delay\r\n\r\nIf you think that 2 years is a reasonable length then I have no objections. Let's use 2 years.\r\n\r\n### 4. DateStartStaking\r\n\r\nI'm proposing `1541894400`.\r\n\r\n11/11/2018 @ 12:00am (UTC)\r\n"}}
{"actor":{"display_login":"Dexaran"}}