Ape Auto Compound

For users participating in ApeStaking on the Parallel platform, ApeCompoundBot automates the compounding process for earned APE rewards. The bot is operated and funded by Parallel and can automatically claim and deposit a certain amount of APE rewards into the Compound Pool for compounding to get cAPE and then deposit cApe to the Lending pool for the user. Specifically, auto-compounding on Parallel refers to the process of automatically reinvesting earned interest back into the principal amount, and ApeCompoundBot is a bot designed to automate the compounding process for multiple APE series NFTs(MAYC, BAYC, BAKC). The bot can specify a particular compounding interval based on the progress of each NFT's reward generation.

💡 ApeCompoundBot can help eliminate the tedious manual compounding process and ensure that earned interest is automatically reinvested, resulting in a compounding effect over time and maximizing investment returns.


What does compounding do?

  1. The compounding operation will claim the APE rewards first, and then deposit it into the compound pool, and we will finally get cAPE.

  2. cAPE will be used to pay protocol fees (if exist on Parallel).

  3. Based on the user's configured sell option, decide whether to exchange some cAPE for USDC through Uniswap (currently only supports USDC).

  4. For the exchanged USDC, it will be converted into pUSDC through the supply operation.

  5. For the cAPE portion that has not participated in the swap, first repay the user's cAPE borrowing, and then convert the remaining portion (if any) into pcAPE through the supply operation.

Contract interface

ApeCompoundBot supports two types of ApeStaking: supplyAndStake and p2pPairStaking, refer to ape-staking-guide.

  1. Auto compound for supplied and staked BAYC/MAYC/BAKC

// 1. NFT Assets: BAYC or MAYC
/// @inheritdoc IPoolApeStaking
function claimApeAndCompound(
    address nftAsset,
    address[] calldata users,
    uint256[][] calldata tokenIds
) external;

// 2. NFT Asset: BAKC
 * @notice Claim user BAKC paired Ape coin reward and deposit to ape compound to get cApe, then deposit cApe to Lending pool for user
 * @param nftAsset Contract address of BAYC/MAYC
 * @param users array of user address
 * @param _nftPairs Array of Paired BAYC/MAYC NFT
function claimPairedApeAndCompound(
    address nftAsset,
    address[] calldata users,
    ApeCoinStaking.PairNft[][] calldata _nftPairs
) external;
  1. Auto compound for P2P pair staking

// For NFT Assets: MAYC, BAYC or BAKC
function claimForMatchedOrderAndCompound(
    bytes32[] calldata orderHashes
) external;

At the same time, they can supply cAPE to the Lending Pool as collateral.

Compound Strategy

ApeCompoundBot follows specific intervals to perform automatic compounding(at least 6 hours), each auto-compounding needs to meet the following two conditions:


    • the total unclaimed reward for the user


    • the total unclaimed reward for the individual NFT

when the above conditions are met, an Ape NFT can be added to the compounding candidate set of ApeCompoundBot.

  • BAYC compounds when both the total unclaimed reward exceeds 200 APE and when the individual NFT has over 60 APE rewards unclaimed.

  • MAYC compounds when both the total unclaimed reward exceeds 75 APE and when the individual NFT has over 20 APE rewards unclaimed.

  • BAKC compounds when both the total unclaimed reward exceeds 35 APE and when the individual NFT has over 15 APE rewards unclaimed.

💡 NOTE: Only the unclaimed rewards for NFTs exceeding INDIVIDUAL_NFT_PENDING_REWARD_LIMIT will be counted towards USER_PENDING_REWARD_LIMIT.

Last updated