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

cip: prevent auto claiming of rewards. #251

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tac0turtle
Copy link

@tac0turtle tac0turtle commented Feb 7, 2025

Overview

This cip proposes a change to the distribution module, the change stops auto claiming of rewards when modifying delegation shares (delegation, redelgation, unbonding) and makes the movement of funds from the distribution module to a users account explicit.

@tac0turtle tac0turtle changed the title add cip 30 cip: prevent auto claiming of rewards. Feb 7, 2025
@tac0turtle tac0turtle force-pushed the marko/distribution_claiming branch from 2b9a082 to f3f35d6 Compare February 7, 2025 13:49

## Abstract

Currently, when delegators modify their staking positions (e.g., redelegate or undelegate), the distribution module automatically claims all accrued staking rewards. This CIP proposes removing that automatic functionality, thereby allowing users to intentionally choose *when* to claim their rewards. Specifically, the distribution module will no longer auto-claim rewards on delegation-share changes. Instead, it will store the accrued rewards until a user explicitly calls `MsgWithdrawDelegatorReward`. This avoids unintended reward-claiming events that can trigger immediate tax or regulatory obligations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a simple enough change, do we have data on the rate of redelegations or undelegations or how much demand there is for this change? I couldn't think of any firm blockers to this, but its been a while since I dug through the maze that is the distribution and staking module logic.

separate to this limitted change,

This is a simple change, if we wanted something more complex we could propose an LST like design

could we do, or has any sdk based chain done, claimless auto compounding, redelegation, undelegation without creating an LST? presumably this requires a significant change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea i can get the data for the last few months.

we have explored this, its a deeper change in the distribution module. I can look into this as an alternative.

cips/cip-30.md Outdated Show resolved Hide resolved

## Abstract

Currently, when delegators modify their staking positions (e.g., redelegate or undelegate), the distribution module automatically claims all accrued staking rewards. This CIP proposes removing that automatic functionality, thereby allowing users to intentionally choose *when* to claim their rewards. Specifically, the distribution module will no longer auto-claim rewards on delegation-share changes. Instead, it will store the accrued rewards until a user explicitly calls `MsgWithdrawDelegatorReward`. This avoids unintended reward-claiming events that can trigger immediate tax or regulatory obligations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this require going back to (or keeping) a fork of the sdk using v0.50?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may be able to get away without a fork, but due to the global registry we may need to maintain a small fork.

@tac0turtle tac0turtle force-pushed the marko/distribution_claiming branch from f3f35d6 to 296b5fc Compare February 7, 2025 14:29
@ValarDragon
Copy link

Even independent of taxation, this is just generally a massive UX win. Its very annoying to have to explain or track as is. (Note, spec of this was definitely in large part my fault for not thinking of the UX pain here)

cips/cip-30.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

cips/cip-30.md Outdated Show resolved Hide resolved
cips/cip-30.md Outdated Show resolved Hide resolved
@tac0turtle tac0turtle marked this pull request as ready for review February 11, 2025 09:17
Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM

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.

5 participants