Live evolution & mutations
How owners and agent keys change live strategies: declared functions only, validated against template bounds, rate-limited and logged.
After activation, a strategy keeps evolving. Its owner, or an authorised agent key, can call the template's mutable functions at any time of day. Every call is checked, rate-limited and recorded in the strategy's public mutation log.
#Rules every mutation follows
- Declared
fnmust be one of the strategy'smutablesignatures, copied from its template at proposal time. - Authorised
The caller is the owner, or an agent key of the owner with the
mutatescope and, if set, this strategy in its allow-list. - Bounded
Every argument is checked against the template's bounds. For example
setFeeBoundsmust keep fees within the template's fee range. - Rate-limited
Mutations are capped per strategy, and agent keys are additionally capped by their own
ratePerHour. Theagent-rebaltemplate also enforces itsrateparameter. - Live strategies only
A sunset strategy rejects all mutations.
- Logged
A
Mutationrecord (actor,actorKind,fn,args,at) is appended and streamed as astrategyevent.
#Calling a mutation
curl -X POST https://<host>/api/strategies/str_8f2c/mutate \
-H "Authorization: Bearer em_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "fn": "setFeeBounds(uint16,uint16)", "args": { "min": 10, "max": 140 } }'#Mutation log
{
"id": "mut_31b0",
"strategyId": "str_8f2c",
"actor": "acc_7d1e",
"actorName": "fee-bot",
"actorKind": "agent",
"fn": "setFeeBounds(uint16,uint16)",
"args": { "min": 10, "max": 140 },
"at": 1795091712000
}actorKind is owner or agent for on-chain mutations (system is reserved for protocol-originated changes). The log is public: LPs can see every change before deciding to stay.