Search projects, hackathons, sponsors and tech

    ← All projects

    harbor

    Harbor: instant liquidity for redeemable assets and pending withdrawal rights.

    Demo

    About

    Harbor is an onchain redemption-liquidity market connecting users who need liquidity now with capital willing to wait. Across DeFi, redeemable does not always mean immediately available. Yield-bearing assets can involve withdrawal queues, cooldowns and delayed settlement. Once a user requests redemption, they may receive a pending withdrawal right instead of spendable funds. Harbor makes that waiting period tradable. Users can swap supported redeemable assets, sell eligible pending withdrawal rights for immediate liquidity, or buy available rights from pool inventory. Liquidity providers deposit into a shared vault that supplies capital across approved strategies. The pool can resell acquired assets and claims or hold them through redemption, sharing the resulting gains and losses with LPs. Harbor’s pricing engine considers expected recovery, remaining settlement time, operating costs and the pool’s existing exposure. It does not treat every claim as guaranteed cash or assume every withdrawal takes the same time. As exposure grows, inventory-sensitive pricing makes further purchases more conservative and adjusts resale prices to encourage reducing exposure. Ordinary token trading supports buying and selling with both exact-input and exact-output execution through Aqua and SwapVM. Eligible withdrawal NFTs trade as whole rights through direct settlement using the same Book, pricing and risk accounting. Approved integrations do not require fresh governor approval for every NFT. The Graph powers transaction-linked views of trading activity, strategy exposure, deposits, withdrawals and realized results. Privy provides embedded-wallet onboarding alongside external-wallet support, with capability-aware batching and ordinary transaction flows. We also evaluated four pricing policies against frozen historical withdrawal data: fixed-delay pricing, age-based pricing, queue-aware valuation and Harbor’s capacity-adjusted model. The presentation distinguishes simulated results from actual protocol activity and makes the assumptions and maker-versus-seller tradeoffs explicit. The current demonstration runs on Hoodi. Harbor’s contracts are unaudited, and immediate liquidity depends on supported assets, valid pricing and available capital. The core idea is simple: a user should be able to sell the right to wait, while the buyer receives a clearly priced and verifiable obligation.

    How it's made

    Harbor is built with Solidity and Foundry, integrating official 1inch Aqua and SwapVM contracts, Solady and OpenZeppelin primitives, The Graph, and a Next.js frontend with Privy. The contracts separate economic responsibilities. HarborVault holds pool funds, issues LP shares and manages withdrawal liabilities. HarborBook owns portfolio accounting, acquisition basis, exposure limits, pricing policies and settlement rules. A shared Executor coordinates trades across registered Book/Vault pairs. Issuer adapters verify asset conversions, withdrawal ownership, claim status and actual recovery. A central accounting distinction runs through the system: nominal entitlement, estimated portfolio value and spendable cash are different quantities. A pending claim can contribute to portfolio backing without becoming cash available for another purchase or an LP payout. Harbor combines discounted recovery valuation with an inventory-capacity adjustment. In simplified form: recovery_value = nominal_entitlement × sum( scenario_probability × recovery_fraction / (1 + annual_funding_rate × remaining_days / 365) ) pool_bid = recovery_value − operating_cost − buy_margin − increase_in_capacity_penalty pool_ask = recovery_value + operating_cost + sell_margin − decrease_in_capacity_penalty The capacity penalty is zero below a utilization threshold and grows cubically above it. Its change across a trade adjusts the price according to how much exposure the pool acquires or releases. Requesting redemption does not free that exposure merely because the asset changes representation. Authorized publishers provide reusable, bounded and expiring recovery-discount parameters. Contracts combine them with verified live state to calculate executable amounts. Quotes do not depend on a backend signing every individual fill. Independent valuation remains responsible for LP accounting; publishing a trading price cannot manufacture NAV. For ordinary ERC-20 swaps, Harbor builds a canonical SwapVM program using the official instruction set. Extruction invokes Harbor’s Book pricing logic, while FeeProtocol handles the configured VM fees. The Vault is Aqua’s maker and publishes its strategy allocations. Aqua allocations and token approvals do not replace Harbor’s cash, reserve and exposure constraints. Execution opens a shared operation lock, calculates the trade through the VM, authenticates callbacks, measures token movements and commits accounting only after settlement checks pass. Exact-input and exact-output modes use explicit integer-rounding rules. Transient storage carries transaction-local authorization and callback state, while fixed linked libraries keep substantial execution logic outside the Book’s runtime without introducing upgradeable dispatch. Raw withdrawal NFTs use direct settlement through the same Book because Aqua’s ERC-20 transfer path does not carry NFT IDs. The adapter verifies each claim’s ownership, status and entitlement under an approved issuer policy. This avoids deploying a wrapper and publishing a separate Aqua strategy for every withdrawal ID. The Graph indexes economic events into trade history, strategy-level activity, LP flows and realized results, with transaction hashes for verification. The data layer also includes reusable standardized external-vault queries and a historical issuer pipeline. Historical finalizations use inclusive ranges and prefix accounting to keep indexing work bounded. Exported research datasets carry provenance and reconciliation checks, and simulated pricing results remain separate from live Harbor events. Privy manages embedded-wallet onboarding and connected external wallets. The transaction layer checks wallet capabilities before requesting atomic batches or EIP-7702 authorization, with ordinary transactions available when batching is unsupported. Harbor’s Periphery handles native-token wrapping, unwrapping and measured refunds without taking ownership of users’ signing keys. Foundry tests cover accounting lifecycles, all four trading modes, fee rounding, withdrawal funding, claim recovery, callback rollback and pool isolation. Fork- based tests exercise real issuer and Aqua/SwapVM dependencies, while the Hoodi deployment demonstrates actual token and withdrawal-right transfers.