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

[WIP] and RFC stake delegation contract implementation in Solidity #431

Closed
wants to merge 4 commits into from

Conversation

madxor
Copy link

@madxor madxor commented Nov 29, 2018

This is work-in-progress and a call for comments for pushing the stake delegation forward.

It is based on #121 but rewritten for (I hope) simplicity and readability.

The goal is to create a contract as simple and readable as possible and to nail all corner cases.

As it's my first Solidity code please be as hostile as possible cause I want and need to learn a lot.

First I would like to have this contract "complete", then I will start working on a glue.

Stake delegation working assumptions:

Account types:

  • Delegator: an account that delegates stake to an operator.
  • Operator: an account that operates delegated stake on behalf of a delegator.

Requirement: an account is either Operator or Delegator can’t be both <-- trying to enforce it wherever possible.

@mhluongo
Copy link
Member

I'd like to see a human spec for this alongside the code, as the biggest issue IMO hasn't been "are we doing the thing right?" it's been "are we doing the right thing?"

@mhluongo
Copy link
Member

For example - I'm not certain the two roles of "delegator" and "operator" are enough, via this discussion.

Anyway, that aside- will review!

@madxor
Copy link
Author

madxor commented Nov 29, 2018

@mhluongo Will do next. I wanted to anchor my thoughts somewhere thus the code. And definitely, need to work out a broader context for this to be usable (which I'm missing currently).

@madxor
Copy link
Author

madxor commented Dec 5, 2018

Uploaded an RFC documenting our stake delegation from the perspective of requirements and functionality.

Please disregard solidity code for now, as it is not relevant and aligned with the doc.

@Shadowfiend
Copy link
Contributor

Couple of nitpicks:

  • Let's do a separate PR for the RFC. Keep this PR for the Solidity code.
  • Commit messages: no period at the end of commit subjects.
  • Commit messages: make sure you're capturing a bit more detail on thinking in the commit body. e.g. with the initial RFC commit, capturing a very quick high-level of why there's a stake delegation RFC at all. This is somewhat duplicative to the content, but should be much shorter. e.g. see Raghav's body for his initial RFC 1 commit: da02cf9 .

@madxor madxor mentioned this pull request Dec 5, 2018
@madxor
Copy link
Author

madxor commented Dec 5, 2018

RFC work was moved to #443

Deleted. RFC work was moved to #443
@pdyraga
Copy link
Member

pdyraga commented Feb 18, 2019

@madxor How does it relate to the newest version of the stake delegation RFC? Should we close this PR without merging?

@madxor madxor closed this Feb 18, 2019
@Shadowfiend Shadowfiend deleted the wip-stake-delegate branch May 15, 2019 01:02
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

Successfully merging this pull request may close these issues.

4 participants