


Reads onchain state
Reads what a Compound market charges borrowers at a given utilization, per second and as an APY. Comet's getBorrowRate 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 borrowApy. The market never exposes its rate at the current utilization, so wire the utilization read into this one to ask what it charges right now. Reach for it to gate a borrow on a maximum APY, to compare the cost of debt against the yield the borrowed asset will earn elsewhere, or to ask what a loop would cost at a utilization the market has not reached yet.
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.
Earn yield on Base · 12 plugs
More on Compound · 20





















On other protocols · 1