TokensTraded()

CarbonController.sol
   event TokensTraded(
        address indexed trader,
        address indexed sourceToken,
        address indexed targetToken,
        uint256 sourceAmount,
        uint256 targetAmount,
        uint128 tradingFeeAmount,
        bool byTargetAmount
    );

This event is emitted when tokens are traded into one or more strategies.

Event Parameters

NameTypeDescription

trader

address

The address that performed the trade.

sourceToken

address

The token traded from.

targetToken

address

The token traded to.

sourceAmount

uint256

The number of source tokens traded.

targetAmount

uint256

The number of target tokens received.

tradingFeeAmount

uint128

The number of tokens earned by Carbon DeFi as a fee.

byTargetAmount

bool

True: the trade was done using the tradeByTargetAmount() function.

False: the trade was done using the tradeBySourceAmount() function.

Last updated