Skip to main content

MembershipScores

MembershipScores

GFI_MANTISSA

uint256 GFI_MANTISSA

USDC_MANTISSA

uint256 USDC_MANTISSA

USDC_TO_GFI_MANTISSA

uint256 USDC_TO_GFI_MANTISSA

calculateScore

function calculateScore(uint256 gfi, uint256 capital, uint256 alphaNumerator, uint256 alphaDenominator) internal pure returns (uint256)

Calculate a membership score given some amount of gfi and capital, along with some 𝝰 = alphaNumerator / alphaDenominator.

𝝰 must be in the range [0, 1]

Parameters

NameTypeDescription
gfiuint256amount of gfi (GFI, 1e18 decimal places)
capitaluint256amount of capital (USDC, 1e6 decimal places)
alphaNumeratoruint256alpha param numerator
alphaDenominatoruint256alpha param denominator

Return Values

NameTypeDescription
[0]uint256membership score with 1e18 decimal places