about fundup

yield-donating app powered by a Twyne credit vault and Octant v2 strategy primitives.

what it is

fundup lets you deposit USDC into a vault that generates yield. Your principal stays yours, and the yield is donated to on-chain projects you collectively upvote. Projects register an on-chain recipient and receive donations proportionally to votes.

how it works

  • Deposit USDC to a Twyne-like credit vault (ERC-4626). Shares accrue yield over time.
  • Your principal is tracked locally; your yield equals vault assets minus principal.
  • Donate flow transfers your current yield to the splitter and distributes to active projects by votes.
  • Projects are stored off-chain in Supabase and mirrored on-chain with the same project id.

contracts & components

  • Twyne-like Credit Vault (mock) for ERC-4626 deposits and yield accrual.
  • ProjectsUpvoteSplitter for on-chain project registry, votes, and distribution.
  • Octant-style strategy glue in the strategy contract to report assets and mint profit to donations.

smart contracts (built here)

  • MintableERC20 (USDC mock, 6 decimals): owner‑mintable token used for deposits and donations.
  • MockTwyneCreditVault (ERC‑4626‑like): accepts USDC deposits, tracks shares, accrues yield via an exchange rate; includes accrueWithTime for sim.
  • ProjectsUpvoteSplitter: on‑chain registry keyed by Supabase project id; vote per epoch; distribute(token) splits by vote weights.
  • TwyneYieldDonatingStrategy (Octant‑style): deploys funds into the vault; reports assets as loose + converted shares; profits minted to the donation address.

uvp (why this matters)

  • deposit once, keep principal; only yield flows to public goods you choose.
  • on-chain voting sets donation weights, making allocation transparent and credibly neutral.
  • no custody of funds by the app; vault + splitter contracts enforce the rules on-chain.

why twyne (tech notes)

  • credit vault is ERC‑4626‑like, purpose‑built to extend credit to collateral vaults and accrue interest per an IRM curve. see credit vault docs.
  • architecture separates roles: credit vault (lenders) and collateral vault (borrowers), wired via a factory and vault manager. see architecture overview,collateral vault,factory.
  • risk isolation: liquidation is handled on collateral side; credit vault stays standardized for LPs.
  • simple deposits/withdraws for LPs; predictable conversions via shares/assets (convertToAssets/convertToShares).

octant v2 integration (tech notes)

  • strategy reports total assets = loose underlying + vault assets converted from shares; profits get minted to the donation address.
  • flow: user deposits USDC → shares accrue → user donates current yield → splitter distributes by vote weights.
  • frontend uses viem public client for reads and explicit accounts for writes; usdc uses 6 decimals everywhere.