dforce-network / dToken

dForce yield token

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some DToken events are missing indexed fields

mgcolburn opened this issue · comments

Severity: Code Quality

Description

The following events in the DToken contract would benefit from having an indexed field for easier off-chain discovery.

  •    event Mint( 
       address account, 
       uint256 pie, 
       uint256 wad, 
       uint256 totalSupply, 
       uint256 exchangeRate 
    
  •   event Burn( 
       address account, 
       uint256 pie, 
       uint256 wad, 
       uint256 totalSupply, 
       uint256 exchangeRate 
    
  •    event Rebalance( 
       address admin, 
       address[] withdraw, 
       uint256[] withdrawAmount, 
       address[] supply, 
       uint256[] supplyAmount 
    
  •    event TransferFee( 
       address admin, 
       address token, 
       address feeRecipient, 
       uint256 amount  
    
  •    event NewDispatcher(address Dispatcher, address oldDispatcher);
    
  •    event NewOriginationFee( 
       bytes4 sig, 
       uint256 oldOriginationFeeMantissa, 
       uint256 newOriginationFeeMantissa 
    
commented

For admin functions, we do not prefer to indexed fields cause these operations are barely used. For user functions, will add the indexed field as you suggest.