gage

v1.4.0
cash.gage/gage Checked 23 hours ago Published 26 days ago

Fixed-cost loans on Robinhood Chain: quotes, and each transaction unsigned for your own wallet.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gage_capabilities gage capabilities

Chain, contracts, allowed loan terms, fees, the rules and any lend assets besides USDG. Start here.

gage_assets Collateral gage takes

Tokens gage takes as collateral now: each one's minimum pledge, its most per loan where one is set (maxPerLoan, null where there is none), whether leverage buys it and its Borrow link on gage.cash; a row names the lend asset it is borrowed in, once there is more than USDG.

gage_borrow_quote Borrow quote

The largest loan the partner vaults fund now for at most maxCollateral of a token, at the lowest fixed cost they accept; or one exact loan (collateral and principal) at the lowest cost that funds it now, or at your own costBps, with what each Loan grade costs; in USDG or the lend asset named, with a prepare object for gage_prepare_borrow.

ParameterTypeDescription
term *integerLoan term in seconds, one of the terms gage_capabilities lists
token *string
collateralstringWith principal: the exact pledge of one chosen loan, raw units
costBpsnumberWith collateral and principal: your own fixed cost for the loan instead, bps of the amount borrowed, to a tenth (more digits are rounded); the quote's grades say what each Loan grade costs
lendAssetstringThe asset the loan is paid in and repaid in: USDG when omitted, or a lend asset gage_capabilities lists (its token address)
maxCollateralstringMost of the token to pledge, raw units: quotes the largest loan the vaults fund for it, at the lowest fixed cost they accept
principalstringWith collateral: the exact amount to borrow, raw units of the loan's asset; priced at the lowest fixed cost the vaults funding it accept, or at costBps
walletstring

gage_leverage_quote Leverage quote

Preview a leveraged loop for a pledge and a multiple: amounts, cost and the most the purchase costs. Signs nothing.

ParameterTypeDescription
multiple *numberLeverage, 1.1 to 3 with at most two decimals (2 = twice the pledge held for the loan)
own *stringThe tokens you put in, raw units
term *integerLoan term in seconds, one of the terms gage_capabilities lists
token *string
lendAssetstringUSDG only: leverage lends USDG (a loop in a lend asset is refused; a lend asset's puts open with put_open)
walletstring

gage_loan Loan

One loan: state, amounts, deadlines, what can be done with it now (here, or on gage.cash for an action this server does not serve), its standing instruction to roll by itself, and what closed it (a roll or a cash-out).

ParameterTypeDescription
loanId *string
enginestringThe engine; the current core when omitted

gage_portfolio Portfolio

A wallet's loans (each one's sGAGE to claim, raw, and whether it rolls by itself), Earn holdings and credits (USDG, and each lend asset's apart); where a release names the chain's exit desk, each holding's open exit now and where it stands, and what exit sales paid the wallet. A core or vault that could not be read just now is named in unread, never shown as empty.

ParameterTypeDescription
wallet *stringThe wallet that will sign

gage_earn_vaults Earn vaults

The partner vaults that lend: tokens, fees, size, free cash, share value and each one's link on gage.cash.

gage_vault_free_cash Vault free cash

One partner vault's free cash: what withdrawals are paid from now, what comes back to it as its loans end, by day, and what loans past their end bring back once settled, only if their borrowers repay; and the share of the vault a new loan must leave free (bufferBps).

ParameterTypeDescription
vault *stringA partner vault, as gage_earn_vaults lists it

gage_put_quote Put quote

Preview a put for a margin and a size: a loan of a lend asset against USDG, opened with put_open: it gains as the asset falls, and its loss stops at the USDG put in. Its pledge, purchase, loan, repayment, cost and the most the purchase costs, with a prepare object for gage_prepare_put_open. Signs nothing.

ParameterTypeDescription
lendAsset *stringThe asset the put borrows against USDG: a lend asset gage_capabilities lists with a putRouter (its token address)
margin *stringThe USDG you put in, raw units (6 decimals): the most the put can lose
size *numberThe put's size, 1.1 to 10 with at most two decimals: its whole USDG pledge over the margin you put in (4 = the margin and three times it bought with the loan)
term *integerLoan term in seconds, one of the terms gage_capabilities lists
walletstring

gage_lp_positions LP positions

A wallet's liquidity positions on Uniswap v3 or v4, SushiSwap v3, Ramses or Fables in a pool gage's LP lane lends against: range, liquidity, amounts and worth in USDG at the pool's price now, and whether the lane takes it now. Uniswap v4 positions are found through gage's index and checked on chain; the note says when some may be missing. Start here to borrow against one.

ParameterTypeDescription
wallet *stringThe wallet that will sign

gage_lp_quote LP loan quote

A quote for a fixed-cost USDG loan against an ETH/USDG or stock/USDG liquidity position on Uniswap v3 or v4, SushiSwap v3, Ramses or Fables, with no liquidation: it is never closed early because a price moves, and if it is not repaid by its end the position is unwound for its lenders and nothing else is taken: what the wallet receives and repays, its cost and loan-to-value, signed for the wallet for five minutes at most, with a prepare object for gage_prepare_lp_borrow. Signs nothing.

ParameterTypeDescription
adapter *stringThe position's adapter: one gage_capabilities lists under lpLane.adapters (Uniswap v3, SushiSwap v3, Ramses V3, Uniswap v4 or Fables; gage_lp_positions names each position's)
term *integerLoan term in seconds, one of gage_capabilities lpLane.terms
tokenId *stringThe position's id: its NFT's token id at the adapter's position manager (gage_lp_positions)
wallet *stringThe wallet that holds the position and will borrow: the quote is signed for it
vaultstringThe LP vault to borrow from; the lane's first one that can fund the loan whole when omitted

gage_lp_loans LP loans

A wallet's LP loans (state, amounts, end, its position now, what can be done with it now) and what the lane's core credits the wallet.

ParameterTypeDescription
wallet *stringThe wallet that will sign

gage_lp_vaults LP vaults

The LP vaults that lend against LP positions, the release's and those curators opened: size, free cash, loans out, share value, fee, its curator, the pools it funds (its mandate, in plain words in funds), whether the registry still lets it lend, and whether each takes deposits and pays out now.

gage_park_positions Out-of-range positions

A wallet's out-of-range liquidity positions in the pools gage parks from (gage_capabilities parkPools): each one's pool, range, the one token it holds now and the partner vaults that take it, or why none can. Start here to park one.

ParameterTypeDescription
wallet *stringThe wallet that holds the positions
alsoarrayPositions to read beside those found, by their manager and id: a Uniswap v4 PositionManager and a Fables hook cannot list a wallet's

gage_prepare_borrow Prepare: Borrow

Prepare a loan: pledge a token, receive USDG (or the lend asset named by lendAsset), repay a fixed amount of it within the term. Use the prepare object of gage_borrow_quote, without its action. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
cap *stringTo repay, raw units of the loan's asset, above principal
collateral *stringTokens to pledge, raw units
principal *stringTo borrow, raw units of the loan's asset (USDG: 6 decimals)
term *integerLoan term in seconds, one of the terms gage_capabilities lists
token *string
wallet *string
lendAssetstringThe asset the loan is paid in and repaid in: USDG when omitted, or a lend asset gage_capabilities lists (its token address)

gage_prepare_leverage Prepare: Open a loop

