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

Add Avax support for cycles/harvests #771

Open
21 of 65 tasks
Darruma opened this issue Mar 21, 2022 · 0 comments
Open
21 of 65 tasks

Add Avax support for cycles/harvests #771

Darruma opened this issue Mar 21, 2022 · 0 comments

Comments

@Darruma
Copy link
Contributor

Darruma commented Mar 21, 2022

REWARDS REPO

env_config.py

  • - Add explorer API keys
  • - Add web3 provider

rewards_config.py

  • - Set root update intervals

aws.py

  • - Add secret names

chain_mappings.py

  • - Add vaults
  • - Add emissions tokens
  • - Add emissions contracts (Tree, rewards logger and gas oracle)
  • - Add chain ID
  • - Add claimable tokens
  • - Add abi directory
  • - Add decimal mapping
  • - Add explorer url

emissions.py

  • - Add Avax to Boost Chains

explorer.py

  • - New subgraph based get_block_by_timestamp required

TreeManager.py

  • - Investigate if get_tx_options needs custom functionality

tx_utils.py

  • - Add to get_gas_price_of_tx
  • - Add to get_effective_gas_price

subgraph/config.py

  • - Add chain and token subgraphs (No Boost)

.deploy/base/propose_avax_cycle_bot.yaml

  • - Create CronJob K8s spec

.deploy/base/approve_avax_cycle_bot.yaml

  • - Create CronJob K8s spec

.deploy/base/service_account.yaml

  • - Create service account with propose bot IAM role
  • - Create service account with approve bot IAM role

.deploy/base/kustomization.yaml

  • - Add propose and approve bot yaml files to resources list

KEEPERS - AWS

  • - Create Avax Propose / Approve keeper
  • - Implement avax propose / approve script in YAML
  • - Create bucket and blank tree in AWS
  • - Fund cycle bot (address: 0x1a6D6D120a7e3F71B084b4023a518c72F1a93EE9)

badger-prod AWS actions

Manual Actions

  • - Create secrets in AWS secrets manager for Discord monitoring webhooks (boost in prod/stg, cycles in prod), for block explorer api token

https://github.com/Badger-Finance/badger-IaC/pull/88

  • - Update rewards_bots_sm_policy IAM policy to give bots access to secrets
  • - Update stg_boost_bot_sm_policy IAM policy to give bots access to secrets
  • - Create service account IAM role for approve cycle bot
  • - Create service account IAM role for propose cycle bot
  • - Create IAM policy to allow access to relevant S3 buckets
  • - Attach S3 access IAM policy to service account IAM roles
  • - Attach common secrets IAM policy to service account IAM roles
  • - Attach highsec STS assume role IAM policy to service account IAM roles
  • - Attach badger-org STS assume role for dynamo access IAM policy to service account IAM roles

badger-highsec AWS actions

https://github.com/Badger-Finance/badger-highsec-iac/pull/23

  • - Add new service account IAM roles to trust policy for highsec assume role

badger-org AWS actions

  • - Add new service account IAM roles to trust policy for arn:aws:iam::784874126256:role/k8s-bots
  • - Add new service account IAM roles to bucket policy for following buckets
    • arn:aws:s3:::badger-staging-merkle-proofs
    • arn:aws:s3:::badger-merkle-proofs
    • arn:aws:s3:::badger-json-fantom
    • arn:aws:s3:::badger-analytics

SCRIPTS

scripts/rewards/avax

  • - Propose script
  • - Approve script

API

  • - Add Avax badger tree definition to API / SDK

Vault Keepers

  • - Add keeper address to Badger Tree as RootProposer
  • - Add keeper address to Badger Tree as RootValidator

python-keepers

Badger-Finance/python-keepers#125

.deploy/base/avax_earner.yaml

  • - Create CronJob manifest

.deploy/base/avx_harvester.yaml

  • - Create CronJob manifest

.deploy/base/service_accounts.yaml

  • - Create harvester service account
  • - Create earner service account

.deploy/base/kustomization.yaml

  • - Add .deploy/base/avx_harvester.yaml to resources
  • - Add .deploy/base/avax_earner.yaml to resources

config/constants.py

  • - Update MULTICHAIN_CONFIG object with new chain entry containing
    • chainlink data feed for gas token usd price
    • keeper acl address
    • addresses that registered vaults to registry
    • vault registry contract address
    • list of invalid strategies to ignore earning
    • list of invalid strategies to ignore harvesting

scripts/avx_earn.py

  • - CronJob execution script

scripts/avax_harvest.py

  • - CronJob execution script

src/earner.py

  • - Add gas limit for new chain in GAS_LIMITS object
  • - Update __get_gas_price() with strategy to calculate gwei gas price for tx

src/general_harvester.py

  • - Add gas limit for new chain in GAS_LIMITS object
  • - Update __get_effective_gas_price() with strategy to calculate gwei gas price for tx

badgerprod AWS

Manual Actions

  • - Create new channel called avax-keeper-info in Badger Builders with web hook
  • - Create new secret in secrets manager with web hook URL

https://github.com/Badger-Finance/badger-IaC/pull/89

  • - Create service account IAM role for harvester
  • - Create service account IAM role for earner
  • - Create IAM policy for bots to use giving access to
    • keeper address
    • keeper private key
    • keeper-alerts channel Discord web hook URL
    • ftm-keeper-info channel Discord web hook URL
  • - Attach IAM policy to earner IAM role
  • - Attach IAM policy to harvester IAM role
@Darruma Darruma changed the title Add Avax support for cycles Add Avax support for cycles/harvests Mar 21, 2022
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

No branches or pull requests

1 participant