PositionRouter never holds a position. The loan stays on the user. The router must be an operator before it can borrow.
Addresses: Addresses, Robinhood Chain testnet. ABI: PositionRouter.json.
1
Approve the router as operator
Required for
borrow and withdrawCollateral on behalf of the user. setOperatorWithSig exists for EOAs that need one flow.2
Permit or approve the stock
openPosition pulls supplyAmount of the book’s collateral with transferFrom. Pass a Permit if the token supports it. deadline = 0 skips permit.The book must be borrowingEnabled and regime == LIVE.3
Open in one transaction
What can go wrong
NotOperatorif you skipped step 1 andborrowAmount > 0.RegimeBlockedon weekends, holidays, halts, corporate-action windows, and sequencer-down.Pausedif the guardian flipped the core.BorrowingDisabledwhile the book is still closed. Launch default is off. Testnet may have flipped it.Unhealthy/ cap errors ifborrowAmountexceedsRiskLens.maxBorrowor the book/issuer cap.- Leftover stock is swept back to the caller. The router must end at zero balances.
Parameters
Launch default for
borrowingEnabled is off. Testnet may have flipped it. Read the flag on Parameters rather than trusting the ARCHITECTURE.md launch prose.
Next: Repay and withdraw, Zap.