Skip to main content
Staking, delegation, and permissions module for xRAM. VoteModule is the contract that actually supplies governance voting power. Voter reads VoteModule.balanceOf(user), not a wallet balance or NFT position.

Core Functions

deposit / depositAll

Moves xRAM from the caller into VoteModule and increases the caller’s voting power.

withdraw / withdrawAll

Returns xRAM to the caller and reduces voting power.

delegate

Grants another address permission to act as a delegate for voting-related calls such as Voter.vote(), Voter.reset(), and Voter.poke(). Passing address(0) clears the delegate.

setAdmin

Sets an admin/operator for the caller. Admin permissions are broader than delegate permissions and are used by fee-distributor reward claims.

isDelegateFor / isAdminFor

Permission checks consumed by Voter and FeeDistributor.

unlockTime / cooldown

Expose the active cooldown window. Unless an address is exempt, both deposits and withdrawals require block.timestamp >= unlockTime.

Key Concepts

  • Voting power equals the caller’s staked xRAM balance in VoteModule.
  • notifyRewardAmount(0) can only be called by xRAM and is used to push unlockTime forward after weekly maintenance.
  • Delegates are intended for voting actions; admins are used for a wider set of owner-authorized operations such as fee claims.
  • AccessHub can change cooldown settings and add cooldown exemptions for specific addresses.