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
- ETH stays in
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
claimableEthas 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
minVeOutthe 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
- Index + user accounting details: ShareholderRoyalties (Barons)
- Furnace entry / minVeOut: Integrate Furnace quotes + enter