Sunshine and Rainbows Algorithm explained
Sunshine and Rainbows (SAR) is an innovative farming-staking algorithm created by Pangolin DAO. It addresses the issue of attracting stable liquidity, which is a common challenge faced by decentralized exchanges (DEXs).
In contrast to other protocols that require long-term fund lockups or staking governance tokens, Pangolin has developed a game-theoretic algorithm. The advertised APRs on Pangolin's website are average figures; actual APRs start at zero and increase over time, potentially surpassing the average.
Claiming rewards or removing liquidity resets the APR back to zero. Users can compound their rewards to the farms and the staking pool. When compounding, the APR decreases proportionally to the compounded amount compared to the position size. Users must match the other side of the PBAR rewards to compound if they are not staking.
Users can compound within that same farm, but must add equal value of the other token in the pair.
Users must compound to the PBAR-HBAR farm and add equal value of HBAR to their PBAR rewards. Also, they must remove liquidity from the PBAR-HBAR far before withdrawing from the non-PBAR farm.
Users can compound to their NFT, which represents their staking position.
When you compound your rewards, your APR will go down proportionally to the amount compounded compared to your position size.
It’s important to note for farms, you’ll need to match the other side of PBAR rewards to compound.
Assuming nobody enters or leaves the farm, your APR would go down if other LPs compound, but you don’t since your share in the farm would go down over time.
Here is the formula for how your share from the rewards is calculated:
In the SAR system, farming and staking have distinct characteristics.
You can only have 1 position per wallet. You can always add on top of your current position, but you can’t split your position into multiple pieces. It’s important to note that your APR will go down if you add more liquidity to the farm based on the liquidity you add on top of your current position, just like it does with compounding.
You’ll be minting a SAR NFT when you stake PBAR tokens. That NFT will represent your position, hold your tokens, and accrue PBAR rewards. It’s important to note that NFTs carry over APRs and the PBAR tokens.
With staking, you can have multiple positions by minting more NFTs. This allows you to split your position into multiple pieces if wanted.
Compared to farming, there is no impermanent loss risk with SAR NFTs since you’re single-sided staking.
SAR NFTs enable users to compound PBAR rewards, participate in on-chain proposals, trade on NFT marketplaces, and potentially rent-borrow NFTs for voting or collateral purposes.
Super farms are farms where you earn multiple rewards tokens. For example, we’ll be giving PBAR and HBAR rewards to the farms on Hedera.
Each super farm has its own multiplier. For simplicity, let’s assume PBAR-HBAR super farm’s multiplier is 3. That means you’d earn 3 HBAR per 1 PBAR earned.
So, the amount of HBAR you earn will depend on how much PBAR you will be earning. As staying in the farm for a longer period of time will have a positive impact on the additional rewards you will be earning.
It’s important to note that you can’t compound reward tokens except for PBAR. So if you’re farming in PBAR-HBAR super farm, you will be able to compound your PBAR rewards, but not your HBAR rewards. Your HBAR rewards will accrue over time until you claim your rewards or remove your liquidity, which would reset your APR.