Skip to content

Allow anyone to close allocation after max allocation period #543

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

Closed
wants to merge 1 commit into from

Conversation

abarmat
Copy link
Contributor

@abarmat abarmat commented Feb 9, 2022

Goal

Provide a mechanism so that anyone can close stale allocations.

Motivation

Stale allocations affect the stability of the network when an indexer that has a big proportional allocated stake on a subgraph does not keep it active, as other indexer won't want to allocate if it already has a big allocation. Stale allocation also reduce the speed of how value flows through the protocol, reducing the frequency at which curators and delegators get their share of rewards/fees.

Currently delegators for an indexer are the only one that can close them, but this is an unnecessary validation considering that anyone could turn into a delegator, even with the smallest amount of tokens, and then close it.

Reference

Forum: https://forum.thegraph.com/t/rewarded-force-close-mechanism-to-eliminate-stale-allocations/2951/8

@abarmat abarmat changed the title feat: allow anyone to close allocation after max allocation period Allow anyone to close allocation after max allocation period Feb 9, 2022
@codecov
Copy link

codecov bot commented Feb 9, 2022

Codecov Report

Merging #543 (a4a0771) into dev (cf8b7d8) will decrease coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #543      +/-   ##
==========================================
- Coverage   91.19%   91.08%   -0.12%     
==========================================
  Files          37       37              
  Lines        1795     1794       -1     
  Branches      293      292       -1     
==========================================
- Hits         1637     1634       -3     
- Misses        158      160       +2     
Flag Coverage Δ
unittests 91.08% <100.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
contracts/staking/Staking.sol 98.50% <100.00%> (-0.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 726562c...a4a0771. Read the comment docs.

@abarmat
Copy link
Contributor Author

abarmat commented Jul 12, 2022

Closing as it was superseded by this implementation #549

@abarmat abarmat closed this Jul 12, 2022
@abarmat abarmat deleted the ariel/public-close-alloc branch July 12, 2022 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant