Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ Agents run in Shade local mode (`requires_tee = false`): `uwagent.runway-rama.te
([open it](https://ipfs.filebase.io/ipfs/bafybeiaybfhshzhm24gfgzly2zy5zd3lvecb5b3sj2agg4fheti2g6nns4) through any IPFS gateway) and recorded in
`credit.get_exit_app_cid()`. The backend (`services/node`) runs on Render at
[runway-node.onrender.com](https://runway-node.onrender.com/) (free plan: the first request after it has
been idle takes about a minute) and the web app on Vercel; [docs/DEPLOY.md](docs/DEPLOY.md) has the steps
and the CI/CD pipelines. **Judges:** [docs/JUDGES.md](docs/JUDGES.md) is a wallet walkthrough of every flow.
been idle takes about a minute) and the web app on Vercel at
**[runway-dusky.vercel.app](https://runway-dusky.vercel.app)**; [docs/DEPLOY.md](docs/DEPLOY.md) has the
steps and the CI/CD pipelines. **Judges:** [docs/JUDGES.md](docs/JUDGES.md) is a wallet walkthrough of every flow, and
[docs/TESTING.md](docs/TESTING.md) the full test plan with the expected result of each step.

Run it yourself against testnet: `pnpm --filter @runway/node start` (needs the keys in `.env` and
`.env.agents.local`), then `pnpm --filter @runway/web dev`, or `pnpm --filter @runway/scripts testnet-e2e` for the
Expand Down
38 changes: 26 additions & 12 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Home() {
<SimulatedBanner>
This deployment runs on NEAR testnet with mock USDC and a simulated UPI provider.
</SimulatedBanner>
<Card title="Try it on testnet (about 20 minutes)">
<Card title="Try it on testnet (about 30 minutes)">
<ol className="list-decimal space-y-1 pl-5 text-sm">
<li>
Create a testnet wallet (Meteor or MyNearWallet, set to testnet) and get free testnet NEAR from
Expand All @@ -30,6 +30,14 @@ export default function Home() {
</a>
. Registering a merchant locks about 2 NEAR.
</li>
<li>
First, on{" "}
<Link className="text-accent underline" href="/lend">
Lend
</Link>
, get 1,000 test USDC. This also registers your wallet with the mock USDC token, so your payouts
and your loan can reach it.
</li>
<li>
<Link className="text-accent underline" href="/verify">
Verify
Expand All @@ -41,26 +49,32 @@ export default function Home() {
.
</li>
<li>
Pay your handle with SIMULATED USDC once in each of three 5-minute windows (the pay link is on the
merchant page).
Pay your handle 400 SIMULATED USDC once in each of three 5-minute windows in a row (the pay link
is on the merchant page; windows follow the clock).
</li>
<li>
Ask for an offer on{" "}
In the next window, ask for an offer on{" "}
<Link className="text-accent underline" href="/merchant/capital">
Capital
</Link>
, accept it, and watch later payments repay it. Try the UPI tab and rupee payouts.
</Link>{" "}
and accept it, then repay it within 5 minutes by paying yourself 1,200. Try the UPI tab and rupee
payouts.
</li>
<li>
On{" "}
<Link className="text-accent underline" href="/lend">
Lend
</Link>
, get 1,000 test USDC, deposit, and withdraw after the cooldown. Check everything on{" "}
On Lend, deposit and withdraw after the cooldown, then check everything on{" "}
<Link className="text-accent underline" href="/audit">
Audit
</Link>
.
. The{" "}
<a
className="text-accent underline"
href="https://github.com/ramachandrareddy352/RunWay/blob/main/docs/TESTING.md"
target="_blank"
rel="noreferrer"
>
full test plan
</a>{" "}
lists the expected result of every step.
</li>
</ol>
</Card>
Expand Down
40 changes: 23 additions & 17 deletions docs/JUDGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@
Runway runs on **NEAR testnet**. Every payment is SIMULATED: mock USDC, and a mock UPI provider where you
press "Simulate success" instead of paying. Nothing here moves real money.

**Web app:** `<Vercel URL>` · **Exit page (IPFS):**
**Web app:** https://runway-dusky.vercel.app · **Exit page (IPFS):**
https://ipfs.filebase.io/ipfs/bafybeiaybfhshzhm24gfgzly2zy5zd3lvecb5b3sj2agg4fheti2g6nns4

Any IPFS gateway serves the exit page; that one serves it directly. `ipfs.io/ipfs/<CID>` also works in a
browser (it loads through a service worker), and Pinata's free public gateway refuses HTML pages.

The backend sleeps when idle (free hosting). If a page says the agent is unavailable, wait a minute and
reload.
reload. [docs/TESTING.md](TESTING.md) is the full test plan, with the expected result of every step.

## 1. A wallet (2 minutes)

Install Meteor Wallet (or use MyNearWallet), switch it to **testnet**, create an account, and get free
testnet NEAR from https://near-faucet.io. Registering as a merchant locks about 2 NEAR, so get at least 3.
testnet NEAR from https://near-faucet.io. Registering as a merchant locks about 2 NEAR, so get at least 4.

Then, **before anything else**, open `/lend`, connect, and press **Get 1,000 test USDC**. Besides the USDC,
this registers your wallet with the mock USDC token; without that your share of payments and your loan
can't be delivered to you.

## 2. Look around without signing anything

Expand All @@ -29,27 +33,29 @@ testnet NEAR from https://near-faucet.io. Registering as a merchant locks about

1. `/merchant` → Connect wallet → register a handle. Runway creates `<handle>.pay.runway-rama.testnet`,
a settlement account with **no keys**.
2. Open your payment link (`/pay/<handle>?amount=4000`). On the Crypto tab pick an asset and a refund
address and press **Get quote**: this is a real NEAR Intents 1Click quote (a mainnet price preview),
verified in your browser. Then **Pay with SIMULATED testnet USDC**.
3. Repeat step 2 once in each of the next two 5-minute windows (testnet revenue buckets are 5 minutes).
The revenue chart on `/merchant` fills in.
4. `/merchant/capital` → **Sign and request an offer**. Your browser checks the underwriter's session key
2. Open your payment link (`/pay/<handle>?amount=400`). On the Crypto tab pick "USDC on base", enter a
refund address (any EVM address, for example `0x52908400098527886e0f7030069857d2e4169ee7`) and press
**Get quote**: this is a real NEAR Intents 1Click quote (a mainnet price preview), verified in your
browser. Then **Pay 400.00 with SIMULATED testnet USDC**.
3. Repeat step 2 **once** in each of the next two 5-minute windows (windows follow the clock: :00–:05,
:05–:10, …), with the same amount. The revenue chart on `/merchant` fills in. Pay early in each window.
4. In the window right after the third one, `/merchant/capital` → **Sign and request an offer**. Your browser checks the underwriter's session key
on-chain, you sign a NEP-413 message, and the request is encrypted to the agent. Optionally attach a
CSV statement: it is read with NEAR AI private inference, verified by attestation. A first offer is
capped at 100 USDC (no identity anchor).
5. **Accept**: the loan goes PendingTerms → PendingTransfer → Active and USDC arrives in your wallet.
6. Pay yourself again on the pay page: each payment is split on-chain, a share to lenders until the loan
is repaid. Testnet loan periods are 5 minutes; a loan with no payments becomes delinquent after one
period and defaults after two.
7. UPI: on the pay page's **UPI (₹)** tab enter ₹8500 → **Open the SIMULATED UPI page** → **Simulate
success**. The rupees are converted at a live INR rate and arrive as USDC in your settlement account.
capped at 100 USDC (no identity anchor): expect grade C, limit 100.00, fee 10.00%, repay share 9.17%.
5. **Accept**: the loan goes PendingTerms → PendingTransfer → Active and 100 USDC arrives in your wallet.
6. **Within 5 minutes**, pay yourself 1,200 on the pay page: the payment is split on-chain, 9.17% (110
USDC) repays the loan and the rest reaches you. Testnet loan periods are 5 minutes; a loan that repays
less than 10% in a period becomes delinquent, and after two such periods it defaults.
7. UPI: on the pay page's **UPI (₹)** tab enter ₹8500 → **Get UPI QR** → **Open the SIMULATED UPI page** →
**Simulate success**. The rupees are converted at a live INR rate and arrive as USDC in your
settlement account; the pay page shows pending → paid → delivered and the on-chain receipt.
8. `/merchant/settings`: switch payouts to ₹ and register a UPI ID (only a masked label is stored, encrypted).
Your next UPI sale is paid out in rupees (simulated), with the UTR hash on-chain.

## 4. Be a lender

1. `/lend` → **Get 1,000 test USDC** → register share storage → deposit.
1. `/lend` → **Get 1,000 test USDC** (if you haven't) → register share storage → deposit.
2. Request a withdrawal; after the 120-second cooldown, **Claim** (priced at claim time).
3. Or deposit and withdraw in rupees with the ₹ cards (simulated UPI).

Expand Down
Loading