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

Allow claiming staking rewards through smart contracts #2930

Open
Tracked by #2793
lumtis opened this issue Sep 27, 2024 · 0 comments
Open
Tracked by #2793

Allow claiming staking rewards through smart contracts #2930

lumtis opened this issue Sep 27, 2024 · 0 comments
Labels
feature:idea An early idea for a feature. Used as reference to follow new feature integrations feature:smart-contracts Related to extending smart contracts capability and interactions with ZEVM stateful-precompile A new stateful precompile contract that is user facing

Comments

@lumtis
Copy link
Member

lumtis commented Sep 27, 2024

Describe the Issue
The staking precompile currently allow to manage stakes but not claiming rewards.

We should add the ability to claim the rewards to give full flexibility to build staking application (with the staking precompile the staker address might be a contract, currently this contract would not be able to stake the rewards)

Add the following methods:

// claim all staking rewards
claim() 

// fetch the current claimable rewards
// since we will allow ZRC20 rewards, could contains in argument what ZRC20 to fetch rewards, if null address or another boolean argument is specified, fetch native ZETA rewards
rewards() 

// (potentially)
// stake directly the rewards
stakeRewards()

Solution

Claiming is part of the distribution module and not staking module.

Two solutions:

Other considerations

Some of the rewards would be in ZRC20 as Cosmos Coin version introduced in #2791

When claiming ZRC20., the ZRC20s should be directly sent to claimer as the ERC20 version, the users should never have to use the Cosmos native version.

@lumtis lumtis added feature:idea An early idea for a feature. Used as reference to follow new feature integrations feature:smart-contracts Related to extending smart contracts capability and interactions with ZEVM stateful-precompile A new stateful precompile contract that is user facing labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:idea An early idea for a feature. Used as reference to follow new feature integrations feature:smart-contracts Related to extending smart contracts capability and interactions with ZEVM stateful-precompile A new stateful precompile contract that is user facing
Projects
None yet
Development

No branches or pull requests

1 participant