Ethereum Chainlink CCIP: Receiving USDC from another chain returns with a “Ready for manual execution” error

In the world of decentralized finance (DeFi), blockchain technology plays a vital role in facilitating secure and efficient interactions between different networks. One such network is Ethereum, which has been the hub of many DeFi projects and applications. We recently observed an issue where a specific function call in a smart contract on another chain would return with a “Ready for manual execution” error.

This issue stems from the Chainlink Oracle Service (CCIP), which allows Ethereum-based contracts to query external data sources, such as APIs or other blockchain networks. In this article, we will explain the issue in detail and provide insights on how to resolve the issue.

The Problem: Function Call Returned with “Ready for Manual Execution” Error

According to reports from various DeFi communities and forums, a specific function call in a smart contract on another chain is experiencing return issues. This function call, “bringUsdcFromAnotherChain,” attempts to retrieve the balance of a USDC token on an external network using the Chainlink Oracle service.

The coded function call corresponds to this operation:

pragma solidity ^0.8.0;

contract BringUsdcFromAnotherChain {

// Function to fetch USDC from another chain and run it on the main Ethereum network.

function bringUsdcFromAnotherChain(address usdcAddress) public returns (uint256) {

// Retrieve the current USDC balance from the Chainlink Oracle

byte memory data = abi.encodePacked(

0x6ef5d8dd, // 'from'

usdcAddress,

1,

10000000,

2

);

// Call the function to perform the query on the Chainlink Oracle

uint256 balance;

request(bytes(data).length >= 4, "Invalid data");

byte memory newdata = abi.decodePacked(bytes(data), &balance);

request(newdata[3] == 1, "Invalid oracle data");

// Execute the recovered balance and send it to the caller

uint256[] memory output = abi.encodeArray(balance);

output output[0];

}

}

When this function call is executed on a smart contract on another chain, it typically uses the Chainlink Oracle service to retrieve the current USDC balance. However, due to internal issues with the CCIP service or the contract itself, the rollback will be with the error message “Ready for manual execution.”

Decision: Understanding the cause and mitigation strategies

The root cause of the issue is the API call format of the Chainlink Oracle service, which is incompatible with the data formats of Ethereum-based smart contracts. There are several mitigation strategies that can be used to resolve this issue:

  • Upgrade the CCIP service:

    Ethereum: Chainlink CCIP publishing message (encoded function call) to bring USDC from another chain is getting reverted with

    One possible solution is to upgrade the Chainlink Oracle service to the latest version or implement a compatibility layer between different blockchain networks.

  • Using different data formats:

    Another approach could involve using alternative data formats that are compatible with Ethereum-based smart contracts. For example, you could use JSON Web Tokens (JWT) instead of Chainlink Oracle’s own data format.

  • Manual execution: The third strategy is to manually execute the function call in a smart contract on another chain. This involves a separate node or endpoint that manually executes the “bringUsdcFromAnotherChain” function, bypassing the rollback issue entirely.

In summary, the Ethereum Chainlink CCIP service had issues reversing the appropriate function calls to bring USDC from another chain.