# xHENAI Dividends Plugin

A portion of [protocol earnings](https://docs.henjin.xyz/henjinai-protocol/protocol-earnings) are redistributed to users who allocated xHENAI to the Dividends plugin.

This dividends distribution can be done in the form of one or more tokens, and happens **continuously** (reward/second), through weekly epochs.

### Epochs

The distribution is based on a weekly epoch logic: every week, a fixed part of the owner-defined accumulated tokens is marked as to be distributed.

The same process is repeated every 7 days.

### Payouts handling

The distribution of those tokens is equally spread over the duration of the epoch, and allocated on a second-basis to every user with a xHENAI allocation on this Dividends plugin, proportionally to their share of the total allocation.

{% hint style="info" %}
In more simpler terms, if we go with the following values:

* a total of 10,000 xHENAI allocated to the dividends plugin
* a daily distribution of 10,000 USDC

If a user has allocated 200 xHENAI to the plugin, he owns 2% of the allocations and will consequently receive 2% of the daily rewards, ie 200 USDC.
{% endhint %}

Dividends are being distributed continuously, users don't need to wait for the end of the epoch to collect them.

### Deallocation

Deallocating xHENAI from this plugin is not subject to any condition, and can be done at any time.
