Advanced Use-Cases
Managing, deploying, and customising a specific pool are advanced use-cases that offer the full capability of creating money markets with parameters of their choice, at their own will
Managing A Pool's Assets
deployAsset
deployAssetRunning a Liquidity Mining Campaign
Step 1: Deploy Flywheel Core & Flywheel Static Rewards
import { ethers } from 'ethers';
// An ether's signer
const { deployer } = await ethers.getNamedSigners();
// E.g. WBNB as reward token for the LM campagin
const rewardTokenAddress = "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
// Deploy Flywheel Core
const fwCore = await sdk.deployFlywheelCore(rewardTokenAddress, {
from: deployer.address,
});
// Deploy Flywheel Static Rewards
const fwStaticRewards = await sdk.deployFlywheelStaticRewards(fwCore.address, {
from: deployer.address,
});
// Setup FuseFlywheelCore with FlywheelStaticRewards
const tx = await sdk.setFlywheelRewards(fwCore.address, fwStaticRewards.address, {
from: deployer.address,
});
await tx.wait()Step 2: Add the Flywheel to the pool
Step 3: Set up rewards for specific market and set its emission schedule
Step 4: Fund the Flywheel with the tokens you'd like to emit
Querying Flywheels for Accrued Rewards
getFlywheelMarketRewardsByPoolWithAPR
getFlywheelMarketRewardsByPoolWithAPRLast updated