Skip to content

Conversation

@baedrik
Copy link
Contributor

@baedrik baedrik commented Dec 28, 2020

No description provided.

Copy link
Contributor

@reuvenpo reuvenpo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry it took so long to get around to reviewing this! We were making some minor changes to this repo this week and i realized i never addressed this PR.
I left several comment, but because it's been a while since you submitted the PR I understand if you don't want to get back to it, and I can probably invest a bit of time to touch it up for merging.

Thanks for cleaning up the Readme! We should have done that long ago.

@reuvenpo reuvenpo requested a review from assafmo May 16, 2021 14:07
Copy link
Contributor

@assafmo assafmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

The code was updated with a new mechanism, which I call viewing keys. This allows a user to generate a key that enables off-chain queries. This way you can perform balance and transaction history queries without waiting for a transaction on-chain. The tranaction to create a viewing key is expensive, to the tune of about 3M gas. This is intended to make queries take a long time to execute to be resistant to brute-force attacks.

The usual disclaimer: Don't use this in production, I take no responsibility for anything anywhere anytime etc.
\*:The conversion rate will be 1 uscrt for 1 minimum denomination of the token. This means that if your token has 6 decimal places, it will convert 1:1 with SCRT. If your token has 10 decimal places, it will have an exchange rate of 10000 SCRT for 1 token. If your token has 3 decimal places, it will have an exchange rate of 1000 tokens for 1 SCRT. You can use the exchange_rate query to view the exchange rate for the token. The query response will display either how many tokens are worth 1 SCRT, or how many SCRT are worth 1 token. That is, the response lists the symbol of the coin that has less value (either SCRT or the token), and the number of those coins that are worth 1 of the other.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not let the creator set the conversion rate?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conversion rate applies to tokens like sSCRT. The conversion rate is between the wrapped asset and the corresponding native asset, so unless you're doing something special, this is in line with how Withdraw and Redeem are defined.

@reuvenpo
Copy link
Contributor

I merged master again to resolve the conflict around the query response schema file.

@reuvenpo reuvenpo merged commit 6c2c4f2 into scrtlabs:master May 19, 2021
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

Successfully merging this pull request may close these issues.

3 participants