-
Notifications
You must be signed in to change notification settings - Fork 608
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
Ensure gauges can only be created for assets that exist on-chain #530
Comments
@ValarDragon I've been working on this but am a bit uncertain about a few things with regards to denomination existence logic:
Either way, I'm seeing lots of test failures checking both lockup.QueryCondition |
The check should basically be:
We want to upgrade to SDK v0.44 ASAP, so probs best to wait on that. (Or can build it in a separate branch using Jacob's PR) I don't really understand what it means for an asset to exist on chain with no supply. Is this an edge case in the current supply code or smth? |
Sounds good, thanks for clarifying this - will wait until this functionality is available via SDK version upgrade to continue with implementation I haven't taken a deep look into the SDK supply code, but I'm making an assumption here that an asset is not removed - for history/transparency - if the supply ultimately reaches zero (though I guess this is theoretically impossible); it's quite possible I'm incorrect about this expectation. Anyways, this is why I figured it may be safer to check asset presence via attributes other than the supply, but seeing the check of |
Currently gauges seem to be creatable for assets that don't exist on-chain. This doesn't really pose any efficiency problems, but we should nonetheless eliminate this. (If nothing else, just for integrators sanity lol)
Here is an instance for a gauge for the denom "Stake".
This can be fixed by making the CreateGauge logic in
x/incentives
check that the denomination exists in the bank keeper on the chain, somewhere.The text was updated successfully, but these errors were encountered: