Documentation

How Divine Spring works on Robinhood Chain.

Overview

Divine Spring is an open staking rewards protocol. Anyone can create a campaign by depositing a reward token that is permanently locked. The reward streams linearly per block to stakers of a chosen staking token during a fixed block window.

All campaigns live in a single StakingRewards contract. Each campaign is isolated — parameters and hooks are fixed at creation with no admin controls, refunds, or upgrades.

Staking tokens must be Pools.Trade UERC20 tokens. Reward tokens can be any ERC-20.

Creating a campaign

Use the create page or call createCampaign directly on the StakingRewards contract.

You set:

  • Staking token and reward token
  • Total reward amount (locked forever)
  • Start and end block numbers
  • Minimum stake amount (optional)
  • Optional hook for reward multipliers and withdraw fees

The reward rate is fixed at creation: rewardAmount ÷ (endingBlock − startingBlock). Nothing can be changed after the campaign is created.

Staking and rewards

Stakers call stake before the end block. Rewards accrue per block inside the campaign window, weighted by effective amount (hook-adjusted, not raw principal).

claim can be called anytime to collect accrued rewards. Principal is returned separately on withdraw.

Unstaking is two steps: requestUnstake stops accrual and starts a 2-day cooldown (1,728,000 blocks at 0.1s/block). Then withdraw returns principal minus any hook fee.

Other rules:

  • One position per wallet per campaign; top-ups merge
  • Partial unstake allowed; remainder must be zero or ≥ min stake
  • Re-requesting unstake merges amounts and resets the cooldown
  • Blocks with zero stakers burn that portion of rewards permanently
  • Undistributed rewards and rounding dust stay locked forever

Hooks, fees, and multipliers

Hooks are optional, immutable contracts attached at campaign creation. They adjust reward weight on stake and may charge a fee on withdraw. Principal is never modified — only reward share and withdraw fees are affected.

AngelNumbersHook (default on the create form): +1% reward weight compounded per 222,222 tokens staked in a single transaction, capped at 5×. 1% withdraw fee sent to the burn address.

Other hook templates exist in the repo (NFT boost, signature attested, merkle snapshot) but only AngelNumbers is deployed on mainnet today.

Integration touchpoints:

  • stake(campaignId, amount, data) data forwarded to hook when required (signatures, proofs)
  • previewEffectiveAmount and previewWithdrawFee on BaseStakeHook for exact previews
  • Campaign URLs: /{stakingToken}-{rewardToken}
  • Indexer: Ponder GraphQL for campaign list, positions, and activity
  • Staking tokens link to Pools.Trade

Deployment addresses

Robinhood Chain mainnet (chain ID 4663)

Disclaimer

This is unaudited code meant for entertainment purposes only. There is no claim of value. Smart contracts are immutable once deployed — rewards are permanently locked, and bugs or exploits could result in loss of funds. Participate at your own risk.