UNPKG

@ohgeez/fsushi

Version:

fSUSHI is a protocol built on top of [FlashStake](http://flashstake.io/) and [SushiSwap](https://sushi.com) that enables stakers to get instant, upfront yield without waiting for it to accrue.

388 lines (182 loc) 4.49 kB
# IFlashStrategySushiSwap ## Methods ### burnFToken ```solidity function burnFToken(uint256 _tokenAmount, uint256 _minimumReturned, address _yieldTo) external nonpayable returns (uint256) ``` #### Parameters | Name | Type | Description | |---|---|---| | _tokenAmount | uint256 | undefined | | _minimumReturned | uint256 | undefined | | _yieldTo | address | undefined | #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### depositPrincipal ```solidity function depositPrincipal(uint256 _tokenAmount) external nonpayable returns (uint256) ``` #### Parameters | Name | Type | Description | |---|---|---| | _tokenAmount | uint256 | undefined | #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### fToken ```solidity function fToken() external view returns (address) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | address | undefined | ### factory ```solidity function factory() external view returns (address) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | address | undefined | ### flashProtocol ```solidity function flashProtocol() external view returns (address) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | address | undefined | ### flpToken ```solidity function flpToken() external view returns (address) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | address | undefined | ### getMaxStakeDuration ```solidity function getMaxStakeDuration() external view returns (uint256) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### getPrincipalAddress ```solidity function getPrincipalAddress() external view returns (address) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | address | undefined | ### getPrincipalBalance ```solidity function getPrincipalBalance() external view returns (uint256) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### getYieldBalance ```solidity function getYieldBalance() external view returns (uint256) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### initialize ```solidity function initialize(address _flashProtocol, address _flpToken) external nonpayable ``` #### Parameters | Name | Type | Description | |---|---|---| | _flashProtocol | address | undefined | | _flpToken | address | undefined | ### quoteBurnFToken ```solidity function quoteBurnFToken(uint256 _tokenAmount) external view returns (uint256) ``` #### Parameters | Name | Type | Description | |---|---|---| | _tokenAmount | uint256 | undefined | #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### quoteMintFToken ```solidity function quoteMintFToken(uint256 _tokenAmount, uint256 duration) external view returns (uint256) ``` #### Parameters | Name | Type | Description | |---|---|---| | _tokenAmount | uint256 | undefined | | duration | uint256 | undefined | #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### setFTokenAddress ```solidity function setFTokenAddress(address _fTokenAddress) external nonpayable ``` #### Parameters | Name | Type | Description | |---|---|---| | _fTokenAddress | address | undefined | ### sushi ```solidity function sushi() external view returns (address) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | address | undefined | ### withdrawPrincipal ```solidity function withdrawPrincipal(uint256 _tokenAmount) external nonpayable ``` #### Parameters | Name | Type | Description | |---|---|---| | _tokenAmount | uint256 | undefined | ## Events ### BurnedFToken ```solidity event BurnedFToken(address indexed _address, uint256 _tokenAmount, uint256 _yieldReturned) ``` #### Parameters | Name | Type | Description | |---|---|---| | _address `indexed` | address | undefined | | _tokenAmount | uint256 | undefined | | _yieldReturned | uint256 | undefined | ## Errors ### AmountTooLow ```solidity error AmountTooLow() ``` ### Forbidden ```solidity error Forbidden() ``` ### InsufficientTotalSupply ```solidity error InsufficientTotalSupply() ``` ### InsufficientYield ```solidity error InsufficientYield() ``` ### InvalidVault ```solidity error InvalidVault() ```