Badger-Finance / badger-rewards

MIT License
3 stars 3 forks source link

Badger Logo

Test coverage:

codecov

Badger Rewards

Badger Rewards hosts scripts directly related to the Badger Rewards system, including:

Visit our GitBook for more detailed documentation.

Current deployed bots

Boost Bot

Chain: Ethereum
Cadence: Every 10m

Rewards deployment

In order to deploy on an EVM chain, the following is required

Development

Releasing a feature

When not sure if feature can break something, consider using feature flags functionality to disable the code that could potentially cause issues.

First, add new feature flag to FeatureFlags.FLAGS dictionary:

class FeatureFlags:
    FLAGS: Dict[str, bool] = {
        NEW_FLAG: True
    }

Then use new flag to wrap potentially dangerous code:

from rewards.feature_flags import flags

def some_func():
    if flags.flag_enabled(NEW_FLAG):
        new_functionality()
    else:
        old_functionality()

After succesful release consider removing NEW_FLAG, as well as the wrapper and old functionality.