IFeeConverter
Functions
getExchangeHelper
get the exchange helper address
function getExchangeHelper() external view returns (address exchangeHelper);
Returns
Name | Type | Description |
---|---|---|
exchangeHelper | address | exchange helper address |
getTreasury
get the treasury address and treasuryShare
function getTreasury() external view returns (address treasury, UD60x18 treasuryShare);
Returns
Name | Type | Description |
---|---|---|
treasury | address | treasury address |
treasuryShare | UD60x18 | treasury 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
Name | Type | Description |
---|---|---|
sourceToken | address | address of token to convert |
callee | address | exchange address to call to execute the trade. |
allowanceTarget | address | address for which to set allowance for the trade |
data | bytes | calldata to execute the trade |
redeem
Redeem shares from an ERC4626 vault
function redeem(address vault, uint256 shareAmount) external returns (uint256 assetAmount);
Parameters
Name | Type | Description |
---|---|---|
vault | address | address of the ERC4626 vault to redeem from |
shareAmount | uint256 | quantity of shares to redeem |
Returns
Name | Type | Description |
---|---|---|
assetAmount | uint256 | quantity 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();