# Introduction to Pondo

Liquid Staking Protocol on Aleo

Pondo enables you to **earn rewards** from your **ALEO tokens** while maintaining **liquidity**. It **rebalances** **delegation** of your ALEO to the **validators** with the most **yield** on the network, to ensure **optimal** performance.

In addition to providing liquidity, Pondo lowers the barrier to entry for stakers and is open to any validator to participate. Rebalancing is permissionless and programatic making the protocol decentralized while at the same time not relying on any gouvernance mechanism.


# Aleo Delegated Staking

What are the motivations behind Pondo?

The Aleo blockchain relies on a network of **validators**: infrastructure service providers who secure the network through **AleoBFT**, a **Proof of Stake** based **consensus mechanism** that leverages the latest state-of-the-art consensus research: **Bullshark**.

## Validators

Validators **verify** and **confirm** blocks of **transactions** and agree on state of the chain. They receive **rewards** and **fees** for their work securing the network. These rewards are proportional to a specific amount of Aleo tokens bonded to them. They are called **staking rewards**.

## Delegators

Because a minimum of **10M Aleo Credits** is required to become a validator, a mechanism natively exists on the chain to allow users not meeting the criteria to earn staking rewards: they can **delegate** their tokens by **bonding** them to a validator, in exchange for a **commission**. These users are called **delegators**. Both delegators and validators are referred to as **stakers**.

## Learn more

[Read more about Aleo Staking.](https://aleo.org/faq/)

[Check out its implementation.](https://github.com/AleoNet/snarkVM/blob/testnet3/synthesizer/program/src/resources/credits.aleo)

While delegation solves a major pain about Staking, it does not bring a liquid, scalabe, private staking mechanism on Aleo. Pondo aims at solving these pain points.


# Liquid Staking Mechanisms

Liquid Staking and Pondo

## What is Liquid Staking?

Liquid staking provides additional new functionality on top of traditional staking like working around the scalability limitations in the number of validators and delegators, unlocking private staking, and enabling validators to receive a commission. The idea behind liquid staking is to pool users tokens and delegate the pool as a whole to one or (split it among) multiple validators.

## Pondo's Approach

Pondo is such a protocol, with its own implementation of liquid staking for Aleo. To ensure efficient capital gains, the top five validators in Aleo are allocated the protocol’s Aleo pool.

Furthermore, the validators are ranked based on their yield, the highest APYs have a larger share of the protocol’s Aleo pool delegation than those with a lower APY:

* **1st** Validator is delegated: 37% of the pool.
* **2nd:** 26%
* **3rd:** 16%,
* **4th:** 12%
* **5th:** 9%

Because this information is not directly accessible by core protocol program, a [Yield Oracle](/how-it-works/yield-oracle) program is responsible for reporting this data.

### Delayed/Instant Claims

When a user withdraws tokens from the protocol he does not have to wait for the actual unbonding, he can pay a certain fee to have instant liquidity on his staked tokens.


# pALEO Token

What is the purpose of pALEO ?

## ALEO Credits

ALEO credits are ALEO blockchain native tokens, the rewards from the protocol comes from staking this token under the hood.

[Learn more about ALEO Credits.](https://aleo.org/aleo-credits/)

## pALEO Token

pALEO represent one's current share in the Pondo staked pool. If there's 1000 ALEO in the pool, 100 pALEO minted and you own one of them, then you are owed 1% of the ALEO pool, ie: 10 ALEO, whenever you want to withdraw.

Those ALEO in the pool are calculated as the ALEO owned by the core protocol program minus those that are already claimed by some involved parties.

### Lifecycle

Whenever you stake ALEO credits by pooling them in the core protocol, pALEO tokens are minted according to the new share of the pool you represent. On the contrary when some ALEO are withdrawn pALEO tokens are burned accordingly.

As ALEO reward distribution progresses, pALEO token value increases proportionally to ALEO staking related inflation rate. This means that pALEO held passively during any period of time are equivalent to ALEO actively bonded to a validator.


# Yield Oracle

How is Validator Yield Determined?

[Yield Oracle](/how-it-works/yield-oracle) program is responsible for reporting yield data used for ranking validators to rebalance delegation.

For doing so, it leverages reference delegators: programs with behavior restricted to delegating to a validator just with the purpose of measuring its yield. They then push this data to the Oracle, and it is used to rebalance delegation shares of the protocol pool attributed to top 5 validators.

<figure><img src="/files/jegADC4WmzJSWkDeLOuF" alt=""><figcaption><p>Pondo Oracle</p></figcaption></figure>

All pondo oracle actions are permissionless making this approach almost entierly decentralised, appart from a necessary approval of reference delegators. It allows to ensure offchain that the delegator meets the requirements to be considered a reference delegator. All parties can verify as they are public that approved reference delegators are indeed valid reference delegators.

Multiple reference delegators for the same validator are supported to prevent DOS attack situations.


# Rebalancing

What is 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.


# Security

What features make Pondo secured?

## Decentralized Validators

The protocol does not choose nor preference any validators in the network. Instead, an auto-rebalancing mechanism ensures that the protocol delegates to the best validators. This provides a simple way for large token holders to delegate and forget without worrying about whether or not their allocations are going to the right validators.

## No DAO

The protocol will accumulate fee revenue that will back a new token to reward participants in the ecosystem for integrating with the protocol and incentivizing liquidity. There is no voting. Pondo takes the Uniswap approach of introducing a stand-alone protocol and plan upgrades as entirely new versions.

## Future-proof

Core to the protocol is a boosting mechanism that enables validators to “boost” their perceived APY. As MEV or other sources of validator revenue become available in the coming years, validators will be able to contribute their revenue back to the protocol, boost their perceived APY, and thus potentially receive a larger delegation.

## Security Audits

Pondo smart contracts went through multiple security audits from established auditers as [ZK security](https://www.zksecurity.xyz/).


# Stake using Pondo

How to stake using Pondo?

Here is an example of how you can delegate **100 ALEO Credits** for staking in Pondo:

<figure><img src="/files/UE6QV8KwdF8RKPNnjkgP" alt=""><figcaption></figcaption></figure>

As the outcome of the transaction, you will **mint a certain quantity of pALEO tokens**, that represent your **current share in the Pondo staked pool.** The more you wait, the more ALEO credits you can get from those same pALEO tokens you own. These Credits come from the rewards of your staked ALEO.

\\


# Claim your rewards

How to claim your Pondo rewards?

To get your delegated credits back, along with associated reward, you must burn the pALEO tokens you own.

There are two possibilities for doing so:

* **Instant Withdraw** - Getting your credits back **instantly**, in one transaction, but paying a **0.25% fee**.
* **Two steps Withdraw** - Burn your pAleo tokens in a first transaction, then wait a minimum of **\~2.5 Days** before you can claim associated credits back.

## Instant **Withdraw**

To get your credits back instantly, select the instant category:

<figure><img src="/files/kwNLqdAb2z121iHLe2Dn" alt=""><figcaption></figcaption></figure>

## Two steps **Withdraw**

First you must initiate a "Slow Withdrawal":

<figure><img src="/files/pgbx1rj8w9dPk4nV6nM4" alt=""><figcaption></figcaption></figure>

You must then wait **43,200 blocks** (or 2.5 days, assuming 5 sec per block), before you can claim credits associated with the withdrawal.

After the wait period, you can claim credits due to you by navigating to the "Claim" section:

<figure><img src="/files/DejsYxnZCE0rZF27l6do" alt=""><figcaption></figcaption></figure>


# How to Burn PNDO for pALEO?

PNDO's utility explained

As there is no web interface to burn PNDO yet, the burn function must be executed directly from the Leo Demo DApp. Here is the step-by-step guide to do so.

### Step 1: Open <https://demo.leo.app/execute>, and connect your wallet

<figure><img src="/files/Lzq2PcnOpP66Qv4Z8P5K" alt=""><figcaption></figcaption></figure>

### Step 2: Fill the required fields of the form

<figure><img src="/files/ci8svodWhWzNY3oolFu8" alt=""><figcaption></figcaption></figure>

**Program ID:** `pondo_protocol_token.aleo`

**Function Name:** `burn_public`

**Inputs:** *(One input per line)*

`YOUR_ADDRESS` *(It must be the same as the wallet address connected to the dApp)*\
`PNDO_BURNT_AMOUNT` *(Postfixed with u128, as an integer with 6 digits precision, for instance 23.5 PNDO would be represented by 23500000u128)*\
`WITHDRAWN_PALEO_AMOUNT` *(Postfixed with u128, as an integer with 6 digits precision, for instance 123.456 ALEO would be represented by 123456000u128, see next section to learn how to determine this amount)*

**Fee:** `346053` (Network fees, \~0.35 ALEO)

### Step 3: Review and Confirm the Transaction in your Wallet

<div data-full-width="false"><figure><img src="/files/JpPrGl9e5HONbtN6ebvl" alt="" width="185"><figcaption></figcaption></figure></div>

## How to determine the withdrawn pALEO amount?

Let's say you are trying to burn a PNDO token amount N, you then need to determine what is the associated withdrawn pALEO amount: A. Let's understand how to compute A from N.

### Step 1: Retrieve B, the pALEO balance of Pondo Contract

Open the following link:\
<https://api.explorer.provable.com/v1/mainnet/program/token_registry.aleo/mapping/authorized_balances/3242288718229738787948769588602675310170924869859109695547161313477376112745field>

<figure><img src="/files/MSpQeDxBbvhHH77EUqqA" alt="" width="375"><figcaption></figcaption></figure>

B is the integer between `balance:` and the following `u128`, here `57062905199`.

### Step 2: Retrieve S, the PNDO current supply

Open the following link:\
<https://api.explorer.provable.com/v1/mainnet/program/token_registry.aleo/mapping/registered_tokens/1751493913335802797273486270793650302076377624243810059080883537084141842601field>

<figure><img src="/files/dIliaIGQlXwSP8QahpfK" alt="" width="375"><figcaption></figcaption></figure>

S is the integer between `supply:` and the following `u128`, here `57062905199`.

You can then obtain the pALEO amount A you will get for burning N PNDO tokens:

$$
A=\frac{N\cdot B}{S}
$$


# Requirements

How can a validator participate to Pondo?

## Delegation Requirements <a href="#delegation-requirements" id="delegation-requirements"></a>

Any Validator can participate to Pondo to be deleagated part of the protocol's pool. Although, anyone can ban a validator during the rebalancing/update period if:

* The validator has a commission greater than 0.5%
* The validator leaves the committee

A validator needs to have a corresponding reference delegator to participate to the protocol and be considered by the yield oracle.

Alternatively the protocol will fully unbond from a validator permissionlessly during rebalance, or if the validator commission changed of more than 0.1% while the delegator was bonded.


# PNDO Token

How does PNDO work?

## Overview

PNDO is the token at the core of the protocol's fee mechanism. PNDO has a fixed initial supply. It can only be burnt, and never minted. It’s always more optimal to not burn PNDO because of the future expected rewards from the protocol.

## Fee Mechanism

When a user withdraws tokens from the pool, by burning pALEO tokens, a 10% fees on these rewards goes to Pondo’s Rewards Pool.

PNDO holders can redeem their PNDO for the ALEO credits in Pondo’s Rewards Pool proportional to their holdings. PNDO holders send their PNDO to the Pondo Protocol. The Pondo Protocol will burn those PNDO tokens and withdraw a proportional amount of ALEO credits from the protocol to send back to the original PNDO holder.


