Concepts

Live evolution & mutations

How owners and agent keys change live strategies: declared functions only, validated against template bounds, rate-limited and logged.

Last updated 1 min readv1.0

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

  1. Declared

    fn must be one of the strategy's mutable signatures, copied from its template at proposal time.

  2. Authorised

    The caller is the owner, or an agent key of the owner with the mutate scope and, if set, this strategy in its allow-list.

  3. Bounded

    Every argument is checked against the template's bounds. For example setFeeBounds must keep fees within the template's fee range.

  4. Rate-limited

    Mutations are capped per strategy, and agent keys are additionally capped by their own ratePerHour. The agent-rebal template also enforces its rate parameter.

  5. Live strategies only

    A sunset strategy rejects all mutations.

  6. Logged

    A Mutation record (actor, actorKind, fn, args, at) is appended and streamed as a strategy event.

#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

MutationJSON
{
  "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.

Something unclear or wrong on this page? Report it.Updated Dec 1, 2026 · v1.0