Back to Projects
Razor - Company Payments on NEAR
CompletedRustNEAR SDKNEAR Intents+7 more

Razor - Company Payments on NEAR

A company finance workspace for treasury, payroll, invoices, clearing, and cross-chain business payments, powered by five verified contracts on NEAR Mainnet.

Timeline

2026 - Present

Role

Full Stack Blockchain Developer

Team

Hooman Digital

Status
Completed

Technology Stack

Rust
NEAR SDK
NEAR Intents
Circle USDC
TypeScript
Node.js
Next.js
React
Hono
SQLite

Key Challenges

  • Isolating company balances, approvals, and spending policy inside a shared NEAR treasury contract
  • Reconciling uncertain, partial, and refunded cross-chain transfers without paying an obligation twice
  • Supporting multiple funding assets while preserving each recipient payout preference
  • Settling invoice offsets only after every participating company gives exact consent

Key Learnings

  • Designing finance workflows around obligations instead of isolated token transfers
  • Building Rust contracts and production deployment controls for NEAR Mainnet
  • Integrating NEAR Intents for supported cross-chain funding and payouts
  • Separating product demonstrations, deployment evidence, and verified customer settlement claims

Razor - Company Payments on NEAR

Overview

Razor is a company finance workspace for treasury, payroll, invoices, business clearing, and cross-chain payments. Companies record obligations in USDC, fund through supported assets and networks, enforce approvals and spending policy on-chain, and let each recipient confirm their preferred payout asset and network.

The hosted product is live at razorfi.xyz. Five Razor contracts were deployed and verified on NEAR Mainnet on November 14, 2026. NEAR provides the financial authority, while NEAR Intents connects supported funding and payout routes across networks.

Razor charges no percentage markup on payment principal. Optional subscriptions fund workflow capacity and automation without reducing employee or contractor entitlements.

The Problem

Crypto-funded companies often manage treasury, payroll, supplier invoices, approvals, recipient preferences, cross-chain routes, and reconciliation across disconnected tools. A transfer can succeed, fail, refund, or remain uncertain, while the underlying business obligation still needs an exact and auditable state.

Razor models the obligation first. Payment attempts, approvals, fees, delivery, refunds, and unresolved transfers remain attached to one shared financial record. This lets the system recover from uncertain routes without treating a retry as a new payment.

Product Capabilities

Company Treasury

Each company activates an isolated ledger in the shared NEAR treasury contract. Finance teams can fund through supported assets, inspect available and reserved balances, enforce payment limits, and withdraw eligible funds under company policy.

Payroll and Payables

Teams can import payroll CSVs, record salary components, review funding needs, approve batches, schedule recurring obligations, manage supplier invoices, and track outstanding liabilities.

Recipient-Controlled Payouts

An employee, contractor, or supplier confirms a supported asset, network, and address. The company controls payment policy, while the recipient controls where supported funds arrive.

Recovery and Reconciliation

Uncertain or partial transfers remain held for review. Razor tracks delivered value, remaining obligation, source refunds, and any approved recovery path so a retry cannot silently pay twice.

Business Clearing

Consenting companies can offset accepted invoices or fund only their net position through NEAR clearing escrow. The contracts verify company identities, invoice terms, exact consent, funding, creditor rights, and refunds before settlement.

Accounting and Operations

The workspace includes cost centers, project cash flows, expense and purchasing workflows, reconciled exports, scoped APIs, MCP tools, signed events, durable jobs, notifications, and optional accounting integrations.

How a Payment Works

  1. Create a company workspace, invite the finance team, and link a NEAR treasury owner.
  2. Ask the recipient to confirm a supported payout asset, network, address, and optional native USDC backup.
  3. Create a payroll or invoice obligation in USDC with its approvals and execution-cost ceiling.
  4. Fund through supported source assets using NEAR Intents or native NEAR USDC.
  5. Review the exact route and authorize execution under the company's contract-enforced policy.
  6. Reconcile delivery, partial settlement, refunds, and the remaining obligation for both company and recipient records.

