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

Schwartz protocol v2 #98

Merged
merged 20 commits into from
Aug 22, 2024
Merged

Schwartz protocol v2 #98

merged 20 commits into from
Aug 22, 2024

Conversation

Schwartz10
Copy link
Contributor

No description provided.

@Schwartz10 Schwartz10 marked this pull request as ready for review August 22, 2024 05:48
@Schwartz10 Schwartz10 changed the base branch from main to protocol-v2 August 22, 2024 05:48
@Schwartz10 Schwartz10 merged commit 0615572 into protocol-v2 Aug 22, 2024
@Schwartz10 Schwartz10 deleted the schwartz-protocol-v2 branch August 22, 2024 05:54
Schwartz10 added a commit that referenced this pull request Sep 4, 2024
* Update abigenerated files

* Schwartz protocol v2 (#98)

* Refactor basic methods for V2

* Add AgentDebt call

* Add initial framework for margin helpers

* Add _fi helper methods

* Refactor liquidation queries and consolidate packages

* Add back tests

* Small fixes

* Small tweaks

* Add fee debt test

Fix tests

* Add econ tests, bug fixes and improvements

* Get rid of pool registry

* Small tweaks

* Add agent data helpers and tests

Fix collateral value not changing on computeagentdata

* Add push funds helper with protect against push to fee debt miner

* Improve tests

* Add test helper

* More cleanup

* Nix the mock ado

* Delete unused constants

* Add claims decoder

* More cleanup

* Change method name

* Fix issue with agentfi using only principal when computing debt (#100)

* Add back edr calc

* Update abigen

* Update deployments

* Add poolsapi calls to econ package (#101)

Still need to do interest in agentfi call

* add margin and leverage ratio

* handle edge cases in margin and dtl

* Schwartz improvements (#102)

* Update deployments

* Add more api helpers and tests

* More helper methods

* Revert bad merge

* Update abigen

* Update afi with spendable balance (#106)

* Fix/borrow (#107)

* fix max borrow on agent fi

* Create minerfi type

---------

Co-authored-by: Jonathan <jpschwartz2@uwalumni.com>

* fix index out of range when miner sectors are less than desired sample size (#108)

* add miner that gave error on staging to test cases (#109)

* add miner that gave error on staging to test cases

* fix step size rounding error

* change BaseFi test to MinerFi test

* Add Events API endpoint to extern struct (#105)

* Add Events API endpoint to extern struct

Also change functions that use it to take a SDK argument so
they can look up the endpoint.

* Polish

---------

Co-authored-by: Jonathan <jpschwartz2@uwalumni.com>

* Add test github action

* Fix/glifapi (#110)

* Add the AgentMarginJSON struct type

* Update type name

* Add LiveSectors and FaultySectors to AgentMarginJSON

* Update type

* Potential fix for eventsapi once pools-events is redeployed

Consolidate function calls to the api

* Update types

* Fix glifapi queries

* Refactor principal and interest sdk funcs to work for v0 historically

Fix tests

---------

Co-authored-by: ganzai-san <ganzai@protonmail.com>
Co-authored-by: ganzai <79986704+ganzai-san@users.noreply.github.com>
Co-authored-by: Jim Pick <jim@jimpick.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.

1 participant