Prepare a leveraged loop: the loan buys more of the pledged token in one transaction. USDG only. Refused above maxCostBps. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
maxCostBps *integerHighest loan cost you accept, bps of the amount borrowed; the loop is refused above it
multiple *numberLeverage, 1.1 to 3 with at most two decimals (2 = twice the pledge held for the loan)
own *stringThe tokens you put in, raw units
term *integerLoan term in seconds, one of the terms gage_capabilities lists
token *string
wallet *string
lendAssetstringUSDG only: leverage lends USDG (a loop in a lend asset is refused; a lend asset's puts open with put_open)

gage_prepare_cancel Prepare: Cancel a listing

Prepare cancelling a loan still waiting for funding and taking its collateral back. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *string
wallet *string
enginestringThe engine; the current core when omitted, the loan's own core for a loan in a lend asset

gage_prepare_reclaim Prepare: Repay a loan

Prepare repaying a running loan in full, in the asset it is paid in, and taking the collateral back, before its term ends. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *string
wallet *string
enginestringThe engine; the current core when omitted, the loan's own core for a loan in a lend asset

gage_prepare_cash_out Prepare: Cash a loan out

Prepare cashing a running loan out: its whole collateral is sold through an aggregator, the loan repaid from the sale, and the rest less gage's 0.5% fee paid to the wallet, in one transaction. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *string
wallet *string
enginestringThe engine; the current core when omitted, the loan's own core for a loan in a lend asset
maxSlippageBpsintegerMost the net you receive may fall below the quote, in bps of it; 50 when omitted
minNetstringThe least you accept to receive, raw units of the loan's asset (USDG: 6 decimals): the cash-out is refused under it, and its transaction reverts under it

gage_prepare_roll Prepare: Roll a loan over

Prepare rolling a running loan over: a new loan of the same size on the same pledge repays it in full, and the wallet adds the difference (the old loan's cost and the new fee) or keeps what is over. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *string
wallet *string
enginestringThe engine; the current core when omitted, the loan's own core for a loan in a lend asset
termintegerThe new loan's term in seconds, one gage_capabilities lists; the loan's own term when omitted

gage_prepare_auto_roll Prepare: Roll a loan over by itself

Prepare leaving a loan to roll over by itself: gage's keeper rolls it in its last hours into a loan of the same size and term, at most maxCost each, up to four times. Leaves standing approvals to gage's rollover router. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *string
wallet *string
enginestringThe engine; the current core when omitted, the loan's own core for a loan in a lend asset
maxCoststringThe most each new loan may cost, its fixed cost and origination fee together, raw units of the loan's asset, at most the loan's principal; when omitted, twice what a roll of the loan costs now, held t…

gage_prepare_cancel_auto_roll Prepare: Stop rolling a loan over

Prepare ending a loan's instruction to roll over by itself. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *string
wallet *string
enginestringThe engine; the current core when omitted, the loan's own core for a loan in a lend asset

gage_prepare_earn_deposit Prepare: Deposit into Earn

Prepare a deposit into a partner vault (lending), in the asset the vault takes: USDG, or its lend asset. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
amount *stringTo deposit, raw units of the vault's asset (USDG: 6 decimals)
vault *string
wallet *string
maxSlippageBpsintegerMost the conversion may move against you, in bps; 50 when omitted

gage_prepare_earn_redeem Prepare: Withdraw from Earn

Prepare withdrawing from a partner vault, everything it can pay when shares is omitted. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
vault *string
wallet *string
maxSlippageBpsintegerMost the conversion may move against you, in bps; 50 when omitted
sharesstringShares to redeem, raw (18 decimals); all when omitted, less what a vault of an asset with more than 6 decimals cannot pay after a loss (a millionth of the asset at most)

gage_prepare_collect Prepare: Collect what is ready

Prepare collecting what is ready here: USDG and lend assets from loans, collateral back, vault earnings, the collateral and backing of loans the vaults wrote off (never counted as earnings), the sGAGE of loans and partner vaults, and what exit now sales paid; a claim that would revert now is left out, and said. The first vault's credits and claims, earlier engines' lender recoveries, retired Earn strategies and the GAGE/sGAGE pool's rewards and Drip are collected on gage.cash. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
wallet *stringThe wallet that will sign

gage_prepare_feedback Prepare: Rate gage

Prepare rating gage (agent #8845 in ERC-8004) in its Reputation Registry: your own score from 0 to 100, once a wallet, public on chain. Optional: gage offers nothing for a rating. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
score *integerYour own rating of gage, a whole number from 0 (worst) to 100 (best)
wallet *string

gage_prepare_put_open Prepare: Open a put

Prepare a put: borrow a lend asset (lendAsset) against USDG, whose loan buys more USDG and pledges it with your margin, size times the margin in all, in one transaction. It gains as the asset falls, and its loss stops at the margin. Refused above maxCostBps. Use the prepare object of gage_put_quote, without its action. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
lendAsset *stringThe asset the put borrows against USDG: a lend asset gage_capabilities lists with a putRouter (its token address)
margin *stringThe USDG you put in, raw units (6 decimals): the most the put can lose
maxCostBps *integerHighest loan cost you accept, bps of the amount borrowed; the put is refused above it
size *numberThe put's size, 1.1 to 10 with at most two decimals: its whole USDG pledge over the margin you put in (4 = the margin and three times it bought with the loan)
term *integerLoan term in seconds, one of the terms gage_capabilities lists
wallet *string

gage_prepare_put_close Prepare: Close a put

Prepare closing a put, or any loan on a core with a put router, out of its own pledge: the pledge buys the repayment back and the rest comes back to the wallet, in one transaction (a loan of a lend asset against USDG, opened with put_open: it gains as the asset falls, and its loss stops at the USDG put in). Returns the next unsigned transaction; never signs.

ParameterTypeDescription
engine *stringThe loan's core: its lend asset's (gage_capabilities lendAssets)
loanId *string
wallet *string
maxSlippageBpsintegerMost the purchase may cost over its quote when it is sent, in bps; 50 when omitted
minBackstringThe least of the pledge you accept back, raw units (USDG: 6 decimals): the close is refused under it, and its transaction reverts under it

gage_prepare_put_roll Prepare: Roll a put over

Prepare rolling a put over through its put router: a new loan of the same size on the same pledge repays it in full, and the wallet's USDG buys what the new payout leaves short. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
engine *stringThe loan's core: its lend asset's (gage_capabilities lendAssets)
loanId *string
wallet *string
maxSlippageBpsintegerMost the purchase may cost over its quote when it is sent, in bps; 50 when omitted
termintegerThe new loan's term in seconds, one gage_capabilities lists; the loan's own term when omitted

gage_prepare_put_auto_roll Prepare: Roll a put over by itself

Prepare leaving a put to roll over by itself: gage's keeper rolls it in its last hours through its put router, at most maxCost each, buying each top-up with at most maxSpend of the wallet's USDG, up to four times. Leaves standing approvals to the put router. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
engine *stringThe loan's core: its lend asset's (gage_capabilities lendAssets)
loanId *string
wallet *string
maxCoststringThe most each new loan may cost, its fixed cost and origination fee together, raw units of the loan's asset, at most the loan's principal; when omitted, as auto_roll starts it
maxSpendstringThe most of the pledge's token (USDG: 6 decimals) each roll may spend buying what the new loan leaves short, at most the loan's pledge; when omitted, twice what buying the largest top-up costs now

gage_prepare_put_cancel_auto_roll Prepare: Stop rolling a put over

Prepare ending a put's instruction to roll over by itself through its put router. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
engine *stringThe loan's core: its lend asset's (gage_capabilities lendAssets)
loanId *string
wallet *string

gage_prepare_lp_borrow Prepare: Borrow against an LP position

Prepare an LP loan (a fixed-cost USDG loan against an ETH/USDG or stock/USDG liquidity position on Uniswap v3 or v4, SushiSwap v3, Ramses or Fables, with no liquidation: it is never closed early because a price moves, and if it is not repaid by its end the position is unwound for its lenders and nothing else is taken): the position is approved to the lane's core and moves into its own escrow, and the loan's USDG less the fee comes to the wallet. A Uniswap v4 position leaves any subscription it has (a rewards program that tracks it) as it moves. Fables receipts not wrapped yet (rangeId, gage_lp…

ParameterTypeDescription
adapter *stringThe position's adapter: one gage_capabilities lists under lpLane.adapters (Uniswap v3, SushiSwap v3, Ramses V3, Uniswap v4 or Fables; gage_lp_positions names each position's)
maxCostBps *integerHighest loan cost you accept, bps of the amount borrowed; refused above it
term *integerLoan term in seconds, one of gage_capabilities lpLane.terms
wallet *string
rangeIdstringFables receipts not wrapped yet (gage_lp_positions fablesReceipts), with the Fables adapter: they are wrapped into a position first, unstaking any staked, then borrowed against; name tokenId or rangeI…
tokenIdstringThe position's id (gage_lp_positions); or rangeId for Fables receipts not wrapped yet
vaultstringThe LP vault to borrow from; the lane's first one that can fund the loan whole when omitted

gage_prepare_lp_repay Prepare: Repay an LP loan

Prepare repaying an LP loan in full in USDG before its end, and taking its position back. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *stringThe LP loan's id on the lane's core (gage_lp_loans)
wallet *string

gage_prepare_lp_return_position Prepare: Take an LP position back

Prepare taking back the position of an LP loan repaid before its end. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *stringThe LP loan's id on the lane's core (gage_lp_loans)
wallet *string

gage_prepare_lp_collect Prepare: Collect an LP position's fees

Prepare collecting a running LP loan's trading fees (a native ETH pool's as WETH), and a Ramses position's rewards, to the wallet; the liquidity stays in place. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *stringThe LP loan's id on the lane's core (gage_lp_loans)
wallet *string

gage_prepare_lp_withdraw Prepare: Withdraw LP credits

Prepare withdrawing what the LP lane's core credits the wallet (a loan's USDG, fees, rewards), every token when token is omitted. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
wallet *string
tokenstringThe token to withdraw; every token the LP lane credits the wallet when omitted

gage_prepare_lp_deposit Prepare: Deposit into an LP vault

Prepare a deposit of USDG into an LP vault, which lends against LP positions in the pools of its mandate. Refused while the vault is impaired, its deposits are closed or the registry no longer lets it lend. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
amount *stringUSDG to deposit, raw units (6 decimals)
vault *stringAn LP vault: one gage_lp_vaults lists (the manifest's, or one a curator opened through the lane's factory)
wallet *string
maxSlippageBpsintegerMost the conversion may move against you, in bps; 50 when omitted

gage_prepare_lp_redeem Prepare: Withdraw from an LP vault

Prepare withdrawing from an LP vault the wallet's own shares (those it received by transfer too), every share its free cash pays when shares is omitted. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
vault *stringAn LP vault: one gage_lp_vaults lists (the manifest's, or one a curator opened through the lane's factory)
wallet *string
maxSlippageBpsintegerMost the conversion may move against you, in bps; 50 when omitted
sharesstringShares to redeem, raw, in the vault's own decimals (its shareDecimals in gage_lp_vaults and the portfolio, 18 or 12: 10^shareDecimals shares were worth 1 USDG when the vault opened); every share the v…

gage_prepare_lp_claim_bonus Prepare: Claim an LP vault's bonus

Prepare claiming an LP vault's bonus (what a defaulted LP loan's sale brought above its book value, shared by the lenders by their share of the vault and the time they held it while the loan ran), every loan with one when loanId is omitted. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
vault *stringAn LP vault: one gage_lp_vaults lists (the manifest's, or one a curator opened through the lane's factory)
wallet *string
loanIdstringThe defaulted LP loan whose bonus to claim; every loan of the vault with a bonus for this wallet when omitted

