> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groundtech.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Provision a fee wrapper

Provisions a revenue-sharing fee wrapper around the Ground vault backing an existing gtoken.
Use the returned fee-wrapper ID to check when the contract is ready.


## OpenAPI

````yaml swagger/swagger-combined.yaml POST /v2/fee-wrappers
openapi: 3.0.0
info:
  title: Ground API
  description: Core API for Portfolio Wallets, gtokens, MicroVaults, and webhooks.
  version: 2.0.0
servers:
  - url: https://sandbox.groundtech.co
  - url: https://production.groundtech.co
security:
  - bearerAuth: []
tags:
  - name: System
    description: System health and utility endpoints.
  - name: Sandbox Faucets
    description: Sandbox-only test token faucets.
  - name: Portfolio Wallets
    description: >-
      Portfolio wallets with strategy allocation, deposits, withdrawals, and
      yield positions.
  - name: gVaults
    description: >-
      Direct access to gtokens with deposit access controls and optional fee
      wrappers.
  - name: MicroVaults
    description: >-
      Customer-owned onchain vaults with externally held ERC-20 shares. Private
      preview in sandbox on Ethereum Sepolia.
  - name: Webhook Endpoints
    description: Webhook endpoint management for portfolio wallet notifications.
paths:
  /v2/fee-wrappers:
    post:
      tags:
        - gVault Fee Wrappers
      summary: Provision a fee wrapper over a gtoken backing vault
      operationId: createFeeWrapper
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeeWrapperCreateRequest'
      responses:
        '202':
          description: Provisioning accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeWrapper'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: Request ID conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    FeeWrapperCreateRequest:
      type: object
      description: >-
        Management fees are set at creation. Ground fixes their annual cap at
        100 bps; maxManagementFeeBps is not accepted as input.
      required:
        - requestId
        - gVaultId
        - feeRecipientAddress
        - performanceFeeBps
      additionalProperties: false
      properties:
        requestId:
          $ref: '#/components/schemas/UuidV4'
        gVaultId:
          $ref: '#/components/schemas/GVaultId'
        feeRecipientAddress:
          $ref: '#/components/schemas/NonzeroEvmAddress'
        performanceFeeBps:
          type: integer
          minimum: 0
          maximum: 9999
        managementFeeBps:
          type: integer
          minimum: 0
          maximum: 100
          default: 0
          description: Annual management fee in basis points.
      example:
        requestId: a1b2c3d4-0000-4000-8000-000000000001
        gVaultId: ground-ustb-vault
        feeRecipientAddress: '0x2222222222222222222222222222222222222222'
        performanceFeeBps: 2000
    FeeWrapper:
      type: object
      required:
        - id
        - requestId
        - gVaultId
        - status
        - contractAddress
        - feeRecipientAddress
        - performanceFeeBps
        - maxPerformanceFeeBps
        - managementFeeBps
        - maxManagementFeeBps
        - createdAt
        - updatedAt
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/UuidV4'
        requestId:
          $ref: '#/components/schemas/UuidV4'
        gVaultId:
          $ref: '#/components/schemas/GVaultId'
        status:
          type: string
          enum:
            - provisioning
            - ready
            - failed
        contractAddress:
          $ref: '#/components/schemas/NullableNonzeroEvmAddress'
        feeRecipientAddress:
          $ref: '#/components/schemas/EvmAddress'
        performanceFeeBps:
          type: integer
          minimum: 0
          maximum: 9999
        maxPerformanceFeeBps:
          type: integer
          minimum: 0
          maximum: 9999
        managementFeeBps:
          type: integer
          minimum: 0
          maximum: 9999
        maxManagementFeeBps:
          type: integer
          minimum: 0
          maximum: 9999
          readOnly: true
          description: >-
            Immutable annual management fee cap. New wrappers use 100 bps; older
            wrappers retain their deployed cap.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      example:
        id: 8f4c52d7-62ab-4db9-a964-92f481f6b851
        requestId: 2b8332ce-5fe8-4fa6-a1da-d30a78285e07
        gVaultId: ground-ustb-vault
        status: ready
        contractAddress: '0x7c4a1cb5a3d5c3c4e019c3f6ab29a0f98c21b814'
        feeRecipientAddress: '0x92e6a1ed742f0c8502f902c61775f57728985b42'
        performanceFeeBps: 2000
        maxPerformanceFeeBps: 2000
        managementFeeBps: 0
        maxManagementFeeBps: 100
        createdAt: '2026-09-02T18:42:11.000Z'
        updatedAt: '2026-09-02T18:43:29.000Z'
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: >-
            Human-readable error message. May change without notice; do not
            parse programmatically.
        code:
          type: string
          description: >-
            Machine-readable error code. Stable across API versions — safe to
            switch on in client code.
          enum:
            - validation_error
            - unknown_parameters
            - unsupported_chain
            - unsupported_token
            - invalid_destination_address
            - precision_overflow
            - invalid_cursor
            - unauthenticated
            - forbidden
            - wallet_not_found
            - wallet_limit_reached
            - withdrawal_not_found
            - deposit_not_found
            - yield_source_not_found
            - wallet_projection_unavailable
            - insufficient_funds
            - duplicate_request_id
            - request_id_conflict
            - invalid_position_weight
            - invalid_withdrawal_plan
            - payout_not_found
            - webhook_not_found
            - webhook_duplicate_url
            - withdrawal_not_cancellable
            - withdrawal_already_cancelled
            - withdrawal_payout_in_progress
            - withdrawal_policy_required
            - workflow_conflict
            - payout_already_terminal
            - payout_in_progress
            - payout_not_retryable
            - address_book_entry_not_found
            - address_book_duplicate_entry
            - address_book_whitelist_violation
            - rate_limited
            - rate_limit_exceeded
            - internal_error
            - wallet_creation_failed
            - service_temporarily_unavailable
    UuidV4:
      type: string
      format: uuid
      pattern: >-
        ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
      example: 8f4c52d7-62ab-4db9-a964-92f481f6b851
    GVaultId:
      type: string
      description: Source ID returned by the gtoken yield-source catalogue.
      enum:
        - ground-ustb-vault
      example: ground-ustb-vault
    NonzeroEvmAddress:
      type: string
      description: >-
        Valid nonzero EVM EOA or contract address. Mixed-case values must use a
        valid EIP-55 checksum.
      minLength: 42
      maxLength: 42
      pattern: ^0x(?!0{40}$)[0-9a-fA-F]{40}$
      example: '0x3bf25a73a1f1033c2d50ac65f3c9d6a44123db81'
    NullableNonzeroEvmAddress:
      type: string
      nullable: true
      description: >-
        Deployed nonzero EVM contract address, or null while deployment is
        pending.
      minLength: 42
      maxLength: 42
      pattern: ^0x(?!0{40}$)[0-9a-fA-F]{40}$
      example: '0x7c4a1cb5a3d5c3c4e019c3f6ab29a0f98c21b814'
    EvmAddress:
      type: string
      description: Valid EVM address. Mixed-case values must use a valid EIP-55 checksum.
      minLength: 42
      maxLength: 42
      pattern: ^0x[0-9a-fA-F]{40}$
      example: '0x92e6a1ed742f0c8502f902c61775f57728985b42'
    AuthErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Authentication or authorization error message.
        message:
          type: string
          nullable: true
          description: Additional auth middleware detail, when present.
        code:
          type: string
          nullable: true
          enum:
            - unauthenticated
            - forbidden
          description: >-
            Some auth and scope failures include a stable code; middleware
            errors may omit it.
    ServiceUnavailableError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            retryable:
              type: boolean
              description: Whether the client should retry with the same requestId
  responses:
    Unauthorized:
      description: >-
        The request is missing a valid bearer token, or the token is invalid or
        expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthErrorResponse'
          example:
            error: Unauthenticated request
            message: Missing or invalid bearer token
    ServiceUnavailable:
      description: >-
        An upstream dependency is temporarily unavailable. The request can be
        retried with the same `requestId`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServiceUnavailableError'
          example:
            error: Service temporarily unavailable
            code: service_temporarily_unavailable
            retryable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````