Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cold Staking Upgradability #91

Closed
RideSolo opened this issue Feb 15, 2020 · 3 comments
Closed

Cold Staking Upgradability #91

RideSolo opened this issue Feb 15, 2020 · 3 comments

Comments

@RideSolo
Copy link

RideSolo commented Feb 15, 2020

Proposal

The actual staking contract requires a hard fork for any upgrade, this proposal aim to solve this problem by setting a main staking contract (managed by the team and later by the governance system) that will handle sub-contract.

Description

The main staking contract will handle only sub-contracts, each sub contract has to be first whitelisted (by the team or through governance later-on), the reward will be divided between all the sub-contracts following their time and deposit.

Users restrictions on deposit, withdrawal, and claim will be applied only on sub contracts while the sub-contracts will be free from any restrictions on deposit, withdrawal, and claim in the main contract.

The used staking formula will be the same as the cold staking v2 formula proposed here.

Advantages

  • It will allow easy upgradability and users migration from one contract to another (by whitelisting and blacklisting a sub-contract).
  • The proposal will make staking modular since it will allow new features like proposal 85 or 87 to be implemented as sub-contracts.(I'm also working on another proposal that I will be publishing soon related with the audit process that can be implemented using the same logic)

Work plan

  • Update the previously proposed staking formula document (with better description & formulation).
  • Implementation of the solidity contract.
  • Full testing of the contract using truffle framework.
  • Updating and porting the tests to be implemented to the main sub-staking contract.

Funding goal

1000 USD to be paid in equivalent value of CLO.
Address 0x863199C0A7Eb5c6E70E0889a93242445ee998CF4.

@shivneja
Copy link

Great idea. 👍

My thoughts: since staking returns are dropping and market volatility is increasing, we need to offer investors some newer incentives to keep their interest in CLO. Ideas #87 and #76 are useful for investors looking for a steady return + kicker. Your proposal makes this easier to implement.
Question: would the investor be able to make a choice? For example, if the investor has 200,000 CLO can he stake 50% with a fixed return and 50% with a variable return.

What about borrowing against the staked contract? Can there be an additional smart contract which will lend me (say) 85% of the staked CLO at xx% and on maturity the borrowing gets extinguished against the staked CLO? Somewhat linked to your proposal #85.

@RideSolo
Copy link
Author

@shivneja I think that borrowing CLO will go against the rules of staking itself since we want the staked CLO to be locked, but borrowing other pegged assets (without interest rate) to incentivize staking is what proposal 85 is about. CLO ecosystem is limited since it is relatively new blockchain but we can, and we will make it better.

@RideSolo
Copy link
Author

RideSolo commented Mar 6, 2020

@Dexaran I created a repository for this proposal the initial contract were developed and can be checked here.

  • The truffle test folder contains multiple test cases to show the contracts usage.
  • The most important contract are CallistoStakingMain that will handle the sub-contracts and CallistoStakingSub that is the re-implementation of callisto staking v2 adapted to this proposal (that is handled as a sub contract). CallistoStakingVoting inherit from CallistoStakingSub and add support to the TreasuryGovernance contract.
  • Please note that this is the initial implementation and will be further tuned, the test cases do not cover the TreasuryGovernance and the voting test for now (also more test cases can be added for further security of the contracts), I will update the repo later on to add them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants