# YieldSource examples

## Stargate LP farming

Liquidity providers for stargate receive LP token. Users can stake this token into farming contract for STG rewards. We can use this reward for insurance purchase by converting STG into WETH or any other payment token.

Here is deploy script.

```
    yieldSource = address(
        new StargateLPYieldSource(
            STG_PID, // LP farming pool id
            STG_LPTOKEN, // LP token of stargate
            STG_STAKING, // Farming contrat
            SUSHISWAP_ROUTER // Router for swap
        )
    );
```

[StargateLPYieldSource code](https://github.com/Y2K-Finance/SelfInsuredVault/blob/master/src/sources/StargateLPYieldSource.sol)

Stargate USDC LP token: 0x892785f33CdeE22A30AEF750F285E18c18040c3e\
Yield Source: 0x80D47E9D823074e0909601A389b4cd255d65CE27\
SIV: 0x3D817dB548245692f9100FCCB4Fc0D8eb92a210a

## Staked GLP from GMX

GLP owners receive WETH fees and GMX tokens as yield. We can use this yield for insurance purchase. Here, we compound GMX for more WETH fee rewards.

Here is deploy script.

```
    yieldSource = address(
        new StakedGLPYieldSource(
            StakedGLP_TOKEN, // sGLP token
            WETH, // wrapped eth
            GMX_REWARD_ROUTER, // reward router v2 of gmx
            SUSHISWAP_ROUTER // swap router for swap
        )
    );
```

StakedGLPYieldSource code

sGLP: 0x5402B5F40310bDED796c7D0F3FF6683f5C0cFfdf\
Yield Source: 0x875D8b0ecB66F625399D954BA50b3db0B28F9ECe\
SIV: 0x589A9463d55a1ac2fe2f903d4f700eC0fb301E9E
