Skip to content
Aruna

Aruna

Invoice financing meets DeFi. Sustainable funding

Created on 8th November 2025

•

Aruna

Aruna

Invoice financing meets DeFi. Sustainable funding

The problem Aruna solves

Core Problem: Public Goods Funding Sustainability

Public goods projects face a critical funding challenge. Traditional funding models rely on:

  • One-time donations (unsustainable)
  • Grant applications (competitive and inconsistent)
  • Retroactive funding (rewards past work, not future development)
  • Donor fatigue (declining contributions over time)

What Aruna Does

Aruna creates a sustainable public goods funding mechanism by connecting two independent cash flows:

1. Business Invoice Commitments
Businesses with stable cash flow can lock collateral against future invoice payments to receive instant grants. This creates on-chain proof of creditworthiness while providing immediate cash incentives.

2. DeFi Yield Generation
Investors deposit stablecoins into ERC-4626 compliant vaults (Morpho V2) to earn competitive yields. The protocol automatically routes 25% of all realized yield to public goods via Octant V2.

Makes Existing Tasks Easier

For Businesses:

  • Lock $1,000 collateral, receive $300 instant grant (30% ROI in 30 days)
  • Build verifiable on-chain reputation through settlement history
  • No complex credit checks or lengthy approval processes

For Investors:

  • Single deposit action creates ongoing public goods contributions
  • No manual donation decisions or tracking required
  • Competitive yields (5.7% APY) while supporting ecosystem development

For Public Goods:

  • Predictable monthly funding stream from yield
  • No dependency on individual donor decisions
  • Transparent, auditable allocation via smart contracts

Safer Than Alternatives

Smart Contract Security:

  • Non-custodial architecture (funds held in battle-tested Morpho vaults)
  • ReentrancyGuard on all external functions
  • SafeERC20 for token transfers
  • No upgradeable proxies (immutable contracts)

Economic Safety:

  • Businesses provide 10% collateral against invoice value
  • Automatic liquidation after 120 days for defaulted invoices
  • Reputation system disincentivizes defaults

Challenges I ran into

Challenge 1: Aave V3 Address Discovery on Base Sepolia

Problem:
Deployed AaveVaultAdapter reverted on all deposit attempts with "Internal JSON-RPC error." The deployment used Pool address 0x07eA79F68B2B3df564D0A34F8e19D9B1e339814b which appeared valid during compilation but had no contract code when queried on Base Sepolia.

Discovery:
Traced the transaction revert through BaseScan and found the Pool address returned empty bytecode. Cross-referenced multiple sources including Aave documentation and deployment scripts from other protocols. Found conflicting addresses across different documentation sources.

Solution:
Located Aave's official address book repository (bgd-labs/aave-address-book) which maintains canonical addresses for all deployments. Verified the correct Base Sepolia Pool address (0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27) by checking contract code existence and comparing deployment timestamps.

Decision:
Prioritized Morpho V2 integration for hackathon demo while documenting the correct Aave addresses for post-hackathon redeployment. This allowed completing the demo on schedule while maintaining production-ready code for both vault types.

Challenge 2: ERC-4626 Share Calculation Ordering

Problem:
MorphoVaultAdapter deposits succeeded on-chain but user share balances remained zero. The vault was receiving assets and forwarding them to Morpho correctly, but no shares were minted to users. This broke all downstream functionality including yield distribution and withdrawals.

Root Cause:
The deposit function interacted with Morpho vault before calling the parent ERC4626 implementation. This reversed the intended flow where shares should be minted before assets move. OpenZeppelin's ERC4626 base contract expects assets to still be in the vault when calculating share amounts.

Solution:
Restructured the deposit flow to call super.deposit() first, which mints shares based on current vault state, then forwards assets to Morpho. Added yield harvesting before share minting to ensure accurate share prices for new depositors. This ordering maintains ERC-4626 compliance and prevents share price manipulation.

Impact:
This fix resolved share accounting across all vault operations. Users now receive correct share amounts proportional to their deposits. The totalAssets calculation accurately reflects vault value by reading from Morpho's underlying positions. Withdrawals return proper amounts based on share redemption at current prices.

Challenge 3: Yield Distribution Coordination

Problem:
YieldRouter needed to track user vault shares for proportional yield distribution, but vault share balances changed independently through deposits and withdrawals. Initial implementation had YieldRouter query vault balances on-demand, but this created race conditions where yield calculations used stale share data.

Architecture Issue:
The vault and router were loosely coupled with no synchronization mechanism. A user could deposit to vault, earn yield, then withdraw before YieldRouter updated its internal accounting. This resulted in incorrect yield allocations and potential loss of funds.

Solution:
Implemented atomic updates where vault operations (deposit, withdraw, redeem) immediately notify YieldRouter of share balance changes. The vault calls yieldRouter.updateUserShares() at the end of every transaction that modifies balances. This keeps router state synchronized with vault state without requiring constant polling.

Verification:
Added integration tests that perform rapid deposit/withdraw sequences while tracking cumulative yield. Tests verify that yield calculations remain accurate across all operations and that the 70/25/5 split executes correctly regardless of share balance changes.


Conclusion

Aruna demonstrates a working implementation of sustainable public goods funding by connecting invoice commitments with DeFi yield. The protocol successfully integrates Morpho V2 with ERC-4626 compliance, implements automatic yield routing to Octant V2, and provides a simple UX for turning investors into passive public goods supporters.

The core innovation is not in the invoice financing mechanism (which is a grant incentive system), but in the automatic, recurring nature of public goods funding. Every dollar deposited creates ongoing monthly contributions without requiring repeated user decisions.

Deployed on Base Sepolia, verified contracts, functional frontend, and comprehensive documentation demonstrate production-ready code suitable for mainnet deployment after Aave address configuration fixes.

Tracks Applied (5)

Best use of a Yield Donating Strategy

Why Aruna Fits This Track: Aruna demonstrates programmatic yield allocation that solves a fundamental problem in public...Read More

Most creative use of Octant v2 for public goods

The Core Innovation: Aruna transforms the donation model from active to passive. Traditional approaches require users t...Read More

Best use of Morpho V2

Why This Implementation Deserves Recognition: Aruna's Morpho integration demonstrates proper ERC-4626 vault adapter arc...Read More

Best public goods projects

Why Aruna Deserves Recognition: Aruna addresses the most critical challenge in public goods funding: sustainability. Th...Read More

Best use of Aave v3 (Aave Vaults)

Implementation Status: AaveVaultAdapter was fully implemented, deployed, and verified on Base Sepolia. However, the dem...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