Solidity API
IInternalStateOrchestrator
Interface for the internal state orchestrator
InternalUpkeepPhase
Upkeep phase
enum InternalUpkeepPhase {
Idle,
PreprocessingTransparentVaults,
PreprocessingEncryptedVaults,
ProcessingDecryptedValues,
Buffering,
PostprocessingTransparentVaults,
PostprocessingEncryptedVaults,
BuildingOrders
}
epochDuration
function epochDuration() external view returns (uint32)
Returns the epoch duration
Return Values
Name | Type | Description |
---|---|---|
[0] | uint32 | The epoch duration in seconds |
currentPhase
function currentPhase() external view returns (enum IInternalStateOrchestrator.InternalUpkeepPhase)
Returns the current upkeep phase
Return Values
Name | Type | Description |
---|---|---|
[0] | enum IInternalStateOrchestrator.InternalUpkeepPhase | The current InternalUpkeepPhase |
epochCounter
function epochCounter() external view returns (uint16)
Returns the current epoch counter
Return Values
Name | Type | Description |
---|---|---|
[0] | uint16 | The current epoch |
updateAutomationRegistry
function updateAutomationRegistry(address newAutomationRegistry) external
Updates the Chainlink Automation Registry address
Parameters
Name | Type | Description |
---|---|---|
newAutomationRegistry | address | The new automation registry address |
updateEpochDuration
function updateEpochDuration(uint32 newEpochDuration) external
Updates the epoch duration
Parameters
Name | Type | Description |
---|---|---|
newEpochDuration | uint32 | The new epoch duration in seconds |
updateMinibatchSizes
function updateMinibatchSizes(uint8 _transparentMinibatchSize, uint8 _encryptedMinibatchSize) external
Updates the minibatch sizes
Parameters
Name | Type | Description |
---|---|---|
_transparentMinibatchSize | uint8 | The new transparent minibatch size |
_encryptedMinibatchSize | uint8 | The new encrypted minibatch size |
updateProtocolFees
function updateProtocolFees(uint16 _vFeeCoefficient, uint16 _rsFeeCoefficient) external
Updates the protocol fees
Parameters
Name | Type | Description |
---|---|---|
_vFeeCoefficient | uint16 | The new volume fee coefficient |
_rsFeeCoefficient | uint16 | The new revenue share fee coefficient |
pendingProtocolFees
function pendingProtocolFees() external view returns (uint256)
Returns the pending protocol fees
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The pending protocol fees |
subtractPendingProtocolFees
function subtractPendingProtocolFees(uint256 amount) external
Subtracts a specified amount from the pending protocol fees
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The amount to subtract from pending protocol fees |
callbackPreProcessDecrypt
function callbackPreProcessDecrypt(uint256 requestID, bytes cleartexts, bytes decryptionProof) external
Callback function to decrypt the encrypted values
Parameters
Name | Type | Description |
---|---|---|
requestID | uint256 | The request ID |
cleartexts | bytes | The cleartexts |
decryptionProof | bytes | The decryption proof |
getOrders
function getOrders() external view returns (address[] sellingTokens, uint256[] sellingAmounts, address[] buyingTokens, uint256[] buyingAmounts, uint256[] sellingEstimatedUnderlyingAmounts, uint256[] buyingEstimatedUnderlyingAmounts)
Get selling and buying orders
Return Values
Name | Type | Description |
---|---|---|
sellingTokens | address[] | The tokens to sell |
sellingAmounts | uint256[] | The amounts to sell in shares |
buyingTokens | address[] | The tokens to buy |
buyingAmounts | uint256[] | The amounts to buy in underlying assets |
sellingEstimatedUnderlyingAmounts | uint256[] | The estimated underlying amounts to sell |
buyingEstimatedUnderlyingAmounts | uint256[] | The estimated underlying amounts to buy |
getPriceOf
function getPriceOf(address token) external view returns (uint256 price)
Get price for a specific token
Parameters
Name | Type | Description |
---|---|---|
token | address | The token to get the price of |
Return Values
Name | Type | Description |
---|---|---|
price | uint256 | The corresponding price [shares/assets] |
updateBufferAmount
function updateBufferAmount(int256 deltaAmount) external
Updates the buffer amount based on execution vs estimated amounts
Can only be called by the Liquidity Orchestrator
Parameters
Name | Type | Description |
---|---|---|
deltaAmount | int256 | The amount to add/subtract from the buffer (can be negative) |
getVaultTotalAssetsForFulfillRedeem
function getVaultTotalAssetsForFulfillRedeem(address vault) external view returns (uint256 totalAssets)
Get total assets for fulfill redeem for a specific vault
Parameters
Name | Type | Description |
---|---|---|
vault | address | The vault address |
Return Values
Name | Type | Description |
---|---|---|
totalAssets | uint256 | The total assets for fulfill redeem |