Open
Conversation
aaronovz1
reviewed
Jan 18, 2021
| contract TruefiAdapter is IVampireAdapter { | ||
| IDrainController constant drainController = IDrainController(0x2e813f2e524dB699d279E631B0F2117856eb902C); | ||
| ITrueFarm constant trueFarm = ITrueFarm(0xED45Cf4895C110f464cE857eBE5f270949eC2ff4); | ||
| IUniswapV2Router02 constant router = IUniswapV2Router02(0x1d5C6F1607A171Ad52EFB270121331b3039dD83e); |
There was a problem hiding this comment.
Looks like the wrong address being used. This is the LuaSwap router not Uniswap.
| } | ||
|
|
||
| function poolCount() external view override returns (uint256) { | ||
| return trueFarm.totalStaked(); |
There was a problem hiding this comment.
This function should return the number of pools, not the amount staked. Looking at TrueFi website (https://app.truefi.io/farm). There should be 3 pools we can support.
| // Victim actions, requires impersonation via delegatecall | ||
| function sellRewardForWeth(address, uint256 rewardAmount, address to) external override returns(uint256) { | ||
| require(drainController.priceIsUnderRejectionTreshold(), "Possible price manipulation, drain rejected"); | ||
| address[] memory path = new address[](2); |
There was a problem hiding this comment.
I don't think there is any reason to use router here. Probably cheaper to swap using the UniswapV2Pair interface. You can see examples in other adapters.
|
|
||
| contract TruefiAdapter is IVampireAdapter { | ||
| IDrainController constant drainController = IDrainController(0x2e813f2e524dB699d279E631B0F2117856eb902C); | ||
| ITrueFarm constant trueFarm = ITrueFarm(0xED45Cf4895C110f464cE857eBE5f270949eC2ff4); |
There was a problem hiding this comment.
This is only represents the UNI LP farm. We should aim to support all 3 farms on TrueFi.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.