Leprechaun

Leprechaun

Synthetic RWAs backed by on-chain collateral

Created on 16th May 2025

Leprechaun

Leprechaun

Synthetic RWAs backed by on-chain collateral

The problem Leprechaun solves

Imagine gaining exposure to blue-chip stocks, precious metals, and commodities from anywhere in the world, with just a smart device and an internet connection. Leprechaun makes this vision a reality, empowering the underbanked and financially excluded with 24/7 access to markets that were previously inaccessible.

The Leprechaun Protocol on Base solves this accessibility issue in global financial markets by enabling the trading of synthetic assets, or "lAssets," that mirror real-world assets via blazing-fast Pyth oracles. It removes barriers like geographic restrictions, high fees, and complex regulations, allowing users worldwide to gain price exposure without outright owning any assets.

Users can mint lAssets with optimized collateral ratios, maximizing their positions while maintaining system stability. Similar to giants like MakerDAO and AAVE: as more users participate, the system becomes more efficient, creating deeper liquidity and enhanced opportunities for all participants.

Leprechaun's auto-liquidation hooks provide extra efficiency in synthetic asset markets through seamless integration with Uniswap V4. This innovative system leverages flash-swap mechanics to execute liquidations with near-zero capital requirements, removing traditional barriers to liquidator participation while ensuring optimal protocol health through instant position resolution.

When positions fall below required collateralization ratios, the hook orchestrates a complex atomic transaction: borrowing the required debt token via flash swap, liquidating the undercollateralized position, selling the acquired collateral, repaying the flash loan, and distributing profits—all within a single, gas-optimized transaction block. This elegant system creates a self-sustaining liquidation marketplace that eliminates the capital barriers, MEV exploitation, and gas wars that plague traditional liquidation mechanisms, while simultaneously enhancing protocol stability and capital efficiency for all participants.

Finally, the Leprechaun DAO decentralized governance empowers users to shape the protocol, ensuring fairness. Leveraging Base’s Ethereum-compatible system minimizes fees and boosts transaction speed, creating a transparent, capital-efficient ecosystem for traders and liquidity providers.

Check out our pre-alpha Base Mainnet demo here (not real funds): https://leprechaun-mvp.vercel.app/

High-level diagram of the protocol:
image

Liquidations in action (Mainnet):
image

Challenges we ran into

Our team faced several significant challenges during the Base Batches Hackathon, which tested our resilience and adaptability.

The main issue our team faced was the fragmentation of on-chain environments. On one hand, we had to use the Mainnet to get accurate oracle prices, interact correctly with price feeds, and overall get access to the functional tooling we need. On the other hand, deployment of UniV4 hooks to Mainnet require whitelist through the DAO, which we couldn't do in time (and shouldn't as well due to project maturity - we're yet to go through audits and further security reviews before committing to an actual Mainnet release). Due do this restriction, we had to isolate our auto-liquidation hook to Testnet, leveraging a more traditional Typescript-based liquidation bot on Mainnet.

The Uniswap widget, an initially critical component of our project, was broken, and despite our best efforts to troubleshoot and resolve the issue, we couldn’t get it fully functional within the tight timeline. Compounding this, we had only nine days to complete the entire project, which demanded rapid development and coordination under intense time pressure.

Another minor issue we faced was implementing accurate collateral ratio calculations across different token decimals. When creating a protocol that handles multiple collateral types like USDC (6 decimals), WETH (18 decimals), and WBTC (8 decimals), ensuring mathematical precision while maintaining gas efficiency was crucial. We solved this by developing a specialized decimal handling library that normalizes values for calculations and converts back for token interactions.

Despite these obstacles, our team remained focused and leveraged creative workarounds to push the project forward. The compressed timeline forced us to prioritize efficiently, while the limitations with v4 hooks and the Uniswap widget pushed us to explore alternative solutions and adapt our approach. These ultimately strengthened our problem-solving skills and highlighted the importance of flexibility.

Tracks Applied (2)

Stablecoins

Leprechaun Protocol fits the Stablecoins track by enabling users to leverage stablecoins as collateral for synthetic ass...Read More

DeFi

Leprechaun Protocol aligns with the DeFi track through its implementation of a synthetic asset protocol that expands DeF...Read More

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion

Builders also viewed

See more projects on Devfolio