-
Notifications
You must be signed in to change notification settings - Fork 25
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
docs: add ARC-1 proposal #690
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #690 +/- ##
=======================================
Coverage 93.61% 93.61%
=======================================
Files 238 238
Lines 35565 35565
=======================================
Hits 33294 33294
Misses 2271 2271 ☔ View full report in Codecov by Sentry. |
|
||
ITS Hub can use the source and destination token decimals to determine the appropriate scaling factor to apply when intercepting this message. ITS edge contract can populate the source token decimals by reading the token metadata, however the destination token decimals will need to be provided by the deployer. | ||
|
||
Setting this incorrectly however can be lead to the ITS hub recording the deployment incorrectly, while the deployment tx on the destination ITS will fail due to mismatching decimals, which isn’t recoverable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why will it fail on the destination? Because the decimals would be greater than the chain supports? Can't we check this in the ITS hub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ITS hub doesn't know about the destination token's decimals. Solution 2 addresses this
|
||
Setting this incorrectly however can be lead to the ITS hub recording the deployment incorrectly, while the deployment tx on the destination ITS will fail due to mismatching decimals, which isn’t recoverable. | ||
|
||
One potential mitigation is to allow the deployer to resubmit the msg but with a different destination decimals, and have ITS hub overwrite the recorded deployment. ITS Hub can allow this overwrite until the first Transfer msg is encountered to allow the user to fix their deployment. This adds some more complexity in ITS hub setup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this overwrite until transfer logic sounds a bit complicated, would prefer to avoid. Can the successful deployment send back some sort of confirmation to the hub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, a modified version of Solution 2 is to send a GMP call back on deploy token manager going through with the decimals of the destination token but I find it more complex to have a 2-stage setup in ITS Hub
2. ITS Hub calculates scaling factor and records deployment | ||
3. Destination chain deploys token manager with the corresponding token address (extracted from the params) | ||
|
||
#### Solution 2: Token Registration and Linking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this solution seems much better. Is there a downside to this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra complexity and worse UX for a developer setting up their token link. Although, I think it's acceptable for supporting custom tokens. The common flow of deploying a token is still very simple
} | ||
|
||
struct LinkToken { | ||
bytes32 tokenId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how/when is this tokenId generated?
moved to ARCs repo |
Description
Todos
Steps to Test
Expected Behaviour
Other Notes