[Thread] Berachef contract walk-through
![[Thread] Berachef contract walk-through](/_next/image?url=https%3A%2F%2Fberachain.ghost.io%2Fcontent%2Fimages%2F2024%2F07%2Frewardsvault.png&w=1920&q=75)
On Berachain, validators must direct their block-building rewards to dapps via Rewards Vaults. Validators choose how to distribute their rewards, configuring which vaults and the weights via their "cutting board"
â cami 𧸠(@camiinthisthang) July 31, 2024
Let's walk through how this works at the smart contract level đ
Validators use this under the hood in BGT Station to set how they want to distribute their BGT. Think of it as a pie chartâeach section makes up a percentage of the whole, and each section maps to a rewards vault.
â cami 𧸠(@camiinthisthang) July 31, 2024
View an example here - https://t.co/dwtNiS0CHy pic.twitter.com/yyexXzn4Iz
To update their cutting board, this function queueNewCuttingBoard is called, which sets a delay before a new cutting board can go into effect.
â cami 𧸠(@camiinthisthang) July 31, 2024
This makes it so validator preferences can't be changed too often, providing more predictability. pic.twitter.com/Q2DQP4XikF
We also have a struct CuttingBoard that represents a cutting board. It includes the block this cutting board goes into effect, and an array of the Weights struct we just looked at. pic.twitter.com/8aANqbQX2j
â cami 𧸠(@camiinthisthang) July 31, 2024
Note to the reader: You've seen reward vaults be referred to as gauges. Soon, we'll be updating our docs and UIs to use reward vaults as this is more clear.
â cami 𧸠(@camiinthisthang) July 31, 2024
Check out this thread for more on PoL contracts! https://t.co/f0iIvTu3mE
Docs: https://t.co/Fyqe5uM0xw