There is a problem where some contracts want computation to happen every X blocks (for example, staking derivatives may want to calculate rewards every block, or every few blocks). To achieve something like this, you'd have to run external code that calls the contract periodically, manages gas, etc.
This could be streamlined by having a contract that is triggered every block that can trigger multiple other contracts, based on some criteria (e.g. call this contract once every 10 blocks, call another once every 20 blocks) etc. The challenges would be managing gas costs, and DoS resistance (what happens if one of the calls fails?).
Another idea is to have something like this as a service (off chain completely)
another issue if it's on-chain is accumulating computational overhead for nodes. If a contract asks to be run once every block, indefinitely... well it's going to be there for the rest of time.
There is a problem where some contracts want computation to happen every X blocks (for example, staking derivatives may want to calculate rewards every block, or every few blocks). To achieve something like this, you'd have to run external code that calls the contract periodically, manages gas, etc.
This could be streamlined by having a contract that is triggered every block that can trigger multiple other contracts, based on some criteria (e.g. call this contract once every 10 blocks, call another once every 20 blocks) etc. The challenges would be managing gas costs, and DoS resistance (what happens if one of the calls fails?).
Another idea is to have something like this as a service (off chain completely)