Skip to content
This repository was archived by the owner on Dec 5, 2021. It is now read-only.

Update LP contracts and add the farm page#24

Closed
boyuan-chen wants to merge 13 commits intodevelopfrom
lp-amm
Closed

Update LP contracts and add the farm page#24
boyuan-chen wants to merge 13 commits intodevelopfrom
lp-amm

Conversation

@boyuan-chen
Copy link
Copy Markdown

  • Farm page
    image

@boyuan-chen boyuan-chen requested review from CAPtheorem, InoMurko, jliphard, kevsul and souradeep-das and removed request for jliphard May 27, 2021 19:45
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 27, 2021

Codecov Report

Merging #24 (d365fe4) into develop (b51875c) will decrease coverage by 10.29%.
The diff coverage is n/a.

❗ Current head d365fe4 differs from pull request most recent head 28ca65d. Consider uploading reports for the commit 28ca65d to get more accurate results
Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
...dge/messaging/OVM_L1CustomCrossDomainMessenger.sol 0.00% <ø> (ø)
...ic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol 0.00% <0.00%> (-100.00%) ⬇️
...-ethereum/OVM/bridge/tokens/OVM_L1ERC20Gateway.sol 0.00% <0.00%> (-100.00%) ⬇️
...m/libraries/resolver/Lib_ResolvedDelegateProxy.sol 0.00% <0.00%> (-100.00%) ⬇️
...OVM/bridge/messaging/OVM_L1MultiMessageRelayer.sol 0.00% <0.00%> (-100.00%) ⬇️
...VM/bridge/messaging/OVM_L2CrossDomainMessenger.sol 0.00% <0.00%> (-100.00%) ⬇️
...VM/bridge/messaging/OVM_L1CrossDomainMessenger.sol 0.00% <0.00%> (-98.12%) ⬇️
...-ethereum/OVM/bridge/tokens/Abs_L1TokenGateway.sol 0.00% <0.00%> (-80.00%) ⬇️
.../bridge/messaging/Abs_BaseCrossDomainMessenger.sol 0.00% <0.00%> (-78.58%) ⬇️
...ic-ethereum/libraries/standards/UniswapV2ERC20.sol 35.13% <0.00%> (-48.65%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c96fcb...28ca65d. Read the comment docs.

Copy link
Copy Markdown

@InoMurko InoMurko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of code but can we add some tests + CI testing?

Copy link
Copy Markdown

@souradeep-das souradeep-das left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably unused. consider removing it

onlyOwner()
{
// use with caution, can register only once
PoolInfo storage pool = poolInfo[_l2TokenAddress];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can directly compare

require(poolInfo[_l2TokenAddress].l2TokenAddress == address(0), "Token Address Already Registerd");

accUserRewardPerShare: 0,
accOwnerReward: 0,
latestUserRewardPerShare: 0,
startTime: block.timestamp
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latestUserRewardPerShare and startTime are probably unused

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want the alt_messenger stuff to be on a different branch or do we want to keep this?

@CAPtheorem
Copy link
Copy Markdown

PR was applied manually

@CAPtheorem CAPtheorem closed this May 30, 2021
@boyuan-chen boyuan-chen deleted the lp-amm branch June 7, 2021 18:55
InoMurko pushed a commit that referenced this pull request Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants