FreeosDAO / freeoscontracts

Freeos Smart Contract Code
0 stars 1 forks source link

Traget rate not capped #5

Closed judytan21 closed 3 years ago

judytan21 commented 3 years ago

As per Tom's Airclaim doc, "The target rate has a hardcoded rate of 0.0167. If you change the value to less than 0.0167, the target rate will be set to 0.0167. I ran a test case where both current/target price was set to 0 which is below the hardcoded rate, System did not set target rate to 0.0167 and was at 0. The results will be quite different if the targetprice is not reset to 0.0167 cos as current price = target price = 0, Hence, user will receive 100 liquid freeos and 0 vested freeos. gitpod /workspace $ proton get table freeosconfig freeosconfig exchangerate { "rows": [{ "currentprice": "0.00000000000000000", "targetprice": "0.00000000000000000" }

tommccann777 commented 3 years ago

@judytan21 I checked the code and it was ok. The problem was that I had not deployed the latest version (v0.103) of the freeosconfig contract to the Proton Testnet. I deployed and it now works as intended. You may want to do a retest.

judytan21 commented 3 years ago

24/2/21 Issue retested. Targetrate capped at 0.0167. 25/2/21 Issue closed.