If/Else and filters

The builder is a canvas. Weight sits at the top. Everything else is a block you add with +. Create still signs a CC3 policy. Simulation is not execution.

Blocks

BlockJob
AssetPlaces TCTC or ETH on the canvas. Needed in Then and Else, and at the root when there is no branch.
WeightThe TCTC/ETH split for the active mix. Always present.
If/ElseA condition over two market functions, plus Then and Else mixes.
FilterRanks TCTC vs ETH by a metric and keeps Top or Bottom N.

If/Else

The cyan chip is the rule. Empty, it says Set Condition. Filled, it reads as a sentence, for example If Current Price of ETH is greater than Current Price of TCTC.

Click the chip to edit. The editor is a two-column condition. Each side is a function of an asset, or a fixed value. Comparators are greater than, less than, and equal. On desktop the popover opens to the right of the chip so it does not cover +.

Then and Else start as Select block. They are empty on purpose. Add TCTC or ETH into those slots. The simulation holds the Then mix when the condition is true, and the Else mix when it is false.

Create refuses an incomplete If/Else. You need a full condition sentence and at least one asset in each branch. Both TCTC and ETH still have to appear somewhere on the canvas, because the on-chain policy is a two-asset pair.

Filter

Filter ranks the two assets, then keeps Top or Bottom N. The chip reads like Sort by Percent Gain, Select Top 1.

MetricSource
Current PriceCoinGecko spot for creditcoin-2 or ethereum.
Market CapSame API, market cap field.
VolumeSame API, 24h volume.
Percent Gain7-day move on the sparkline series.

Affest only has two assets. Top 1 values the winner at 100%. Top 2 keeps both. Bottom works the same way from the other end of the rank. Filter is a simulation input. It does not replace the proof gate.

What create checks

  • Weight is present.
  • TCTC and ETH both appear, including across If/Else branches.
  • Every If/Else has a complete condition and assets in Then and Else.
  • Every Filter has a metric, a side, and a count.