Developers Documentation
  • Overview
    • Contracts Overview
    • Public Repositories
    • Smart Contract Addresses
      • Polygon PoS
  • Core protocol
    • Architecture Overview
    • Blocks
    • Vault Strategy
    • Vault Configuration
    • Vault Deployment
    • Vault Operations
    • Access Manager
    • Contracts
      • StrategVault
      • StrategERC3525
      • StrategVaultFactory
      • StrategAssetBuffer
      • StrategBlockRegistry
      • StrategUserInteractions
      • StrategOperatorProxy
      • StrategOperatorDataAggregator
  • Borrow module
    • Architecture Overview
    • Aave V3 Position manager
    • Smart Contract Docs
      • StrategPositionManagerFactory
      • StrategAaveV3PositionManager
      • StrategAaveV3PositionManagerInfo
  • Portal Module
    • Architecture Overview
    • Swap
      • Features
      • Functions
    • Oracle
      • Architecture design
      • Functions
  • Tools
    • Developer kit
Powered by GitBook
On this page
  • Methods
  • addressProvider
  • authority
  • initialize
  • isConsumingScheduledOp
  • lockVaults
  • lockedVault
  • oracleUpdateOperation
  • positionManagerOperation
  • setAuthority
  • unlockVaults
  • userWithdrawalRebalancedNonce
  • vaultHarvest
  • vaultRebalance
  • vaultStopStrategy
  • vaultWithdrawalRebalance
  • withdraw
  • Events
  • AuthorityUpdated
  • Initialized
  • PositionManagerRebalanced
  • VaultLocked
  • VaultStrategyHarvested
  • VaultStrategyRebalanced
  • VaultStrategyStopped
  • VaultStrategyWithdrawalRebalanced
  • VaultUnlocked
  • Errors
  • AccessManagedInvalidAuthority
  • AccessManagedRequiredDelay
  • AccessManagedUnauthorized
  • AddressEmptyCode
  • AddressInsufficientBalance
  • DeadlineExceeded
  • ECDSAInvalidSignature
  • ECDSAInvalidSignatureLength
  • ECDSAInvalidSignatureS
  • FailedInnerCall
  • InvalidInitialization
  • NotInitializing
  • OnlyUserInteraction
  • PortalExecutionFailed
  • PositionManagerOperationReverted
  • SOPTAllowanceNotSufficient
  • SafeERC20FailedOperation
  • VaultIsLocked
  • VaultRebalanceReverted
  1. Core protocol
  2. Contracts

StrategOperatorProxy

This contract serves as a proxy for executing operations on strategy vaults. It requires the OPERATOR_ROLE to perform the operations.

Methods

addressProvider

function addressProvider() external view returns (contract IStrategAddressesProvider)

Mapping of vault addresses to their locked status.

Returns

Name
Type
Description

_0

contract IStrategAddressesProvider

undefined

authority

function authority() external view returns (address)

Returns the current authority.

Returns

Name
Type
Description

_0

address

undefined

initialize

function initialize(address _authority, address _addressProvider) external nonpayable

Initializes the contract by granting the DEFAULT_ADMIN_ROLE to the treasury address.

Parameters

Name
Type
Description

_authority

address

The address of the access manager.

_addressProvider

address

undefined

isConsumingScheduledOp

function isConsumingScheduledOp() external view returns (bytes4)

Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.

Returns

Name
Type
Description

_0

bytes4

undefined

lockVaults

function lockVaults(address[] _vaults) external nonpayable

Locks the specified vaults, preventing any operations on them.

Parameters

Name
Type
Description

_vaults

address[]

Array of vault addresses to be locked.

lockedVault

function lockedVault(address) external view returns (bool)

Mapping of vault addresses to their locked status.

Parameters

Name
Type
Description

_0

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

oracleUpdateOperation

function oracleUpdateOperation(address[] _addresses, uint256[] _prices) external nonpayable

Executes price updates on portal oracle.

Parameters

Name
Type
Description

_addresses

address[]

Addresses of tokens.

_prices

uint256[]

related prices

positionManagerOperation

function positionManagerOperation(address _positionManager, address _payer, uint256 _gasCost, bytes _payload) external nonpayable

Executes the rebalance function on the position manager.

Parameters

Name
Type
Description

_positionManager

address

Address of the position manager.

_payer

address

payer for operation cost

_gasCost

uint256

gas cost to pay for operation

_payload

bytes

Array of dynamic parameter indexes for exiting positions.

setAuthority

function setAuthority(address newAuthority) external nonpayable

Transfers control to a new authority. The caller must be the current authority.

