Skip to main content

Documentation Index

Fetch the complete documentation index at: https://glide-9da73dea.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Move funds between yield vaults (Aave/Morpho/Kamino/idle) within the envelope. Blocked by V3 yield infra if that dependency slips.

Metadata

FieldValue
Nameyield.allocate
Categorytreasury
Required scopetreasury:yield-allocate
Idempotency key requiredyes

Annotations

AnnotationValue
TitleAllocate Yield
Read-onlyno
Destructiveno
Idempotentyes
Open-worldno
Requires human approvalno

Input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "from_protocol": {
      "type": "string",
      "enum": [
        "aave",
        "morpho",
        "kamino",
        "idle"
      ]
    },
    "to_protocol": {
      "type": "string",
      "enum": [
        "aave",
        "morpho",
        "kamino",
        "idle"
      ]
    },
    "chain": {
      "type": "string",
      "enum": [
        "eth",
        "base",
        "arb",
        "op",
        "polygon",
        "sol"
      ]
    },
    "token": {
      "type": "string",
      "minLength": 1
    },
    "amount_cents": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "min_apr_bps": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  },
  "required": [
    "from_protocol",
    "to_protocol",
    "chain",
    "token",
    "amount_cents",
    "idempotency_key"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "allocation_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "from_protocol": {
      "type": "string",
      "enum": [
        "aave",
        "morpho",
        "kamino",
        "idle"
      ]
    },
    "to_protocol": {
      "type": "string",
      "enum": [
        "aave",
        "morpho",
        "kamino",
        "idle"
      ]
    },
    "amount_cents": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "enqueued_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    },
    "policy_version": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "allocation_id",
    "from_protocol",
    "to_protocol",
    "amount_cents",
    "enqueued_at",
    "policy_version"
  ],
  "additionalProperties": false
}

Auth

Caller’s grant must include the treasury:yield-allocate scope. Grants whose scope set is a superset of the required scope are accepted.

Request examples

curl -X POST https://mcp.glide.co/mcp/treasury \
  -H "Authorization: Bearer $GLIDE_GRANT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: yield-rebalance-20260504-001" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "yield.allocate",
    "params": {
      "from_protocol": "idle",
      "to_protocol": "aave",
      "chain": "base",
      "token": "USDC",
      "amount_cents": 500000,
      "min_apr_bps": 350,
      "idempotency_key": "yield-rebalance-20260504-001"
    }
  }'

Response examples

Success
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "allocation_id": "c1d2e3f4-a5b6-4789-8012-345678fedcba",
    "from_protocol": "idle",
    "to_protocol": "aave",
    "amount_cents": 500000,
    "enqueued_at": "2026-05-04T15:30:00Z",
    "policy_version": 9
  }
}
Step-up required (amount over envelope threshold)
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32003,
    "message": "yield move of 500000¢ requires step-up",
    "data": {
      "reason_id": "step_up_required",
      "step_up_url": "https://app.glide.co/step-up/confirm?sigil=eyJhbGci..."
    }
  }
}
V3 yield infrastructure not yet available
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32006,
    "message": "yield.allocate depends on V3 DeFi yield infra (Bucket 1.8 / 4.4); not yet shipped",
    "data": {
      "reason_id": "yield_v3_blocked"
    }
  }
}

Errors

Codereason_idMeaning
-32000unauthenticatedBearer token missing or expired.
-32001unauthorizedGrant does not include treasury:yield-allocate.
-32002policy_deniedEnvelope denied the allocation (velocity, protocol not in allowlist, daily cap).
-32003step_up_requiredAmount exceeds the envelope’s step_up_amount_cents. data.step_up_url is the biometric approval URL.
-32004rate_limitedToo many allocation requests. data.retry_after_seconds present.
-32006yield_v3_blockedV3 DeFi yield infrastructure is not yet deployed. The tool is gated on Bucket 1.8 / 4.4.
-32602same_protocol_noopfrom_protocol and to_protocol are identical — no-op.
-32603internal_errorTransient server fault. Retry with the same idempotency key.

Step-up flow

yield.allocate uses the same envelope step-up threshold as payments.initiate — step-up is not always required, only when the allocation amount exceeds the envelope’s step_up_amount_cents.
  1. Call yield.allocate with your params. If the amount is below the threshold, the allocation is enqueued immediately and you receive a success response.
  2. If the amount is at or above the threshold, you receive -32003 with data.step_up_url.
  3. Redirect the principal to step_up_url. On approval, Glide mints a one-time sigil for reason: "yield_allocate".
  4. Re-submit the original call with step_up_sigil: "<sigil>" added to params. The server verifies the sigil is bound to reason: "yield_allocate" and has not been redeemed.
Note: unlike vault.rotateSigner, the allocation row is enqueued after the sigil is redeemed in the same call — there is no separate proposal step.