You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!isPropertyDivisible(property)) { // <-- the tokens "invested"
nValue = nValue * 1e8; // <-- modifies nValue!
}
The adjusted amount for crowdsale participations with indivisble tokens is not stored in a new variable, but modifies the value of the transaction.
As result, crowdsale participations may look much larger than they actually are. This is not consensus affecting, as far as I can see right now.
Example:
Given is a crowdsale without bonus, where 1 indivisible token is granted for each unit invested. The tokens to be invested are also indivisible, i.e. 1 token invested = 1 token granted.
{"propertyid": 4,"name": "Test","active": true,"issuer": "n4JaFhZXkSu59RoZLbzu3PMUdsEtkhPMFU","propertyiddesired": 3,"tokensperunit": "1","earlybonus": 0,"percenttoissuer": 0,"starttime": 1442692142,"deadline": 7731414000,"tokensissued": "1","addedissuertokens": "0","amountraised": "100000000",// <--- only 1 sent, off by a factor of 100000000"participanttransactions": [{"txid": "fc2e547b7426111da6fe04007dfac08a2ca996241d2bc48e05a17aee3fc2b05a","amountsent": "100000000",// <--- only 1 sent, off by a factor of 100000000"participanttokens": "1","issuertokens": "0"}]}
The total can also overflow, if there are multiple participations:
{"propertyid": 4,"name": "Test","active": true,"issuer": "miSc8q3BtXUX4AXebpxqkJuxJAFvsaXpxn","propertyiddesired": 3,"tokensperunit": "1","earlybonus": 0,"percenttoissuer": 0,"starttime": 1442693274,"deadline": 7731414000,"amountraised": "-219103232",// <--- should be 368934881472"tokensissued": "368934881472","addedissuertokens": "0","participanttransactions": [{"txid": "3770ead708178fd1072dc4d90e711417dfe4cc003b7edd26846db0d05485a3d3","amountsent": "9223372036800000000",// <--- should be 92233720368"participanttokens": "92233720368","issuertokens": "0"},{"txid": "5e8f786d7d97adef1334afa5a4bcd726bcc8e9fc3a0cdcf3d2e968e6b45d6a2b","amountsent": "9223372036800000000",// <--- should be 92233720368"participanttokens": "92233720368","issuertokens": "0"},{"txid": "f57d2fee2178f49ffe96b6a2ba2b0a899b20c21804ef46745f7751ed98384dde","amountsent": "9223372036800000000",// <--- should be 92233720368"participanttokens": "92233720368","issuertokens": "0"},{"txid": "8127b30eeb61716c526b9672162e2414ea4d219876961b0bf663dd0d9aceea4f","amountsent": "9223372036800000000",// <--- should be 92233720368"participanttokens": "92233720368","issuertokens": "0"}]}
Note: even though this is seemingly an RPC issue, the underlying cause should be addressed on the core level.
CMPTransaction::logicHelper_CrowdsaleParticipation:
The adjusted amount for crowdsale participations with indivisble tokens is not stored in a new variable, but modifies the value of the transaction.
As result, crowdsale participations may look much larger than they actually are. This is not consensus affecting, as far as I can see right now.
Example:
Given is a crowdsale without bonus, where 1 indivisible token is granted for each unit invested. The tokens to be invested are also indivisible, i.e. 1 token invested = 1 token granted.
It follows a purchase with 1 token:
The total can also overflow, if there are multiple participations:
Note: even though this is seemingly an RPC issue, the underlying cause should be addressed on the core level.
Related: #247, #248
The text was updated successfully, but these errors were encountered: