Commit graph

32 commits

Author SHA1 Message Date
giteadmin
8de3865c6f fix: extract VWAP logic and fix critical dormant whale vulnerability
- Extract VWAP tracking logic into reusable VWAPTracker contract
- Fix critical compression bug that erased historical price memory
- Replace dangerous 10^35x compression with limited 1000x max compression
- Add comprehensive dormant whale protection testing
- Preserve "eternal memory" to prevent manipulation by patient whales
- Add double-overflow analysis showing 1000x limit is mathematically safe
- Maintain backwards compatibility with existing LiquidityManager

Security Impact:
- Prevents dormant whale attacks where traders accumulate early then exploit
  compressed historical data to extract value at inflated prices
- VWAP now maintains historical significance even after compression
- Floor position calculations remain anchored to true price history

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 10:31:41 +02:00
giteadmin
79c26e3c31 testing price boundaries 2025-07-06 10:08:59 +02:00
giteadmin
78b48f1639 replaced sentiment with specific params 2025-02-01 21:51:03 +01:00
giteadmin
092f88a668 took out UBI and cleaned up 2025-01-23 13:21:49 +01:00
giteadmin
bb34d0725f feature/simulations (#11)
this pull request:
- creates a unit test that can take any scenario file (default: `out/scenario.json` and play it back on the deployment
- during the playback a debug trace generated in `timeSeries.csv`
- extracts the sentimenter into a separate upgradeable contract

Co-authored-by: JulesCrown <admin@noip.localhost>
Co-authored-by: giteadmin <gite@admin.com>
Reviewed-on: http://gitea.loseyourip.com:4000/dark-meme-society/harb/pulls/11
2024-11-07 15:33:40 +00:00
JulesCrown
938d1eba79 better revert messages 2024-09-18 07:59:07 +02:00
JulesCrown
af351b9cfc enable access restrictions for recenter 2024-09-12 17:00:24 +02:00
JulesCrown
2caef7ecb2 small cleanup 2024-09-10 19:13:43 +02:00
JulesCrown
e2fd200d5b update outstanding supply for floor with harb in anchor and discovery 2024-08-21 12:37:17 +02:00
roleengineer
8c28b05312 exact repeat of initial pulledHarb storage var. 2024-08-21 08:54:33 +00:00
JulesCrown
ff316a9fa1 improve efficiency 2024-08-16 12:00:13 +02:00
JulesCrown
2a4577d165 minor fix 2024-08-15 15:24:09 +02:00
JulesCrown
16e65f0f15 take harb minted for staking into account when setting floor 2024-08-15 15:17:44 +02:00
roleengineer
0329a5da4f priceRatio stored and used in vwap always ETH/HARB. fixed compatibility. 2024-08-13 18:33:41 +00:00
JulesCrown
1dfa81ea57 allow for capital efficiency beyond 100% 2024-08-13 20:30:59 +02:00
JulesCrown
c7582350a0 correct accumulator pricing 2024-08-12 19:07:07 +02:00
JulesCrown
84999fc90a better overflow protection 2024-07-18 16:50:23 +02:00
JulesCrown
b243874f02 added overflow checks 2024-07-18 07:35:39 +02:00
JulesCrown
dbc23802d2 added more gov params 2024-07-17 14:08:53 +02:00
JulesCrown
9f03bd9f5d cleanup 2024-07-16 20:59:42 +02:00
JulesCrown
694afbe9fe make slide and shift one function 2024-07-16 20:47:06 +02:00
JulesCrown
ae8c3a1e4f added gov params 2024-07-16 19:47:39 +02:00
JulesCrown
236469f023 added comments 2024-07-13 18:33:47 +02:00
JulesCrown
2314ff51c1 new deployment with public position counter 2024-03-18 12:42:30 +01:00
JulesCrown
4e895f57e9 LiqMan WIP 2024-03-14 17:31:16 +01:00
JulesCrown
b93664431f got UBI to work 2024-03-14 12:40:57 +01:00
JulesCrown
06581a0b8d first deployment 2024-03-12 20:22:10 +01:00
JulesCrown
307f98840b wip 2024-03-12 12:27:47 +01:00
JulesCrown
e62fb45ed5 wip 2024-03-12 11:38:16 +01:00
JulesCrown
40f72cfff5 wip 2024-03-12 10:36:31 +01:00
JulesCrown
f22910069a setup 2024-03-12 09:59:33 +01:00
JulesCrown
7decc4c32d subfolder 2024-02-27 17:55:38 +01:00
Renamed from src/LiquidityManager.sol (Browse further)