Adding new pools into the strategy

How to add a new strategy to Strategy Handler?

To add a new pool to the strategy, we should call

```typescript
            await handler.addLiquidityDirection(
                _codeName,
                _strategyAddress,
                _entryToken,
                _assetId,
                _chainId,
                _entryData,
                _exitData,
                _rewardsData
            );
```
  • _entryToken: the token with which we are entering a pool.

  • _assetId:

  • entryData, exitData, rewardsData: should be got from the strategy contract.

```typescript
const _entryData = await strategy.encodeEntryParams(
                curvePool, _entryToken, poolSize, tokenIndexInCurve, fraxPool, duration);
const _rewardsData = await strategy.encodeRewardsParams(lpToken, fraxPool, assetId);
const _exitData = await strategy.encodeExitParams(curvePool, _entryToken, tokenIndexInCurve, fraxPool);
```

Last updated