Parameters

Name
Type
Description

newAuthority

address

undefined

unlockVaults

function unlockVaults(address[] _vaults) external nonpayable

Unlocks the specified vaults, allowing operations on them.

Parameters

Name
Type
Description

_vaults

address[]

Array of vault addresses to be unlocked.

userWithdrawalRebalancedNonce

function userWithdrawalRebalancedNonce(address) external view returns (uint256)

Mapping of addresses to their respective withdrawal rebalance nonce.

Parameters

Name
Type
Description

_0

address

undefined

Returns

Name
Type
Description

_0

uint256

undefined

vaultHarvest

function vaultHarvest(address _vault, address _payer, uint256 _gasCost, uint256[] _dynParamsIndex, bytes[] _dynParams, bytes _portalPayload) external nonpayable

Executes the harvest function on the strategy vault.

Parameters

Name
Type
Description

_vault

address

Address of the strategy vault.

_payer

address

payer for operation cost

_gasCost

uint256

gas cost to pay for operation

_dynParamsIndex

uint256[]

Array of dynamic parameter indexes.

_dynParams

bytes[]

Array of dynamic parameters.

_portalPayload

bytes

undefined

vaultRebalance

function vaultRebalance(address _vault, address _payer, uint256 _gasCost, uint256[] _dynParamsIndexEnter, bytes[] _dynParamsEnter, uint256[] _dynParamsIndexExit, bytes[] _dynParamsExit) external nonpayable

Executes the rebalance function on the strategy vault.

Parameters

Name
Type
Description

_vault

address

Address of the strategy vault.

_payer

address

payer for operation cost

_gasCost

uint256

gas cost to pay for operation

_dynParamsIndexEnter

uint256[]

Array of dynamic parameter indexes for entering positions.

_dynParamsEnter

bytes[]

Array of dynamic parameters for entering positions.

_dynParamsIndexExit

uint256[]

Array of dynamic parameter indexes for exiting positions.

_dynParamsExit

bytes[]

Array of dynamic parameters for exiting positions.

vaultStopStrategy

function vaultStopStrategy(address _vault, address _payer, uint256 _gasCost, uint256[] _dynParamsIndex, bytes[] _dynParams) external nonpayable

Executes the harvest function on the strategy vault.

Parameters

Name
Type
Description

_vault

address

Address of the strategy vault.

_payer

address

payer for operation cost

_gasCost

uint256

gas cost to pay for operation

_dynParamsIndex

uint256[]

Array of dynamic parameter indexes.

_dynParams

bytes[]

Array of dynamic parameters.

vaultWithdrawalRebalance

function vaultWithdrawalRebalance(address _user, address _vault, uint256 _deadline, uint256 _amount, bytes _signature, bytes _portalPayload, bytes _permitParams, uint256[] _dynParamsIndexExit, bytes[] _dynParamsExit) external payable returns (uint256 returnedAssets)

Executes the withdrawalRebalance function on the strategy vault.

Parameters

Name
Type
Description

_user

address

undefined

_vault

address

Address of the strategy vault.

_deadline

uint256

undefined

_amount

uint256

Amount to be withdrawn.

_signature

bytes

Needed if vault need

_portalPayload

bytes

Parameters for executing a swap with returned assets.

_permitParams

bytes

Parameters for executing a permit (optional).

_dynParamsIndexExit

uint256[]

Array of dynamic parameter indexes for exiting positions.

_dynParamsExit

bytes[]

Array of dynamic parameters for exiting positions.

Returns

Name
Type
Description

returnedAssets

uint256

undefined

withdraw

function withdraw(address[] _tokens) external nonpayable

Withdraws fees from the contract and transfers them to the caller.

Parameters

Name
Type
Description

_tokens

address[]

Array of token addresses to withdraw fees from.

Events

AuthorityUpdated

event AuthorityUpdated(address authority)

Authority that manages this contract was updated.

Parameters

Name
Type
Description

authority

address

undefined

Initialized

event Initialized(uint64 version)

Triggered when the contract has been initialized or reinitialized.

Parameters

Name
Type
Description

version

uint64

undefined

PositionManagerRebalanced

event PositionManagerRebalanced(address indexed positionManager, address payer, uint256 gasCost)

Emitted when a position manager is rebalanced.

Parameters

Name
Type
Description

positionManager indexed

address

Address of the position manager that was rebalanced.

payer

address

Address of the payer for the operation cost.

gasCost

uint256

Amount of gas cost paid for the operation.

VaultLocked

event VaultLocked(address indexed vault)

Emitted when a vault is locked.

