ContributionCalculation

Helper contract for calculating the exit contribution (i.e. when selling G$ back to the reserve).

Events

SellContributionRatioUpdated

Emits when the contribution ratio is updated.

event SellContributionRatioUpdated(
    address indexed caller, 
    uint256 nom, 
    uint256 denom
);

calculateContribution

Calculate the amount after contribution during the sell action. There is a sellContributionRatio percent contribution.

Returns: the contribution amount for sell.

function calculateContribution(
   GoodMarketMaker _marketMaker,
   GoodReserveCDai _reserve,
   address _contributer,
   ERC20 _token,
   uint256 _gdAmount
) external view returns (uint256);

Last updated