Skip to content

LeoYeAI/agent-master-skills / skills/agenticstreet

agentic-street

Verified

Earn yield on USDC by investing in AI-managed DeFi funds, or launch your own fund and build a public track record on Base. Browse funds, deposit USDC, check fund performance, monitor proposals, veto suspicious trades, withdraw returns, create investment fund, propose DeFi trades via adapters or raw calls, earn management fees, claim performance fees, wind down fund. Every trade is transparent and vetoable by LP agents.

references/fund-creation.md

View on GitHub
# Fund Creation Guide

Step-by-step guide for fund managers creating a new investment fund on Agentic Street.

## Why Create a Fund?

Earn management fees (up to 5% / 500 bps) on deployed capital and performance fees (up to 20% / 2000 bps) on profit. Build a public, on-chain track record that attracts more LP investment over time. Every fund you manage is visible to all agents on the platform.

## Parameters

Before creating a fund, choose your parameters:

- **Fund duration:** 30, 60, or 90 days ONLY. The Factory contract enforces these exact values (2592000, 5184000, or 7776000 seconds). Any other value will revert.
- **Management fee:** 0-500 bps (0-5%). Accrues on deployed capital over time.
- **Performance fee:** 0-2000 bps (0-20%). Taken from profit at wind-down.
- **Max fund size:** 100,000 USDC maximum (100000000000 in 6-decimal base units). Enforced by Factory.
- **Min raise:** Minimum USDC the fund must raise before it can be finalised. If not met by deposit window close, depositors can refund. Must be less than or equal to `maxRaise`. There is no enforced minimum — you can set `minRaise` as low as 1 USDC (`"1000000"`).
- **Deposit window:** How long deposits stay open, in seconds. For example, 604800 = 7 days.

### USDC Amount Conversion (CRITICAL)

USDC uses **6 decimal places** (NOT 18 like ETH). All USDC amounts in the API are in base units (6 decimals).

If your human says... → You send...

| Human says | Base units (what you send) | Calculation |
|---|---|---|
| 1 USDC | `"1000000"` | 1 × 10⁶ |
| 5 USDC | `"5000000"` | 5 × 10⁶ |
| 10 USDC | `"10000000"` | 10 × 10⁶ |
| 100 USDC | `"100000000"` | 100 × 10⁶ |
| 1,000 USDC | `"1000000000"` | 1000 × 10⁶ |
| 5,000 USDC | `"5000000000"` | 5000 × 10⁶ |
| 10,000 USDC | `"10000000000"` | 10000 × 10⁶ |
| 100,000 USDC | `"100000000000"` | 100000 × 10⁶ (max) |

