Fetching strategies metadata

Use following methods in order to communicate to your users what protocols are currently used for the yield farming at Yelay.

Get protocols

Fetch list of all protocols currently whitelisted for the yield farming through Yelay. Whitelisted strategies are those that are connected to the Yelay, and can be instantly set to the 'active' state in order to get liquidity flown there. F.e: Gearbox, Morpho, Euler, Silo.

const protocols = await sdk.strategies.getProtocols();

Get active strategies

Fetch list of the strategies that are currently "active" for specific vault, i.e. strategies that accept user liquidity going through that vault.

const activeStrategies = await sdk.strategies.getActiveStrategies(vault);

It returns strategy name (f.e. "MV-usdc-mev-capital" for one of the Morpho vaults), name of the protocol and current % allocation of the funds.

Response format:

[
	{
		name: "MV-usdc-mev-capital",
		protocolId: 'morpho',
		allocation: 100 // Percentage allocated to the strategy
	}
]

Note: The sum of allocations for all active strategies might not be complete 100%. In specific cases, a portion of the funds can remain unallocated in the vault itself.

Last updated