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

Visibility of the stakingToken isn't public #25

Closed
eduardonunesp opened this issue Jun 21, 2018 · 6 comments
Closed

Visibility of the stakingToken isn't public #25

eduardonunesp opened this issue Jun 21, 2018 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@eduardonunesp
Copy link

Why the declaration of the stakingToken on contract ERC900BasicStakeContainer.sol isn't public like ERC20 public stakingToken; ?

@johnhforrest
Copy link
Contributor

We actually expose stakingToken via the token function below:

function token() public view returns (address) {
    return stakingToken;
  }

Looking at the HarbourProject implementation it may be acceptable to change the name from stakingToken to token and make it a public property to rely on the auto-generated accessor, but I haven't confirmed that the ABI created will be the same.

@johnhforrest johnhforrest added the question Further information is requested label Jun 21, 2018
@eduardonunesp
Copy link
Author

Yep name it stakingToken it's kind of more explicit, sometimes I think that add a function to return the token address is just more code to read

@johnhforrest
Copy link
Contributor

Might be worth adding that to the discussion on the EIP here: ethereum/EIPs#900

If we rename token to stakingToken in the standard then this problem will go away.

@johnhforrest
Copy link
Contributor

@eduardonunesp out of curiosity, is Loom looking to do something similar? If so, would love to collaborate on ideas. We're thinking of revising the model a little bit to use an intermediary currency (i.e., credits). This way the staking mechanism isn't so prohibitive to smaller users.

It would look something like this:
User A can stake N tokens over T time, for let's say 10 credits. If they are a small-time user maybe 10 credits is sufficient for a year's worth of transactions on the protocol, so staking is still beneficial for them and they receive utility out of the token.

User B is a power user and does the same N*T stake. Since they are making frequent transactions, they spend their 10 credits quickly and need to stake more tokens or begin paying for using the protocol.

I'll ping you when I have an implementation of this working if it's something you're interested in.

@eduardonunesp
Copy link
Author

@johnhforrest sort, not too many details now, I'd like to discuss more for sure, we can touch base in near future :)

@johnhforrest
Copy link
Contributor

@eduardonunesp Looking forward to it! Feel free to email me directly if you'd like to chat privately. My email address is on my GH profile page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants