The Unifi Controller is a work in progress with minor tweaks here and there. Full documentation will be available once it is optimized!
Primary Uses - The Unifi Controller is responsible for the setting the variables of UP minting on individual pairs as well as updating the redeem value of UP tokens globally.
event SwapFeesUpminted(address indexed pool, uint amountUPMinted, address defaultPoolAddress, uint platforUPFees);
SwapFeeUpmintedevent is emitted whenever UP is minted. In the majority of cases, this will occur any time a trade occurs.
event UpdatePoolRewards(address indexed pool, uint rewards);
UpdatePoolRewardsevent is emitted when the amount of UP claimable by the liquidity providers in the liquidity pool is updated. This event occurs when a trade occurs and results in UP being minted for liquidity providers, or a liquidity provider performs a claim UP transaction.
function feeSetter() external view returns (address);
feeSetterfunction returns the address of uTrade V2's Smart Contract which sets the fees for trading.
function WETH() external view returns (address);
WETHfunction will return the address of WMATIC on Polygon. As this does not change, it will always return
function UNFIUPVault() external view returns (address);
UNFIUPVaultfunction returns the address of the UPMatic vault. This vault contains the MATIC that is redeemable for UP.
function nativeFeeTo() external view returns (address);
nativeFeeTofunction returns the address where, in the case of Unifi Protocol collecting native token fees, the fees would be sent to.