Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-2100]: Feat timestamp based contracts #324

Merged
merged 31 commits into from
Apr 25, 2024
Merged

[VEN-2100]: Feat timestamp based contracts #324

merged 31 commits into from
Apr 25, 2024

Conversation

Debugger022
Copy link
Collaborator

Description

Resolves #VEN-2100
This PR contains contracts based on Timestamp changes

Checklist

  • I have updated the documentation to account for the changes in the code.
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a test preventing this bug from silently reappearing again.
  • My contribution follows Venus contribution guidelines.

@Debugger022 Debugger022 marked this pull request as ready for review November 21, 2023 10:35
contracts/JumpRateModelV2.sol Outdated Show resolved Hide resolved
contracts/Lens/PoolLens.sol Outdated Show resolved Hide resolved
contracts/Shortfall/Shortfall.sol Outdated Show resolved Hide resolved
contracts/lib/constants.sol Outdated Show resolved Hide resolved
hardhat.config.ts Outdated Show resolved Hide resolved
contracts/TimeManager.sol Outdated Show resolved Hide resolved
contracts/TimeManager.sol Outdated Show resolved Hide resolved
contracts/BaseJumpRateModelV2.sol Outdated Show resolved Hide resolved
contracts/TimeManager.sol Outdated Show resolved Hide resolved
contracts/Shortfall/Shortfall.sol Outdated Show resolved Hide resolved
contracts/Rewards/RewardsDistributor.sol Outdated Show resolved Hide resolved
contracts/Rewards/RewardsDistributor.sol Outdated Show resolved Hide resolved
contracts/test/UpgradedVToken.sol Outdated Show resolved Hide resolved
contracts/test/VTokenHarness.sol Outdated Show resolved Hide resolved
helpers/deploymentUtils.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@kkirka kkirka left a comment

Choose a reason for hiding this comment

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

Thank you for this effort, it was probably quite tedious. I marked some comments with emojis so that you don't spend too much time resolving my "would be nice to have it this way" things 😅

[🤔] – some ideas and thoughts we could discuss, definitely not a blocker for the PR in any way
[🤓] – nerdy nitpicks you might want to address or ignore

contracts/JumpRateModelV2.sol Outdated Show resolved Hide resolved
contracts/BaseJumpRateModelV2.sol Outdated Show resolved Hide resolved
contracts/BaseJumpRateModelV2.sol Outdated Show resolved Hide resolved
contracts/BaseJumpRateModelV2.sol Outdated Show resolved Hide resolved
contracts/Rewards/RewardsDistributor.sol Outdated Show resolved Hide resolved
tests/hardhat/Lens/PoolLens.ts Outdated Show resolved Hide resolved
tests/hardhat/Lens/PoolLens.ts Outdated Show resolved Hide resolved
tests/hardhat/Lens/PoolLens.ts Outdated Show resolved Hide resolved
tests/hardhat/Lens/PoolLens.ts Outdated Show resolved Hide resolved
tests/hardhat/Lens/RewardsSummary.ts Outdated Show resolved Hide resolved
contracts/TimeManager.sol Outdated Show resolved Hide resolved
@web3rover
Copy link
Collaborator

web3rover commented Dec 1, 2023

I think we should move the TimeManager contract to https://github.com/VenusProtocol/solidity-utilities. I will be needing the contract for Prime also and we shouldn't import isolated-pools in venus-protocol repo.

Also I think we will need different solidity versions of the contract if we are deploying some of the venus-protocol repo contracts in other chains. For example: XVSVault.

@kkirka
Copy link
Collaborator

kkirka commented Dec 1, 2023

I think we should move the TimeManager contract to https://github.com/VenusProtocol/solidity-utilities. I will be needing the contract for Prime also and we shouldn't import isolated-pools in venus-protocol repo.

Also I think we will need different solidity versions of the contract if we are deploying some of the venus-protocol repo contracts in other chains. For example: XVSVault.

Maybe the time has come for vault v0.8?

hardhat.config.ts Outdated Show resolved Hide resolved
contracts/Rewards/RewardsDistributor.sol Outdated Show resolved Hide resolved
@web3rover
Copy link
Collaborator

I think we should move the TimeManager contract to https://github.com/VenusProtocol/solidity-utilities. I will be needing the contract for Prime also and we shouldn't import isolated-pools in venus-protocol repo.
Also I think we will need different solidity versions of the contract if we are deploying some of the venus-protocol repo contracts in other chains. For example: XVSVault.

Maybe the time has come for vault v0.8?

As per my opinion, having a new v0.8 Vault will increase the new feature implementation overheads. I don't see any benefits of having two versions. Even if we create a new version of XVSVault we might still need old version of TimeManager because many other contracts may also need the older version.

If there is any other major benefits of having a v0.8 XVSVault then I would vote for it.

@chechu chechu added the audit label Dec 3, 2023
@chechu chechu added this to the 024 milestone Feb 7, 2024
web3rover
web3rover previously approved these changes Feb 19, 2024
GitGuru7
GitGuru7 previously approved these changes Feb 19, 2024
@Debugger022 Debugger022 dismissed stale reviews from GitGuru7 and web3rover via 3d5b379 February 26, 2024 13:51
0xlucian
0xlucian previously approved these changes Feb 26, 2024
contracts/Lens/PoolLens.sol Show resolved Hide resolved
contracts/JumpRateModelV2.sol Show resolved Hide resolved
contracts/Lens/PoolLens.sol Show resolved Hide resolved
Copy link

Code Coverage

Package Line Rate Branch Rate Health
contracts 96% 79%
contracts.Gateway 98% 68%
contracts.Gateway.Interfaces 100% 100%
contracts.Lens 95% 73%
contracts.Pool 100% 92%
contracts.Rewards 96% 70%
contracts.RiskFund 89% 61%
contracts.Shortfall 100% 85%
contracts.lib 100% 89%
Summary 96% (1616 / 1682) 76% (540 / 714)

@Debugger022 Debugger022 merged commit b03ddd3 into develop Apr 25, 2024
4 checks passed
@chechu chechu mentioned this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants