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: larger gamma #12

Merged
merged 135 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
60d7559
Fixes in symmetry of limits. Limits of CurveCryptoOptimized for gamma…
michwill Mar 26, 2024
119f801
gamma to 0.3
michwill Mar 26, 2024
fd03e81
chore: lint
AlbertoCentonze Mar 27, 2024
c6f3c28
test: fixed broken imports
AlbertoCentonze Mar 27, 2024
19dcd0a
cytoolz needed for pypy
michwill Apr 7, 2024
ad12b9b
Fix test_newton_D (it was not working)
michwill Apr 7, 2024
7397e94
Raise gamma in testing newton_D
michwill Apr 7, 2024
17fb88f
New contract tests pass
michwill Apr 8, 2024
1aa0652
Change max gamma in the pool itself
michwill Apr 8, 2024
6dec22f
Few fixes to get_y() test
michwill Apr 9, 2024
2dfa36e
test: added boilerplate for newton_y checks
AlbertoCentonze Apr 11, 2024
4ffc20b
docs: math testing infos
AlbertoCentonze Apr 15, 2024
07d5bcf
chore: inlining module
AlbertoCentonze Apr 15, 2024
f3c21ab
chore: renamed test suite prev. ignored by pytest
AlbertoCentonze Apr 15, 2024
befac25
docs: documenting changes in math tests
AlbertoCentonze Apr 15, 2024
5b9f008
chore: bumped boa version
AlbertoCentonze Apr 15, 2024
05e7a8a
test: ensuring old bounds behavior is unchanged
AlbertoCentonze Apr 16, 2024
7974330
test: making simulator twocrypto-only
AlbertoCentonze Apr 16, 2024
1e3619e
test: using more reliable function to compute y
AlbertoCentonze Apr 16, 2024
df64fb1
style: removing class for test suite
AlbertoCentonze Apr 16, 2024
acb1874
feat: stricter and symmetric checks for `newton_D`
AlbertoCentonze Apr 17, 2024
d5c6c5e
refactor initial guess logic in math contract
bout3fiddy Apr 18, 2024
a2e3dd7
test: verifying `newton_y` converges + no revert
AlbertoCentonze Apr 18, 2024
827e446
test: added event for newton_y fallback in tests
AlbertoCentonze Apr 22, 2024
a69abb6
test: increasing test coverage
AlbertoCentonze Apr 22, 2024
53d5e17
chore: cleaning simulator
AlbertoCentonze Apr 22, 2024
616be26
chore: moving non-test file to utils
AlbertoCentonze Apr 22, 2024
05cd92e
docs: updated math testing README
AlbertoCentonze Apr 22, 2024
45077e5
ci: reducing too long fuzzing
AlbertoCentonze Apr 22, 2024
52b1e18
test: simplified withdrawal/deposit tests
AlbertoCentonze Apr 22, 2024
319ba93
docs: updated with proof results
AlbertoCentonze Apr 24, 2024
95ff7d3
test: removed unnecessary rule override
AlbertoCentonze Apr 24, 2024
fecf54a
refactor: using constants for math tests
AlbertoCentonze Apr 24, 2024
7ee1fdb
chore: fixed hypothesis version
AlbertoCentonze Apr 26, 2024
ec64186
test: reduce fuzzing for trivial cases
AlbertoCentonze Apr 26, 2024
55b046e
refactor: improving test readability
AlbertoCentonze Apr 26, 2024
d2c2e28
test: stricter stateful testing
AlbertoCentonze Apr 26, 2024
aada53c
test: fixed warning
AlbertoCentonze Apr 26, 2024
f151ae1
test: removed redundant test
AlbertoCentonze Apr 26, 2024
6a4a8c6
test: fixed broken test
AlbertoCentonze Apr 26, 2024
da5e0fb
test: stricter testing logic
AlbertoCentonze Apr 26, 2024
76d5faa
docs: documenting flaw in workaround
AlbertoCentonze Apr 26, 2024
2db4641
feat: added more constants
AlbertoCentonze Apr 26, 2024
550c31f
test: completely reworked ramping tests
AlbertoCentonze Apr 26, 2024
c7c1035
chore: moved imports to top of the tests
AlbertoCentonze Apr 26, 2024
849f387
test: fixed deprecation warning
AlbertoCentonze Apr 27, 2024
744db35
test: created specific test strategies
AlbertoCentonze May 2, 2024
b61d99b
feat: improvement in twocrypto search strategies
AlbertoCentonze May 7, 2024
866e545
feat: added new stateful testing class (wip)
AlbertoCentonze May 7, 2024
ca40664
feat: more features in new stateful test
AlbertoCentonze May 8, 2024
8bf8ee1
feat: test suits for new stateful tests
AlbertoCentonze May 8, 2024
978590e
chore: using `UNIX_DAY` constant
AlbertoCentonze May 9, 2024
b24b71c
feat: `TestUpOnlyLiquidity` stateful testing
AlbertoCentonze May 9, 2024
13f6f36
feat: updated gamma bounds
AlbertoCentonze May 13, 2024
8723eca
test: remove liquidity rule for stateful tests
AlbertoCentonze May 13, 2024
8ad21cf
ci: stateful tests are now a separate job
AlbertoCentonze May 13, 2024
cf2dd30
test: enabling more stateful tests to run
AlbertoCentonze May 13, 2024
0f21703
Update boa and ignore isolation
DanielSchiavini May 13, 2024
eae9db0
ci: removed redundant test
AlbertoCentonze May 13, 2024
03388aa
Merge branch 'larger-gamma' of github.com:curvefi/twocrypto-ng into l…
AlbertoCentonze May 13, 2024
71f4100
chore: fixed linter
AlbertoCentonze May 13, 2024
034e881
test: better correction for integration tests
AlbertoCentonze May 13, 2024
1d75f21
test: updated `timestamp` access
AlbertoCentonze May 13, 2024
3c1821c
ci: now stateful tests are correctly ignored
AlbertoCentonze May 14, 2024
a990aaa
chore: moving old tests to separate folder
AlbertoCentonze May 14, 2024
6db690f
test: removing unbalanced liquidity (wip)
AlbertoCentonze May 14, 2024
ef15f6a
chore: renamed files + more TODOs
AlbertoCentonze May 14, 2024
894e039
ci: math tests now are a separate job
AlbertoCentonze May 14, 2024
40279b5
test: minor fixes
AlbertoCentonze May 14, 2024
229b30c
test: finished imabalanced withdrawal rule
AlbertoCentonze May 15, 2024
da19003
docs: documenting tests
AlbertoCentonze May 15, 2024
24368d5
test: imbalanced deposits (wip)
AlbertoCentonze May 15, 2024
88097e5
docs: stateful test instructions
AlbertoCentonze May 15, 2024
b3e7b25
feat: stateful tests now cover all base operations
AlbertoCentonze May 17, 2024
f907e38
test: variable decimals in stateful testing
AlbertoCentonze May 20, 2024
ff8508f
docs: help to debug variable decimals
AlbertoCentonze May 20, 2024
f8d9714
test: exchange now supports variable deciam
AlbertoCentonze May 20, 2024
8ec9bea
chore: removed legacy TODOs
AlbertoCentonze May 20, 2024
8756e99
test: all tests now support variable decimals
AlbertoCentonze May 20, 2024
38493cc
test: stateful ramping
AlbertoCentonze May 20, 2024
5113a33
test: minor fixes
AlbertoCentonze May 20, 2024
2ee5642
test: last invariant restored
AlbertoCentonze May 21, 2024
8b46af0
test: fixing old tests
AlbertoCentonze May 21, 2024
7bb59c4
test: maths tests refactoring
AlbertoCentonze May 21, 2024
340d947
test: relaxed invariant
AlbertoCentonze May 21, 2024
911dd18
remove xcp_oracle
bout3fiddy May 22, 2024
ebf1049
remove xcp_ma_time from admin tests
bout3fiddy May 22, 2024
b580be8
test: fixing stateful test edge cases
AlbertoCentonze May 22, 2024
66fa937
test: limiting unbalanced liquidity deposits
AlbertoCentonze May 22, 2024
4b94716
test: removing virtual price invariant when ramp
AlbertoCentonze May 22, 2024
866759c
feat: easier ramping condition
AlbertoCentonze May 22, 2024
da26907
test: corrected ramping condition
AlbertoCentonze May 22, 2024
5d36443
test: less agressive decimals fuzzing
AlbertoCentonze May 23, 2024
d9fe884
add profiling
bout3fiddy May 27, 2024
d8c9a93
Merge branch 'larger-gamma' of github.com:curvefi/twocrypto-ng into l…
AlbertoCentonze May 27, 2024
2800e6f
fix contracts
bout3fiddy May 27, 2024
277dcc6
Merge branch 'larger-gamma' of https://github.com/curvefi/twocrypto-n…
bout3fiddy May 27, 2024
391d378
perf: removed redundant check
AlbertoCentonze May 27, 2024
285d31e
fix profiling
bout3fiddy May 27, 2024
54c9fb7
add max newton_D experimental contract
bout3fiddy May 27, 2024
cbcc0c9
Merge branch 'larger-gamma' of github.com:curvefi/twocrypto-ng into l…
AlbertoCentonze May 27, 2024
14dd5d2
convert contract to notebook for experiments
bout3fiddy May 27, 2024
ebac4ce
add contract to notebook
bout3fiddy May 28, 2024
d6935d0
test: moved hypothesis profile to `conftest`
AlbertoCentonze May 28, 2024
dc81490
test: minor changes
AlbertoCentonze May 28, 2024
c4aacbd
test: better measure of imbalance
AlbertoCentonze May 28, 2024
0cba139
test: more tollerance on virtual price decrease
AlbertoCentonze May 28, 2024
0ebd523
test: exchange failure are handled correctly
AlbertoCentonze May 28, 2024
e930a32
test: new imbalanced deposits
AlbertoCentonze May 28, 2024
74a715b
Merge branch 'larger-gamma' of github.com:curvefi/twocrypto-ng into l…
AlbertoCentonze May 28, 2024
f6a102b
test: not checking virtual price when claiming fee
AlbertoCentonze May 28, 2024
fe78922
test: simplified swap failure checks
AlbertoCentonze May 28, 2024
a8a5d1b
test: event on swap failure
AlbertoCentonze May 28, 2024
951eabc
test: simpler condition for asymmetric deposit
AlbertoCentonze May 28, 2024
5d02dbf
test: gracefully handling imabalanced deposit fail
AlbertoCentonze May 29, 2024
6bfb071
perf: removed unnecessary array from getter
AlbertoCentonze May 29, 2024
4f458c7
Revert "test: gracefully handling imabalanced deposit fail"
AlbertoCentonze May 30, 2024
e475996
Revert "perf: removed unnecessary array from getter"
AlbertoCentonze May 30, 2024
41039d7
test: better assumption
AlbertoCentonze May 31, 2024
54f22b0
test: splitting imbalanced liquidity rules
AlbertoCentonze May 31, 2024
89f3269
test: better assumption on low values
AlbertoCentonze Jun 2, 2024
6969a05
test: handling precision errors
AlbertoCentonze Jun 2, 2024
274787c
test: improved testing notes
AlbertoCentonze Jun 2, 2024
4801d2a
test: added preset list
AlbertoCentonze Jun 2, 2024
6295f37
test: simplified price strategy
AlbertoCentonze Jun 2, 2024
b73787e
test: simplified token strategy
AlbertoCentonze Jun 2, 2024
a88b27c
test: pool strategy from presets
AlbertoCentonze Jun 2, 2024
86a8032
test: using new pool strategy for stateful tests
AlbertoCentonze Jun 2, 2024
5bbb9b8
test: reworking imbalanced strategies (wip)
AlbertoCentonze Jun 2, 2024
0c0d185
test: removed redundant rule
AlbertoCentonze Jun 2, 2024
b8a510b
test: restricted price strategy
AlbertoCentonze Jun 2, 2024
e5034ab
test: more tolerance on no-fees with low decimals
AlbertoCentonze Jun 2, 2024
e4dd519
test: corrected withdrawal note
AlbertoCentonze Jun 3, 2024
a4afb5d
chore: skipping hard to pass test
AlbertoCentonze Jun 3, 2024
9856e82
test: making withdrawal more restricted
AlbertoCentonze Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
path: |
~/.vvm
key: compiler-cache
key: compiler-cache-${{ hashFiles('**/requirements.txt') }}

- name: Setup Python 3.10.4
uses: actions/setup-python@v2
Expand Down
52 changes: 49 additions & 3 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
boa-tests:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -16,7 +16,7 @@ jobs:
with:
path: |
~/.vvm
key: compiler-cache
key: compiler-cache-${{ hashFiles('**/requirements.txt') }}

- name: Setup Python 3.10.4
uses: actions/setup-python@v2
Expand All @@ -27,4 +27,50 @@ jobs:
run: pip install -r requirements.txt

- name: Run Tests
run: python -m pytest tests/unitary -n auto
run: python -m pytest tests/unitary -n auto --ignore=tests/unitary/pool/stateful --ignore=tests/unitary/math

stateful-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Cache Compiler Installations
uses: actions/cache@v2
with:
path: |
~/.vvm
key: compiler-cache-${{ hashFiles('**/requirements.txt') }}

- name: Setup Python 3.10.4
uses: actions/setup-python@v2
with:
python-version: 3.10.4

- name: Install Requirements
run: pip install -r requirements.txt

- name: Run Stateful Tests
run: python -m pytest tests/unitary/pool/stateful -n auto --ignore=tests/unitary/pool/stateful/legacy

math-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Cache Compiler Installations
uses: actions/cache@v2
with:
path: |
~/.vvm
key: compiler-cache-${{ hashFiles('**/requirements.txt') }}

- name: Setup Python 3.10.4
uses: actions/setup-python@v2
with:
python-version: 3.10.4

- name: Install Requirements
run: pip install -r requirements.txt

- name: Run Tests
run: python -m pytest tests/unitary/math -n auto
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ reports/
.idea
**/.idea
.vscode
*.csv

# misc
/data
Expand Down
Loading
Loading