Skip to content

Relay #2

@stas

Description

@stas

At a high level the relay is basically a compounder. We have two types of Relay:

  • compounder - was designed for everyone to convert claimed rewards into VELO and locked veVELO into deposited veNFTs
  • converter - was designed for our Foundations to convert claimed rewards into USDC

The general flow here is:

  1. Claim & lock rebases
  2. Claim rewards
  3. Swap rewards into VELO or USDC
  4. Extra step for compounders lock/compound the VELO

The challenges here are:

  • all computations are done in real-time onchain, there’s no APIs nor external services
  • onchain data needs to be fetched efficiently and we should leverage the Sugar where possible
  • limited memory / computing resources on the execution nodes, likely needs some architecture work for splitting the workload into steps (eg. swaps, or claims), sort of dispatcher approach (see bellow)

The current relay automation architecture we have is monolithic, so I don't expect it to fit in this current shape. It would have to be broken down per relay, where the processing is done per relay and every step can be run independently and/or triggered by a previous step/event:

  • Relay epoch triggered
    • Claims rewards and triggers
    • Swaps rewards and triggers
      • Compounds
    • Claims rebases

Relevat repositories (plus a private one we can share, with the current monolithic implementation):

https://github.com/velodrome-finance/relay
https://github.com/velodrome-finance/sugar/?tab=readme-ov-file#relay-data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions