Skip to content

RelativePositionManager

Venus Trade is a relative performance trading product built on Venus Protocol’s lending infrastructure. It allows users to express a view that one asset will outperform another, packaged into a single managed position with automated execution, proportional closing, and built-in yield generation.

For architecture details and implementation walkthrough, see the Trade Technical Article.

Version scope: This API reference follows venus-periphery v1.2.0. RelativePositionManager is an upgradeable proxy; PositionAccounts are deterministic EIP-1167 clones of the one-time configured implementation. Verify the current proxy implementation, locked PositionAccount implementation, ACM grants, DSA configuration, pause state, and manager dependencies before integrating.

The Venus comptroller contract

contract IComptroller COMPTROLLER

The leverage strategies manager contract

contract LeverageStrategiesManager LEVERAGE_MANAGER

Tolerance for proportional close (in basis points): 100 = 1% margin of error (governance-controlled)

uint256 proportionalCloseTolerance

Implementation contract for PositionAccount clones (settable via governance, can only be set once)

address POSITION_ACCOUNT_IMPLEMENTATION

Lock flag to prevent changing POSITION_ACCOUNT_IMPLEMENTATION after it’s set

bool isPositionAccountImplementationLocked

Counter / next index for newly added DSA vTokens (also equals current count)

uint8 dsaVTokenIndexCounter

Whether the contract is partially paused (blocks open, scale, withdraw, deactivate but allows close and supply)

bool isPartiallyPaused

Whether the contract is completely paused (blocks all state-changing user operations)

bool isCompletelyPaused

Mapping from DSA index to supported DSA (Default Settlement Asset) vToken markets

mapping(uint8 => address) dsaVTokens

Tracks whether a given DSA vToken is currently active for new activations

mapping(address => bool) isDsaVTokenActive

Mapping from user => longAsset => shortAsset => Position data

mapping(address => mapping(address => mapping(address => struct IRelativePositionManager.Position))) positions

Contract constructor

constructor(address comptroller, address leverageManager) public
NameTypeDescription
comptrolleraddressThe Venus Comptroller contract address
leverageManageraddressThe LeverageStrategiesManager contract address (provides swap helper for enter/exit leverage)

Initializes the upgradeable contract

function initialize(address accessControlManager_) external
NameTypeDescription
accessControlManager_addressAddress of the Access Control Manager contract

Partially pauses the manager — blocks risk-increasing operations (open, scale, withdraw, deactivate) while allowing defensive operations (close, supply principal).

function partialPause() external
  • ACM permission required: partialPause()

Removes partial pause, re-enabling risk operations (unless completely paused).

function partialUnpause() external
  • ACM permission required: partialUnpause()

Completely pauses all state-changing user operations on the manager

function completePause() external
  • ACM permission required: completePause()

Removes complete pause, re-enabling all operations (unless partially paused).

function completeUnpause() external
  • ACM permission required: completeUnpause()

Sets the implementation contract used for PositionAccount clones (can be set only once)

function setPositionAccountImplementation(address positionAccountImpl) external
NameTypeDescription
positionAccountImpladdressImplementation contract for PositionAccount EIP-1167 clones
  • ACM permission required: setPositionAccountImplementation(address)
  • The implementation can be set only once; existing and future clones then use that locked address
  • Emits PositionAccountImplementationSet event.
  • Throw ZeroAddress if positionAccountImpl is zero.
  • Throw PositionAccountImplementationLocked if already set.

Sets the proportional close tolerance (in basis points)

function setProportionalCloseTolerance(uint256 newTolerance) external
NameTypeDescription
newToleranceuint256New tolerance value in basis points
  • ACM permission required: setProportionalCloseTolerance(uint256)
  • Emits ProportionalCloseToleranceUpdated event.
  • Throw InvalidProportionalCloseTolerance if tolerance is outside [1, 10000].
  • Throw SameProportionalCloseTolerance if tolerance is unchanged.

Adds a new DSA vToken to the supported list

function addDSAVToken(address dsaVToken) external
NameTypeDescription
dsaVTokenaddressThe vToken market address to add as a supported DSA
  • ACM permission required: addDSAVToken(address)
  • Emits DSAVTokenAdded event.
  • Throw ZeroAddress if dsaVToken is zero.
  • Throw AssetNotListed if the market is not listed in the Comptroller.
  • Throw DSAVTokenAlreadyAdded if the DSA vToken is already configured.

