# Building a Chainlink Oracle Price Feed on ICP using IC Alloy

**URL:** <https://forum.dfinity.org/t/building-a-chainlink-oracle-price-feed-on-icp-using-ic-alloy/54279>\
**Category:** Rust\
**Created:** [August 1, 2025, 12:51pm UTC](https://forum.dfinity.org/t/building-a-chainlink-oracle-price-feed-on-icp-using-ic-alloy/54279 "2025-08-01T12:51:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yongsxyz](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/yongsxyz/32/22753_2.png) [@yongsxyz](https://forum.dfinity.org/u/yongsxyz)\
**Post date:** [August 1, 2025, 12:51pm UTC](https://forum.dfinity.org/t/building-a-chainlink-oracle-price-feed-on-icp-using-ic-alloy/54279/1 "2025-08-01T12:51:17Z")

</div>

`ic-alloy` is an open source project to make the [Alloy.rs](https://alloy.rs/) support libraries available to ICP developers. Using Alloy instead of interacting with the EVM RPC canister directly provides a drastically simpler developer experience.

Live Backend: [Live Backend](https://a4gq6-oaaaa-aaaab-qaa4q-cai.icp0.io/?id=jmbn7-tiaaa-aaaaa-qbsfa-cai)  
ICP Ninja: [icp ninja](https://icp.ninja/i?s=w2RVV)  
Frontend source code: [frontend](https://github.com/yongsxyz/ic-alloy-chainlink/tree/main/src/frontend)  
Backend source code: [backend](https://github.com/yongsxyz/ic-alloy-chainlink/tree/main/src/backend)  
Smart Contract: [smart contract](https://github.com/yongsxyz/ic-alloy-chainlink/tree/main/contract)  
Live Testnet Sepolia: [testnet](https://sepolia.etherscan.io/address/0xe1006413d1ae924056a602D5266e86dd2570Ad68)

### **Overview**

this demonstrates how to connect Chainlink Price Feed to **Canister** with external **EVM-compatible chains** and Ideal for decentralized finance (DeFi), lending borrowing, oracles on the Internet Computer

- Query on-chain price feed data (e.g., Chainlink) directly from Solidity contracts
- Read real-time price data from decentralized applications on ICP without relying on off-chain oracles.

#### Cross-Chain Data Access:

Read price data from Chainlink’s on-chain sources via EVM and Fully decentralized and serverless

## Features:

#### Asset Management

- Add/remove assets with custom symbols

- Update asset information

- Owner-specific asset configurations

**Price Feed Integration**

- Automatic validation of Chainlink price feeds

- **Configurable stale data thresholds (heartbeat)** per asset to define how long price data is considered valid

- Allows you to set a custom `staleThreshold` in seconds during asset registration or update.

- Protects against using outdated or frozen price feeds

- Fallback mechanisms for failed price lookups

#### **Conversion Tools**

- Accurate token ↔ USD conversions

- Handles different decimal precisions

- Bulk conversion operations
