DeFi and Market Actions
Use B3OS blockchain data, market, DeFi, futures, DEX, analytics, and token discovery actions.
B3OS includes a large blockchain data and DeFi action surface. These actions help workflows read token, market, protocol, position, DEX, futures, risk, and analytics data before deciding what to do next.
Video Walkthroughs
See aerodrome LP auto-claim, Polymarket USDC funding from Morpho, and the full library on the B3OS channel.
Action Families
| Family | Examples |
|---|---|
| Token data | Token lookup, metadata, price, decimals, discovery |
| Market data | CEX price, DEX price, futures, funding, market movement |
| DeFi | Pools, yields, positions, protocol metrics, Morpho-style yield lookups |
| Analytics | Dune, Coinglass, Coingecko, DexScreener, Codex, Chainalysis-style risk or data lookups |
| Prediction markets | Polymarket market and user activity |
| Onchain reads | Balances, allowances, contract reads, transaction debugging |
Read-Then-Decide Pattern
Collect data
Use market, token, position, or protocol read actions to gather context.
Normalize values
Convert units, parse symbols, or select list min/max before branching.
Apply policy
Check thresholds, risk flags, liquidity, slippage, or allowed markets.
Notify or execute
Send a message, write an org database record, or call an onchain action.
Example Decision Payload
json{ "asset": "{{$props.asset}}", "price": "{{$nodes.fetchMarket.result.price}}", "threshold": "{{$props.alertThreshold}}", "shouldAlert": "{{$nodes.fetchMarket.result.price}} > {{$props.alertThreshold}}"}
Production Notes
| Concern | Recommendation |
|---|---|
| Rate limits | Batch or cache where possible and avoid unnecessarily frequent schedules |
| Data freshness | Include timestamps in notifications and downstream decisions |
| Token decimals | Normalize before comparisons and transfers |
| Provider variance | Handle missing fields and provider-specific error messages |
| Trading actions | Add policy branches before placing orders or moving funds |
Do not route a single unverified data point directly into a wallet action. Use thresholds, freshness checks, liquidity checks, and explicit branch logic.
