# KPI Rewarder

#### Module Category: Logic Module

**Smart Contract Name**:&#x20;

KPI Rewarder allows dynamic payments based on on/off-chain KPIs set by the project. It leverages UMA’s Optimistic Oracle to verify the KPI data.

KPI Rewarder checks and validates KPIs, generates payment orders, and manages the distribution of those payments. It enables the distribution of payments or rewards according to defined performance outcomes.

## Modules Functionalities

### Parameters to set:

#### KPI-Based Payment Parameters

**Reward Structure:** Supports various reward structures, including proportional payouts and tiered rewards. These structures can be adjusted based on total value locked or specific performance metrics, allowing for flexibility in reward distribution.

**Maximum Payout:** Sets the upper limit on rewards for a given period.

**Recurring Query Periods:** Defines the recurring period for the KPIs to be checked with the Oracle.

#### UMA Oracle Parameters

**Bonding Amount:** Sets the bonding amount for each query, which is collateral required to secure an Oracle query within the UMA system.

**Recurring Query Periods:** Specifies the intervals at which the system will automatically ask the UMA Oracle for KPI evaluations.

**Maximum Payout:** Sets the maximum payout limit for each period, which helps control the disbursement of rewards.

#### Automated Module Interactions:

**Oracle Queries:** Periodically queries the UMA Oracle to retrieve KPI data, which it then uses to determine the reward payout amount.

**Payment Order Generation:** Based on the results from the UMA Oracle, the module generates Payment Orders. These orders are determined by whether the Oracle's responses are binary (Yes/No), numerical, or address-based, affecting how rewards are calculated and distributed.

**Dispute Management:** In case of disputes in Oracle responses, the module holds the payment until the dispute is resolved.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inverter.network/concepts/protocol-concepts/module-library/logic-modules/kpi-rewarder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