Application login and financial signing authority remain separate. A listed asset does not guarantee that a route is available for every amount or at every time, so Razor uses the current catalog and quote rather than treating support as static.

Why NEAR

| NEAR component | Role in Razor | | -------------------------------- | ----------------------------------------------------------------------------------------------- | | NEAR accounts and Rust contracts | Company authority, isolated balances, approvals, limits, payment attempts, and recovery state | | NEAR Intents | Supported cross-chain funding, payout discovery, quotes, and transfer status | | Native NEAR USDC | Treasury settlement, direct payouts, clearing escrow, subscriptions, and optional credit escrow | | Restricted function-call keys | Bounded execution under owner-granted authority and contract-enforced token budgets | | NEAR AI Cloud | Optional private document processing with verification checks and human review |

External networks act as funding and receiving endpoints. Razor's financial authority and policy enforcement remain on NEAR.

Mainnet Contracts

| Contract | NEAR Mainnet account | Responsibility | | -------- | ---------------------------- | -------------------------------------------------------- | | Treasury | treasury.shreyassp002.near | Company ledgers, funding, payment policy, and recovery | | Clearing | clearing.shreyassp002.near | Consented invoice setoff and cash-backed clearing rounds | | Billing | billing.shreyassp002.near | Explicit company subscription payments | | Credit | credit.shreyassp002.near | Optional native USDC lending escrow | | Evidence | evidence.shreyassp002.near | Optional stateless evidence commitments |

Treasury, clearing, billing, and credit retain operator-controlled upgrade keys. The evidence contract is keyless and immutable. Company permissions therefore do not remove operator trust from the upgradeable contracts.

Clearing Example

If Company A owes Company B 100 USDC and Company B owes Company A 70 USDC, separate payments move 170 USDC. With exact consent from both owners, a cash-backed Razor clearing round requires Company A to fund only the 30 USDC net position while preserving the full invoice discharge record.

Employee wages and personal contractor payments never enter business clearing. The feature is limited to consenting business obligations.

Architecture

  • Web application: Next.js, React, TypeScript, company and recipient workspaces
  • API and jobs: Hono, Node.js, SQLite, encrypted private records, durable reconciliation workers
  • Contracts: Rust and NEAR SDK across treasury, clearing, billing, credit, and evidence
  • Payments: NEAR Intents, native NEAR USDC, live catalog discovery, quotes, and transfer status
  • Access: NEAR Connect, wallet login, optional configured Google or email login
  • Integrations: scoped APIs, MCP tools, optional accounting providers, notifications, and email

Verification Boundary

The hosted application and the five contract deployments are live. The public product preview uses fictional company records and does not claim completed customer payroll, funded subscriptions, issued loans, or verified private inference. Deployment evidence and customer settlement evidence remain separate.

Private document processing also does not make public-chain transfers private. Cross-chain delivery distinguishes provider observations, authorized attestations, and independent chain evidence.

Challenges and Solutions

One Treasury, Isolated Companies

Company registration adds isolated state to one shared treasury contract instead of deploying another contract copy. Every balance, approval, policy, and payment attempt is scoped to the company identity.

Recovery Without Duplicate Payments

An uncertain transfer stays unresolved until reconciliation. Partial delivery and source refunds remain distinct, and only the verified remaining obligation can be approved for another attempt.

Flexible Funding Without Flexible Accounting

Companies can fund through supported assets and networks, but obligations remain denominated in USDC. Independent funding legs and recipient terms preserve one consistent business record.

Clearing With Exact Consent

The clearing contracts verify the selected invoices, company identities, owner consents, and complete funding before finalization. A creditor receives a withdrawal right only after those conditions hold.

What I Learned

  • How to model payroll and payables as durable obligations instead of one-off transfers
  • How to design contract-enforced company policy around approvals, budgets, limits, and recovery
  • How to combine NEAR Mainnet authority with supported cross-chain funding and payouts through NEAR Intents
  • How to keep deployment proof, demo data, and customer settlement evidence clearly separated

Shreyas Patil