


Reads onchain state
Reads the latest Chainlink price of a base asset in a quote asset, normalized to 18 decimals. The feed registry's latestRoundData is fetched for the pair, and the answer is rescaled from the feed's own decimals to 18 so every pair compares alike. The round's timestamps come back alongside, so staleness can be checked. Reach for it whenever a strategy needs a reference price independent of any pool: compare a DEX quote against it to bound slippage, convert a dollar target into a token amount, or coil the updated-at timestamp into a predicate that requires the feed is fresh.
Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.
Swap 20 USDC for ETH Within 1% of Chainlink



1·Get price
Reading Chainlink, the latest ETH price is pulled quoted in USD at 0x0000000000000000000000000000000000000348 and normalized to 18 decimals, giving the reference the rest of the plug builds on.
2·Multiply then divide
Taking 20 times 1 and dividing by that Chainlink price rounded down converts the 20 USDC budget into an ETH amount at the oracle rate.
3·Multiply then divide
Multiplying that ETH amount by 99 and dividing by 100 rounded down trims it to 99 percent, setting a floor one percent below the oracle quote.
4·Swap tokens
Swapping 20 USDC through the solver, the trade requires at least that floored ETH amount to settle, so it reverts if fill falls below the 1 percent band.
Dollar-cost average on Base · 4 plugs
Posts · 4
More on Chainlink · 1
On other protocols · 12