Skip to main content
ERC4626 vault built in R33.sol. The source contract is named R33, but the ERC20 share token it mints is "xRAM Liquid Staking Token" with symbol hyperRAM. The vault wraps xRAM exposure, stakes the underlying into VoteModule, and lets an operator vote and compound on behalf of all depositors.

Core ERC4626 Functions

deposit

Deposits xRAM, stakes it into VoteModule, and mints vault shares to receiver.

withdraw

Burns shares, withdraws xRAM from VoteModule, and transfers xRAM to receiver.

redeem

Redeems a share amount for the corresponding xRAM assets.

totalAssets

Returns the xRAM currently staked by the vault in VoteModule.

ratio

Returns the current xRAM-per-share ratio, scaled by 1e18.

Operator and Governance Functions

submitVotes

Operator-only helper that forwards a vote through Voter on behalf of the vault.

claimIncentives

Claims vote incentives and fee rewards to the vault.

swapIncentiveViaAggregator

Operator-only reward-processing hook that swaps incentive tokens through a whitelisted aggregator. RAM output is then available for compound().

compound

Converts any RAM held by the vault into xRAM, deposits that xRAM into VoteModule, and increases the vault ratio for all share holders.

unlock

Marks the current period as unlocked, but only when the VoteModule cooldown is not active.

Key Concepts

  • Deposits are gated by isUnlocked(), which requires the current period to be unlocked and not within one hour of the next weekly period.
  • Withdrawals and redeems do not use the same vault lock, but they still depend on VoteModule.withdraw() succeeding, so the VoteModule cooldown matters.
  • totalAssets() reads from VoteModule.balanceOf(address(this)), not from idle xRAM held directly in the vault.
  • Aggregators must be whitelisted by AccessHub before swapIncentiveViaAggregator() can be used.
  • Shares are transferable even though the underlying xRAM token is transfer-restricted.