Skip to content

Commit

Permalink
quick gamma yield deposit + withdrawal for redemptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Nov 28, 2024
1 parent 9f5051d commit bcf0403
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions contracts/SmartVaultYieldManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,16 @@ contract SmartVaultYieldManager is ISmartVaultYieldManager, Ownable {
emit Withdraw(msg.sender, _token, _hypervisor, _withdrawn);
}

function quickDeposit(address _hypervisor, address _collateralToken, uint256 _deposit) external {
IERC20(_collateralToken).safeTransferFrom(msg.sender, address(this), _deposit);
HypervisorData memory _hypervisorData = hypervisorData[_collateralToken];
_otherDeposit(_collateralToken, _hypervisorData);
}

function quickWithdraw(address _hypervisor, address _token) external returns (uint256 _withdrawn) {

}

function addHypervisorData(
address _collateralToken,
address _hypervisor,
Expand Down
4 changes: 3 additions & 1 deletion contracts/interfaces/ISmartVaultYieldManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ interface ISmartVaultYieldManager {
function deposit(address _collateralToken, uint256 _usdPercentage)
external
returns (address vault0, address vault1);
function withdraw(address _vault, address _token) external;
function withdraw(address _hypervisor, address _token) external;
function quickDeposit(address _hypervisor, address _token, uint256 _deposit) external;
function quickWithdraw(address _hypervisor, address _token) external returns (uint256 _withdrawn);
}

0 comments on commit bcf0403

Please sign in to comment.