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

Keep a track of the dividend distributed #5

Open
rya-sge opened this issue Jun 7, 2024 · 0 comments
Open

Keep a track of the dividend distributed #5

rya-sge opened this issue Jun 7, 2024 · 0 comments

Comments

@rya-sge
Copy link
Collaborator

rya-sge commented Jun 7, 2024

To know the remaining balance after distribution, it could be relevant to keep a track of the distributed sum for a specific dividend.

Example
mapping(uint256 => uint256) public segregatedDividendClaimed;

And rename segregatedDividend in segregatedDividendDeposit

When a dividend is deposit:
segregatedDividendClaimed += value

When a dividend is claimed
segregatedDividendClaimed -= value

After the end of the distribution, it is easier for the operator to withdraw the remaining dividends after distribution

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

1 participant