Parameters

Name
Type
Description

vault indexed

address

Address of the vault that was locked.

VaultStrategyHarvested

event VaultStrategyHarvested(address indexed vault, address payer, uint256 gasCost)

Emitted when a strategy on a vault is harvested.

Parameters

Name
Type
Description

vault indexed

address

Address of the vault where the strategy was harvested.

payer

address

Address of the payer for the operation cost.

gasCost

uint256

Amount of gas cost paid for the operation.

VaultStrategyRebalanced

event VaultStrategyRebalanced(address indexed vault, address payer, uint256 gasCost)

Emitted when a strategy on a vault is rebalanced.

Parameters

Name
Type
Description

vault indexed

address

Address of the vault where the strategy was rebalanced.

payer

address

Address of the payer for the operation cost.

gasCost

uint256

Amount of gas cost paid for the operation.

VaultStrategyStopped

event VaultStrategyStopped(address indexed vault, address payer, uint256 gasCost)

Emitted when a strategy on a vault is stopped.

Parameters

Name
Type
Description

vault indexed

address

Address of the vault where the strategy was stopped.

payer

address

Address of the payer for the operation cost.

gasCost

uint256

Amount of gas cost paid for the operation.

VaultStrategyWithdrawalRebalanced

event VaultStrategyWithdrawalRebalanced(address indexed vault)

Emitted when a withdrawal rebalance is performed on a vault.

Parameters

Name
Type
Description

vault indexed

address

Address of the vault where the withdrawal rebalance was performed.

VaultUnlocked

event VaultUnlocked(address indexed vault)

Emitted when a vault is unlocked.

Parameters

Name
Type
Description

vault indexed

address

Address of the vault that was unlocked.

Errors

AccessManagedInvalidAuthority

error AccessManagedInvalidAuthority(address authority)

Parameters

Name
Type
Description

authority

address

undefined

AccessManagedRequiredDelay

error AccessManagedRequiredDelay(address caller, uint32 delay)

Parameters

Name
Type
Description

caller

address

undefined

delay

uint32

undefined

AccessManagedUnauthorized

error AccessManagedUnauthorized(address caller)

Parameters

Name
Type
Description

caller

address

undefined

AddressEmptyCode

error AddressEmptyCode(address target)

There's no code at target (it is not a contract).

Parameters

Name
Type
Description

target

address

undefined

AddressInsufficientBalance

error AddressInsufficientBalance(address account)

The ETH balance of the account is not enough to perform the operation.

Parameters

Name
Type
Description

account

address

undefined

DeadlineExceeded

error DeadlineExceeded()

Error for when an operation exceeds the specified deadline.

ECDSAInvalidSignature

error ECDSAInvalidSignature()

The signature derives the address(0).

ECDSAInvalidSignatureLength

error ECDSAInvalidSignatureLength(uint256 length)

The signature has an invalid length.

Parameters

Name
Type
Description

length

uint256

undefined

ECDSAInvalidSignatureS

error ECDSAInvalidSignatureS(bytes32 s)

The signature has an S value that is in the upper half order.

Parameters

Name
Type
Description

s

bytes32

undefined

FailedInnerCall

error FailedInnerCall()

A call to an address target failed. The target may have reverted.

InvalidInitialization

error InvalidInitialization()

The contract is already initialized.

NotInitializing

error NotInitializing()

The contract is not initializing.

OnlyUserInteraction

error OnlyUserInteraction()

Error for when an operation is restricted to user interactions only.

PortalExecutionFailed

error PortalExecutionFailed(bytes data)

Error for when portal execution fails.

Parameters

Name
Type
Description

data

bytes

Additional data about the failed execution.

PositionManagerOperationReverted

error PositionManagerOperationReverted(bytes data)

Error for when a position manager operation is reverted.

Parameters

Name
Type
Description

data

bytes

Additional data about the reverted call.

SOPTAllowanceNotSufficient

error SOPTAllowanceNotSufficient()

Error for when the SOPT allowance is not sufficient for an operation.

SafeERC20FailedOperation

error SafeERC20FailedOperation(address token)

An operation with an ERC20 token failed.

Parameters

Name
Type
Description

token

address

undefined

VaultIsLocked

error VaultIsLocked()

Error for when an operation is attempted on a locked vault.

VaultRebalanceReverted

error VaultRebalanceReverted(bytes data)

Error for when a vault rebalance operation is reverted.

Parameters

Name
Type
Description

data

bytes

Additional data about the reverted call.

PreviousStrategUserInteractionsNextStrategOperatorDataAggregator

Last updated 1 year ago