Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tech.ramses.xyz/llms.txt

Use this file to discover all available pages before exploring further.

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

function deposit(uint256 assets, address receiver) external returns (uint256 shares)
Deposits xRAM, stakes it into VoteModule, and mints vault shares to receiver.

withdraw

function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares)
Burns shares, withdraws xRAM from VoteModule, and transfers xRAM to receiver.

redeem

function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets)
Redeems a share amount for the corresponding xRAM assets.

totalAssets

function totalAssets() public view returns (uint256)
Returns the xRAM currently staked by the vault in VoteModule.

ratio

function ratio() public view returns (uint256)
Returns the current xRAM-per-share ratio, scaled by 1e18.

Operator and Governance Functions

submitVotes

function submitVotes(address[] calldata pools, uint256[] calldata weights) external
Operator-only helper that forwards a vote through Voter on behalf of the vault.

claimIncentives

function claimIncentives(address[] calldata feeDistributors, address[][] calldata tokens) external
Claims vote incentives and fee rewards to the vault.

swapIncentiveViaAggregator

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

compound

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

unlock

function unlock() external
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.