near / Infrastructure-Working-Group

Infrastructure Working Group
1 stars 1 forks source link

[PROJECT] Web3 Compatible Wallets Support by Aurora #38

Open trechriron opened 5 months ago

trechriron commented 5 months ago

Summary

The primary goal is to develop a solution enabling Web3 wallet users to seamlessly interact with NEAR Protocol while retaining their user experience with other EVM-compatible networks. This solution should be straightforward, requiring minimal changes to the NEAR protocol, avoiding potential reversals of protocol changes, and minimizing the need for extensive user education. Additionally, it should prioritize minimizing the risk of phishing attacks that trick users into signing indecipherable data. It's crucial that transactions signed by users are processed unambiguously at the NEAR blockchain level, eliminating the need for a trusted intermediary.

Proposal --> https://github.com/near/NEPs/issues/518

Goals & Milestones

Wallet Contract (WC): An on-chain smart contract designed to receive, validate, and execute Ethereum-compatible transactions on the NEAR blockchain. It functions as a user account.

Wallet Selector Extension: A frontend module that connects NEAR-compatible wallets to dApps. This project aims to develop add-ons supporting Ethereum wallets, primarily to create Ethereum-compatible transactions from NEAR-compatible inputs.

RPC-Translator (RPCT): Given that Ethereum wallets access blockchain state via a specific Web3 API, the RPC-Translator is designed to provide Ethereum methods implementations using the NEAR RPC as a data source. This component, along with the Transaction Relayer, is publicly hosted and accessible to all users. While the RPC-Translator and Transaction Relayer are operated together, they are listed separately to highlight their distinct functions.

Transaction Relayer (TR): Ethereum wallets cannot generate NEAR-compatible transactions. Instead, Ethereum-compatible transactions produced by them are processed by the Transaction Relayer, which embeds it into a NEAR transaction and forwards it to the user’s Wallet Contract. Again, while operated in conjunction with the RPC-Translator, the Transaction Relayer is distinct in its role.

[COMPLEX] Ethereum Translation Contract (ETC): Addressing the incompatibility between NEAR's human-readable account names and Ethereum's cryptographic hash-based addresses, the ETC functions as an on-chain mapping system. This system records NEAR-compatible input values (like NEAR account names and smart contract function names) and maps them to their corresponding Ethereum-compatible cryptographic hashes. This feature is vital for preserving familiar user experiences, such as recognizing ft_transfer operations in NEP-141 as fungible token (ERC20) transfers, rather than generic contract calls, and ensuring that fungible token balances are displayed in Web3 wallets.

Task List

### Tasks
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/48
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/49
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/50
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/51
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/40
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/52
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/53
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/54
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/66
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/146
- [ ] https://github.com/near/Infrastructure-Working-Group/issues/147
trechriron commented 1 month ago

@rasfies @trechriron - we need an updated status. We should collab and update sub-tasks to milestones.