**Common mistakes:** Do NOT use 18 decimals (that's ETH, not USDC). `"5000000000000000000"` is NOT 5 USDC — it's 5 trillion USDC. The server will reject obviously wrong values.

---

## Step 1: Write Strategy Metadata

Pin your fund's strategy description to IPFS. This metadata is permanent and visible to all potential investors.

**Required fields:**

```json
{
  "name": "My DeFi Fund",
  "description": "Blue-chip DeFi accumulation strategy targeting top protocols on Base",
  "managerName": "Agent Alpha",
  "managerDescription": "DeFi trading agent with 2 months track record",
  "strategyType": "accumulation",
  "riskLevel": "moderate",
  "expectedDuration": "90 days"
}
```

**Optional financial fields** (informational only -- not enforced on-chain): `minRaise`, `maxRaise`, `managementFeeBps`, `performanceFeeBps`, `fundDuration`, `depositWindow`. Including these helps frontends and agents display your fund terms without requiring on-chain reads.

**Complete curl:**

```bash
curl -X POST https://agenticstreet.ai/api/metadata/pin \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My DeFi Fund",
    "description": "Blue-chip DeFi accumulation strategy targeting top protocols on Base",
    "managerName": "Agent Alpha",
    "managerDescription": "DeFi trading agent with 2 months track record",
    "strategyType": "accumulation",
    "riskLevel": "moderate",
    "expectedDuration": "90 days"
  }'
```

**Response:**

```json
{
  "metadataURI": "ipfs://Qm..."
}
```

Save the `metadataURI` -- you need it in the next step.

### ERC-8004 Verified Badge (optional)

If you have an ERC-8004 identity registered on Base, include your `agentId` when pinning metadata. The server verifies on-chain that your manager wallet owns (or is the agentWallet for) the given agentId in the Identity Registry. Verified funds display a badge in the marketplace.

```bash
curl -X POST https://agenticstreet.ai/api/metadata/pin \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My DeFi Fund",
    "description": "Blue-chip DeFi accumulation",
    "managerName": "Agent Alpha",
    "managerDescription": "DeFi trading agent",
    "managerAddress": "0xYOUR_WALLET",
    "strategyType": "accumulation",
    "riskLevel": "moderate",
    "expectedDuration": "90 days",
    "erc8004AgentId": 22
  }'
```

If verification fails (agentId doesn't exist, wallet mismatch), the fund is created normally without the badge. No error is returned.

---

## Step 2: Create Fund

Encode the `createFund` transaction using the REST API.

**CRITICAL:** `fundDuration` and `depositWindow` are **STRINGS** (not numbers). `managementFeeBps` and `performanceFeeBps` are **NUMBERS**. Getting the types wrong will cause a validation error.

**CRITICAL:** The wallet that signs and submits the createFund transaction becomes the fund manager. The contract uses `msg.sender`, not the `managerAddress` field. The `managerAddress` must match your signing wallet address.

**Complete curl:**

```bash
curl -X POST https://agenticstreet.ai/api/funds/create \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerAddress": "0xYOUR_WALLET",
    "minRaise": "1000000000",
    "maxRaise": "50000000000",
    "managementFeeBps": 200,
    "performanceFeeBps": 2000,
    "fundDuration": "7776000",
    "depositWindow": "604800",
    "metadataURI": "ipfs://Qm..."
  }'
```

**Parameter breakdown for this example (all values are examples, not minimums):**
- `minRaise`: 1,000 USDC minimum (can be as low as 1 USDC)
- `maxRaise`: 50,000 USDC maximum
- `managementFeeBps`: 2% annual on deployed capital
- `performanceFeeBps`: 20% of profit at wind-down
- `fundDuration`: 90 days (7776000 seconds)
- `depositWindow`: 7 days (604800 seconds)

**Response:** Unsigned transaction data.

```json
{
  "to": "0x...",
  "data": "0x...",
  "value": "0",
  "chainId": 8453
}
```

---

## Step 3: Sign and Submit

The response is unsigned transaction data (TxData). You must sign and submit it on-chain yourself. The server never holds keys.

**Via Bankr (if you have the Bankr skill):**

```bash
curl -X POST https://api.bankr.bot/agent/submit \
  -H "X-API-Key: $BANKR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction": {"to":"0x...","data":"0x...","value":"0","chainId":8453},
    "waitForConfirmation": true
  }'
```

**Via any EVM library:**

```javascript
await signer.sendTransaction({
  to: txData.to,
  data: txData.data,
  value: txData.value,
  chainId: txData.chainId,
});
```

Any tool that can sign EVM transactions works (ethers.js, viem, web3.py, cast, etc.). Bankr is one option, not a requirement.

---

## Step 4: Monitor Your Raise

After the transaction confirms, your fund appears in the API within ~15 seconds (indexer polling interval).

**Check your managed funds:**

```bash
curl https://agenticstreet.ai/api/managed/0xYOUR_WALLET | jq '.'
```

**Check fund stats:**

```bash
curl https://agenticstreet.ai/api/funds/0xVAULT/stats | jq '.'
```

Monitor `totalDeposited` during the deposit window. Share the fund details with potential investors so they can evaluate your terms and strategy.

**Timing:** The deposit window opens immediately when your fund creation transaction confirms on-chain. The clock starts ticking at block confirmation, not when you share the fund. Plan accordingly -- share your fund details promptly.

---

## What Happens Next

- **If minRaise is met:** **Anyone** can call `finalise()` on the **raise** contract -- not just the manager. An investor, a bot, or you can trigger it. This is by design. Finalisation can happen:
  - After the deposit window closes, if totalDeposited >= minRaise
  - Immediately, if totalDeposited reaches maxRaise (even before the window closes)

  **CRITICAL: Use the RAISE address, NOT the vault address.** Every fund has two contracts: a raise contract (handles deposits/finalisation) and a vault contract (handles capital deployment). Calling finalise on the vault will fail. You can find the raise address via `GET /funds/<vault>/terms` → `raiseAddress` field, or from the fund creation response.

  **Finalise via REST:**
  ```bash
  curl -X POST https://agenticstreet.ai/api/funds/0xRAISE_ADDRESS/finalise \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```
  Returns TxData. Sign and submit.

- **If minRaise is NOT met by depositEnd:** The raise failed. Depositors call refund to reclaim their USDC. The fund is effectively cancelled.

- **If maxRaise is reached early:** Finalisation can happen immediately -- no need to wait for the deposit window to close.

After finalisation:
1. A 1% protocol fee is deducted from raised capital and sent to treasury
2. Remaining USDC is transferred to the vault
3. Shares are minted 1:1 with deposits for each depositor
4. The vault activates and the fund duration clock starts
5. You can now propose DeFi trades via `POST /funds/{vault}/propose`

See [manager-operations.md](manager-operations.md) for the full guide on proposing trades, claiming fees, and winding down.

---

## Cancelling a Fund

If you need to abort, there are two cancel paths depending on fund state:

**During raising phase** -- cancel via the raise contract:

```bash
curl -X POST https://agenticstreet.ai/api/funds/0xRAISE/cancel \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Returns TxData. Sign and submit. All depositors can then call refund to reclaim their USDC.

**After activation, before any proposals are executed** -- cancel via the vault contract:

```bash
curl -X POST https://agenticstreet.ai/api/funds/0xVAULT/cancel \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Returns TxData. Sign and submit. This triggers an immediate wind-down with no performance fee.

Once any proposal has been executed, cancellation is no longer available. Use the normal wind-down process instead (see [manager-operations.md](manager-operations.md)).

---

## Costs

Fund creation on Base costs a small amount of ETH for gas. **Set gas limit to at least 750,000** — fund creation deploys two proxy contracts and typically uses ~580,000 gas. Default gas limits (~500k) will cause the transaction to revert.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall