Claim Pool Rewards

Learn how to claim rewards accrued through Morpho, on-chain via a Smart Contract & off-chain via ethers.js.

Claim rewards accrued from the underlying pool through Morpho, off-chain through Etherscan or with ethers.js, or on-chain using a Smart Contract. Here are concrete examples 👇

Morpho-Aave V2

There are currently no rewards distributed by Aave V2.

Morpho-Compound

// SPDX-License-Identifier: GNU AGPLv3
pragma solidity ^0.8.16;

import {IMorpho} from "@morpho-dao/morpho-core-v1/contracts/compound/interfaces/IMorpho.sol";

contract MorphoCompoundRepayer {
    address public constant CDAI = 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643;
    address public constant CWBTC2 = 0xccF4429DB6322D5C611ee964527D42E5d685DD6a;

    address public constant MORPHO = 0x8888882f8f843896699869179fB6E4f7e3B58888;

    function claimRewards() public {
        address[] memory poolTokens = new address[](2);
        poolTokens[0] = CDAI;
        poolTokens[1] = CWBTC2;

        IMorpho(MORPHO).claimRewards(poolTokens, false);
    }
}

Last updated

Logo

This documentation is provided by MorphoLabs, main contributor to Morpho DAO. For any question, reach out.