balancer / balancer-v2-monorepo

Balancer V2 Monorepo
https://balancer.fi/
GNU General Public License v3.0
306 stars 378 forks source link

Add L2 gauge claimer utility #1351

Closed nventuro closed 2 years ago

nventuro commented 2 years ago

Tokens can be claimed for a RewardsOnlyGauge directly, but these are subject to a restriction in that they only get tokens from their streamer at most CLAIM_FREQUENCY seconds apart - meaning gauges only get tokens at most every hour.

However, the streamer transfer can be initiated by any account, not just the gauge. We could then build a simple permissionless utility that would let anyone claim on multiple gauges all of their reward tokens, without being subject to this delay. On top of that, we could provide a helper view method that'd return the number of tokens due, which front-end applications could call to display data.

nventuro commented 2 years ago

This could be a good starting poiint: https://github.com/beethovenxfi/beethovenx-token/pull/21/files