-
Notifications
You must be signed in to change notification settings - Fork 469
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
Added Conversion Functionality #1559
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdowning100
requested review from
wizeguyy,
kiltsonfire and
gameofpointers
as code owners
March 25, 2024 05:23
wizeguyy
requested changes
Mar 25, 2024
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.
We need to discuss with @kiltsonfire about account locking
kiltsonfire
requested changes
Apr 3, 2024
jdowning100
force-pushed
the
conversion
branch
3 times, most recently
from
April 11, 2024 20:16
59b4b14
to
7c92f0e
Compare
kiltsonfire
requested changes
Apr 17, 2024
jdowning100
force-pushed
the
conversion
branch
3 times, most recently
from
April 17, 2024 21:59
e3e5726
to
7f802f0
Compare
jdowning100
force-pushed
the
conversion
branch
3 times, most recently
from
April 18, 2024 19:33
6c9f62b
to
ee13241
Compare
Closed
kiltsonfire
requested changes
Apr 18, 2024
kiltsonfire
requested changes
Apr 18, 2024
wizeguyy
previously approved these changes
Apr 22, 2024
kiltsonfire
approved these changes
Apr 23, 2024
wizeguyy
approved these changes
Apr 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@dominant-strategies/core-dev
Conversion is a process that allows a user to convert Quai to Qi and vice-versa at the rate determined by the header difficulty (the conversion formula is currently a stub). Conversion does not require a separate transaction type, rather, the user signs and sends a transaction that spends to an address in the same location but different ledger (Quai or Qi). This emits an ETX that must cross prime before it is included in a block in the destination (along with all other ETXs) and converts at the rate of the Prime coincident. Converted funds are locked for a length of blocks to be determined. There is a minimum conversion amount as well, to be determined.
Note:
A Qi-Quai conversion locks the funds in the lockup 'precompile' smart contract in contracts.go. The recipient sends an empty transaction to the address of this smart contract with sufficient gas (at least 100k) and the smart contract will iteratively redeem any locks that are unlocked and credit the recipients balance.
A Quai-Qi conversion will lock the UTXOs in the destination, but the rest of the address' UTXOs are not affected. The conversion executes after a prime coincident and only creates as many UTXOs as gas provided in the ETX (9000 gas per UTXO creation).
Conversion is currently not possible cross-shard.