smrnjeet222 / nUSD-stablecoin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nUSD Stablecoin

The task for assessment is to create a new stablecoin called nUSD. The stablecoin will be backed by ETH (similar to DAI). The primary goals of this project are to allow users to deposit ETH and receive 50% of its value in nUSD. Additionally, there will be a redeem function to convert nUSD back into either ETH.

Key Functions:

  • Develop a function that enables users to deposit ETH and receive 50% of its value in nUSD. For instance, if a user deposits 1 ETH at 2000, they should receive 1000 nUSD. Applicants can use Testnet Ether and Testnet Chainlink Oracle for this task.
  • Design a redeem function that allows users to convert their nUSD back into either ETH at the current exchange. Ensure that the amount of nUSD required to convert to ETH is double the value, that is, to convert nUSD to 1ETH at 2000, 4000 nUSD would be required.
  • Ensure that the total supply of nUSD is updated based on the actions.

Depoyed

forge coverage
image

About


Languages

Language:Solidity 58.7%Language:JavaScript 35.4%Language:HTML 3.9%Language:Makefile 1.9%