if the token that represent the points will have low decimals, and will represent much lower amount than points, the protocol will not be able to provide the real ratio between each point and it's token.
The SystemConfig::updateMarket
allows the owners to provide the token address, and the ratio between each point and tokens (_tokenPerPoint
).
however אhis is based on the assumption (which is not necessarily correct) that each point represents many more tokens, together with the decimal, for example:
each point represent 1e18 tokens.
however, if the points represent LESS than tokens * 10 ** token's decimals
, the protocol will not be able to function by the real ratio.
let's consider a scenario where a user sells 500,000 points:
Points: 500,000
the token's decimal is 2 (just for simplicity) and the 500,000 points represent 500 tokens.
the 500,000 points are equal to 50 * 10 ** 2 ( which is 50,000);
therefore the tokenPerPoint
should be 0.1, which can not be passed as an input parameter to
and the protocol will not be able to update the ratio.
manual review
consider implementing a mechanism in the protocol, where points are being stored together with decimals, then, the ratio can be manipulated with points
and tokenPerPoint
to represent the real ratio
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.