Updates the active flag for a configured DSA vToken, controlling whether it can be used for new activations

function setDSAVTokenActive(uint8 dsaIndex, bool active) external
NameTypeDescription
dsaIndexuint8Index of the DSA vToken in the internal mapping
activeboolNew active flag (true to allow new activations, false to block them)
  • ACM permission required: setDSAVTokenActive(uint8,bool)
  • Emits DSAVTokenActiveUpdated when the active flag is changed.
  • Throw InvalidDSA if the index or stored address is invalid.
  • Throw SameDSAActiveStatus when called with the current active flag.

Executes multiple generic calls from a position account for emergency or administrative actions.

function executePositionAccountCall(address positionAccount, address[] targets, bytes[] data) external
NameTypeDescription
positionAccountaddressAddress of the position account
targetsaddress[]Array of target contract addresses
databytes[]Array of encoded function call data
  • ACM permission required: executePositionAccountCall(address,address[],bytes[])
  • The granted caller selects every target and calldata item. RelativePositionManager forwards them to the PositionAccount’s genericCalls function without restricting the called contracts or selectors.

Opens a leveraged position for the first time (combines activation + opening in one call)

function activateAndOpenPosition(address longVToken, address shortVToken, uint8 dsaIndex, uint256 initialPrincipal, uint256 effectiveLeverage, uint256 shortAmount, uint256 minLongAmount, bytes swapData) external
NameTypeDescription
longVTokenaddressThe vToken market address for the asset to long
shortVTokenaddressThe vToken market address for the asset to short
dsaIndexuint8Index of the DSA vToken in the dsaVTokens array
initialPrincipaluint256Required initial principal amount to supply during activation (must be > 0)
effectiveLeverageuint256The target leverage ratio for this position (in mantissa, e.g., 2e18 = 2x leverage)
shortAmountuint256Amount to borrow in shortAsset terms
minLongAmountuint256Minimum amount of long asset expected from swap
swapDatabytesSwap instructions for converting shortAsset to longAsset
  • Emits PositionAccountDeployed (if new account), PositionActivated, PrincipalSupplied, and PositionOpened.
  • Throw InsufficientPrincipal if initialPrincipal is zero.
  • Throw ZeroAddress if longVToken or shortVToken is zero.
  • Throw SameMarketNotAllowed if long and short vTokens are identical.
  • Throw AssetNotListed if a market is not listed.
  • Throw InvalidDSA if dsaIndex is not Valid, or DSAInactive if the DSA is inactive.
  • Throw InvalidLeverage if effectiveLeverage is out of range.
  • Throw PositionAlreadyExists if the position is already active.
  • Throw EnterMarketFailed if entering the DSA market on behalf fails.
  • Throw MintBehalfFailed if minting initialPrincipal fails.
  • Throw ZeroVTokensMinted if initialPrincipal rounds down to 0 vTokens due to exchange rate.
  • Throw ZeroShortAmount if shortAmount is zero.
  • Throw InvalidOraclePrice if pricing data is unavailable while computing borrow limits.
  • Throw BorrowAmountExceedsMaximum if shortAmount exceeds max allowed borrow.

Scales an existing position by adding additional leverage (borrow + swap to long)

function scalePosition(contract IVToken longVToken, contract IVToken shortVToken, uint256 additionalPrincipal, uint256 shortAmount, uint256 minLongAmount, bytes swapData) external
NameTypeDescription
longVTokencontract IVTokenThe vToken market for the asset to long
shortVTokencontract IVTokenThe vToken market for the asset to short
additionalPrincipaluint256Additional principal to supply this call (0 if none)
shortAmountuint256Amount to borrow in shortAsset terms (must not exceed max calculated borrow)
minLongAmountuint256Minimum amount of long asset expected from swap (protects against slippage)
swapDatabytesSwap instructions for converting shortAsset to longAsset
  • Emits PositionScaled event (and PrincipalSupplied if additionalPrincipal > 0).
  • Throw ZeroShortAmount if shortAmount is zero.
  • Throw PositionNotActive if the position is not active.
  • Throw MintBehalfFailed if additionalPrincipal minting on behalf fails.
  • Throw ZeroVTokensMinted if additionalPrincipal rounds down to 0 vTokens if Minted.
  • Throw InvalidOraclePrice if pricing data is unavailable while computing borrow limits.
  • Throw BorrowAmountExceedsMaximum if shortAmount exceeds max allowed borrow.

