Using non-ERC20 token standards
Note that - while Cega is intended to be used with ERC20 tokens only - it is possible to use Cega with tokens of other standards that share the same ERC20 function selectors (those that Cega use, at least). However, using non-ERC20 tokens is dangerous because Cega is designed to work with ERC20 tokens only.
For example, it is possible to create an FCNProduct
contract configured to use an ERC721 asset. But IERC721.transferFrom
triggers a call to the to
address's onERC721Received
function, potentially enabling reentrancy exploits. An admin may be able to abuse this behavior if a vault were configured with an ERC721 token to reenter into collectFees
and drain the vault.