> For the complete documentation index, see [llms.txt](https://docs.kpk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kpk.io/funds/infrastructure/onchain-accounting/price-feeds/syrupusdc-l2.md).

# syrupUSDC (L2)

Custom price feed for **Maple Finance syrupUSDC** on Layer 2 networks. On L2s, a dedicated Chainlink syrupUSDC/USDC feed is available and used directly, multiplied by the USDC/USD price read from the NAV's own primary feed.

**Source:** [`syrupUSDC_L2_CustomPriceFeed.sol`](https://github.com/karpatkey/onchain-accounting/blob/main/src/prices/protocols/syrupUSDC_L2_CustomPriceFeed.sol)

{% hint style="info" %}
**L2 feed.** For the Ethereum mainnet feed, see [syrupUSDC](/funds/infrastructure/onchain-accounting/price-feeds/syrupusdc.md).
{% endhint %}

{% hint style="info" %}
The USDC/USD term is sourced from the NAV's own selector — see [Base/USD from the NAV's own selector](/funds/infrastructure/onchain-accounting/price-feeds.md#base-usd-from-the-navs-own-selector).
{% endhint %}

***

## Approach

Chainlink syrupUSDC/USDC × USDC/USD (from the NAV's primary feed via `getPriceDataNoDivergence(USDC)`)

<figure><img src="/files/3q8EFbUKDTO0aN8LWaDP" alt="Left-to-right flowchart of the syrupUSDC (L2) price feed: rate and Chainlink inputs combine into a USD price, with a staleness gate."><figcaption><p>syrupUSDC (L2) price feed — how its oracle inputs compose into a USD price, with the staleness gate.</p></figcaption></figure>

***

## Price calculation

```
price = syrupUSDC_to_USDC_rate × USDC_USD / 10^syrupUSDC_to_USDC_feed.decimals()
```

| Input                    | Source                                              | Description                      |
| ------------------------ | --------------------------------------------------- | -------------------------------- |
| `syrupUSDC_to_USDC_rate` | Chainlink syrupUSDC/USDC                            | syrupUSDC exchange rate in USDC  |
| `USDC_USD`               | NAV base — `getPriceDataNoDivergence(USDC)` (8 dec) | the NAV's primary USDC/USD price |

The syrupUSDC/USDC rate is read live from Chainlink; the USDC/USD base term is read from the NAV's primary feed. Result carries the feed's **8 decimals**.

***

## Constructor

```solidity
constructor(
    address syrupUsdc_,
    address syrupUsdcToUsdcChainlink_,
    uint256 syrupUsdcToUsdcHeartbeat_,
    address nav_,
    address baseAsset_
)
```

| Parameter                   | Description                                                                                     |
| --------------------------- | ----------------------------------------------------------------------------------------------- |
| `syrupUsdc_`                | The syrupUSDC token address                                                                     |
| `syrupUsdcToUsdcChainlink_` | Chainlink syrupUSDC/USDC oracle                                                                 |
| `syrupUsdcToUsdcHeartbeat_` | Staleness window (seconds) for the syrupUSDC/USDC feed                                          |
| `nav_`                      | NAVCalculator (proxy) — supplies the base stablecoin's USD price via `getPriceDataNoDivergence` |
| `baseAsset_`                | The registered base stablecoin whose USD price is read (USDC)                                   |

***

## Staleness

The syrupUSDC/USDC rate leg checks its own Chainlink heartbeat: it is stale if the rate is `≤ 0` or if `block.timestamp − effectiveUpdatedAt ≥ heartbeat` (`effectiveUpdatedAt` clamped to `block.timestamp`). The price is also stale if the base USD price is `≤ 0`, or if the NAV reports the base asset (USDC) stale — all its feeds stale. The base leg's `updatedAt` comes from the NAV's selected USDC feed. The reported `updatedAt` is the older (minimum) of the rate leg and the base leg.

***

## Chains

Deployed on **Arbitrum**. Mainnet uses [syrupUSDC (Mainnet)](/funds/infrastructure/onchain-accounting/price-feeds/syrupusdc.md), which derives the rate from the ERC-4626 vault instead.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kpk.io/funds/infrastructure/onchain-accounting/price-feeds/syrupusdc-l2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
