IDelayedFeeCalculator
Last updated
Last updated
Interface for a contract that calculates fee inputs for a single-depositor vault
Submit a new snapshot for fee calculation
function submitSnapshot(address vault, uint160 averageValue, uint128 highestProfit, uint32 timestamp) external;
Parameters
vault
address
The address of the vault
averageValue
uint160
The average value during the period since last snapshot to this snapshot timestamp
highestProfit
uint128
The highest profit achieved up to the snapshot timestamp
timestamp
uint32
The timestamp of the snapshot
Process fee accrual for a vault
function accrueFees(address vault) external returns (uint256 tvlFeesEarned, uint256 performanceFeesEarned);
Parameters
vault
address
The address of the vault
Returns
tvlFeesEarned
uint256
The earned TVL fees for the vault and the protocol
performanceFeesEarned
uint256
The earned performance fees for the vault and the protocol
The fee state of a vault
function vaultFeeState(address vault) external view returns (VaultSnapshot memory, VaultAccruals memory);
Parameters
vault
address
The address of the vault
Returns
<none>
VaultSnapshot
vaultSnapshotFeeState The snapshot fee state of the vault
<none>
VaultAccruals
baseVaultFeeState The base fee state of the vault
Emitted when a new snapshot of fee inputs is submitted for a vault
highestProfit is equivalent to a high water mark but could be applicable to a subset of the vault
event SnapshotSubmitted(address indexed vault, uint160 averageValue, uint128 highestProfit, uint32 timestamp);
Parameters
vault
address
The vault address
averageValue
uint160
The average value of the vault during the period since last snapshot
highestProfit
uint128
The highest profit achieved during the period since last snapshot
timestamp
uint32
The timestamp of the snapshot
Thrown when a snapshot's timestamp is older than the last fee accrual
error Aera__SnapshotTooOld();
Thrown when a snapshot's timestamp is in the future
error Aera__SnapshotInFuture();
Thrown when attempting to accrue fees with a highest profit that is less than the last highest profit
error Aera__HighestProfitDecreased();
Thrown when the dispute period is greater than the maximum allowed
error Aera__DisputePeriodTooLong();