npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@morpho-org/blue-reward-programs

v1.4.69

Published

This repository allows you to create your own reward program by submitting a pull request.

Downloads

762

Readme

Morpho Blue reward programs

This repository allows you to create your own reward program by submitting a pull request.

⚠️ Warning ⚠️

- The pull request must be submitted at least one week before the start of the program.

- The funds must be sent to the URD before the pull request is submitted. Please share the transaction link in the pull request template

Pull Request Verification Process

To ensure the accuracy and reliability of each Pull Request, we follow these detailed verification steps before merging:

  1. Future Start Date: Confirm that the program’s start date is set in the future.
  2. Valid URD Address: Verify that the urdAddress is a valid URD.
  3. Market or Vault verification: Verify that the specified Market or Vault is valid and whitelisted in the Morpho app.
  4. Token Pricing: Check that the specified token is priced in our API. If not, pause the process until pricing is available.
  5. Funds Transfer: Confirm that the funds have been sent from the designated fundsSender to the URD.
  6. Reward Amount Accuracy: Ensure the reward amount matches the funds sent to the URD, paying special attention to the token’s decimal precision.

Create a Market program

Market Programs can be added in src/market-programs.ts at the end of the marketPrograms array. You should send funds to the URD with the funds sender before the start date of the program to validate it.

You can see an example below:

export const marketPrograms = [
  {
    start: 1717149233n,
    end: 1718149235n,
    fundsSender: "0x061060a65146b3265C62fC8f3AE977c9B27260fF",
    urdAddress: "0xURD_MAINNET_TO_MODIFY",
    tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    marketId: "0xdba352d93a64b17c71104cbddc6aef85cd432322a1446b5b65163cbbc615cd0c",
    rewardAmount: {
      supply: parseUnits("300000", 18),
      borrow: 0n,
      collateral: 0n,
    },
    chainId: ChainId.MAINNET,
  },
];

Create a Vault program

Vault Programs can be added in src/vault-programs.ts at the end of the vaultPrograms array. You should send funds to the URD with the funds sender before the start date of the program to validate it.

You can see an example below:

export const vaultPrograms = [
  {
    start: 1718719200n,
    end: 1723903200n,
    fundsSender: "0x74Cbb1E8B68dDD13B28684ECA202a351afD45EAa",
    urdAddress: "0xURD_BASE_TO_MODIFY",
    tokenAddress: "0xA88594D404727625A9437C3f886C7643872296AE",
    vault: "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
    amount: parseUnits("4165000", 18),
    chainId: ChainId.BASE,
  },
];

Create an Airdrop program

Airdrop Programs can be added in src/airdrop-programs.ts at the end of the airdropPrograms array. You should send funds to the URD with the funds sender before the claim date of the program to validate it.

You can see an example below:

export const vaultPrograms = [
  {
    claimDate: 1725840000n,
    fundsSender: "0xF057afeEc22E220f47AD4220871364e9E828b2e9",
    urdAddress: "0x330eefa8a787552dc5cad3c3ca644844b1e61ddb",
    tokenAddress: "0x9994E35Db50125E0DF82e4c2dde62496CE330999",
    cidV0: "QmbfETB4KZG96tjfPZLJHb8Xn1bjNbfK9vyUcdgfsm33WG",
    chainId: ChainId.MAINNET,
    totalRewards: parseUnits("600000", 18),
  },
];

Frequently Asked Questions

  1. Where should we get the urdAddress?

The URDs are not tied to a specific type of program. The incentive provider must ensure that Morpho Association is the updater of the tree to prevent incorrect tree roots from being published on the URD, which could lead to loss of funds. It is recommended to use the following URDs:

  1. Do the borrow and collateral parameters affect anything? Should we set them to 0?

Yes, they can affect the reward distribution. If your program does not intend to provide rewards for borrowing or collateral, you should set these parameters to 0. Otherwise, you can specify the amount accordingly.

  1. What happens if the funds are not sent to the URD before the start date?

If funds arrive after the start date, the program won't start immediately, but the funds are not lost. They can be used to reschedule the program or initiate a new one later on.

Note that a reward program pull request will not be merged if the funds have not been sent to the URD.

  1. In case of multiple rewards programs, should I send all funds?

It is up to the incentives provider. If multiple programs are created, it's essential that the URD receives the rewards dedicated to each program before their respective start dates. Even if a program starts in one month, as long as its dedicated rewards are received before its start date, it will be considered valid.