gage_prepare_borrow · Prepare: Borrow
may change things: you confirm before it runsPrepare 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 and a review link; never signs.
Input schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"wallet": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"token": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"collateral": {
"type": "string",
"pattern": "^[1-9]\\d{0,77}$",
"description": "Tokens to pledge, raw units"
},
"principal": {
"type": "string",
"pattern": "^[1-9]\\d{0,77}$",
"description": "To borrow, raw units of the loan's asset (USDG: 6 decimals)"
},
"cap": {
"type": "string",
"pattern": "^[1-9]\\d{0,77}$",
"description": "To repay, raw units of the loan's asset, above principal"
},
"term": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Loan term in seconds, one of the terms gage_capabilities lists"
},
"lendAsset": {
"description": "The asset the loan is paid in and repaid in: USDG when omitted, or a lend asset gage_capabilities lists (its token address)",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
},
"required": [
"wallet",
"token",
"collateral",
"principal",
"cap",
"term"
],
"additionalProperties": false
}