Supplies additional principal to an active position

function supplyPrincipal(address longVToken, address shortVToken, uint256 amount) external
NameTypeDescription
longVTokenaddressThe vToken market address for the long asset
shortVTokenaddressThe vToken market address for the short asset
amountuint256Amount of DSA underlying to supply (must be large enough to mint at least 1 vToken)
  • Emits PrincipalSupplied event.
  • Throw ZeroAmount if amount is zero.
  • Throw PositionNotActive if the position is not active.
  • Throw MintBehalfFailed if minting supplied principal on behalf fails.
  • Throw ZeroVTokensMinted if supplied amount rounds down to 0 vTokens Minted.

Closes a position proportionally; can realize profit on the closed slice (partial or full). If treasuryPercent is enabled, the LM redeems more than the requested long amount on behalf of the position account to cover the fee; callers should reduce redeem amounts accordingly to avoid exceeding the available collateral bucket and causing a revert.

function closeWithProfit(contract IVToken longVToken, contract IVToken shortVToken, uint256 closeFractionBps, uint256 longAmountToRedeemForRepay, uint256 minAmountOutRepay, bytes swapDataRepay, uint256 longAmountToRedeemForProfit, uint256 minAmountOutProfit, bytes swapDataProfit) external
NameTypeDescription
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
closeFractionBpsuint256Proportion to close in basis points (10000 = 100%, 1 = 0.01% minimum)
longAmountToRedeemForRepayuint256Amount of long to redeem for the repay leg (validated against BPS)
minAmountOutRepayuint256Minimum short Amount expected from repay swap; must be >= required repay amount for the given BPS. Should Include flash-loan fees and (for 100% close) include internal tolerance buffer.
swapDataRepaybytesSwap #1: long → short for debt repayment
longAmountToRedeemForProfituint256Amount of long to redeem and swap long→DSA as profit (can be non-zero for partial or full close)
minAmountOutProfituint256Minimum DSA out from the profit swap used for slippage protection
swapDataProfitbytesSwap #2: long → DSA for profit realization
  • Emits ProfitConverted event.
  • Emits PositionClosed event. When DSA == Long, PositionClosed.longDustRedeemed is reclassified back as principal vTokens rather than transferred.
  • Throw PositionNotActive if the position is not active.
  • Throw InvalidCloseFractionBps if closeFractionBps is not between 1 and 10000.
  • Throw InvalidLongAmountToRedeem if total long to redeem is invalid for the chosen BPS.
  • Throw MinAmountOutRepayBelowDebt if minAmountOutRepay is below the calculated short debt for this close.
  • Throw ProportionalCloseAmountOutOfTolerance if total long amounts are not within the tolerated BPS band.
  • Throw RedeemBehalfFailed if redeem on behalf (profit leg or full-close dust) fails.
  • Throw TokenSwapCallFailed if the profit swap helper call fails.
  • Throw SlippageExceeded if profit swap output is below minAmountOutProfit.
  • Throw MintBehalfFailed if minting converted profit as principal fails.
  • Throw ZeroVTokensMinted if profit swap output rounds down to 0 vTokens if Minted.
  • Throw PositionNotFullyClosed if 100% close is used but short debt remains (e.g. exitLeverage did not repay fully).

Closes a position with loss proportionally (BPS-based, same pattern as closeWithProfit). If treasuryPercent is enabled, the LM redeems more than the requested DSA amount on behalf of the position account to cover the fee.

Implementation notes:

  • First exit (long → short): long/short amounts are derived from BPS; the user passes shortAmountToRepayForFirstSwap, which is validated to be within [0, expectedShort] and minAmountOutFirst must be >= shortAmountToRepayForFirstSwap. For 100% close with one leg, shortAmountToRepayForFirstSwap should be slightly higher to cover the internal tolerance bump.
  • Second exit (DSA → short): the second repay amount is calculated as expectedShort - shortAmountToRepayForFirstSwap (and bumped for 100% close when > 0). minAmountOutSecond must be >= the calculated second repay (slippage protection; and should cover the bump but exact match not required).
  • Single-leg scenarios: this function also supports cases where only one leg (long or DSA) is available (e.g. after liquidation), by allowing either the first or second exit to be effectively skipped.
  • Principal handling: Unused DSA principal stays on the position account. withdrawPrincipal withdraws up to the withdrawable amount; deactivatePosition redeems all remaining DSA and sends it to the user.
function closeWithLoss(contract IVToken longVToken, contract IVToken shortVToken, uint256 closeFractionBps, uint256 longAmountToRedeemForFirstSwap, uint256 shortAmountToRepayForFirstSwap, uint256 minAmountOutFirst, bytes swapDataFirst, uint256 dsaAmountToRedeemForSecondSwap, uint256 minAmountOutSecond, bytes swapDataSecond) external
NameTypeDescription
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
closeFractionBpsuint256Proportion to close in basis points (10000 = 100%, 1 = 0.01% minimum)
longAmountToRedeemForFirstSwapuint256Long amount to redeem for the first swap (validated against BPS within 1% tolerance)
shortAmountToRepayForFirstSwapuint256Short amount to repay in the first exit (validated: 0 <= value <= BPS-derived expected short)
minAmountOutFirstuint256Min short Amount expected from first swap; must be >= shortAmountToRepayForFirstSwap. Should Include flash-loan fees and for 100% close with one leg, include internal tolerance buffer.
swapDataFirstbytesSwap #1 calldata: long/DSA → short for the first repay leg
dsaAmountToRedeemForSecondSwapuint256DSA amount to redeem and use as input for the second repay swap
minAmountOutSeconduint256Minimum short Amount expected from second swap; must be >= internally calculated second repay amount. Should Include flash-loan fees and (for 100% close) internal tolerance buffer.
swapDataSecondbytesSwap #2 calldata: DSA → short for the second repay leg
  • Emits PositionClosed event. When DSA == Long, PositionClosed.longDustRedeemed is reclassified back as principal vTokens rather than transferred.
  • Throw PositionNotActive if the position is not active.
  • Throw ZeroDebt if there is no short debt to close.
  • Throw InvalidCloseFractionBps if closeFractionBps is not between 1 and 10000.
  • Throw MinAmountOutRepayBelowDebt if minAmountOutFirst is below shortAmountToRepayForFirstSwap.
  • Throw ProportionalCloseAmountOutOfTolerance if first-exit amounts are not within the tolerated BPS band.
  • Throw MinAmountOutSecondBelowDebt if minAmountOutSecond is below the internally calculated second repay.
  • Throw InsufficientWithdrawableAmount if either leg’s effective amount (after treasury grossup) exceeds its bucket in the shared pool (DSA==long only).
  • Throw RedeemBehalfFailed if redeeming long or DSA vTokens on behalf fails.
  • Throw TokenSwapCallFailed if a swap helper call fails, or SlippageExceeded if swap output is too low.
  • Throw ExcessiveShortDust if short token dust after both exit legs exceeds proportional tolerance.

Fully closes a profitable position and deactivates it in a single atomic transaction.

function closeWithProfitAndDeactivate(contract IVToken longVToken, contract IVToken shortVToken, struct IRelativePositionManager.CloseWithProfitParams profitSwapParams) external
NameTypeDescription
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
profitSwapParamsstruct IRelativePositionManager.CloseWithProfitParamsCloseWithProfitParams struct containing swap parameters

Fully closes a position at a loss and deactivates it in a single atomic transaction.

function closeWithLossAndDeactivate(contract IVToken longVToken, contract IVToken shortVToken, struct IRelativePositionManager.CloseWithLossParams lossSwapParams) external
NameTypeDescription
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
lossSwapParamsstruct IRelativePositionManager.CloseWithLossParamsCloseWithLossParams struct containing swap parameters

Deactivates a position account

function deactivatePosition(contract IVToken longVToken, contract IVToken shortVToken) external
NameTypeDescription
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
  • Emits PositionDeactivated event.
  • Throw PositionNotActive if the position is not active.
  • Throw PositionNotFullyClosed if short debt remains.

Withdraws principal from an active position, subject to utilization constraints

function withdrawPrincipal(contract IVToken longVToken, contract IVToken shortVToken, uint256 amount) external
NameTypeDescription
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
amountuint256Amount to withdraw
  • Emits PrincipalWithdrawn event when principal is withdrawn.
  • Throw PositionNotActive if the position is not active.
  • Throw ZeroAmount if amount is zero.
  • Throw InsufficientWithdrawableAmount if amount exceeds withdrawable principal.
  • Throw RedeemBehalfFailed if redeem fails.

Returns the address at which the PositionAccount would be deployed for the given user and markets

function getPositionAccountAddress(address user, contract IVToken longVToken, contract IVToken shortVToken) external view returns (address predicted)
NameTypeDescription
useraddressUser address
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
NameTypeDescription
predictedaddressThe predicted PositionAccount address (same as deployed by activateAndOpenPosition for that user/long/short)
  • Throw PositionAccountImplementationNotSet if implementation is not configured.

Returns the full list of configured DSA vToken markets

function getDsaVTokens() external view returns (address[] dsaVTokensList)
NameTypeDescription
dsaVTokensListaddress[]Array of DSA vToken addresses

Returns the position data for a user and asset pair

function getPosition(address user, contract IVToken longVToken, contract IVToken shortVToken) external view returns (struct IRelativePositionManager.Position position)
NameTypeDescription
useraddressUser address
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
NameTypeDescription
positionstruct IRelativePositionManager.PositionThe Position struct

Calculates capital utilization for a position

function getUtilizationInfo(address user, contract IVToken longVToken, contract IVToken shortVToken) external returns (struct IRelativePositionManager.UtilizationInfo utilization)
NameTypeDescription
useraddressUser address
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
NameTypeDescription
utilizationstruct IRelativePositionManager.UtilizationInfoUtilization information including available capital and withdrawable amount

Returns the remaining short borrow capacity for a position under current market conditions

function getAvailableShortCapacity(address user, contract IVToken longVToken, contract IVToken shortVToken) external returns (uint256 availableCapacity)
NameTypeDescription
useraddressUser address
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
NameTypeDescription
availableCapacityuint256Remaining borrow capacity in short asset terms

Returns the maximum allowed leverage for a given DSA/long market pair based on current collateral factors

function getMaxLeverageAllowed(contract IVToken dsaVToken, address longVToken) external view returns (uint256 maxLeverage)
NameTypeDescription
dsaVTokencontract IVTokenThe DSA vToken market (CF_dsa used as collateral)
longVTokenaddressThe long asset vToken market (CF_long used as hedge coverage)
NameTypeDescription
maxLeverageuint256The maximum leverage ratio (1e18 mantissa)

Returns the actual long collateral balance in underlying for a given user/position, excluding DSA principal when the DSA and long assets share the same vToken market.

function getLongCollateralBalance(address user, contract IVToken longVToken, contract IVToken shortVToken) external returns (uint256 longBalance)
NameTypeDescription
useraddressThe position owner
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
NameTypeDescription
longBalanceuint256The long collateral balance in underlying units (principal excluded when shared market)

Returns the supplied principal balance in underlying units for a given user/position

function getSuppliedPrincipalBalance(address user, contract IVToken longVToken, contract IVToken shortVToken) external returns (uint256 balance)
NameTypeDescription
useraddressThe position owner
longVTokencontract IVTokenThe vToken market for the long asset
shortVTokencontract IVTokenThe vToken market for the short asset
NameTypeDescription
balanceuint256The supplied principal in underlying units

Minimal proxy contract that holds user funds for isolated Relative Trading positions

Address of the Venus Comptroller (same for all clones)

contract IComptroller COMPTROLLER

Address of the authorized RelativePositionManager contract (same for all clones)

address RELATIVE_POSITION_MANAGER

Address of the LeverageStrategiesManager contract (same for all clones)

address LEVERAGE_MANAGER

Address of the position account owner (different for each clone)

address owner

Address of the long vToken for this position

address longVToken

Address of the short vToken for this position

address shortVToken

Constructor for the PositionAccount implementation contract

constructor(contract IComptroller comptroller_, address relativePositionManager_, address leverageManager_) public
NameTypeDescription
comptroller_contract IComptrollerThe Venus comptroller contract address
relativePositionManager_addressAddress of the RelativePositionManager contract
leverageManager_addressAddress of the LeverageStrategiesManager contract
  • ZeroAddress if any of the addresses is zero.

Initializes a new position account clone

function initialize(address owner_, address longVToken_, address shortVToken_) external
NameTypeDescription
owner_addressAddress of the position account owner
longVToken_addressAddress of the long market vToken
shortVToken_addressAddress of the short market vToken
  • ZeroAddress if any of the addresses is zero.

Forwards enterLeverage to the LeverageStrategiesManager on behalf of this position account

function enterLeverage(contract IVToken collateralMarket, uint256 collateralAmountSeed, contract IVToken borrowedMarket, uint256 borrowedAmountToFlashLoan, uint256 minAmountOutAfterSwap, bytes swapData) external
NameTypeDescription
collateralMarketcontract IVTokenCollateral (e.g. long) vToken to supply after swap
collateralAmountSeeduint256Optional seed amount of collateral (RPM uses 0)
borrowedMarketcontract IVTokenBorrowed (e.g. short) vToken to flash-borrow
borrowedAmountToFlashLoanuint256Amount to borrow via flash loan
minAmountOutAfterSwapuint256Minimum collateral out after swap (slippage protection)
swapDatabytesSwap calldata (e.g. borrowed → collateral)
  • UnauthorizedCaller if caller is not the RelativePositionManager.

Forwards exitLeverage to the LeverageStrategiesManager on behalf of this position account

function exitLeverage(contract IVToken collateralMarket, uint256 collateralAmountToRedeemForSwap, contract IVToken borrowedMarket, uint256 borrowedAmountToFlashLoan, uint256 minAmountOutAfterSwap, bytes swapData) external
NameTypeDescription
collateralMarketcontract IVTokenCollateral (e.g. long) vToken to redeem
collateralAmountToRedeemForSwapuint256Amount of collateral to redeem for swap
borrowedMarketcontract IVTokenBorrowed (e.g. short) vToken to repay
borrowedAmountToFlashLoanuint256Amount to repay via flash loan
minAmountOutAfterSwapuint256Minimum amount out after swap (slippage protection)
swapDatabytesSwap calldata (e.g. collateral → borrowed)
  • UnauthorizedCaller if caller is not the RelativePositionManager.

Forwards exitSingleAssetLeverage to the LeverageStrategiesManager on behalf of this position account

function exitSingleAssetLeverage(contract IVToken collateralMarket, uint256 collateralAmountToFlashLoan) external
NameTypeDescription
collateralMarketcontract IVTokenvToken market for both collateral and debt
collateralAmountToFlashLoanuint256Amount to borrow via flash loan for debt repayment
  • UnauthorizedCaller if caller is not the RelativePositionManager.

Exits a market by calling comptroller.exitMarket with this position account as the sender

function exitMarket(address vTokenToExit) external
NameTypeDescription
vTokenToExitaddressAddress of the vToken market to exit
  • UnauthorizedCaller if caller is not the RelativePositionManager.
  • ExitMarketFailed if the exit market operation fails.

Transfers full balance of an ERC20 token from this position account to its owner (dust recovery)

function transferDustToOwner(address token) external
NameTypeDescription
tokenaddressAddress of the ERC20 token to transfer
  • UnauthorizedCaller if caller is not the RelativePositionManager.

Executes multiple generic calls to external contracts. Direct callers are restricted to RelativePositionManager, but the manager exposes the ACM-gated executePositionAccountCall administrative path described above.

function genericCalls(address[] targets, bytes[] data) external
NameTypeDescription
targetsaddress[]Array of target contract addresses
databytes[]Array of encoded function call data

Each target call executes from the PositionAccount and can therefore act on its token balances, approvals, and protocol permissions. Review the live ACM grantee for executePositionAccountCall(address,address[],bytes[]); onlyRelativePositionManager does not make this path owner-only.

  • UnauthorizedCaller if caller is not the RelativePositionManager.
  • InvalidCallsLength if arrays are empty or lengths mismatch.