Ethereum Chainlink CCIP: USDC Reverting from Another Chain with “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 for various DeFi projects and applications. We recently observed an issue where a specific function call in a smart contract on another chain would be reverted with the “Ready for Manual Execution” error.
This issue stems from the Chainlink Oracle (CCIP) service, which allows Ethereum-based contracts to query external data sources, such as APIs or other blockchain networks. In this article, we will delve into the details of the issue and provide insights into how to resolve it.
The Issue: Reverted Function Call with “Ready to Execute Manually” Error
According to reports from various DeFi communities and forums, a specific function call in a smart contract on another chain has been experiencing reversion issues. This function call, “bringUsdcFromAnotherChain,” attempts to retrieve the balance of USDC tokens 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 take USDC from another chain and execute it on the main Ethereum network.
function bringUsdcFromAnotherChain(address usdcAddress) public returns (uint256) {
// Query the Chainlink Oracle service for the current USDC balance
byte memory data = abi.encodePacked(
0x6ef5d8dd, // 'from'
usdcAddress,
1,
10000000,
2
);
// Call the function to perform the Chainlink Oracle query
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 retrieved 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 lies in 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 applied to resolve this issue:
- Upgrade the CCIP service:
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 implement manual execution of the function based on a smart contract on another chain. This involves creating a separate node or endpoint that manually executes the “bringUsdcFromAnotherChain” function, bypassing the rollback issue entirely.
In summary, the Ethereum Chainlink CCIP service has experienced issues with rollback of function calls corresponding to the receipt of USDC from another chain.
Leave a Reply