
Compound · Reads onchain state
Reads what a Compound market pays suppliers at a given utilization, per second and as an APY. Comet's getSupplyRate evaluates the market's published curve at whatever utilization it is handed and returns the rate at 18 decimals; the action compounds it over a year on-chain into supplyApy. The market never exposes its rate at the current utilization, so wire the utilization read into this one to ask what it pays right now. Reach for it to gate a supply on a minimum APY, to compare markets by yield, or to ask what the market would pay at a utilization it has not reached yet.