Margin Proxy
Looped leverage contract that interacts w/ the Positions contract for the user
Last updated
Looped leverage contract that interacts w/ the Positions contract for the user
Last updated
Key | Type | Description |
---|---|---|
* = optional
Deposit
Deposits asset into a contract owned Position in the Positions contract
* = optional
Loop
Loop credit sales to buy more collateral on leverage
* = optional
ClosePosition
Close position and send excess credit and leftover collateral to the owner
UpdateConfig
Update contract configuration
* = optional
Config
Returns contract configuration
GetUserPositions
Returns user's positions hosted by this contract
Key | Type | Description |
---|---|---|
Key | Type | Description |
---|---|---|
Key | Type | Description |
---|---|---|
Key | Type | Description |
---|---|---|
Key | Type | Description |
---|---|---|
*owner
String
Contract owner, defaults to info.sender
apollo_router_contract
String
Apollo DEX router contract
positions_contract
String
Positions contract
max_slippage
Decimal
Max slippage for asset swaps
*position_id
Uint128
Position ID, creates new position if not passed
position_id
Uint128
Position ID
*num_loops
u64
Max number of loops
target_LTV
Decimal
LTV to use to loop position
position_id
Uint128
Position ID
max_spread
Decimal
Spread used to ensure collateral sold repays the debt amount
*owner
String
Contract owner
*positions_contract
String
Positions contract
*apollo_router_contract
String
Apollo DEX router contract
*max_slippage
Decimal
Max slippage for collateral sales when looping
user
String
User address that owns the positions