Farming Pools

How do I access information on crypto farming pools using the DIA oracle system?

‚Äč

The oracle contains information about pool rates and balances of crypto farming pools. You can execute an oracle call as follows:

  1. Call getCoinInfo(protocol_name) with protocol_name being the name of the farming protocol such as Balancer. You can use the "Read" section on Etherscan to execute this call.

  2. The response of the call contains four values:

    1. Pool rate (see here for an explanation).

    2. Pool balance (measured in pool token).

    3. The UNIX timestamp of the last oracle update.

    4. Pool ID.

As of now, the following list of pools is available in this oracle: - BALANCER: largest WETH/WBTC pool (by market cap) - CVAULT: WETH pool - YFI (yearn.finance): WETH pool - SYNTHETIX: sETH pool - LOOPRING: LRC pool - CURVEFI: 3pool (USDC, DAI, USDT) - BARNBRIDGE: Stablecoin pool (USDC, DAI, sUSD)

Remark: Due to different mechanics of farming, the meaning of pool rate can differ between protocols. See here for a detailed explanation. The emitted value "Pool rate" has the following meaning for the corresponding protocol: - Pool rate: Balancer, CVault, YFI - Total debt: Synthetix - Total reward: Loopring - Virtual price: Curve Finance - Fixed reward: Barnbridge