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

Optimize custom tax logic #182

Open
Lockwarr opened this issue Dec 4, 2024 · 3 comments
Open

Optimize custom tax logic #182

Lockwarr opened this issue Dec 4, 2024 · 3 comments

Comments

@Lockwarr
Copy link
Contributor

Lockwarr commented Dec 4, 2024

When a fee is paid in different denom than unls, then we perform a complex custom logic to determine if the fee is accepted and enough.

Optimize this custom logic to query concrete prices instead of querying all prices.

Validate the params on MsgUpdateParams by again doing a query to the contract and determine if params are okay.

Add a default value for the min_gas_prices in app.toml, hardcoded in the binary as we have for other required values such as commit_timeout.

@Lockwarr
Copy link
Contributor Author

Lockwarr commented Dec 5, 2024

Try this query '{"base_price": { "currency": "OSMO"}}' -> '{"stable_price": { "currency": "OSMO"}}'

@Lockwarr
Copy link
Contributor Author

Rename tax param contract_addr to treasury_addr

Use the base_price query for all custom fees(stables or volatile tokens) and the formula - feeAmount * (pricefeedAmountQuote/priceFeedAmount)

@Lockwarr
Copy link
Contributor Author

Think about no queries for prices or tickers to contracts at all, just have module params for each ibc denom that we want to accept + exact minimum amount or fraction of the base denom

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

No branches or pull requests

1 participant