Skip to content

The agent executes your rule as your position nears liquidation.

It adds collateral or repays debt from your reserve. It cannot send funds anywhere else.

Example positionSOL $160.00
Collateral
40 SOL
Debt
$3,700.00
Current LTV
57.81%
Your rule fires at
70.00%
Liquidation at
$115.63

Run it against a market that already happened

A 31% fall over twelve hours, most of it recovered within a day. Shaped from SOL on 5 August 2024.

SOL / USDScenario market
$145.40−9.12%
$164.38$144.53$125.26$105.99
May 12May 12May 12May 12May 12May 12
Up DownVolume LTV with agent LTV without agent

Position and rule

SOL
USD
USD
Starting LTV57.81%
Liquidation at
$115.63
v2Tops up collateral at
70.00% LTV
Repays debt at
76.00% LTV

Topping up collateral arrives in v2: it needs a signature from you on every action. The deployed program repays debt and nothing else, so a rule with a top-up step cannot be authorized yet.

The rule is fixed here because you set yours in the chat, not in a form. The position is yours to change.

Outcome at the last price

With the agent

$4,644

Reserve left
$624.26
Actions taken
2
Network fees
$0.0050
Outcome
Not liquidated

With no agent

$3,717

Reserve left
$2,200.00
Actions taken
0
Network fees
$0.00
Outcome
Liquidated at $112.40

Reserve repaid up front

$4,316

The same reserve spent on the debt at the start, then nobody acts again. It is the comparison that matters, because leaving the money idle beside a loan is not what anyone actually does with it.

Against leaving the reserve idle+$926.87
Against repaying with it instead+$328.10
Show the numbers as a table
TimePriceLTV with the agentLTV with no agentAgent
0m$160.0057.81%57.81%
1h$158.2058.47%58.47%
2h$154.6059.83%59.83%
3h$149.1062.04%62.04%
4h$143.8064.33%64.33%
5h$138.4066.84%66.84%
6h$133.9069.08%69.08%
7h$129.2062.00%71.59%Added collateral, $799.74v2
8h$124.6064.29%74.24%
9h$119.3067.15%77.54%
10h$115.7069.23%79.95%
11h$112.4062.00%78.73%Added collateral, $775.99v2
12h$110.2063.24%76.31%
13h$111.8062.33%75.22%
14h$114.6060.81%73.38%
15h$118.9058.61%70.73%
16h$122.4056.93%68.70%
17h$126.7055.00%66.37%
18h$130.1053.56%64.64%
19h$133.8052.08%62.85%
20h$137.2050.79%61.29%
21h$140.6049.56%59.81%
22h$143.1048.70%58.77%
23h$145.4047.93%57.84%

The rule worked. Without the agent the position was liquidated at $112.40 and the recovery arrived too late to matter.

What the agent can and cannot do

Can

  • Repay part of your debt from your reserve
  • Add collateral from your reservev2
  • Only once your LTV reaches the threshold you set
  • No more often than your rate limit allows
  • No more than the amount you cap

Cannot

  • Send funds to any other address
  • Touch anything outside your reserve and your position
  • Act after you revoke authorization
  • Act after the authorization expires
  • Act while your position is healthy

When the agent does not help

Every number below comes from the simulator above. You can reproduce all three.

The reserve runs out

The rule can only spend what you put in. When the reserve is empty the agent stops acting and your position carries on falling without it.

$0.00

reserve left after three actions in the third scenario

A fall with no rebound

Topping up converts your reserve into the asset that is falling. It delays liquidation and it can leave you with less than doing nothing at all.

-$2,099.85

worse off with the agent in the third scenario

A spike that reverses

The rule fires on a threshold, not on a forecast. A move that reverses within the hour still spends the reserve and still pays the fees.

$711.74

spent in the second scenario on a position that was never at risk