File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/ethereum-contracts/contracts/superfluid Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ contract AaveYieldBackend is IYieldBackend {
100100 (uint256 normalizedTotalSupply ,) = ISuperToken (address (this )).toUnderlyingAmount (totalSupply);
101101 // decrement by 100 in order to give ample of margin for offsetting Aave's potential rounding error
102102 // If there's no surplus, this will simply revert due to arithmetic underflow.
103- uint256 surplusAmount = A_TOKEN.balanceOf (address (this )) - normalizedTotalSupply - 100 ;
103+ uint256 surplusAmount = A_TOKEN.balanceOf (address (this )) + ASSET_TOKEN.balanceOf (address (this ))
104+ - normalizedTotalSupply - 100 ;
104105 AAVE_POOL.withdraw (address (ASSET_TOKEN), surplusAmount, SURPLUS_RECEIVER);
105106 }
106107
You can’t perform that action at this time.
0 commit comments