project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

CrossYield

CrossYield: Cross-chain yield farming with HTLC-based, intent-driven atomic swaps between Eth,Aptos.

CrossYield

Created At

Unite Defi

Project Description

CrossYield is a cross-chain yield farming protocol that enables users to earn yields across multiple blockchains—specifically Ethereum and Aptos—using HTLC-based atomic swaps and intent-driven automation.

At its core, CrossYield simplifies cross-chain operations by allowing users to submit high-level intents, such as "I want to earn stable yield using USDT on the best available chain." The protocol then leverages a decentralized resolver network to fulfill these intents. Resolvers monitor user intents, identify matching opportunities, and execute optimal strategies while maintaining full non-custodial security.

Key Features: Cross-chain HTLC Atomic Swaps: Enables secure, trustless exchange of assets across Ethereum and Aptos using Hashed Timelock Contracts. This ensures that both sides of a transaction are completed or funds are refunded.

Intent-based Yield Farming: Users define what they want to achieve, and the protocol automates the execution. This abstracts away the complexity of bridging, swapping, and farming.

Trustless Execution: All transactions are secured using cryptographic hashlocks and timelocks, removing the need for intermediaries or custodians.

Decentralized Resolvers: Resolvers are independent actors who scan for user intents, execute swaps, and perform actions to fulfill them. They are incentivized to act honestly and efficiently.

Optimal Yield Routing: Resolvers dynamically select the best-performing yield sources across chains, such as lending protocols or liquidity pools, to maximize user returns.

Non-Custodial and On-Chain: Users retain ownership of their assets throughout the process. All actions are performed on-chain for transparency and security.

Why CrossYield? Today’s DeFi landscape is fragmented across multiple blockchains, making cross-chain yield farming complex and risky. CrossYield eliminates the need for bridges and custodians by combining intent-based automation with HTLC atomic swaps. The result is a secure, intelligent, and seamless yield farming experience across chains.

How it's Made

CrossYield is built as a modular, full-stack cross-chain yield farming protocol combining Ethereum and Aptos via HTLC-based atomic swaps. The architecture consists of three core components: frontend intent capture, Node.js relayer + resolver backend, and smart contracts on Ethereum and Aptos. Here's how it's all wired together:

1.⁠ ⁠Intent Layer (Frontend + Backend API) Frontend: Built with React and Next.js, styled with Tailwind CSS for responsive UI. The user interface lets users submit intents like "Swap ETH to USDT and farm yield" or "Earn yield on USDT on Aptos."

Wallet Integration: MetaMask and WalletConnect support for Ethereum. PetCoin CLI or Petra wallet is used for Aptos.

Intent Submission: Users submit an intent via the frontend, which gets stored in a PostgreSQL database using a Node.js (Express) backend API with Prisma ORM.

Hashlock & Secret Generation: When a user submits an intent, the backend generates a preimage-secret pair and stores the hashed version (hashlock) in the DB. The secret is later used to claim assets trustlessly across chains.

2.⁠ ⁠HTLC Smart Contracts Ethereum (EVM): HTLC smart contracts are written in Solidity and deployed using Foundry. They lock user assets based on the hashlock and timelock. The resolver can claim or refund based on the secret.

Aptos: A matching HTLC contract is written in Move, deployed on Aptos using the Aptos CLI and Aptos SDK. It follows the same hashlock/timelock logic as the Ethereum side to complete atomic swaps.

Security Logic: If the resolver doesn't fulfill within the deadline, funds are safely refunded to the user. This ensures no trust is required between user and resolver.

3.⁠ ⁠Resolver Engine Written in Node.js, this off-chain engine continuously monitors the database for open intents using polling or WebSocket.

When a resolver finds a valid intent, it:

Initiates the swap on Ethereum via the HTLC contract using its own funds.

Reveals the secret (preimage) on-chain to unlock the funds.

Uses the revealed secret to claim assets on Aptos.

This enables trustless settlement between chains without needing bridges or wrapped assets.

4.⁠ ⁠Yield Strategy Execution On Aptos, after claiming the USDT, the resolver routes the funds into supported DeFi protocols (e.g., liquidity pools or lending markets).

Currently, this is mocked or manually simulated, but integration with real yield strategies (e.g., Aries Markets, LiquidSwap) is being built.

Partner Technologies Used Alchemy: Used for Ethereum RPC access and mainnet forking during testing.

Aptos Devnet: Used for deploying and testing Move smart contracts.

Foundry: For compiling, testing, and deploying Solidity contracts rapidly.

1inch API (optional integration): Used for swapping assets within Ethereum before cross-chain swap.

PostgreSQL + Prisma: Robust backend database to track intents and resolver actions.

background image mobile

Join the mailing list

Get the latest news and updates