Skip to Content
TutorialsCollect Barons ETH

Collect Barons ETH (default) and optionally Collect & Lock

Goal:

  • Show a user their accrued Barons ETH
  • Default: Collect ETH (mode 0, receive ETH)
  • Also available: Collect & Lock (mode 1, route ETH through Furnace into veCLAIM)

UI recommendation:

  • Default primary action should be Collect ETH (mode 0).
  • Offer Collect & Lock as an optional secondary action.
  • If you store preferences, allow “remember my choice” for mode selection.
  • Collect & Lock is always ETH-funded (royalties are ETH): show a preview like “ETH → CLAIM → lock” and route into the Furnace compounding flow.

Important naming:

  • Contract calls are claim*
  • UI copy must say Collect for ETH

Flow

Steps

1) Understand the activation gate

ShareholderRoyalties uses MIN_VE_FLUSH to avoid ETH-per-ve spikes.

  • If total ve < MIN_VE_FLUSH:
    • ETH stays in pendingShareholderETH
    • it is not yet indexed into ethPerVe
    • it becomes available to Collect once the threshold is met and a flush occurs

Recommended UI messaging:

  • “Royalties activate once total ve reaches the minimum.”
  • “Once activated, accrued ETH becomes available to Collect.”

2) Show “accrued ETH” correctly

For a connected user:

  • call checkpointUser(user) (or the read helper your app uses)
  • display the resulting claimableEth as accrued / available to Collect

3) Implement the two modes

Mode 0 (Collect ETH, default):

  • claimShareholder(mode=0, ...)

Mode 1 (Collect & Lock, optional):

  • claimShareholder(mode=1, targetTokenId, durationSeconds, createAutoMax, minVeOut)
  • routes through Furnace.lockEthReward(...)

4) If you support “Collect & Lock”, reuse the Furnace slippage pattern

  • quote a ve outcome if you show a preview
  • compute minVeOut the same way as in the Furnace tutorial

What success looks like

  • Your UI matches the official app on accrued ETH.
  • Users can Collect ETH (simple, liquid) by default.
  • Users can Collect & Lock (compounding) with predictable slippage protection.

Next reads