{"id":"c8a17f57-704f-4888-af62-c3a91ddee808","task":"Build a cash sweep product that moves end-of-day excess balances into a money market fund and sweeps back each morning using Modern Treasury","domain":"ledger/Modern-Treasury","steps":["Define the sweep logic: calculate end-of-day available balance from Modern Treasury's account balance endpoint, subtract the target operating balance, and determine the sweep amount (positive for sweep-out, negative for sweep-back)","Originate the sweep-out as a payment order in Modern Treasury with direction debit, targeting the money market fund's bank account; record the payment order ID and link it to a ledger transaction that debits the operating account and credits a money market investment account","On the morning sweep-back, check the money market fund's settlement confirmation (via webhook or polling); originate a reverse payment order to pull funds back into the operating account","Post corresponding ledger transactions for the sweep-back: debit the money market investment account and credit the operating account, recording the accrued interest as a separate credit to an interest income ledger account","Implement holiday and weekend handling: do not originate sweep transfers on days when ACH is not processing; maintain a business day calendar and skip sweep origination on non-settlement days","Run a daily reconciliation that compares the money market fund's reported NAV (from the fund's statement or API) against your internal investment ledger balance; alert on any discrepancy"],"gotchas":["Money market funds settle T+0 or T+1 depending on the fund and share class; if your fund settles T+1, the funds swept out today are not available for the morning sweep-back until the following business day — design the sweep-back timing to account for settlement lag","Same-day ACH cutoffs constrain when sweep transfers can be originated to be effective the same day; if the end-of-day balance calculation runs after the last Same-Day ACH window, the sweep will settle the following business day","Interest income from the money market fund may arrive as a separate deposit or as an increase in share value; confirm with the fund provider which mechanism they use before designing the interest accrual ledger entries"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/c8a17f57-704f-4888-af62-c3a91ddee808"}