Smart Contract Reference
VaultFactory — Base Mainnet
Contract Address: 0x5d4aAE1184fb8DDd757df7E3Edd06d05792cb382
Verified on BaseScan: https://basescan.org/address/0x5d4aAE1184fb8DDd757df7E3Edd06d05792cb382
Write Functions
createVault(token, apr, bronze, silver, gold) — payable, fee 0.001 ETH. Creates a new staking vault for a creator token.
stake(vaultAddress, amount) — Stake tokens into a vault. Requires prior ERC20 approval.
unstake(vaultAddress, amount) — Unstake tokens from a vault. Rewards are preserved.
claimRewards(vaultAddress) — Claim all accumulated rewards for the caller.
fundRewardsPool(vaultAddress, amount) — Creator funds the rewards pool. Requires prior ERC20 approval.
withdrawRewardsPool(vaultAddress, amount) — Creator withdraws from the rewards pool.
updateAPR(vaultAddress, newAPR) — Creator updates the vault APR. Range: 1–1000.
Read Functions
getVaultInfo(vaultAddress) — Returns token, creator, totalStaked, apr, bronzeTier, silverTier, goldTier.
getUserStake(vaultAddress, userAddress) — Returns stakedAmount, pendingRewards, tier.
getRewardsPool(vaultAddress) — Returns current rewards pool balance.
getCreatorVaults(creatorAddress) — Returns all vault addresses for a creator.
getStakersCount(vaultAddress) — Returns total number of stakers.
Security
Built with OpenZeppelin. Reentrancy protection via ReentrancyGuard and Checks-Effects-Interactions pattern. Audited with Slither — 39 findings, zero critical. Full report: https://vaultcreator.xyz/slither-report.txt
Last updated