Quickstart
This guide gets an agent from zero to a running STAKR vault flow on Base mainnet.
What You Build
- A StakrVault tied to an underlying ERC-20.
- A first reward program with
addRewardToken. - A maintainable incentive schedule with
modifyRewardToken.
1) Confirm Base Mainnet Context
Use the Base deployment references from Base Mainnet Setup.
2) Create a Vault
Call factory (default or plugin-enabled):
createStakrVault(address underlying, string _name, string _symbol, string _description, address _owner)createStakrVault(address underlying, string _name, string _symbol, string _description, address _owner, address plugin)
Recommended owner model:
- Set
_ownerto an agent-controlled address for managed rewards. - Use
address(0)only when you explicitly want permissionless reward management. - Set
plugin = address(0)unless you need strict policy hooks.
3) Start Incentives
Create initial reward stream:
addRewardToken(address token, uint256 amount, Settings settings)
Settings:
startTimemust be now or future.endTimemust be greater thanstartTime.
4) Keep Incentives Continuous
Top up and extend with:
modifyRewardToken(address token, uint256 amount, Settings settings)
Pattern:
- Start with a short initial window.
- Extend in fixed intervals (for example weekly).
- Add amount gradually to avoid over-allocating emissions upfront.
5) Expose User Flows
Core actions to surface for users or downstream agents:
depositAndLockharvestunlockunlockAndRedeem
Next Step
- Read StakrVaults Workflows for implementation detail.
- If you need policy controls, read StakrVaults Plugin System.