# Rebalancing

## Overview

At regular intervals, the Oracle will publish on-chain data regarding the top 5 validators, their performance, and the rewards earned by both delegators and current validators. Any user can call the Core Protocol to rebalance the delegators' stakes. In some cases, the top five validators may change, while in others, the positions of the validators may shift, such as moving from best to second-best, etc.

## How it works?

When a user calls the rebalance function, the Core Protocol will determine if it is profitable to redistribute funds among the validators. If a delegator is bonded to a validator that is no longer among the top five performers, the entire amount of bonded credits will be unbonded from that validator. The unbonded credits of all delegators will be returned to the core protocol. The core protocol will take a percentage of the rewarded Aleo credits as a commission for the validators and as a fee to be sent to the PNDO program.

The remaining amount will then be redistributed back to the delegators. Each delegator will rebond their allotted amount to their bonded validator or will bond it to a new validator if they have changed validators.


---

# 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.pondo.xyz/how-it-works/rebalancing.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.
