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

Prevent late lockers from having to claim many weeks of zero-value distributions #1218

Merged
merged 4 commits into from
Apr 6, 2022

Conversation

TomAFrench
Copy link
Contributor

We currently have a concept of a tokenStartTime so that the contract knows from when users should attempt to claim a particular token if they haven't interacted with it before. This means that if we add a new token to be distributed then people don't have to make zero-value claims all the way from _startTime in order to sync the contract up to the current week.

However the issue is we need the same concept for users (userStartTime), otherwise if someone were to lock veBAL in 2 years time and want to claim BAL tokens then they would have to go through all previous BAL distributions whilst we know that they won't receive any fees from before their first lock.

We then save the timestamp of the first week which the user would be eligible for a distribution and when first claiming a token we can fast forward to this week.

@TomAFrench TomAFrench requested a review from nventuro April 5, 2022 17:04
@TomAFrench TomAFrench changed the title Prevent late lockers from having to fast forward through many weeks of claims Prevent late lockers from having to claim many weeks of zero-value distributions Apr 5, 2022
@nventuro nventuro merged commit 6667581 into master Apr 6, 2022
@nventuro nventuro deleted the fee-distribution-better-late-lockers branch April 6, 2022 15:44
TomAFrench added a commit that referenced this pull request Apr 7, 2022
* master: (39 commits)
  Authorizer: Migration script (#1173)
  Managed Pool: BPT management fees (#1163)
  Improve token checkpointing logic (#1217)
  Prevent late lockers from having to claim many weeks of zero-value distributions (#1218)
  fix: make sure to use EVM time when calculating startTime (#1221)
  Add custom implementation of FeeDistributor contract (#1191)
  Authorizer: Improve grant/revoke delays granularity (#1197)
  Linear Pool: ERC4626 Finalized (#1177)
  Weighted pool: use correct compare operators (#1209)
  Re-do Polygon BalancerHelpers deployment
  Update deployments readme
  chore: deploy SmartWalletChecker to kovan (#1208)
  Add SmartWalletChecker (#1207)
  Update readme.md (#1206)
  veBAL deployment (#1205)
  Misc veBAL changes (#1204)
  chore: organise contracts in liquidity-mining package (#1203)
  Fix compile error
  Deploy Batch Relayer V2 to Polygon (#1182)
  Fix reading historical balances/total supply by timestamp (#1201)
  ...
TomAFrench added a commit that referenced this pull request Apr 7, 2022
* master:
  Authorizer: Migration script (#1173)
  Managed Pool: BPT management fees (#1163)
  Improve token checkpointing logic (#1217)
  Prevent late lockers from having to claim many weeks of zero-value distributions (#1218)
  fix: make sure to use EVM time when calculating startTime (#1221)
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.

2 participants