project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

ETHforWLDbiginner

WLD-ETH Swap: A beginner-friendly DeFi app connecting Worldcoin newcomers with ETH stakers for mutually beneficial token swaps. Leveraging WorldID for secure authentication and Chainlink for accurate exchange rates, it offers an intuitive introduction to DeFi.

ETHforWLDbiginner

Created At

ETHGlobal London

Winner of

trophy

Worldcoin - Pool Prize

Prize Pool

Project Description

WLD-ETH Swap is a decentralized finance (DeFi) application designed to provide a user-friendly platform for people who are new to blockchain technology and have started their journey with Worldcoin. The primary target users (referred to as "B") are those who have experimented with the gasless Uniswap on the WorldApp but encountered difficulties when trying to transfer funds to an external wallet like MetaMask due to a lack of gas fees. The application connects these users with blockchain-native users (referred to as "N") who stake their ETH, facilitating a swap that is slightly advantageous for the N users.

The system consists of several key components. First, there is a staking pool where N users stake their ETH. This pool covers the gas fees associated with the transfer of funds from B to N. Second, there is a signing process that B users undertake to initiate a transaction. This signature allows B to send WLD to N. Third, transactions are conducted at a rate slightly favorable to N, and the platform charges an intermediary fee for each transaction. However, multiple transactions from the same WorldID are exempt from this fee. Fourth, WorldID authentication is used as an authentication feature for fee exemption, ensuring a more secure and comfortable user experience. The application leverages WorldID's zero-knowledge (ZK) onchain verification to securely recognize and authenticate users. Finally, the application integrates Chainlink's decentralized price feeds to calculate the real-time exchange rate between WLD and ETH, ensuring that the rates are accurate, transparent, and resistant to manipulation.

The process flow of the application is as follows. First, N stakes ETH in the staking pool. Second, B signs to initiate a transaction. Third, WLD is sent from B to N, and the gas fees for sending ETH from N to B are paid from the staking pool. Fourth, the transaction is completed with the applied exchange rate and intermediary fee. Finally, WorldID authentication using ZK onchain verification is used to check if the fee exemption applies.

This approach serves as an effective means of introducing new users to DeFi. The implementation focuses on enhancing security and user experience. By integrating Chainlink's reliable price feeds, the application ensures that the exchange rates are accurate and resistant to manipulation, providing a trusted environment for users to swap their tokens.

How it's Made

WLD-ETH Swap is built using a combination of cutting-edge blockchain technologies and best practices in decentralized application development.

The core of the application is built using smart contracts written in Solidity, the primary programming language for Ethereum. These smart contracts handle the staking pool, transaction logic, and fee management. The staking pool contract allows N users to stake their ETH, which is then used to cover gas fees for transactions. The transaction logic contract facilitates the token swap between B and N users, applying the exchange rate and intermediary fee. The fee management contract handles the collection and distribution of fees, as well as the fee exemption for multiple transactions from the same WorldID.

To ensure secure user authentication, the application integrates with WorldID, a decentralized identity protocol built on the Ethereum blockchain. The application utilizes WorldID's zero-knowledge (ZK) onchain verification to securely recognize and authenticate users. This ZK-based authentication ensures that user identities are verified without revealing any sensitive information on the blockchain. The WorldID integration also enables the fee exemption feature, as the application can recognize multiple transactions from the same user.

For accurate and transparent exchange rates, WLD-ETH Swap leverages Chainlink's decentralized oracle network. Chainlink's price feeds are used to fetch real-time WLD-ETH exchange rates, which are then used in the token swap transactions. By using Chainlink, the application ensures that the exchange rates are resistant to manipulation and reflect the true market value of the tokens.

The frontend of the application is built using modern web technologies such as React, providing a user-friendly and intuitive interface for users to interact with the platform. The frontend communicates with the smart contracts through a Web3 library, such as ethers.js or web3.js.

One notable aspect of the implementation is the use of gasless transactions for B users. Since these users are new to blockchain and may not have ETH for gas fees, the application uses the staked ETH from N users to cover the gas fees for B users' transactions. This is achieved through a combination of smart contract logic and meta-transactions, allowing B users to interact with the platform without needing to hold ETH.

Overall, WLD-ETH Swap demonstrates a well-architected and thoughtfully designed DeFi application that leverages various blockchain technologies to provide a seamless and secure user experience. The integration of WorldID's ZK onchain verification and Chainlink, combined with the use of gasless transactions, sets this project apart and showcases the potential of decentralized technologies in creating accessible and user-friendly financial applications.

background image mobile

Join the mailing list

Get the latest news and updates