
Math · Reads onchain state
Applies a binary arithmetic operation to two values and returns the result. Operations are add, subtract, multiply, divide, modulo, power, minimum, and maximum. Operand decimals are reconciled so a token amount and a price combine correctly, and division truncates. Power returns a raw integer. Reach for it to derive the next step's input from earlier reads: a repay sized as debt minus a buffer, a min of a target and available liquidity, or a value split into a fraction.
Get Chainlink Token Value (USD)


1·Take
Step one declares a parameter named token, whose value the caller supplies when the plug runs.
2·Take
Next comes a second parameter named amount, also filled in by the caller at execution time.
3·Use
This step composes another plug, Get Chainlink Price (USD), pulling its price result into this transaction.
4·Calculate
Multiplying the composed price from slot 3 by the caller supplied amount from slot 2 produces the total value.
5·Bubble
Finally the product from slot 3 of the math step is surfaced as this plug's output.