Inspiration

This project is inspired on Chain Key ETH (ckETH) proposed on the ICP ecosystem. A twin token that is backed 1:1 for every Ethereum being holded on the native Ethereum Network. link

What it does

caETH is a non-custodial twin token representation of Ethereum on NEAR Protocol, caETH is paired 1:1 with Ethereum.

Features

  • 1:1 paired caETH <> ETH
  • Non-custodial bridged ETH asset
  • caETH minted as NEP-141

User stories The user is able to deposit ETH on ethereum and mint caETH on NEAR Protocol to an indicated wallet The user is able to burn caETH on NEAR Protocol and redeem ETH on Ethereum Network to an indicated wallet.

User Journey

  1. You lock ETH tokens on ETH SC + Indicate an NEAR Address
  2. NEAR SC read data from ETH SC
  3. You are able to mint “nearETH” natively on an smart contract on NEAR, using Ether on Ethereum Network as collateral

How we built it

The project has 3 main bases. The first is the contract which resides in the Ethereum Sepolia network that has been built with the solidity language. This contract has the following functions:

  • deposit(string memory nearAccountId): Allows users to deposit Ether and create an account if it doesn't exist.
  • withdraw(uint256 amount): Allows users to withdraw Ether from their available balance.
  • lockTokens(uint256 amount): Allows users to lock a specified amount of their balance.
  • unlockTokens(uint256 amount): Allows users to unlock locked tokens.
  • transferLockedTokens(address to, uint256 amount, string memory nearAccountId): Allows users to transfer locked tokens to another account.
  • getTotalLockedTokens(): Returns the total amount of locked tokens in the contract.
  • getAccountData(address ethAddress): Returns the data of a specific account.

The second part is the NEAR contract where you can mint and burn your collateral tokens with ETH, taking the name caETH (Chain Abstracted Ethereum). This has been written in the Rust programming language and contains the following functions:

  • validate_eth add a balance of mintable caeth into callers account
  • mint_caeth Mint total balance of caETH pending into callers account

Finally, there is the frontend part where the different smart contracts can be consumed. This is running on the React framework using the NEAR Protocol Chain Signatures tools to carry out the process of depositing, blocking, unlocking and claiming the ETH that has been used as collateral in the project.

Challenges we ran into

We have gone through multiple challenges throughout the development of this project, but one of the most important has been during the development of the tests. This is because Chain Signatures is still a tool in development and sometimes it could present some problems which made it difficult to verify the correct functioning of the demo.

Another challenge we have encountered has been reading the status of an ETH contract from the NEAR contract, since there is currently no simple way to retrieve this information automatically once the transaction has been signed. This forces us to look for creative ways to carry out this process and verify what is happening in the Ethereum network, giving us guidelines for what we have to work on in the future.

Accomplishments that we're proud of

We are proud to be learning about new technologies and, above all, developing tools that can be useful for all of us in the future as users, thus giving us more options to use.

What we learned

We have learned a lot about the implementation of the new Chain Signatures tool, where we can be making multiple calls to other networks like Ethereum and generate a project where we can share functionality between different assets among them.

What's next for Chain Abstracted Ethereum (caETH)

The next step for caETH is to increase the number of native assets being managed by an NEAR account.

caETH can turn into a crypto basket, where users will be able to have exposure to different native tokens represented on a single fungible token on NEAR Protocol Network.

On the future, users will be able to participate on the different crypto baskets. An example of basket can be the OG-Basket, that allows people to have a fractional property of native BTC and ETH represented on a native FT on NEAR.

Share this project:

Updates

Submission history