gage_prepare_lp_roll Prepare: Roll an LP loan over

Prepare rolling an LP loan over: a new loan on the same position repays the running LP loan in full before its end: the position stays in its escrow, and only the difference moves, the new loan's USDG less its fee over the old repayment credited to the wallet, or what it lacks paid by the wallet. Refused above maxCostBps. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
loanId *stringThe LP loan's id on the lane's core (gage_lp_loans)
maxCostBps *integerHighest loan cost you accept, bps of the amount borrowed; refused above it
term *integerLoan term in seconds, one of gage_capabilities lpLane.terms
wallet *string
vaultstringThe LP vault the new loan comes from; the loan's own vault first when omitted

gage_prepare_lp_wrap Prepare: Wrap Fables receipts into a position

Prepare wrapping Fables receipts into a position: every Fables receipt the wallet holds of one range (rangeId, gage_lp_positions fablesReceipts) becomes one position NFT the LP lane lends against: staked receipts are unstaked first (they stop earning Fables' emissions), and the wrapped ones earn the pool's swap fees. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
adapter *stringThe lane's Fables adapter (gage_capabilities lpLane.adapters, kind fables)
rangeId *stringA Fables range's id: the receipts gage_lp_positions lists under fablesReceipts
wallet *string

gage_prepare_lp_unwrap Prepare: Unwrap a Fables position

Prepare unwrapping a Fables position the wallet holds back into its receipts, with their fees less the claim fee Fables keeps. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
adapter *stringThe lane's Fables adapter (gage_capabilities lpLane.adapters, kind fables)
tokenId *stringThe position's id: its NFT's token id at the adapter's position manager (gage_lp_positions)
wallet *string

gage_prepare_lp_create_vault Prepare: Open an LP vault

Prepare opening an LP vault, for a wallet the LP registry lets open one (a curator it allows, or anyone once it opens vault creation): its name, performance fee (500 to 1,500 bps of each loan's fixed cost, fixed for good), largest loan and the pools it funds (gage_capabilities lpLane.pools). A wallet the LP registry lets open one (a curator it allows, or anyone once it opens vault creation) opens a vault through the lane's factory and curates it: it funds loans only in the pools of its mandate, a pool added funding three hours later and one dropped stopping at once (open loans run on); the cur…

ParameterTypeDescription
maxLoanPrincipal *stringThe largest loan the vault funds, raw USDG (6 decimals), at most 10,000,000 USDG; you may change it later
name *stringThe vault's name, as depositors see it (at most 64 bytes)
performanceFeeBps *integerYour share of each loan's fixed cost, in bps: 500 to 1,500 (5% to 15%); fixed for good
pools *arrayThe pools the vault funds loans in (its mandate), each once: from gage_capabilities lpLane.pools
wallet *string

gage_prepare_lp_vault_add_pool Prepare: Add a pool to an LP vault

Prepare adding a pool to the mandate of an LP vault this wallet curates: it funds new loans there three hours later. A wallet the LP registry lets open one (a curator it allows, or anyone once it opens vault creation) opens a vault through the lane's factory and curates it: it funds loans only in the pools of its mandate, a pool added funding three hours later and one dropped stopping at once (open loans run on); the curator never touches its lenders' money. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
adapter *stringThe pool's adapter (gage_capabilities lpLane.pools)
pool *stringThe pool, as gage_capabilities lpLane.pools names it under that adapter
vault *stringAn LP vault this wallet curates (gage_lp_vaults curator)
wallet *string

gage_prepare_lp_vault_remove_pool Prepare: Drop a pool from an LP vault

Prepare dropping a pool from the mandate of an LP vault this wallet curates: it funds no new loan there from then on; loans already open run to their ends. A wallet the LP registry lets open one (a curator it allows, or anyone once it opens vault creation) opens a vault through the lane's factory and curates it: it funds loans only in the pools of its mandate, a pool added funding three hours later and one dropped stopping at once (open loans run on); the curator never touches its lenders' money. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
adapter *stringThe pool's adapter (gage_capabilities lpLane.pools)
pool *stringThe pool, as gage_capabilities lpLane.pools names it under that adapter
vault *stringAn LP vault this wallet curates (gage_lp_vaults curator)
wallet *string

gage_prepare_park Prepare: Park an out-of-range position

Prepare parking: an out-of-range liquidity position's whole liquidity is pulled out on its own DEX (manager and id from gage_park_positions), and the one token it holds is deposited into the partner vault named, which must take it (USDG, or a lend asset; ETH is not parked yet); its fees come to the wallet. Refused while the position is in range. Its transactions are built from one reading of the chain: send them in order (calls) or as one batch, without preparing again between them. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
id *stringThe position's id at its manager (gage_park_positions id): its NFT's token id, or a Fables range's id
manager *stringWhere the position is held: its position manager (a Uniswap v3, SushiSwap v3 or Ramses V3 NonfungiblePositionManager, or a Uniswap v4 PositionManager), or a Fables hook for its receipts (gage_park_pos…
vault *stringThe partner vault to park in: one that takes the token the position holds now (gage_park_positions vaults; a DEX names its own)
wallet *string
maxSlippageBpsintegerMost the conversion may move against you, in bps; 50 when omitted

gage_prepare_unpark Prepare: Unpark into a new position

Prepare unparking: the partner vault named pays the wallet (amount, or all it can pay now: its free cash), and a new position is opened in [tickLower, tickUpper] of a pool gage_capabilities parkPools lists that pairs the vault's asset; a range around the price takes the pool's other token too, from the wallet. Its transactions are built from one reading of the chain: send them in order (calls) or as one batch, without preparing again between them. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
manager *stringWhere the new position is minted: the pool's manager (gage_capabilities parkPools manager)
pool *stringThe pool: a v3-style pool's address, or a v4 pool's id (gage_capabilities parkPools pool)
tickLower *integerThe new range's lower tick, a multiple of the pool's tick spacing
tickUpper *integerThe new range's upper tick, a multiple of the pool's tick spacing, above tickLower
vault *stringThe partner vault to withdraw from: one whose asset the pool pairs
wallet *string
amountstringHow much to withdraw, raw units of the vault's asset; everything the vault can pay the wallet now when omitted
maxSlippageBpsintegerMost the conversion may move against you, in bps; 50 when omitted

gage_prepare_rehypo_exit_now Prepare: Exit a rehypo pool now

Prepare an exit now from a rehypo pool, for a pool LP whose share of one of the pool's tokens is more than that token's rehypo source can pay now (source: the hook's source for that token, which lends it through a partner vault). The source commits the vault shares its cash leaves short of the wallet's share at the chain's exit desk, which lists one of the vault's loans, first the one whose price can fall furthest for this exit. Over ten minutes its price falls from book value plus 99% of what the loan has still to earn, no further than the source's share of that loan can pay: the buyer's disc…

ParameterTypeDescription
source *stringThe rehypo source of the pool's token your share is short of: the hook's source for that token, which lends it through a partner vault
wallet *stringThe wallet that holds the pool's LP shares

gage_prepare_earn_exit_now Prepare: Exit a partner vault now

Prepare an exit now from a partner vault, for a holder whose balance is more than the vault can pay now: the wallet's vault shares (amount, raw in the vault's asset at today's share value; the whole balance when omitted) are committed at the chain's exit desk, approved to it for exactly those shares, and the desk lists one of the vault's loans: first the one whose price can fall furthest for this exit, then the smallest that covers what the vault cannot pay of them. Over ten minutes its price falls from book value plus 99% of what the loan has still to earn: only the part the vault cannot pay…

ParameterTypeDescription
vault *stringA partner vault, as gage_earn_vaults lists it
wallet *stringThe wallet that holds the vault's shares
amountstringWhat to exit, raw units of the vault's asset (USDG: 6 decimals) at today's share value; the whole balance when omitted

gage_prepare_earn_exit_list Prepare: List an exit's next loan

Prepare listing the next loan for the wallet's open exit from a partner vault, once its last listing ended unsold and the vault still cannot pay the rest: the next of the vault's loans, chosen as earn_exit_now chooses it; gage's keeper may also list it. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
vault *stringThe partner vault its exit leaves
wallet *stringThe wallet whose exit it is

gage_prepare_earn_exit_cancel Prepare: Cancel an exit

Prepare cancelling the wallet's exit from a partner vault, before a sale: its shares stay the wallet's, and nothing more is listed or sold for it; it goes to the desk the vault's factory bound, so it works while exits are closed. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
vault *stringThe partner vault its exit leaves
wallet *stringThe wallet whose exit it is

gage_prepare_earn_exit_collect Prepare: Collect what an exit paid

Prepare collecting what exit now sales paid the wallet, from the exit desk: asset (USDG or a lend asset), or every asset it owes when omitted. Returns the next unsigned transaction; never signs.

ParameterTypeDescription
wallet *string
assetstringThe asset to collect: USDG, or a lend asset gage_capabilities lists; every asset the exit desk owes the wallet when omitted

gage_pool_vaults Pool vaults

The pools among the partner vaults (a curator's alone where one is named): one curator's vaults whose names end in the pool's tag (Fables NVDA/USDG), one for each pool token gage lends, each side its vault and gage.cash page, or none.

ParameterTypeDescription
curatorstringOnly this curator's pools; every curator's when omitted

gage_create_pool_vaults Create pool vaults

The calls that create a DEX pool's vaults on gage, one for each pool token gage lends, each on its own factory, from any curator while its creation is open (mainnet's since 5 November 2026), otherwise one gage admitted as a partner: what both share named once (fee, longest loan, Loan grade floor, priority fee), and for each token its largest loan and the cash it keeps free. Neither vault lends against the pool's own two tokens unless a side names one and allowPoolTokens is true. Answers the calls for one wallet batch (EIP-5792, atomic) and the same as a Safe{Wallet} Transaction Builder file (s…

ParameterTypeDescription
curator *stringWho manages both vaults, for good: the wallet or Safe that sends the calls. Any address while a generation's creation is open (mainnet's since 5 November 2026), otherwise one gage admitted as a partne…
feeBps *integerThe performance fee both charge on each loan's profit, bps, 500 to 1500; the protocol receives 10% of it
name *stringThe name before the pool's tag: "Fables" names both vaults "Fables NVDA/USDG"
pool *arrayThe pool's two tokens, in its order
sides *arrayWhat is counted in each token, one entry for each pool token gage lends: its largest loan, and the cash it keeps free
term *The longest loan both vaults fund, in seconds: 604800 (7 days) or 1814400 (21 days)
allowPoolTokensbooleantrue lets a side's collateral name one of the pool's own two tokens, which a fall in that token would then hit twice: in the pool and in the vault's loans. When omitted or false, naming one is refused…
buyLoansobjectEach vault buys running loans other vaults of its generation sell, when they pay at least the model's return plus this; off when omitted. Before mandate 13 (Intent D56) only the USDG vault buys
minRateGradeintegerThe lowest Loan grade both fund, 0 (any) to 4 (A, the model's price or more). 3 (B, 90% of it) when omitted
priorityFeeBpsintegerThe most each vault pays the protocol for a loan, bps of its profit, 0 to 5000: the vault paying most is funded first. 2000 when omitted