Update LP contracts and add the farm page#24
Conversation
boyuan-chen
commented
May 27, 2021
- Farm page

Codecov Report
@@ Coverage Diff @@
## develop #24 +/- ##
============================================
- Coverage 82.21% 71.92% -10.30%
============================================
Files 48 49 +1
Lines 1895 1934 +39
Branches 303 311 +8
============================================
- Hits 1558 1391 -167
- Misses 337 543 +206
Continue to review full report at Codecov.
|
InoMurko
left a comment
There was a problem hiding this comment.
There's a lot of code but can we add some tests + CI testing?
packages/omgx/wallet/contracts/LP/interfaces/iL2LiquidityPool.sol
Outdated
Show resolved
Hide resolved
souradeep-das
left a comment
There was a problem hiding this comment.
Please apply the comments in consideration to both the pools
Just pouring in some other thoughts-
We are collecting fees and distributing them as rewards on the opposite side of where liquidity is necessary. Is this a problem?
Eventually, we might expect L2->L1 swap offs much more in number than swap-ons, If the rewards for exits are distributed to the L2 pool providers, there’s not much incentive to supply to L1 (but the L1 liquidity is again what the fast exits would need)
| mapping(address => mapping(address => UserInfo)) public userInfo; | ||
|
|
||
| address L1LiquidityPoolAddress; | ||
| uint256 public totalFeeRate; |
There was a problem hiding this comment.
This is probably unused. consider removing it
| onlyOwner() | ||
| { | ||
| // use with caution, can register only once | ||
| PoolInfo storage pool = poolInfo[_l2TokenAddress]; |
There was a problem hiding this comment.
can directly compare
require(poolInfo[_l2TokenAddress].l2TokenAddress == address(0), "Token Address Already Registerd");
| accUserRewardPerShare: 0, | ||
| accOwnerReward: 0, | ||
| latestUserRewardPerShare: 0, | ||
| startTime: block.timestamp |
There was a problem hiding this comment.
latestUserRewardPerShare and startTime are probably unused
There was a problem hiding this comment.
startTime is used to calculate the APR. latestUserRewardPerShare was removed.
|
|
||
| The information generated during the deploy (e.g the `/deployment/local/addresses.json`) is used by the web wallet to set things up correctly. **The full test suite includes some very slow transactions such as withdrawals, which can take 100 seconds to complete. Please be patient.** | ||
|
|
||
| ### Running tests with the customized Messenger |
There was a problem hiding this comment.
do we want the alt_messenger stuff to be on a different branch or do we want to keep this?
packages/omgx/wallet/contracts/LP/interfaces/iL2LiquidityPool.sol
Outdated
Show resolved
Hide resolved
Add docker file for the alt_messenger and update LP contracts
|
PR was applied manually |