Work

What Horizon Protocol tokenizes

Horizon Protocol is a source-available Starknet protocol that splits yield-bearing assets into standardized yield, principal, and yield tokens with PT/SY markets.

Why yield splitting spans multiple runtimes

Yield tokenization requires contract accounting, time-dependent market pricing, router slippage checks, frontend transactions, oracle health, and indexed events to agree across several runtimes.

Building contracts, indexer, and frontend together

I designed and implemented work across the Cairo contracts, deployment scripts, Next.js frontend, Apibara/PostgreSQL indexer, integration documentation, and operational hardening. I authored 46 merged pull requests in the public repository; external libraries provide Starknet, OpenZeppelin, Pragma, Apibara, and frontend primitives.

Contracts, router, indexer, and query layer

  • Cairo contracts implement standardized-yield wrappers, PT and YT token accounting, factories, PT/SY markets, a router with minimum-output parameters, upgrade roles, and Pragma oracle integration.
  • The Next.js and React frontend builds transaction flows from the shared contract interfaces, while a Bun-based Apibara DNA indexer writes Starknet events into PostgreSQL.
  • The documented indexer schema contains 54 event tables and 23 views, including nine materialized views for market statistics, positions, and yield history.
Router entry point for swapping standardized yield into principal tokens
fn buy_pt_from_sy(
  market: ContractAddress,
  receiver: ContractAddress,
  sy_in: u256,
  min_pt_out: u256
)

Why slippage and events stay explicit

  • The Router is the recommended integration entry point and requires minimum-output values so slippage constraints travel with each operation.
  • Protocol state changes emit explicit events that the indexer projects into query-oriented tables and views instead of making the frontend reconstruct history from RPC calls.
  • Token amounts use 18-decimal WAD fixed-point arithmetic, and core contracts are owner-upgradeable to support fixes during the alpha stage.

Pricing principal tokens toward expiry

  • PT pricing converges toward the underlying asset at expiry, so AMM math, implied rates, rounding, and low-liquidity behavior change materially as time remaining approaches zero.
  • Contract ABI and event changes have to propagate through deployment artifacts, the indexer, database views, frontend transaction builders, and tests without leaving a cross-layer mismatch.
  • Frontend actions depend on chain head, RPC, oracle, indexer, and database health; unknown or stale state needs to disable or degrade operations rather than appear current.

Unaudited alpha and upgrade risk

  • The contracts are not audited, there is no active bug bounty, and the documented alpha does not include a pause function or upgrade timelock.
  • Owner upgradeability creates a path to fix alpha software but also concentrates authority and introduces upgrade risk.
  • WAD arithmetic can lose precision at extreme values; public-network, oracle, bridge, liquidity, and underlying-asset risks remain outside the protocol's direct control.

Horizon Protocol after its first market

The latest tagged release is v1.0.0. The repository documents an unaudited Starknet mainnet alpha deployed December 23, 2025; its listed market expired January 17, 2026. The former splityield.org frontend returned HTTP 404 on August 9, 2026, so this page does not present it as a current deployment.

Source, release, and deployment evidence

Protocol, AMM, and indexer specifications

When this protocol evidence was reviewed