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

ParaX L2 Implementation #433

Closed
wants to merge 2 commits into from
Closed

Conversation

zhoujia6139
Copy link
Contributor

Security Checklist

  • 1. Re-Entrancy
  • 2. Arithmetic Over/Under Flows
  • 3. Unexpected Ether
  • 4. Delegatecall
  • 5. Default Visibilities
  • 6. Entropy Illusion
  • 7. External Contract Referencing
  • 8. Short Address/Parameter Attack (off chain)
  • 9. Unchecked CALL Return Values
  • 10. Race Conditions / Front Running
  • 11. Denial Of Service (DOS)
  • 12. Block Timestamp Manipulation
  • 13. Constructors with Care
  • 14. Uninitialized Storage Pointers
  • 15. Floating Points and Precision
  • 16. Tx.Origin Authentication
  • 17. Address.isContract Re-Entrancy via Constructor

⚠️ NOTES ⚠️

Make sure to think about each of these exploits in this PR.

zhoujia6139 and others added 2 commits December 11, 2023 11:52
* feat: improve auto compound

Signed-off-by: GopherJ <[email protected]>

* chore: fallback to onchain slippage

Signed-off-by: GopherJ <[email protected]>

* feat: change p2p fee logic

Signed-off-by: GopherJ <[email protected]>

* feat: seperate compoundBot & matchingOperator

Signed-off-by: GopherJ <[email protected]>

* feat: put slippage offchain

Signed-off-by: GopherJ <[email protected]>

* fix: lint

Signed-off-by: GopherJ <[email protected]>

* fix: typo

Signed-off-by: GopherJ <[email protected]>

* chore: gas optimize

Signed-off-by: GopherJ <[email protected]>

* fix: gas optimize

Signed-off-by: GopherJ <[email protected]>

* fix: check swapAmount before transfer

Signed-off-by: GopherJ <[email protected]>

* fix: part of tests

Signed-off-by: GopherJ <[email protected]>

* fix: auto compound tests

Signed-off-by: GopherJ <[email protected]>

* chore: cleanup

Signed-off-by: GopherJ <[email protected]>

* fix: remove unused bot params

Signed-off-by: GopherJ <[email protected]>

* fix: increase precision

Signed-off-by: GopherJ <[email protected]>

* chore: use real price

Signed-off-by: GopherJ <[email protected]>

* chore: use swapPercent instead

Signed-off-by: GopherJ <[email protected]>

* chore: update verify docs & add shelljs

Signed-off-by: GopherJ <[email protected]>

* chore: update submodules

Signed-off-by: GopherJ <[email protected]>

* chore: add safe owner interface

Signed-off-by: GopherJ <[email protected]>

* chore: use https for ethereumjs-abi

Signed-off-by: GopherJ <[email protected]>

* chore: try fix ci

Signed-off-by: GopherJ <[email protected]>

* chore: add missing phantom enum items

Signed-off-by: GopherJ <[email protected]>

* chore: remove matching operator feature

* chore: allow transfer to sender address

* chore: add pause and ACL for P2P

* chore: fix FUN-POOL-05: User can withdraw $APE without timeLock

* chore: fix bakc owner check

* chore: cache storage variable to save gas

* chore: small gas optimization

* chore: fix some code style

* chore: update some storage variable to immutable to save gas.

* chore: cache reward amount to avoid fetch from ApeCoinStaking twice.

* chore: allow user set sape as collateral

* chore: fix lint and rename variable

* chore: add p2p pause and test case

* chore: don't need to check hf if sApe is not set as collateral

* chore: small fix

* chore: add test case and gas optimization

* chore: basic logic for pair staking

* chore: pair staking test case

* chore: bayc + mayc + bakc base logic and test case

* chore: spit logic contact to reduce contract size

* chore: add owner interface

* chore: compound fee

* chore: fix compound fee

* chore: refactor and add test case

* chore: add pending reward interface

* chore: add multicall

* chore: small optimization

* chore: fix bakc single pool issue

* chore: gas optimization

* chore: refactor and gas optimization

* chore: fix p2p logic

* chore: use one-time approve

* chore: rename script

* chore: add comment and small optimization

* chore: remove unused storage

* chore: vault optimization and fix

* chore: Ape coin pool

* chore: ape coin pool logic implementation

* chore: add pool ape staking test case.

* chore: small optimization

* chore: add test case and fix lint

* chore: remove ApeCoinPoolState

* chore: refactor pool state and bakc single pool

* chore: add pool borrow and stake

* chore: auto claim reward when nToken owner change.

* chore: auto claim test case

* chore: reduce contract size

* chore: gas optimization

* chore: add time lock for sApe

* chore: reduce contract size

* chore:support ape coin order as sApe balance

* chore: update constant hash value

* chore: ApeCoin Order sApe liquidation

* chore: small optimization

* chore: add query interface

* chore: remove burn callback

* chore: optimization

* chore: fix compound fee.

* chore: refactor query and claim pendign reward

* chore: update token status query interface

* chore: simplify poolTokenStatus

* chore: add comment

* chore: fix review issue and some optimization

* chore: unstake user ape staking position when hf < 1

* chore: fix review issue

* chore: add event definition and remove P2P contract

* chore: fix lint

* chore: fix typo

* chore: merge v1 and v2 logic

* chore: keep deprecated data slot

* chore: pool ape staking migration

* chore: p2p migration

* chore: small optimization

* chore: check ntoken owner when migration

* chore: fix test case

* chore: add gas test case

---------

Signed-off-by: GopherJ <[email protected]>
Co-authored-by: GopherJ <[email protected]>
@zhoujia6139 zhoujia6139 requested review from a team as code owners December 11, 2023 04:53
@zhoujia6139 zhoujia6139 marked this pull request as draft December 11, 2023 04:54
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