Skip to content
Ambit

Ambit

Double Duty Loans Protocol

Created on 5th November 2025

β€’

Ambit

Ambit

Double Duty Loans Protocol

The problem Ambit solves

Sustainably funding public goods is one of the hardest problems in Web3. Most projects rely on one-off grants, treasury spends, or token sales, which are finite and deplete a DAO's capital. This creates a difficult, binary choice for treasuries:

  1. Hoard & Grow: They can deposit assets into yield-bearing protocols to grow their treasury, but this provides no direct, tangible benefit to the public good.
  2. Spend & Fund: They can donate their capital, but this is a one-way expense that drains their resources.

Ambit solves this "either/or" problem by creating a perpetual funding engine for public goods. It's a "buy-one-get-one" strategy built on Octant's YieldDonatingStrategy framework that allows a DAO to deploy its capital instead of just spending it.

The strategy's "double duty" mission is to:

  1. First and foremost, fund public goods by capturing the lending interest from a dedicated Morpho market and automatically donating it to the Octant dragonRouter.
  2. Simultaneously, provide a community service by using a separate, primary yield (Spark's DSR) to auto-repay loans for its own members.

All of this is done while keeping the DAO's principal deposit perfectly 1:1 pegged and safe.

What can people use it for?

Ambit transforms a static DAO treasury into an active, self-sustaining engine for ecosystem growth.

For Public Goods & the Octant Ecosystem:

  • Continuous, Automated Funding: This is the primary benefit. Instead of relying on manual grants, Ambit creates a perpetual, automated, and self-sustaining stream of funding for public goods. The DAO's capital works 24/7 to generate donation revenue via the Morpho market's lending interest.

For DAOs & Treasuries:

  • Capital-Efficient Philanthropy: It turns public goods funding from a pure expense into a capital-efficient operation. The DAO can now fund public goods while offering a powerful perk to its members (auto-repaying loans), all funded from the same underlying asset.
  • Safer Treasury Management: The strategy is built for safety.
    1. 1:1 Peg: Our tests (test_profitableReport) prove the DAO's principal is 100% safe and 1:1 pegged. The yield is skimmed off, but the principal is never at risk.
    2. Robust Withdrawals: The strategy is production-ready, safely handling complex DeFi edge cases like "withdrawal dust" by intentionally leaving ~1200 wei of collateral, ensuring DAO funds are never stuck.

For Community Members:

  • Access to Auto-Repaying Loans: A whitelisted community member can borrow from the dedicated Morpho pool.
  • Makes Borrowing Radically Easier: The strategy automatically pays down the principal of their loan over time using the DSR yield. This is a "subsidized" loan where the principal magically shrinks on its own.

πŸ† Prize Track Eligibility

Spark Protocol - Best Integration

Ambit showcases deep Spark Protocol integration:

  • βœ… sDAI as core collateral asset
  • βœ… DSR yield as primary yield source
  • βœ… Novel use case: Auto-repaying community loans funded by DSR
  • βœ… Production-ready with mainnet testing
  • βœ… Demonstrates sophisticated understanding of Spark mechanics

Morpho Blue - Best Integration

Ambit demonstrates advanced Morpho Blue usage:

  • βœ… Custom isolated market creation (sDAI/DAI)
  • βœ… Multi-position management (collateral + borrow + supply)
  • βœ… OnBehalf functionality for community debt repayment
  • βœ… Production-grade safety (dust handling, LTV management)
  • βœ… Creates lending pool for community borrowers

Main Octant Prize

Ambit perfectly embodies Octant v2's mission:

  • βœ… YieldDonatingStrategy framework integration
  • βœ… 100% interest donation to public goods
  • βœ… Innovative dual-yield mechanism
  • βœ… Community service + public goods funding

The Future of Public Goods Funding

Ambit represents a paradigm shift: capital-efficient altruism at scale.

Instead of asking "How much can we afford to donate?" DAOs can now ask "How much impact can we create with our capital while keeping it safe?"

This is what sustainable public goods funding looks like.

  • For every $1M deployed: $40K annual public goods impact (perpetually)
  • Treasury principal: 100% preserved (1:1 peg)
  • Community benefit: Included (auto-repaying loans)
  • Administrative overhead: Zero (fully automated)

Ambit doesn't just participate in the public goods ecosystemβ€”it fundamentally reimagines what public goods funding can be.

Challenges I ran into

We faced a significant hurdle while building Ambit: a complex, protocol-level technical bug .

The "DeFi Dust" Withdrawal Trap

Our biggest technical challenge was a real-world DeFi edge case: the "DeFi Dust" withdrawal trap.

  • The Hurdle: Our strategy holds a leveraged position on Morpho Blue, supplying sDAI as collateral and borrowing DAI against it. When a user tries to withdraw 100% of their funds, the strategy must perfectly repay 100% of its DAI debt to unlock 100% of its sDAI collateral.
  • Our simple implementation kept failing. Due to on-chain math rounding or micro-second interest accrual, even after repaying what we thought was 100% of the debt, the Morpho protocol still registered 1 wei of "dust" debt. This caused the final withdrawal of all collateral to revert, which would have trapped all user funds in the strategy.
  • How We Solved It: We re-architected our _withdrawProportionally function to be "dust-aware". The function now repays the debt and then re-checks the Morpho market for any remaining dust. If it's a full unwind and dust is found, it intentionally leaves a tiny, calculated amount of collateral dust (~1000-1200 wei) to safely cover this micro-debt. This small sacrifice allows the withdrawal to succeed, which is proven in our tests using assertApproxEqAbs.

Tracks Applied (6)

Best use of a Yield Donating Strategy

We innovated on the core template to create a novel dual-yield system.

Most creative use of Octant v2 for public goods

This "buy-one-get-one" model, where a DAO can fund public goods and provide a direct, valuable service to its own commun...Read More

Best use of Morpho V2

For creating a specialized community-facing market.

Best tutorial for Octant v2 (written/video)

Best public goods projects

Because we both fund public goods and are a public good.

Best use of Spark

We use DSR as the engine for the auto-repayment, not just a simple yield source.

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