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

Use kairos-tx for L1 deposit transactions #88

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

koxu1996
Copy link
Contributor

@koxu1996 koxu1996 commented Apr 30, 2024

This PR proposes changes to the smart contract to incorporate a full transaction format for L1 deposit events, aiming to standardize them with L2 transactions.

Rationale

  • Standardize the transaction structure across Kairos, ensuring consistency and ease of processing.
  • Facilitate the generation of a transaction hash for L1 deposits, akin to those for L2 transactions, thereby improving traceability and verification capabilities.

Proposed Changes

Modify the smart contract so that users making L1 deposits will be required to provide "deposit transaction" data matching the L2 format through a smart contract entry point. This data must align with the amount of tokens transferred and the identity of the transaction caller, ensuring consistency and integrity between L1 deposits and the L2 transaction format.

NOTE: Build is currently failing because of kairos-l1-utils introduced in feature/deposit-contract.

Discussion Points

  1. Security: Does requiring signatures for all transactions, including those from L1, potentially increase security?
  2. Consistency and Integrity: By generating a transaction hash for deposits, we enhance the integrity and auditability of our records. How significant is this advantage?
  3. Comparison with Other L2s

Feedback and Future Discussion

This PR is tagged with "needs-discussion" to engage the team in evaluating the benefits and implications of integrating a unified transaction format. Feedback and discussions on this proposal are expected to occur after the MVP phase, as it is not an immediate requirement for the initial launch.


Future work

  1. Rebase PR after smart contract is merged (Improved version of Deposit contract #51).
  2. Fix kairos_crypto compatibility with no_std - kairos-crypto - split trait and introduce no_std support #123.
  3. Fix kairos_tx compatibility with no_std - Use rasn fork that is fully compatible with no-std #126.
  4. Update tests.
  5. Mark PR as ready.

@koxu1996 koxu1996 self-assigned this Apr 30, 2024
@koxu1996 koxu1996 added enhancement New feature or request needs-discussion labels May 13, 2024
Base automatically changed from feature/deposit-contract to main May 17, 2024 17:04
@koxu1996 koxu1996 mentioned this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants