Methods
Last updated
Last updated
This function will be called whenever a user stakes via the Flashstake Protocol. The Time Vault owner can choose to implement a fee but the resulting “locked” principal the user should expect after the stake has ended must be returned.
This function should be protected such that only the Flashstake Protocol can execute this. This is to ensure users do not accidentally call this function and lose their funds.
This function should withdraw principal from the underlying strategy (eg AAVE).
This is the function the user will be calling when performing a . It is responsible for burning the fToken supplied by the user and returning yield to the user.
This must return the current total of all principal accepted by the contract.
This function must report the total yield balance.
This must return the principal token address (eg DAI).
This function will be called by the Flash Protocol (and frontends) to determine how many fTokens should be minted for a given _tokenAmount and _duration (in seconds).
This function must return the yield a user should expect when burning _tokenAmount fTokens.
The function to set the fERC20 address within the strategy.
Note
This function should be protected such that only the Flash Protocol can execute this.
This function must report the maximum duration a user can stake for. This can either be hardcoded or be a function of on-chain metrics.