> For the complete documentation index, see [llms.txt](https://prodigyfi.gitbook.io/structured-yields/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prodigyfi.gitbook.io/structured-yields/protocol-and-product/for-creators-and-builders.md).

# For Creators & Builders

## Creating a vault

Pro Earn lets you become a vault creator, taking the market-maker side. You set the terms, fund the vault, and earn the spread between the market price and the linked price. Subscribers take the other side. There's no leverage, so there's no liquidation risk.

1. Configure the vault. Six parameters define each one: token pair, direction (Buy Low or Sell High), linked price, yield, expiry, and quantity.
2. Deploy. Prodigy.Fi generates a unique smart contract and lists your vault.
3. Manage. Monitor fills under Portfolio → Vaults Created. Cancel unfilled liquidity at any time. Active subscriptions are unaffected.
4. Settle. After expiry, withdraw based on the outcome.

You fund both possible outcomes, plus the yield:

<table><thead><tr><th width="128.8359375"></th><th width="471.484375"></th></tr></thead><tbody><tr><td>Buy Low:</td><td>Linked token: Quantity / Linked Price × (1 + Yield)</td></tr><tr><td></td><td>Investment token: Quantity × Yield</td></tr><tr><td>Sell High: </td><td>Investment token: Quantity × Yield</td></tr><tr><td></td><td>Linked token: Quantity × Linked Price × (1 + Yield)</td></tr></tbody></table>

At settlement, if the linked price is reached, the swap executes. You receive the subscribers' deposit at the linked price, plus your own. If it is not reached, you recover your linked-token deposit, and your investment-token deposit is paid out as subscriber yield.

## Creator fees

You pay a fee on the yield you offer: 60% of the offered yield, collected upfront. Any unused portion is refunded at expiry.

`Fee = 60% × Yield × Filled Quantity × Investment Token Price`

* Buy Low. 8,000 USDC filled at 10% yield, $1.00 token price: `60% × 10% × 8,000 × $1.00 = 480 USDC`
* Sell High. 7 ETH filled at 1% yield, $3,500 token price: `60% × 1% × 7 × $3,500 = 147 USDC`

## Build with the API

The Prodigy.Fi API tool lets developers, traders, and protocols create and subscribe to vaults programmatically, with no UI required. Use it to deploy vaults in bulk, automate recurring strategies, or embed Prodigy.Fi in your own systems.

Repository: [github.com/prodigyfi/dci-cli](https://github.com/prodigyfi/dci-cli)

It uses two files: `config.json` for wallet credentials and network (RPC) settings, and `create-vaults.csv` for vault parameters (token pair, direction, linked price, yield, expiry, quantity). One command deploys every vault in the CSV. Another subscribes to a vault by address:

`npx ts-node ./src/main.ts "Base Mainnet" subscribeVault --vault <vault address> --amount <amount>`

Full setup steps are in the repository README.

<br>
