
Aurika
Digital Gold on the Blockchain
Demo
About
The problem it solves Through this project, I successfully implemented the interaction between Solidity contract deployed via Remix and Frontend made in NextJs using Wagmi and Viem. The project/web app lets user buy and sell Digital Gold using SepoliaETH. The ETH/XAU is calculated by fetching ETH/USD and XAU/USD prices from Chainlink Price Feed via AggregatorV3Interface, then making on chain calculations to find the ETH/XAU price and using it to then calculate average price to allow user to buy, sell or gift digital gold. **Buy:** Users will be able to buy gold through Ethereum, all calculations done earlier, and in contract, msg.value (as total price of which the user wants to buy gold in wei is sent) **Sell:** Users can sell the gold quantity which he/she owns at the latest price fetched from Chainlink Price Feed on chain. **Gift:** Users can gift gold to different wallet addresses. The ethereum will be deducted from the user's account and gold will be transferred to the user holding the wallet address. The frontend is made using NextJs, live average price, buying price, the converted gold for a particular amount is shown to the user in real time. An intuitive and clean UI is designed with careful considerations and user requirements.
How it's made
Challenges we ran into There were not only 1, but multiple challenges I ran into the complete journey of making Aurika. There were Wagmi errors primarily. During the write contract part, I faced some trouble during execution. The major issue I faced though was in the calculation part of ETH -> XAU (Gold) and from XAU (Gold) -> ETH. Making the API routes secure was another big challenge for which I spent about 6 hours straight.