Skip to content

Latest commit

 

History

213 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rackline

Working capital for GPU operators, secured by confirmed receivables.

Rackline finances revenue that GPU operators have earned but not yet received. A controlled source escrow records settlement events, Creditcoin verifies those events through the official Attestcoin native path, and the lending system turns eligible unpaid receivables into a borrowing base. Debt falls only after loan currency reaches the destination vault.

Status (2026-09-14): hackathon prototype. The repository contains the full implementation, a browser demo, and a TEST_ONLY deployment on Creditcoin CC3 Testnet. The native technical path has been exercised with simulated source revenue. This is not a production launch, a live lending pool, a partner integration, or proof of real GPU revenue.

TEST_ONLY application · Fixture demo · API health · Indexer readiness

Rackline flow

How it works

  1. An operator and a provider account are reviewed and linked.
  2. Confirmed unpaid receivables are assigned to a facility with payment control.
  3. A source-chain event is proven with the official Attestcoin SDK and verified by Creditcoin's native BlockProver.
  4. The evidence ledger consumes the verified event once.
  5. The risk engine computes an eligible borrowing base and reserves exposure atomically for a draw.
  6. Source cash moves through a settlement record to the destination vault.
  7. Only measured destination cash allocated through RepaymentRouter reduces debt.

Five judgments stay separate: native event verification, GPU-revenue provenance, current unpaid status, payment-control strength, and destination cash receipt. Evidence for one never establishes another.

What is in the repository

Area Contents
Smart contracts (contracts/gpu/) Source escrow, native verifier, evidence and receivable books, role/control registries, debt ledger, risk and exposure controls, facility manager, lending vault, repayment router, settlement receiver, recovery manager, governance timelock
Attestcoin integration (offchain/attestcoin/) Pinned @gluwa/usc-sdk@0.18.0 and @gluwa/asc-contracts@0.2.1, hashed ABIs and sources, manifest validation, proof retrieval and submission encoding
Off-chain services (offchain/gpu, offchain/api, offchain/prover) PostgreSQL migrations, ingestion, projections, reconciliation, durable jobs and outbox, transaction dispatch, proof worker, chain indexer, control monitor, wallet-authenticated FastAPI product API
Web application (apps/web/) Borrower, LP, provider, activity, and operations views; wallet-signed deposit, withdrawal, draw, repayment, and test-faucet flows; isolated fixture demo at /demo
Verification Foundry unit and invariant tests, Python service and migration tests, TypeScript conformance tests, generated ABI/OpenAPI parity checks, Playwright browser coverage, and an opt-in live scenario runner

The committed deployment manifest records the TEST_ONLY contract suite deployed at block 5,484,231. The Attestcoin release manifest binds it to the TEST_ONLY Sepolia source escrow. The native evidence record carries nativeStatus=CONSUMED for four source transitions plus a refreshed checkpoint, with packaged official proof artifacts and SHA-256 checksums. It keeps partnerRevenue=SIMULATED and partnerSourceBinding=UNCONFIGURED.

Testnet deployment

Creditcoin CC3 Testnet (102031), deployment block 5,484,231. The loan token is a faucet token with no monetary value. Addresses and runtime code hashes are pinned in the deployment manifest.

Contract Creditcoin CC3 Testnet address
ProtocolRoles 0x421b075c3713339f57daf4c4564bc991cbeedb20
ProviderRegistry 0x4837767785fec906bd1cca409d21461ad1f7f952
AuthorizationVerifier 0x1d4ceb59077b127e23cc36afa04a12cc9dcbde6c
AccountRegistry 0x8942aac90466841d2663ff5259841a0e5455665e
AttestcoinRevenueVerifier 0x96fdb10d5247e5827c60ab5ce42bed71eb6411ab
EvidenceBook 0x1a5c5b66df9a125d778302dcec1483d597cd7207
ReceivableBook 0xd22acb2e404d79a96d8e6bf815a8b3fd786d0d4d
ControlRegistry 0x2328e94f07e75a665e8c64bce7b917aa543866b9
DebtLedger 0xe045da25b405f994802d7b5a32ed4331a3db1ecb
GpuRiskPolicy 0x0937cd639d744daeb21cdce22f97ebaea0850fde
ExposureController 0xc312b9a9690b1c9dd95d409cb9a70628efcd41d8
CreditFacilityManager 0xa5a6c3237d424de0aaa00ed5859fcd7d6011226d
LendingVaultV2 0x864f7ca37a640766d6e0a662c0a356d9b5813e75
RepaymentRouter 0xd4dcecfbb505a428e3c99363c23e58bfdb37949b
RecoveryManager 0xb9cc16695203d1a63ebba0010cb8d46defa62489
SettlementReceiver 0xcf5d03ecb4298577018c7162c62d97697f775ad8
GovernanceTimelock 0xb067226e4afff044e6294888c61d2bad11a7c9b8
TreasuryTimelock 0xe6e2c5a7c6c5066ad7d3f593ab2cc6f8810eea26
GpuTestToken (tUSD, 6 decimals) 0x03115387f28660088faa6a9b00aa21cc2ad1ade5

Source contracts on Ethereum Sepolia (11155111):

Contract Sepolia address
SourceEscrow 0x9e00a3a453704e6948689eb68a4f65649af30a97
Source GpuTestToken 0x43d76b878f6b154e1ac351daad354767fad769eb

Source and destination tokens are different assets; a source payout never repays destination debt by itself. Governance uses a 60-second testnet timelock with an EOA governor, not a production multisig. Deployment alone is not native-proof evidence.

Native testnet evidence

Four Sepolia transactions were proven through the official Attestcoin path and consumed by the Rackline contracts on Creditcoin CC3 Testnet:

Event Source transaction Creditcoin consumption
Obligation recognized Sepolia receipt block 5,484,320
Obligation assigned Sepolia receipt block 5,484,358
Payout received Sepolia receipt block 5,484,364
Protected checkpoint Sepolia receipt block 5,484,370

Each proof-only transaction produced zero debt mutation events, zero vault mutation events, and zero vault-token transfer delta: verified source evidence changes evidence and receivable state, never destination debt or cash. The checkpoint had expired by the audit snapshot, so eligible unpaid collateral evaluated to zero, as intended.

Browser-driven financial flows on the same deployment, using faucet test tokens:

Architecture

Sepolia / supported source chain
  SourceEscrow -> settlement event
                      |
                      v
Official Attestcoin proof service + SDK
                      |
                      v
Creditcoin native BlockProver -> AttestcoinRevenueVerifier
                      |
                      v
EvidenceBook -> ReceivableBook -> risk/exposure -> CreditFacilityManager
                                                     |
LPs -> LendingVaultV2 <------------------------------+
          ^
          |
SettlementReceiver -> RepaymentRouter -> DebtLedger

The browser never receives a keeper key. Financial transactions are signed in the connected wallet; the API serves deployment-bound reads, authenticated projections, review requests, and idempotent operational commands. Design details: TECH.md.

Run the demo

The demo uses browser-only fixtures and makes no wallet, API, RPC, or proof-service calls.

npm ci --prefix apps/web
npm --prefix apps/web run dev

Open http://localhost:5173/demo. The connected application at /app requires a configured GPU API; see apps/web/README.md and offchain/api/README.md.

Validate the repository

Prerequisites: Foundry, Node.js 22.12+ (CI uses 24), Python 3.11+, PostgreSQL 16 for the database suite.

# Solidity
forge build --sizes
forge test
forge fmt --check

# Attestcoin tooling
npm ci --prefix offchain/attestcoin
npm --prefix offchain/attestcoin run check
npm --prefix offchain/attestcoin run test -- --run

# Web
npm ci --prefix apps/web
npm --prefix apps/web run lint
npm --prefix apps/web run build
npm --prefix apps/web run test:unit
npm --prefix apps/web run test:e2e

# Python
python -m pip install -e "offchain/gpu[dev]" -e "offchain/api[dev]" -e "offchain/prover[dev]"
(cd offchain/gpu && python -m pytest tests -q)
(cd offchain/api && python -m pytest tests -q)
(cd offchain/prover && python -m pytest tests -q)

The Python migration tests use HASHCREDIT_GPU_TEST_DATABASE_URL when set, or start an ephemeral local PostgreSQL cluster when initdb/pg_ctl are installed. CI runs the same suites plus Slither with a reviewed triage file (.github/workflows/test.yml).

Repository map

contracts/gpu/       Rackline v2 contracts (vendored official Attestcoin sources under vendor/)
test/gpu/            Foundry unit, invariant, and conformance tests
offchain/gpu/        shared domain, database, ingestion, reconciliation, worker runtime
offchain/attestcoin/ pinned official SDK artifacts and proof tooling
offchain/api/        GPU product API (legacy Bitcoin API modules isolated)
offchain/prover/     GPU workers (legacy SPV modules isolated)
apps/web/            connected application and fixture-only demo
config/              domain schemas, Attestcoin manifests, deployment manifest, packaged proofs
evidence/            curated public testnet evidence
script/gpu/          deployment, facility setup, ABI export, native-proof and evidence tools

The original Bitcoin-SPV prototype remains in the repository as legacy code and is not an evidence path for Rackline v2. A pinned read-only inventory preserves its open TEST_ONLY positions without mixing them into v2 claims. Package, CLI, and environment identifiers (hashcredit_*, HASHCREDIT_*) keep the legacy name.

Documentation

Design

Attestcoin

Components and operations

License

MIT

About

Rackline — working capital for GPU operators, secured by receivables they have already earned. Creditcoin · Attestcoin.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages