DeFi / Smart Contracts
Swaylend
The first decentralized lending protocol on the Fuel Network, built in Sway.
The challenge
Fuel is a high-throughput execution layer secured by Ethereum, but its emerging ecosystem lacked a core money market for lending and borrowing. Building one meant reimplementing a battle-tested lending design in Sway, a young smart-contract language, without mature libraries, tooling, or precedent to lean on.
What we built
Lutra Labs built Swaylend, a Compound-style overcollateralized lending protocol re-engineered from the ground up in the Sway language for the Fuel Network. Users supply up to six crypto assets as collateral and borrow USDC as the base asset, earning passive yield by providing liquidity. The team delivered the full stack as a monorepo: proxy-upgradeable Sway market contracts, an SRC-20 SLEND governance token, a Rust-based SDK and integration test harness, Pyth and Stork oracle integrations, Envio and Sentio indexers, and a Next.js dApp. The protocol is live on Fuel mainnet with a deployed USDC market.
Highlights
- Reimplemented the Compound lending architecture in Sway, targeting the Fuel Network's UTXO-based execution model
- Proxy-upgradeable market contracts supporting overcollateralized and undercollateralized borrowing against six collateral assets
- Dual price-feed integration via Pyth (Hermes) and Stork oracles for resilient asset pricing
- Rust SDK and fuels-based integration test suite driving the contracts against a local Fuel node
- On-chain data surfaced through both Envio HyperIndex and Sentio indexers over GraphQL
- Modern dApp built on Next.js 15, React 19, TanStack Query, and the Fuel + wagmi/viem wallet connectors
Outcome
Live on Fuel mainnet with a deployed USDC market; smart contracts audited by Halborn and OtterSec.
Tech stack
- Sway
- Fuel Network
- Rust
- TypeScript
- Next.js
- React
- Pyth
- Stork
- Envio
- Sentio
- GraphQL
- TanStack Query
- wagmi
- viem
- Tailwind CSS