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

Feat/collateral swap 2 #369

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open

Feat/collateral swap 2 #369

wants to merge 86 commits into from

Conversation

GopherJ
Copy link
Contributor

@GopherJ GopherJ commented Apr 13, 2023

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.

GopherJ added 6 commits April 12, 2023 21:48
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
…ulate the exact price after fee

Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
@GopherJ GopherJ requested a review from a team as a code owner April 13, 2023 09:03
@GopherJ GopherJ force-pushed the feat/collateral-swap-2 branch from 314318d to b0f62df Compare April 13, 2023 09:06
GopherJ and others added 19 commits April 13, 2023 16:42
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
* fix: build

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: cleanup

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: resolve some TODOs

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: pass swapAdapter, swapPayload

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: stack too deep

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: lint

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: buy tests

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: accept bid tests

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: remove unused params

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: remove unused swapProvider

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: typo

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: typo & check srcToken

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: emit missing event

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: basic borrow and swap

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: add missing buy tests

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: lint

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: support non-listed token with underlying asset address function

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

---------

Signed-off-by: GopherJ <alex_cj96@foxmail.com>
* fix: build

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: cleanup

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: resolve some TODOs

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: pass swapAdapter, swapPayload

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: stack too deep

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: lint

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: buy tests

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: accept bid tests

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: remove unused params

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: remove unused swapProvider

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: typo

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: typo & check srcToken

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* chore: emit missing event

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: basic borrow and swap

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: add missing buy tests

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* fix: lint

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: support non-listed token with underlying asset address function

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

* feat: ptoken support for collateral swap

Signed-off-by: GopherJ <alex_cj96@foxmail.com>

---------

Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
@GopherJ GopherJ requested a review from a team as a code owner April 23, 2023 09:24
GopherJ added 6 commits July 6, 2023 22:36
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
@GopherJ GopherJ force-pushed the feat/collateral-swap-2 branch from 78a9ef9 to b54d38d Compare July 7, 2023 00:33
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
@GopherJ GopherJ force-pushed the feat/collateral-swap-2 branch from b54d38d to d4c99c1 Compare July 7, 2023 00:39
GopherJ added 21 commits July 7, 2023 09:11
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
Signed-off-by: GopherJ <alex_cj96@foxmail.com>
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.

4 participants