{"templateId":"markdown","versions":[{"version":"v1.40","label":"v1.40 STS","link":"/products/custody/deployment/reference/gas-station","default":true,"active":false,"folderId":"c15a2701"},{"version":"v1.39","label":"v1.39 STS","link":"/products/custody/v1.39/deployment/reference/gas-station","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.38","label":"v1.38 STS","link":"/products/custody/v1.38/deployment/reference/gas-station","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.34","label":"v1.34 LTS","link":"/products/custody/v1.34/deployment/reference/gas-station","default":false,"active":true,"folderId":"c15a2701"},{"version":"v1.26","label":"v1.26 LTS","link":"/products/custody/v1.26/deployment/reference/gas-station","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.19","label":"v1.19 LTS","link":"/products/custody/v1.19/deployment/reference/gas-station","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.15","label":"v1.15 LTS","link":"/products/custody/v1.15/deployment/reference/gas-station","default":false,"active":false,"folderId":"c15a2701"}],"sharedDataIds":{"sidebar":"sidebar-products/custody/@v1.15/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Gas Station reference","description":"User guides, API reference, and support resources.","siteUrl":"https://docs.ripple.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"gas-station-reference","__idx":0},"children":["Gas Station reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This reference describes the configuration and deployment parameters for the Gas Station Service."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This applies to on-premise deployments only. For SaaS deployments, the Gas Station Service is managed by Ripple."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before deploying the Gas Station Service, ensure you have:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A running ","Ripple Custody"," environment"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://kubernetes.io/docs/home/","target":"_blank"},"children":["Kubernetes"]}," cluster (1.21+)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://helm.sh/docs/","target":"_blank"},"children":["Helm"]}," (3.0+)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://www.postgresql.org/docs/","target":"_blank"},"children":["PostgreSQL"]}," database (13+)"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration-parameters","__idx":2},"children":["Configuration parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure the Gas Station Service using environment variables or Helm values:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GATEWAY_SERVER_URL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ripple Custody"," API gateway URL"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PRIVATE_KEY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bot user private key (PEM format)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POLLING_INTERVAL_MS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Interval for checking pending transactions (milliseconds)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5000"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MAX_RETRY_ATTEMPTS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum immediate retry attempts for failed funding"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RETRY_INTERVAL_MINUTES"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Interval between queue-based retries"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FEE_SAFETY_MARGIN_PERCENT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Safety margin added to estimated fees"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["10"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POSTGRES_URL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PostgreSQL connection string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LOG_LEVEL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Logging verbosity (debug, info, warn, error)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OTEL_EXPORTER_OTLP_ENDPOINT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OpenTelemetry collector endpoint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"helm-values","__idx":3},"children":["Helm values"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a values file for the Gas Station Helm chart:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"gasStation:\n  enabled: true\n  gatewayUrl: \"https://your-custody-gateway.example.com\"\n  pollingIntervalMs: 5000\n  maxRetryAttempts: 3\n  retryIntervalMinutes: 5\n  feeSafetyMarginPercent: 10\n  \n  database:\n    host: \"postgres.example.com\"\n    port: 5432\n    name: \"gas_station\"\n    username: \"gas_station_user\"\n    existingSecret: \"gas-station-db-credentials\"\n    \n  credentials:\n    existingSecret: \"gas-station-credentials\"\n    privateKeyKey: \"private-key\"\n    \n  telemetry:\n    enabled: true\n    otlpEndpoint: \"http://otel-collector:4317\"\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"database-setup","__idx":4},"children":["Database setup"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Gas Station Service requires a PostgreSQL database for event deduplication and failed job tracking."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-the-database","__idx":5},"children":["Create the database"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"CREATE DATABASE gas_station;\nCREATE USER gas_station_user WITH ENCRYPTED PASSWORD 'your-secure-password';\nGRANT ALL PRIVILEGES ON DATABASE gas_station TO gas_station_user;\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"database-schema","__idx":6},"children":["Database schema"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The service automatically creates the following tables on startup:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Table"},"children":["Table"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processed_event"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Event deduplication and distributed locking"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed_funding_job"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Failed funding attempts for queue-based retry"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dead_letter_queue"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Permanently failed jobs requiring manual intervention"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sponsor"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sponsorship configuration"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["alert"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Low-balance alert thresholds"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["event"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Audit trail for configuration changes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"processedevent-table","__idx":7},"children":["ProcessedEvent table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Serves as both event deduplication log and distributed lock mechanism. The UNIQUE constraint on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," prevents duplicate event processing across multiple service instances."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Column"},"children":["Column"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Event ID from ","Ripple Custody"," (primary key, provides distributed lock)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locked_at"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When lock was acquired (for stale lock detection)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_order_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transaction order ID for idempotency tracking"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["created_at"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When event was first detected"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processed_at"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When processing completed successfully"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["VARCHAR(20)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Processing status: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processing"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Locks older than 10 minutes are considered stale (crashed worker). The service automatically releases stale locks and retries processing."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"failedfundingjob-table","__idx":8},"children":["FailedFundingJob table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stores failed funding attempts for background retry processing."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Column"},"children":["Column"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique job identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["event_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reference to ","Ripple Custody"," event ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account that needs funding"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sponsor_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sponsor account providing funds"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["required_amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["VARCHAR(100)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount needed (string to preserve precision)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ticker_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Token/ticker UUID for the native token"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["created_at"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When job was created"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["retry_count"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["INTEGER"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of retry attempts"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["next_retry_at"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When job should be retried next"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"deadletterqueue-table","__idx":9},"children":["DeadLetterQueue table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stores funding jobs that have permanently failed after exhausting all retry attempts."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Column"},"children":["Column"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["event_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Original ","Ripple Custody"," event ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account that needed funding"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sponsor_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sponsor account that was attempted"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["required_amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["VARCHAR(100)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount that was needed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ticker_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Token/ticker UUID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["original_error_message"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TEXT"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Last error message before failure"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["final_retry_count"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["INTEGER"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of retry attempts before giving up"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed_at"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When job was moved to dead letter queue"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Jobs in the dead letter queue require manual investigation. Set up alerts to monitor for new entries in this table."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"security-considerations","__idx":10},"children":["Security considerations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"private-key-protection","__idx":11},"children":["Private key protection"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Store the bot user's private key in a secrets management solution (Kubernetes Secrets, HashiCorp Vault, AWS Secrets Manager)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Never commit private keys to version control"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Rotate keys periodically according to your security policy"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"access-control","__idx":12},"children":["Access control"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Restrict database access to the Gas Station Service only"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use network policies to limit communication between services"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enable TLS for all connections (database, API gateway, telemetry)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"audit-logging","__idx":13},"children":["Audit logging"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enable audit logging in ","Ripple Custody"," to track all bot user actions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Forward Gas Station logs to your SIEM for security monitoring"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Set up alerts for unusual funding patterns"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"monitoring-and-observability","__idx":14},"children":["Monitoring and observability"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Gas Station Service exports metrics and traces via OpenTelemetry."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"gauges-current-state","__idx":15},"children":["Gauges (current state)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Metric"},"children":["Metric"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed_jobs_queue_size"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of jobs in FailedFundingJob table"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processed_events_count"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of rows in ProcessedEvent table (for cleanup monitoring)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sponsor_balance_<ticker>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Current balance of each sponsor account"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"counters-cumulative","__idx":16},"children":["Counters (cumulative)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Metric"},"children":["Metric"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["funding_attempts_total{status, chain}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Total funding attempts by status (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},") and chain (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eth"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["events_processed_total{outcome}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Events processed by outcome (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["funded"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipped"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["retry_attempts_total{attempt}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Distribution of retry attempts (1, 2, or 3) before success/failure"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"histograms-distributions","__idx":17},"children":["Histograms (distributions)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Metric"},"children":["Metric"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["funding_duration_seconds"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Time from event detection to funding completion"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["job_age_at_success_hours"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How long jobs were in queue before succeeding"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_latency_seconds{endpoint}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ripple Custody"," API latencies (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dry_run"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submit_intent"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get_balance"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For telemetry configuration, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/v1.34/deployment/reference/telemetry"},"children":["Telemetry overview"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"health-check-endpoints","__idx":18},"children":["Health check endpoints"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Gas Station Service exposes health check endpoints for Kubernetes liveness and readiness probes:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Endpoint"},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/health"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Liveness probe"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Checks if the service is running and responsive"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/ready"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Readiness probe"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verifies database connectivity and ","Ripple Custody"," API reachability"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-kubernetes-probes","__idx":19},"children":["Configure Kubernetes probes"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"livenessProbe:\n  httpGet:\n    path: /health\n    port: 8080\n  initialDelaySeconds: 10\n  periodSeconds: 30\n\nreadinessProbe:\n  httpGet:\n    path: /ready\n    port: 8080\n  initialDelaySeconds: 5\n  periodSeconds: 10\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These endpoints enable proper orchestration, zero-downtime deployments, and automatic service recovery."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-documentation","__idx":20},"children":["Related documentation"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Topic"},"children":["Topic"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/v1.34/concepts/gas-station"},"children":["Gas Station concepts"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sponsorship hierarchy and multi-chain support"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/v1.34/api/environment/user/bot-user"},"children":["Configure bot users"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set up bot users for automated operations"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/v1.34/api/accounting/gas-station/configure-sponsorship"},"children":["Configure gas sponsorship"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API reference for sponsorship configuration"]}]}]}]}]}]},"headings":[{"value":"Gas Station reference","id":"gas-station-reference","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Configuration parameters","id":"configuration-parameters","depth":2},{"value":"Helm values","id":"helm-values","depth":2},{"value":"Database setup","id":"database-setup","depth":2},{"value":"Create the database","id":"create-the-database","depth":3},{"value":"Database schema","id":"database-schema","depth":3},{"value":"ProcessedEvent table","id":"processedevent-table","depth":4},{"value":"FailedFundingJob table","id":"failedfundingjob-table","depth":4},{"value":"DeadLetterQueue table","id":"deadletterqueue-table","depth":4},{"value":"Security considerations","id":"security-considerations","depth":2},{"value":"Private key protection","id":"private-key-protection","depth":3},{"value":"Access control","id":"access-control","depth":3},{"value":"Audit logging","id":"audit-logging","depth":3},{"value":"Monitoring and observability","id":"monitoring-and-observability","depth":2},{"value":"Gauges (current state)","id":"gauges-current-state","depth":3},{"value":"Counters (cumulative)","id":"counters-cumulative","depth":3},{"value":"Histograms (distributions)","id":"histograms-distributions","depth":3},{"value":"Health check endpoints","id":"health-check-endpoints","depth":2},{"value":"Configure Kubernetes probes","id":"configure-kubernetes-probes","depth":3},{"value":"Related documentation","id":"related-documentation","depth":2}],"frontmatter":{"seo":{"title":"Gas Station reference"}},"lastModified":"2026-04-07T19:14:09.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/custody/v1.34/deployment/reference/gas-station","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}