Triggers
A trigger is read on-chain by the vault itself, with the same code in arm, execute and attempt. Every rule also has a nextRun time: no trigger is true before it.
| Kind | Reads | Fields |
|---|---|---|
| TIME (0) | The block time | start, and an interval for repeating rules. The schedule stays aligned: a late run does not shift the next ones. |
| FEED (1) | Chainlink latestRoundData() | feed, below or above, threshold (8 decimals), maxAge. Stock feeds move on weekdays, so the default maxAge is 80 hours; tighten it for faster markets. |
| POOL (2) | Uniswap V4 sqrtPriceX96 through PoolManager.extsload, or a V3 pool's slot0 | pool id (V4) or pool (V3), below or above, threshold. Must be true when armed and when executed, at least 2 L1 blocks apart. |
| BALANCE (3) | balanceOf(account), or ETH when the token is zero | token, account, below or above, value |
| CALL (4) | Any view: staticcall(target, data) | target, calldata, the index of the returned word, comparison, value |
Pool prices and the two-block guard
A pool price can be pushed for one block. A POOL rule therefore runs only if its condition was true when it was armed and is still true when it runs, at least two L1 blocks later (block.number on this chain is the Ethereum block, about 12 seconds). The house keeper arms POOL rules itself and waits. The PoolManager is 0x8366a39CC670B4001A1121B8F6A443A643e40951.
Any view
CALL is what makes any trigger possible: a Pons V2 launch's phase in the factory (the graduation recipe reads word 10 of getLaunchedToken and waits for phase 2, when the Uniswap pool is live), a curve's graduated(), a stock token's multiplier before a split, a vault's share price. The call gets 300,000 gas and must not revert.
Feeds and pools in the app
| Token | Chainlink feed | Uniswap V4 pool (USDG) |
|---|---|---|
| NVDA | 0x379EC4f7… | fee 0.3% |
| TSLA | 0x4A1166a6… | fee 0.3% |
| AAPL | 0x6B22A786… | fee 1% |
| GOOGL | 0xF6f373a0… | fee 0.3% |
| AMD | 0x943A29E7… | fee 1% |
| META | pool only | fee 0.3% |
| MSFT | pool only | fee 0.3% |
| AMZN | pool only | fee 0.3% |
| SPY | pool only | fee 0.3% |
| QQQ | pool only | fee 0.3% |
| COIN | pool only | fee 1% |
| PLTR | pool only | fee 1% |