IFeeConverter

Git Source

Functions

getExchangeHelper

get the exchange helper address

function getExchangeHelper() external view returns (address exchangeHelper);

Returns

NameTypeDescription
exchangeHelperaddressexchange helper address

getTreasury

get the treasury address and treasuryShare

function getTreasury() external view returns (address treasury, UD60x18 treasuryShare);

Returns

NameTypeDescription
treasuryaddresstreasury address
treasuryShareUD60x18treasury share (The % of funds allocated to the treasury address)

convert

convert held tokens to USDC and distribute as rewards

function convert(address sourceToken, address callee, address allowanceTarget, bytes calldata data) external;

Parameters

NameTypeDescription
sourceTokenaddressaddress of token to convert
calleeaddressexchange address to call to execute the trade.
allowanceTargetaddressaddress for which to set allowance for the trade
databytescalldata to execute the trade

redeem

Redeem shares from an ERC4626 vault

function redeem(address vault, uint256 shareAmount) external returns (uint256 assetAmount);

Parameters

NameTypeDescription
vaultaddressaddress of the ERC4626 vault to redeem from
shareAmountuint256quantity of shares to redeem

Returns

NameTypeDescription
assetAmountuint256quantity of assets received

Events

Converted

event Converted(
    address indexed account, address indexed token, uint256 inAmount, uint256 outAmount, uint256 treasuryAmount
);

SetAuthorized

event SetAuthorized(address indexed account, bool isAuthorized);

SetTreasury

event SetTreasury(address indexed newTreasury, UD60x18 newTreasuryShare);

Errors

FeeConverter__NotAuthorized

error FeeConverter__NotAuthorized();

FeeConverter__NotInitialized

error FeeConverter__NotInitialized();

FeeConverter__TreasuryShareGreaterThanOne

error FeeConverter__TreasuryShareGreaterThanOne();