# OpNode Cloud Payments

**Cloud Payments** is the financial backbone of the **OpNode** Cloudverse, a smart contract-driven billing system that ensures **transparent, decentralized, and usage-based payment** for GPU compute.

Unlike traditional cloud providers that rely on opaque pricing models and centralized billing, Cloud Payments enables real-time, trustless settlement between GPU providers and consumers, while offering staking incentives, refunds, and cross-chain flexibility.

***

#### ✨ Core Principles

| **Principle**           | **Description**                                                   |
| ----------------------- | ----------------------------------------------------------------- |
| ⛓️ On-chain Metering    | Every compute job is measured and billed on-chain                 |
| ⚖️ Pay-as-you-go        | Users are charged per second of actual usage                      |
| 🤝 Trustless Settlement | Smart contracts automate payment distribution and refunds         |
| 🪙 Multi-token Support  | $OPEN is default, but stablecoins and fiat gateways are supported |
| 🎁 Incentivized Staking | Stakers of $OPEN receive discounts + rev share                    |

***

#### 🔁 How Cloud Payments Works

#### 1. Wallet Funding

Before launching jobs, users must fund their **Cloud Wallet** (a non-custodial smart contract wallet). This can be done via:

* $OPEN token (native)
* $USDC / $DAI (on supported chains)
* Fiat payment (via Stripe, Transak) – *Coming Soon*

#### 2. Job Cost Estimation

When a user submits a job:

* The Cloud Payment Engine estimates GPU runtime cost (based on per-hour rates)
* Required funds are temporarily locked in an escrow contract

**Example Calculation:**

* Job estimated to run for 2.5 hours on an RTX 4090 (140 $OPEN/hr)
* Estimated cost = 350 $OPEN + 5% buffer = 367.5 $OPEN
* User confirms and signs the transaction

#### 3. Smart Metering + Job Execution

During job execution:

* Actual time usage is tracked in 1-second intervals
* The job status is streamed back to the user (UI/CLI)
* Resource metrics are logged to IPFS + a blockchain timestamp

#### 4. Settlement + Refunds

After job completion:

* The exact cost is calculated
* GPU provider is paid in full from escrow
* Any **unused** tokens are instantly refunded to the user
* A **job receipt** is generated with hashes of:
  * Input code
  * Output files
  * Logs
  * Provider address

***

#### 💰 Pricing Model

Cloud Payments uses a **dynamic GPU pricing engine**, governed by DAO voting + market indexing.

#### Sample Rate Table:

| **GPU Model** | **Base Rate (OPEN/hr)** | **Discount (stakers)** | **Use Cases**       |
| ------------- | ----------------------- | ---------------------- | ------------------- |
| RTX 3090      | 90 OPEN/hr              | -10% (≥25k)            | CV, NLP             |
| RTX 4090      | 140 OPEN/hr             | -15% (≥50k)            | LLM Inference       |
| A100          | 250 OPEN/hr             | -20% (≥100k)           | Large training jobs |

> Rates are adjusted weekly based on network demand, supply, and token utility flows.

***

#### 🌍 Token Support

Cloud Payments supports:

| **Token**  | **Chain**                   | **Notes**                       |
| ---------- | --------------------------- | ------------------------------- |
| $OPEN      | Ethereum, Base              | Default + incentivized          |
| $USDC      | Ethereum, Polygon, Arbitrum | Stable alternative              |
| $DAI       | Ethereum, Base              | Optional for DAO-friendly users |
| Fiat (USD) | Off-chain                   | Via partner ramp – Coming Soon  |

The system uses **real-time oracles** to convert non-native tokens into equivalent OPEN job credits during payment.

***

#### 🔐 Security & Refund Mechanism

| **Feature**         | **Description**                                                      |
| ------------------- | -------------------------------------------------------------------- |
| 🔒 Escrow Lock      | Funds are locked at submission time, released after job verification |
| 🔁 Auto-Refunds     | Unused GPU time refunded instantly                                   |
| 🧾 Verifiable Jobs  | Hash-matching of input/output proves task validity                   |
| ⚠️ Slashing         | Misbehaving GPU nodes can be penalized via staking mechanism         |
| 🧠 Auditable Trails | Every transaction is logged + queryable via job ID or address        |

***

#### 🎁 Incentives for $OPEN Holders

Holding and staking $OPEN unlocks multiple benefits within Cloud Payments:

| **Tier** | **Staked Amount** | **Discount** | **Perks**                       |
| -------- | ----------------- | ------------ | ------------------------------- |
| Bronze   | 10k OPEN          | 5%           | Early job queue                 |
| Silver   | 25k OPEN          | 10%          | Priority execution              |
| Gold     | 50k OPEN          | 15%          | Access to premium GPUs          |
| Platinum | 100k OPEN         | 20%          | DAO voting rights + max rewards |

**Additionally:**

* 12% of Cloud Payment revenue is distributed to stakers weekly
* Active contributors can earn bonuses via DAO proposals

***

#### 📦 Batch Payments & Teams (Coming Soon)

Enterprise and team-based workloads will support:

* Multi-wallet shared accounts
* Scheduled job billing
* Invoice-style breakdowns for bulk processing
* API-based integrations for SaaS teams

***

#### 🛠 Developer Integration (Planned)

Cloud Payments will expose:

* `POST /wallet/deposit`
* `POST /job/estimate`
* `POST /job/pay`
* `GET /job/{id}/receipt`
* `GET /wallet/history`

Webhooks will notify when:

* Jobs complete
* Refunds are processed
* Thresholds are hit (e.g. low balance alerts)

***

#### 🚀 Summary

Cloud Payments powers the **economics of trustless GPU compute** in **OpNode**. It turns raw hardware into a programmable, permissionless utility — priced in real-time, secured by code, and governed by users.

Whether you're a researcher training a model or a DePIN project coordinating global jobs, **Cloud Payments ensures you only pay for what you compute, when you compute it no more, no less**....
