openhands
|
85350caf52
|
feat: OptimizerV3 with direct 2D staking-to-LP parameter mapping
Core protocol changes for launch readiness:
- OptimizerV3: binary bear/bull mapping from (staking%, avgTax) — avoids
exploitable AW 30-90 kill zone. Bear: AS=30%, AW=100, CI=0, DD=0.3e18.
Bull: AS=100%, AW=20, CI=0, DD=1e18. UUPS upgradeable with __gap[48].
- Directional VWAP: only records prices on ETH inflow (buys), preventing
sell-side dilution of price memory
- Floor formula: unified max(scarcity, mirror, clamp) — VWAP mirror uses
distance from adjusted VWAP as floor distance, no branching
- PriceOracle (M-1 fix): correct fallback TWAP divisor (60000s, not 300s)
- Access control (M-2 fix): deployer-only guard on one-time setters
- Recenter rate limit (M-3 fix): 60-second cooldown for open recenters
- Safe fallback params: recenter() optimizer-failure defaults changed from
exploitable CI=50%/AW=50 to safe bear-mode CI=0/AW=100
- Recentered event for monitoring and indexing
- VERSION bump to 2, kraiken-lib COMPATIBLE_CONTRACT_VERSIONS updated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-13 18:21:18 +00:00 |
|
johba
|
6cbb1781ce
|
tax rate, version and compose (#70)
resolves #67
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/70
|
2025-10-07 19:26:08 +02:00 |
|
johba
|
514be62cbb
|
txnbot - rewrite and lint (#53)
resolves #46
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/53
|
2025-10-04 15:40:30 +02:00 |
|
johba
|
dc61771dfc
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
|
2025-10-04 15:37:26 +02:00 |
|
johba
|
d7c2184ccf
|
Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51)
## Changes
### Configuration
- Added .solhint.json with recommended rules + custom config
- 160 char line length (warn)
- Double quotes enforcement (error)
- Explicit visibility required (error)
- Console statements allowed (scripts/tests need them)
- Gas optimization warnings enabled
- Ignores test/helpers/, lib/, out/, cache/, broadcast/
- Added foundry.toml [fmt] section
- 160 char line length
- 4-space tabs
- Double quotes
- Thousands separators for numbers
- Sort imports enabled
- Added .lintstagedrc.json for pre-commit auto-fix
- Runs solhint --fix on .sol files
- Runs forge fmt on .sol files
- Added husky pre-commit hook via lint-staged
### NPM Scripts
- lint:sol - run solhint
- lint:sol:fix - auto-fix solhint issues
- format:sol - format with forge fmt
- format:sol:check - check formatting
- lint / lint:fix - combined commands
### Code Changes
- Added explicit visibility modifiers (internal) to constants in scripts and tests
- Fixed quote style in DeployLocal.sol
- All Solidity files formatted with forge fmt
## Verification
- ✅ forge fmt --check passes
- ✅ No solhint errors (warnings only)
- ✅ forge build succeeds
- ✅ forge test passes (107/107)
resolves #44
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/51
|
2025-10-04 15:17:09 +02:00 |
|
johba
|
f8927b426e
|
webapp - ESLint + Prettier with pre-commit hooks (#54)
resolves #47
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/54
|
2025-10-03 16:51:44 +02:00 |
|
johba
|
09c36f2c87
|
lint/lib (#49)
resolves #42
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/49
|
2025-10-03 11:57:01 +02:00 |
|