Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseMin and Varmin should be uint #58

Closed
nitika-goel opened this issue Dec 25, 2018 · 3 comments
Closed

BaseMin and Varmin should be uint #58

nitika-goel opened this issue Dec 25, 2018 · 3 comments

Comments

@nitika-goel
Copy link
Contributor

The variables BaseMin and Varmin should be uint256 instead of uint64 and should store values with decimals, for eg if BaseMin = 6 ETH it should be saved as 6*10^18.
This also leads to incorrect comparison and triggers in functions like internalLiquiditySwap, where Base Min + Var Min is compared to CA Balance directly, even though Base Min is saved without decimals and CA balance is retrieved with decimals.

@nervehammer
Copy link
Contributor

nervehammer commented Dec 27, 2018

changes done, please refer 2dde656

@nervehammer nervehammer added the resolved - pending closure Issues resolved but pending closure via issue reporter label Dec 27, 2018
@nitika-goel
Copy link
Contributor Author

There are places where they are still referred as uint64, for example in function sendClaimPayout we are converting the parameter to changeCurrencyAssetVarMin() as uint64, while the parameter requires uint256.

@nitika-goel nitika-goel removed the resolved - pending closure Issues resolved but pending closure via issue reporter label Dec 27, 2018
@nervehammer
Copy link
Contributor

changes are done. I am converting all non uint256 types to uint256 as breaking uint256 to smaller uints consume gas if they are not packed. e.g sum assured is not in 10^18, cover period is uint16 etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants