Yield is a decentralized lending platform built on blockchain technology, allowing users to borrow against their assets securely. The platform facilitates loans using USDC and supports the ERC-1155 standard for tokenized assets, making it suitable for various applications like land and crop financing.
- Decentralized Lending: Users can borrow funds using their tokenized assets as collateral.
- Multi-Asset Support: Compatible with ERC-1155 tokens, allowing various asset types to be used as collateral.
- Transparent Transactions: All transactions are recorded on the blockchain for complete transparency.
- User-Friendly Interface: A clean and intuitive frontend for seamless user interaction.
- Node.js
- Yarn or npm
- Metamask or any compatible wallet
Project Structure:
- /frontend: Platform's Frontend implemented using Nextjs
- /yieldContract: Land Tonization, Borrowing and seda (for smart contract)
- /seda: Seda Request and other implementations of seda protocol
- /graph: The Graph implementation to query the blockchain
-
Clone the repository:
git clone https://github.com/pixelhubster/yield.git cd yield/frontend -
Install the dependencies:
npm install
-
Set up your environment variables. Create a
.envfile in the root directory:REACT_APP_AGROMONITORING_API_KEY=your_api_key ..etc -
Start the development server:
npm run dev
- Connect your wallet (e.g., Metamask) to the YieldLending platform.
- Register Land and get ERC-721 ownership token.
- Register Yield to grow on land and list yield Token for sale.
- Use the lending features to borrow against your tokenized assets.
- Land Token Contract (ERC-721):
0x810cB15e1fb9954d2513fD5Eb490f084a49416c7 - Yield Token Contract (ERC-1155):
0x10B365BC4043Fb4500c33a06EdFA9cc4b255A6eC - YieldLending Contract:
0x5a176Aa95797955ce405a39dfbDa6F3209F9cBA0 - Orcacle program Id:
999bf15ed4fa3ef94347a97918427419a04981453a8a309140e0fe722a886b77
Used this endpoints in my seda program call to fetch soil and weather data of land.
input for oracle program: appId/polygonId/latitude/longitude
OracleId: 999bf15ed4fa3ef94347a97918427419a04981453a8a309140e0fe722a886b77
Sample Transaction Hash: https://devnet.explorer.seda.xyz/data-requests/7b6b8f3bd24d50bb5cc8967f6c008067f529513319a142b803dac5a7f73f010b
sample for replication: 720ee6ba01017d67d198d3f11517f5bc/6729ebda7fc9dc4a1e7734ba/51.56297825/-0.0352305
-
Polygon Creation:
- Endpoint:
http://api.agromonitoring.com/agro/1.0/polygons - Method:
POST - Parameters:
appid, duplicated, geo_json
- Endpoint:
-
Soil Data Retrieval:
- Endpoint:
https://api.agromonitoring.com/agro/1.0/soil - Method:
GET - Parameters:
polyid, appid
- Endpoint:
-
Weather Data Retrieval:
- Endpoint:
https://api.agromonitoring.com/agro/1.0/weather - Method:
GET - Parameters:
lat, lon, appid
- Endpoint:
- Data Fetching: Chain Link function retrieves data from a our platforms API endpoint to get daily weather and soil data for all the lands registered.
- Chainlink Automation: Schedules the function to run daily, ensuring data is consistently updated.
- IPFS Storage: Stores the fetched data's IPFS hash on the blockchain for easy retrieval and verification.
- Data Feeds: Gets the usdc price feed for borrowing and repay of loan on our platform.
-
Data Fetching Function:
- Fetches data from the platform's API.
- Processes and stores the data.
- Saves the IPFS hash of the data on the blockchain.
-
Chainlink Automation:
- Utilizes Chainlink Automation to trigger the data fetching function daily, ensuring that the latest data is always available on the blockchain.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m "Add YourFeature" - Push to the branch:
git push origin feature/YourFeature
- Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries, please reach out to:
- Noble Nyuiela: pixelhubster@gmail.com
- Agromonitoring for their API services.
- OpenZeppelin for their ERC standards.
- Contributors and supporters of the YieldLending project.