Events & Indexing
Multyr contracts emit granular events for every state-changing operation. These events serve as the canonical data source for frontends, analytics dashboards, and off-chain indexers.
Key Events
CoreVault
| Event | Parameters | Emitted When |
|---|---|---|
Deposit | sender, owner, assets, shares | A user deposits USDC and receives shares |
Withdraw | sender, receiver, owner, assets, shares | A user withdraws USDC by burning shares |
StrategyRouter
| Event | Parameters | Emitted When |
|---|---|---|
StrategyActivated | adapter, timestamp | A new strategy adapter is added to the routing set |
StrategyDeactivated | adapter, timestamp | A strategy adapter is removed from the routing set |
Harvested | adapter, amount, timestamp | Yield is collected from an adapter |
Rebalanced | allocations[], timestamp | Capital is rebalanced across adapters |
FeeCollector
| Event | Parameters | Emitted When |
|---|---|---|
FeesCollected | feeType, amount, recipient, timestamp | Protocol fees are collected and distributed |
FeeRateUpdated | feeType, oldRate, newRate | A fee rate parameter is changed via governance |
BufferManager
| Event | Parameters | Emitted When |
|---|---|---|
BufferTargetUpdated | oldTarget, newTarget | The idle buffer target is adjusted |
BufferReplenished | amount, source | USDC is pulled from strategies to refill the buffer |
SystemSealer
| Event | Parameters | Emitted When |
|---|---|---|
Sealed | slot, timestamp | A configuration slot is permanently sealed |
Subgraph
A Multyr subgraph is planned for deployment on each supported chain (starting with Arbitrum One) via The Graph's decentralized network. The subgraph will index all events listed above and expose them through a GraphQL API.
Entities (Planned)
- Vault -- aggregate state: totalAssets, totalSupply, sharePrice, cumulative fees
- User -- per-address position: shares held, deposit history, withdrawal history
- Strategy -- per-adapter state: deployed assets, cumulative yield harvested, active/inactive status
- FeeEvent -- individual fee collection records
- HarvestEvent -- individual harvest records with yield amounts
Example Queries
The subgraph endpoint is not yet live. The queries below illustrate the expected schema.
Vault state:
{
vault(id: "0x...") {
totalAssets
totalSupply
sharePrice
lastHarvestTimestamp
}
}
User position:
{
user(id: "0xUserAddress") {
sharesBalance
deposits(orderBy: timestamp, orderDirection: desc, first: 10) {
assets
shares
timestamp
}
withdrawals(orderBy: timestamp, orderDirection: desc, first: 10) {
assets
shares
timestamp
}
}
}
Recent harvests:
{
harvestEvents(orderBy: timestamp, orderDirection: desc, first: 20) {
adapter
amount
timestamp
}
}
Strategy allocations:
{
strategies(where: { active: true }) {
adapter
deployedAssets
cumulativeYield
activatedAt
}
}
Direct Event Querying
If you prefer to bypass the subgraph, you can query events directly from any supported chain's RPC node using standard eth_getLogs calls with the relevant topic hashes. Example using cast (Foundry):
# Get all Deposit events from CoreVault
cast logs --from-block 0 --to-block latest \
--address <CORE_VAULT_ADDRESS> \
"Deposit(address,address,uint256,uint256)" \
--rpc-url https://arb1.arbitrum.io/rpc
Document version: 1.1 Last updated: 2026-03-29