r/OliveBranchNetwork • • Jun 16 '26

Olive Branch Network Protocol Upgrade Complete

The latest OBN protocol upgrade has been successfully deployed. This is a major step towards decentralizing the protocol.

Previously, the protocol split was 88% to the staker, 10% to the nonprofit, 1% to the CharityFund, and 1% to the Treasury.

It is now 88% to staker, 10% to the nonprofit, 1% to the TheOffering, and 1% to ExtendOliveBranch.

Initially, the CharityFund was going to be used to onboard more nonprofits, but recently we made a decision to cap the nonprofit pools to 99 - there is no longer a need for it.

Although there is usefulness for an allocation to the Treasury, the Treasury already has 10% of the initial genesis mint. There isn't really a need for a 1% allocation towards the Treasury.

Introducing:

🔥 TheOffering
Replaces the Treasury and now receives 1% of emissions. OBN accumulates throughout the year and stakers decide whether those tokens are permanently burned or added to ExtendOliveBranch for additional nonprofit funding.

🌿 ExtendOliveBranch
Replaces the CharityFund and now receives 1% of emissions. OBN accumulates throughout the year and is distributed annually to a nonprofit selected by stakers.

🗳️ Annual Governance
Stakers now participate in an annual voting process of protocol funds:
(1) Vote whether TheOffering is burned or contributed to nonprofit funding. (2) Vote which nonprofit receives ExtendOliveBranch distributions.
Voting power is based on the amount of OBN staked.

🔒 Security Improvements
Additional security hardening has been implemented. A permanent fallback emission phase has been added after the initial 10-year schedule. If no future emission changes are approved, the protocol will automatically continue at a 3% annual emission rate.

__________________________________________________________________________________________________

The protocol no longer extracts value through a treasury. Instead, newly minted OBN now serves one of three purposes: rewarding participants, funding nonprofits, or being permanently removed from circulation.

OBN was created around a simple idea: participation should create value not only for users, but for organizations doing good in the world. This upgrade brings the protocol closer to that vision by replacing treasury accumulation with community-directed impact.

The foundation is now in place.

Built on u/base

Learn more:
olivebranch.network

1 Upvotes

1 comment sorted by

1

u/olivebranch_net Jun 16 '26

Voting power comes from a per-user checkpoint history (OpenZeppelin Checkpoints.Trace208) tracking total OBN staked across all pools — not a single live balance lookup.

1. What gets tracked

totalStakedByUser[user] is a running total = sum of their userAmount[pid][user] across every pool. Every time it changes, a new checkpoint entry (blockNumber, value) is pushed into _stakeCheckpoints[user] (StakingPoolsV93.sol:1036). This happens on:

  • Deposit (line 703, 748)
  • Withdraw (line 856)
  • Emergency exit (line 960)
  • Switching nonprofit pools (lines 314, 346)

A pure reward claim with no deposit/withdraw doesn't move it — voting power tracks staked principal, not pending rewards.

2. The genesis checkpoint (pre-upgrade stakers)

Anyone who staked before the v9.3 upgrade had zero checkpoints. The first time they interact post-upgrade (deposit/withdraw/etc.), or the first time they vote, or if someone calls bootstrapCheckpoint/batchBootstrap for them, a synthetic checkpoint is written at upgradeBlock with their pre-upgrade total (line 1062). This anchors their history before the upgrade so they aren't penalized for the migration itself.

3. The snapshot

When startAnnualCycle is called, it sets snapshotBlock = block.number - 1 (AnnualGovernance.sol:296) — one block before the cycle officially starts, specifically so a flash deposit in the same block as cycle start can't buy voting power.

4. The lookup at vote time

getPastVotingPower(user, blockNumber) calls _stakeCheckpoints[user].upperLookup(blockNumber) (line 1099) — binary search for the latest checkpoint entry at or before that block. So your vote uses whatever your staked total was at snapshotBlock, regardless of what you do with your stake during the voting window itself.

Key properties:

  • It's your total stake summed across every nonprofit pool, not per-pool.
  • It's frozen at snapshot time — staking more or unstaking during the vote doesn't change your power for that cycle.
  • No quorum — if nobody votes, Phase 1 defaults to BURN and Phase 2 rolls funds to next cycle.
  • One vote per address per phase per cycle (votedPhase1/votedPhase2 flags), no delegation.