Examples
Worked workflow patterns using the Centrifuge node
1. Check a Treasury Balance Before a Payout Step
Guard a downstream payout/transfer action by confirming an account has enough free balance first.
- Centrifuge node:
resource=account,operation=getBalance,network=centrifuge,address={{treasuryAddress}} - Centrifuge node:
resource=utility,operation=convertUnits,amount={{freeBalance}},fromUnit=base,toUnit=display,decimals=18→ human CFG figure - Condition node:
freeBalanceDisplay >= requiredAmount - If true, continue to the payout step; if false, route to an alert branch
Why convert first:
freeBalance comes back as a base-unit (Planck) string — comparing
it directly against a human threshold like "5 CFG" would be comparing 5000000000000000000 against
5. Convert before you compare.
2. Detect a Stalled Chain Before Trusting a Balance Read
Centrifuge mainnet has been halted since 2026-06-28 — a workflow that blindly trusts every
account.getBalance success will silently treat 22+ day-old state as current.
- Centrifuge node:
resource=utility,operation=chainInfo,network=centrifuge - Condition node:
headBlockAgeSeconds > 3600(or your own staleness threshold) - If true, route to a "stale chain" warning branch before running any balance-dependent logic; if false, proceed normally
3. Re-encode an Address for a Cross-Chain Display
Show a Centrifuge account's Polkadot-style address alongside its native one, e.g. in a report that links out to a Polkadot-aware block explorer.
- Centrifuge node:
resource=utility,operation=convertAddress,address={{centrifugeAddress}},targetNetwork=polkadot - Display
convertedAddressnext to the original — both represent the same account, verifiable via matchingpublicKeyHex.
4. Validate a User-Entered Address Before Any Lookup
- Centrifuge node:
resource=utility,operation=validateAddress,address={{userInput}} - Condition node:
isValid == true - If true, proceed to
account.getBalance; if false, return a validation error to the user immediately instead of calling the network
Tip: This is a free, instant, local check — always run it on user-supplied addresses before a
balance lookup, not just to avoid a wasted RPC round-trip, but because a prefix mismatch between a bad address
and your intended
network would otherwise surface as the less-obvious
VAL_NETWORK_MISMATCH.
5. Convert a Pool Repayment Amount Without a 1012 Error
A form collects a repayment amount in a pool's stablecoin (say, USDC), and a later step needs it in base units.
- Centrifuge node:
resource=utility,operation=convertUnits,amount={{userInputUsdc}},fromUnit=display,toUnit=base,decimals=6 - Pass
outputAmountinto the downstream step's input field.
Note the
decimals=6, not 18. USDC and USDT use 6 decimals; hardcoding CFG's 18 here
would inflate the amount by a factor of a trillion. See Currencies & Units.
6. Convert a Loan's APR Into an On-Chain Rate
A loan configuration form collects an interest rate as an APR percentage; the pool's on-chain configuration needs the RAY per-second equivalent.
- Centrifuge node:
resource=utility,operation=convertRate,rate={{userInputAprPercent}},direction=aprToPerSec - Pass
outputRateinto the downstream step that configures the loan's interest rate.