# My AI Agent Built a Crypto Loan Bot That Pays My Friends in Bitcoin. Its Best Feature Is Knowing When to Stop.

> Source: <https://blakelapierre.substack.com/p/my-ai-agent-built-a-crypto-loan-bot>
> Published: 2026-10-27 16:09:07+00:00

*Previously: [My AI Agent Reads Handwritten Timesheets. It Gets the Receipts 100% Right and the Names 14% Right.](https://blakelapierre.substack.com/p/my-ai-agent-reads-handwritten-timesheets), how my Odoo bot runs the business side.*

In [post 4](https://blakelapierre.substack.com/p/i-gave-an-ai-agent-one-job-find-free) I introduced “money making” as my scout: every hour it looks for new ways to earn and only reports what’s new. That’s still its day job. But over the last few weeks it picked up a much stranger side project, and it’s the most interesting thing any of my agents has built.

This post covers three things: the scout, the gig accounts it watches, and the loan bot.

## Part 1: The scout that mostly says nothing

The hourly scan has written **454 reports** so far. Each one checks Doctor of Credit, the AI-training gig boards (OpenTrain and Terac) and a few others, compares against a log of everything already reported, and messages me only when something new fits.

Most hours, the answer is “nothing new.” A typical skip from this morning: an 80,000–90,000 point credit card bonus, passed over because it needs a spending requirement that doesn’t fit roughly $50 of working capital. A Chipotle costume deal got skipped too: “That’s a discount, not income.”

Once a day it writes a summary ranked by value for effort, no-money-down options first, and re-checks every link before sending. Today’s top picks were AI-training contracts on OpenTrain in the $30–70/hr and $45–90/hr ranges, plus paid interviews on Terac.

## Part 2: The gig accounts, and the real number

I asked it to monitor my Mercor and OpenTrain accounts. It can’t sign in for me, so it handed me its screen to log in, then set up regular checks. Its status file reads like a ledger:

- **Mercor:** 5 applications submitted Oct 16, all still “Submitted.” One more came back “Not selected,” with no reason given.
- **OpenTrain:** profile live, 0 proposals, no messages.
- **Earnings:****$0.**

That’s the real number, and the agent writes it down every check instead of rounding it into “promising.”

## Part 3: The loan bot

Here’s the strange side project. The agent built **fluid-bot**, a TypeScript bot that manages a leveraged position on Fluid, a lending protocol on the Base network. ETH or cbBTC (Coinbase’s wrapped bitcoin) goes in as collateral, and USDC is borrowed against it.

The strategy is a ratchet. When collateral rises 1% or more, the bot borrows back up to a 70% loan-to-value target, swaps most of it into more collateral, and keeps a share as USDC to sweep out. Every swap is quoted across several exchanges, re-quoted right before sending, and aborted if the price is more than 1.5% worse than Fluid’s own oracle.

It started tiny on purpose. The README’s example test position is **$6.3 of collateral against $4.35 of debt.** The bot has 44 unit tests, runs in dry-run unless you pass `--live`, and only approves exact token amounts, never unlimited ones.

### The Guardian

Leverage has one way to really hurt you: liquidation. So the agent built a **Guardian** that runs on every new block, recomputes each loan’s risk and acts in tiers:

TierWhat it doesWarnYellow alert onlyDeleverageSells some collateral and repays, back down to a safe targetEmergencyRepays with spare USDC, then borrows from the *other* loan to repay this oneBlockedCan’t fix it on its own. Critical alert: “add USDC and repay manually”

The README is blunt about the limit: above a certain loan-to-value, Fluid rejects every withdrawal, so the bot **can’t** sell its way out. It also lists what it hasn’t built (a true one-transaction flash loan) and why, including that one swap router it might have used, Odos, shut down on Jul 30.

### The friend-request desk

Then came the feature I didn’t expect. Friends can ask for a small amount through a public page using a private invite code. I approve in my private control panel. The bot borrows within a safe limit and delivers the money as bitcoin, cbBTC or USDC.

For real bitcoin it bridges through Garden, a cross-chain swap service, and refuses the trade if Garden’s fee is over 1% or if less than 98% of the value comes out the other side. Invite codes are stored encrypted, and the public page can’t read them. Nothing is sent without my confirm.

This morning was its first real rush, and it was a good test:

- One send failed because Garden wanted an app ID. The agent found the cause, added Garden’s public one, and told me to press Retry myself, because the money was already sitting safely in the wallet and a second borrow wasn’t needed.
- Another failed on a brief network error. It made that step retry on its own, “without any risk of sending twice.”
- When a friend asked for more than the safe room left, I asked for a way to send part of it. It shipped **“Approve partial”** within minutes, splitting the borrow across both loans so each landed right at its safe limit and leaving the rest pending.
- The first bitcoin payout arrived about a minute after the funds locked. Two others lagged. Instead of guessing, it explained that the funds were locked in escrow, not lost, and refundable if Garden never paid out. Then it scheduled a check-in.

### When the agent got it wrong

Two moments in that rush are why I trust it more, not less:

1. It reported that the Guardian and auto mode were **off.** I had asked for them to stay on. A few minutes later it corrected itself: they’d been on the whole time, and it had misread a status field.
2. It restarted my control panel **in the middle of a live send.** The send finished fine, but the record went stale. It said so plainly, fixed the record, and added a rule that blocks restarts while a send is running.

It also knows where the line is. When I asked how to get the wallet’s private key into MetaMask, it wouldn’t paste the key into chat. It showed me how to read it from the machine myself.

## What I learned

- **Quiet is a feature.** 454 scans, most of them “nothing new,” means that when the scout does speak, I read it.
- **Write down the zero.** $0 in gig earnings is the honest number, and an agent that logs it every check is one I believe about everything else.
- **Build the brakes before the engine.** The loan bot’s best code isn’t the ratchet. It’s the Guardian, the dry-run default, the exact approvals, and the README section titled “Risks (read before funding).”
- **Small, fast fixes beat big plans.** “Approve partial” didn’t exist at 6:04 AM. It was live a few minutes later, because I asked for one specific thing.

— Blake (written through my AI agents)

*Previously: [My AI Agent Reads Handwritten Timesheets. It Gets the Receipts 100% Right and the Names 14% Right.](https://blakelapierre.substack.com/p/my-ai-agent-reads-handwritten-timesheets), how my Odoo bot runs the business side.*
