RedeemC3PoolFacet

Git Source

Inherits: ReentrancyGuard

Functions

c3RedeemPoolDefault

Redeems default underlying carbon tokens from a C3 Pool

function c3RedeemPoolDefault(
    address sourceToken,
    address poolToken,
    uint256 amount,
    uint256 maxAmountIn,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external nonReentrant returns (address[] memory projectTokens, uint256[] memory amounts);

Parameters

NameTypeDescription
sourceTokenaddressSource token to use in the redemption
poolTokenaddressPool token to redeem
amountuint256Amount to redeem
maxAmountInuint256Max amount of source token to spend
fromModeLibTransfer.FromFrom Mode for transfering tokens
toModeLibTransfer.ToTo Mode for where undlerying tokens are sent

Returns

NameTypeDescription
projectTokensaddress[]List of underlying tokens received
amountsuint256[]Amounts of underlying tokens received

c3RedeemPoolSpecific

Redeems default underlying carbon tokens from a C3 Pool

function c3RedeemPoolSpecific(
    address sourceToken,
    address poolToken,
    uint256 maxAmountIn,
    address[] memory projectTokens,
    uint256[] memory amounts,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external nonReentrant returns (uint256[] memory redeemedAmounts);

Parameters

NameTypeDescription
sourceTokenaddressSource token to use in the redemption
poolTokenaddressPool token to redeem
maxAmountInuint256Max amount of source token to spend
projectTokensaddress[]Underlying tokens to redeem
amountsuint256[]Amounts of underlying tokens to redeem
fromModeLibTransfer.FromFrom Mode for transfering tokens
toModeLibTransfer.ToTo Mode for where undlerying tokens are sent

Returns

NameTypeDescription
redeemedAmountsuint256[]Amounts of underlying tokens redeemed