CRE Workflows HubCRE Workflows Hub
  • Workflows
  • Chainlink repo
  • Sign in
CRE Workflows Hub
  • Workflows
  • Docs
  • Contribute workflow
  • Chainlink CRE Templates

A registry for Chainlink Runtime Environment workflows. List and share your CRE workflows without waiting for upstream approval.

Back

Created by Chainlink Labs

Multi-Chain Token Manager

A multi-chain token manager that maximizes lending yields via automated cross-chain rebalancing using CRE integrated with CCIP.

View on GitHub
TypeScript
Go

What This Template Does This template provides an end-to-end starting point for writing your own multi-chain token manager that maximizes supply APY by rebalancing tokens cross-chain with the Chainlink Runtime Environment (CRE) via the Cross-Chain Interoperability Protocol (CCIP).

The template consists of two components:

Contracts (deployed on multiple chains)

  • MockPool contract that mimics an AAVE liquidity pool
  • ProtocolSmartWallet contract that manages lending positions

CRE Workflow that monitors supply APY of a target asset on each chain and automatically rebalances lending positions (to maximize supply APY)

  • Golang workflow targeting the Golang CRE SDK
  • TypeScript workflow targeting the TypeScript CRE SDK

Key Technologies:

  • CRE (Chainlink Runtime Environment) - Orchestrates workflow with DON consensus
  • CCIP (Cross-Chain Interoperability Protocol) - Secure token bridging with instructions

Getting Started You can build with the CRE SDK in either Golang or TypeScript. See the Go README and TypeScript README on GitHub for detailed instructions.

Security Considerations

  • This is a demo project - Not production-ready
  • Contracts are examples - Write your own audited contracts for your use case
  • Use your own RPC for stability - For stable deployment and chainwrite operations it is advised to use your own private RPCs
  • Secrets hygiene – Keep real secrets out of version control; use secure secret managers for .env values.

Install the CRE CLI to use this template

You can use the command below or download the latest CLI release on GitHub.

curl -sSL https://cre.chain.link/install.sh | bash
Author
Chainlink Labs
LicenseMIT

Disclaimer

This template represents an educational example to use a Chainlink system, product, or service and is provided to demonstrate how to interact with Chainlink's systems, products, and services to integrate them into your own. This template is provided "AS IS" and "AS AVAILABLE" without warranties of any kind, it has not been audited, and it may be missing key checks or error handling to make the usage of the system, product or service more clear. Do not use this example in a production environment without completing your own audits and application of best practices. Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs that are generated due to errors in code.