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

M-03 Fix [PAG] #102

Merged
merged 3 commits into from
May 16, 2024
Merged

M-03 Fix [PAG] #102

merged 3 commits into from
May 16, 2024

Conversation

junkim012
Copy link
Collaborator

@junkim012 junkim012 commented May 13, 2024

  • Merges into C-01 Fix [PAG] #95
  • With the virtual assets and virtual shares in the OZ ERC4626, It is still provably unprofitable for the attacker to grief a user deposit. The attacker will lose more money than they gain. But before this change, it was still possible for the attacker to cause the user to lose funds for some cost paid by the attacker.
    • To further defend against inflation attacks, the factory now enforces the deployer to make an initial deposit of minimum 1e3, and burns 1e3 of the minted shares by locking it in the factory contract.

Changes

  • The Vault constructor now calls _addSupportedMarkets to allow for initial deposit from the factory.
  • Public functions such as addSupportedMarkets is separated into external and internal markets.
  • The factory transfers from the user and deposits into the vault.

…ssets and shares, the factory enforces initial deposit into the vault at deployment time
@junkim012 junkim012 requested a review from HrikB May 13, 2024 07:42
Copy link

openzeppelin-code bot commented May 13, 2024

M-03 Fix [PAG]

Generated at commit: ca87088070b794d37678753c52cef4492c377e76

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
2
0
12
39
55
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@junkim012 junkim012 merged commit 2074642 into jun/PAG-C-01 May 16, 2024
4 of 6 checks passed
@junkim012 junkim012 deleted the jun/M-03 branch May 16, 2024 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant