contracts
contracts copied to clipboard
Grace period after maxAllocationEpochs on closeAllocation by delegator
closeAllocation() is the function that allows unallocating tokens assigned to a particular subgraph and eventually collecting all funds from state channels.
To avoid an indexer never closing an allocation and as a consequence never distributing the funds, we allow delegators to force close an allocation after maxAllocationEpochs.
An indexer would want to close the allocation before maxAllocationEpochs. It has two incentives to do so:
- Effective allocation stops counting after maxAllocationEpochs.
- If a delegators close the allocation a POI won't be able to be presented and no rewards are distributed.
I wonder if it is a good idea to also include a grace period after maxAllocationEpochs to detach these two times.
- indexers can close any time
- soft penalty: no effective allocation is counted after maxAllocationEpochs
- hard penalty: delegators can force close after maxAllocationEpochs + gracePeriod
For simplicity we can keep only maxAllocationEpochs and then add a grace period if necessary.
maybe. i am always against more params though, unless absolutely necessary.
my gut feeling is we could do without it. a rational indexer should just close on time. and the indexer agent should do it automatially (i think)