Tervin
DOCUMENTATION

How Tervin works

Tervin is a public-testnet prototype for isolated, fixed-term loans. Borrowers lock test Stock Tokens; senior and junior lenders fund in test USDG.

Loan structure

The Tervin factory deploys isolated loans. Its deployment does not create a loan or collect assets. A borrower chooses collateral amount, senior and junior capital targets, interest obligations, funding deadline and term in the app. Those terms are immutable after the loan is created. Borrower payments—not an external yield strategy—are the only source of interest.

Funding

Collateral must be locked before funding. Multiple lenders can deposit into either tranche. The loan activates and sends principal to the borrower only after both tranches are fully funded and a fresh oracle quote values the collateral at least 150% of principal. The borrower may cancel before activation; anyone may cancel after the funding deadline. Lenders then reclaim deposits.

Repayment

The borrower or another account can pay the full amount due. The contract assigns senior principal and interest first, then junior principal and interest, pro rata within each tranche. Collateral returns to the borrower. After an overdue auction starts, full repayment remains possible until the first bid. The completed V3 public-testnet loan used only synthetic assets.

Shortfall and liquidation

After maturity, a permissionless 48-hour auction can sell the whole collateral lot for test USDG. Bids must meet at least 85% of a fresh oracle value and exceed the previous bid. Senior gets proceeds first, junior receives what remains, and the borrower receives any surplus after both obligations. Junior takes the first shortfall; senior can also lose. If no bidder appears, V3 distributes the test Stock Token collateral in kind using the conservative oracle value recorded when the auction opened. Senior has first allocation, then junior, with any calculated excess returned to the borrower. This delivers tokens, not USDG: the recorded price is not an executable sale quote, and recipients may be unable to sell. A stale oracle can prevent the auction from starting at all. There is no verified production liquidation venue or backstop.

Collateral and price data

The test deployment uses newly minted tSTOCK and tUSDG plus a mutable test feed. None is a canonical Robinhood Stock Token or Paxos USDG, and none has cash value. Before any mainnet use, real token addresses, decimals, Chainlink feeds, corporate-action multiplier handling, feed freshness, trading windows, USDG price and executable collateral liquidity must be verified. The onchain Stock Token feed is multiplier-adjusted; do not multiply it again.

Real Stock Tokens have issuer, trading and jurisdictional restrictions. They do not provide ownership rights in the underlying shares. See the official documentation and applicable issuer terms.

Current status

The public testnet factory is at 0x27b0…C30c. It created two isolated loans: one was funded, repaid and claimed; the second is open with synthetic collateral. The app connects a wallet, lets borrowers create testnet loans and exposes loan actions. Nineteen local tests pass. The public auction and adverse-market liveness have not been end-to-end tested on testnet. No mainnet deployment exists. The contracts are unaudited and must not receive real assets.