Skip to content

chore: Improve readability, add full README#22

Merged
lucas-manuel merged 8 commits intomasterfrom
pre-audit-sweep
Sep 15, 2024
Merged

chore: Improve readability, add full README#22
lucas-manuel merged 8 commits intomasterfrom
pre-audit-sweep

Conversation

@lucas-manuel
Copy link
Copy Markdown
Contributor

@lucas-manuel lucas-manuel commented Sep 14, 2024

  • Remove unused imports
  • Format function declarations according to desired line length
  • Alignment where applicable
  • Add some helpers for tests for easier comprehension
  • Move Relayer bridging functions to bottom in ForeignController, add dedicated headers for internal functions (copy pasted, recommend checking diff manually)
  • Add full README docs

README.md Outdated
<img src="https://github.com/user-attachments/assets/832db958-14e6-482f-9dbc-b10e672029f7" alt="Image 1" height="700px" style="margin-right:100px;"/>
</p>

The diagram below provides and example of calling to mint USDS using the MakerDAO allocation system. Note that the funds are always held custody in the `ALMProxy` as a result of the calls made.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MakerDAO -> Sky

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem updated?

@github-actions
Copy link
Copy Markdown

Coverage after merging pre-audit-sweep into master will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   ALMProxy.sol100%100%100%100%
   ForeignController.sol100%100%100%100%
   MainnetController.sol100%100%100%100%
   RateLimitHelpers.sol100%100%100%100%
   RateLimits.sol97.96%90.91%100%100%111

@lucas-manuel lucas-manuel merged commit cda83de into master Sep 15, 2024
@lucas-manuel lucas-manuel deleted the pre-audit-sweep branch September 15, 2024 03:50
lucas-manuel added a commit that referenced this pull request Mar 25, 2025
* feat: add dai usds swaps

* fix: rm rate limits
lucas-manuel added a commit that referenced this pull request Mar 25, 2025
* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing
lucas-manuel added a commit that referenced this pull request Mar 25, 2025
* feat: add dai usds swaps

* fix: rm rate limits
lucas-manuel added a commit that referenced this pull request Mar 25, 2025
* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing
lucas-manuel added a commit that referenced this pull request Mar 27, 2025
* feat: add dai usds swaps

* fix: rm rate limits
lucas-manuel added a commit that referenced this pull request Mar 27, 2025
* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing
lucas-manuel added a commit that referenced this pull request Mar 28, 2025
* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* feat: initial logic working

* feat: update to add testing

* fix: cleanup

---------

Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>
lucas-manuel added a commit that referenced this pull request Apr 2, 2025
* feat: add dai usds swaps

* fix: rm rate limits
lucas-manuel added a commit that referenced this pull request Apr 2, 2025
* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing
lucas-manuel added a commit that referenced this pull request Apr 2, 2025
* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* feat: initial logic working

* feat: update to add testing

* fix: cleanup

---------

Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>
barrutko referenced this pull request in grove-labs/grove-alm-controller Jul 17, 2025
* feat: Add and rename audits (#96)

* feat: add cantina

* fix: change all names

* feat: Refactor staging deployments scripting to work for full deployment on Base and Arbitrum (#97)

* feat: do initial refactor

* feat: initial deploy script working

* feat: update with working script

* feat: staging deployment working locally

* fix: cleanup

* feat: update to add full input files

* feat: add arbitrum test coverage

* feat: add more testing and update arbitrum file

* fix: update to remove deps from output, updagte lib

* feat: add live staging contracts

* fix: update sub and blocks

* feat: add release jsons

* fix: add mainnet staing

* fix: arb filename

* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* fix: Update swap rate limit calculation (#94)

* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* feat: initial logic working

* feat: update to add testing

* fix: cleanup

---------

Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>

* feat: Update staging PSM addresses, fix morpho usdc staging address (#98)

* feat: update addresses

* fix: logs

* fix: rm unconfigured psms

* feat: Add v1.4.0 audits (#99)

* fix: rm redundant audits, add chainsecurity

* feat: add cantina audit

* feat: Deploy v1.4.0 staging (#103)

* feat: deploy v1.4.0 staging

* fix: newlines

* fix: update testing

* feat: Update testing to use USDT pools, focus on USDT approval functionality (#101)

* fix: rm redundant audits, add chainsecurity

* feat: add cantina audit

* fix: refactor tests

* test: add allowance assertions

* test: add coverage for swap rate limits

* fix: update to use higher swaps

* refactor: Remove `setRateLimitData` from RateLimitHelpers (SC-962) (sparkdotfi#108)

* refactor: Split out Curve and PSM logic into libraries (SC-971) (#104)

* refactor: Init library to take multiple relayers (SC 961) (sparkdotfi#109)

* refactor: Spin out logic of CCTP into a library (SC-970) (#105)

* feat: Adds forceApprove logic (SC-978) (sparkdotfi#110)

* feat: Deploy Unichain (SC-992)

* cleanup: Remove BUIDL redeem facility (SC 994)

* chore: Change `CENTRIFUGE_REQUEST_ID` var to constant (sparkdotfi#118)

* chore: change var to constant

* use internal

* feat: Add LayerZero integration (SC-982) (sparkdotfi#119)

* feat: layerzero integration

* fix review

* change note

* fix followup review

* add success tests

* fix review

* add gas cost test

* chore: linting

* add tests for setter functions

* chore: linting

* chore: linting

* fix: Update README (sparkdotfi#121)

* fix: Order params consistently (sparkdotfi#122)

* fix: interface (sparkdotfi#124)

* fix: Use more robust `_approve` (SC-1036) (sparkdotfi#126)

* feat: add requires

* fix: add full test coverage

* feat: Gas optimize `approve` (SC-1037) (sparkdotfi#128)

* feat: add requires

* fix: add full test coverage

* feat: reuse `approveData` in (Mainnet|Foreign)Controller._approve.

* fix: typo (causing compilation error).

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* Minor issues (#14 from audit) (SC-1032) (sparkdotfi#130)

* chore: rm `IMetaMorpho` imports in MainnetController.sol.

* chore: rm `AccessControl` import in CurveLib.sol.

* chore: rm `RateLimitHelpers` import in PSMLib.sol.

* fix: `multiplied` spelling.

* chore: change IERC(20|4626) to openzeppelin.

* chore: rm import from ForeignController.sol.

* fix: alphabetical ordering.

* fix: re-order imports.

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Make `transferTokenLayerZero` payable (SC-1039) (sparkdotfi#127)

* fix: make transfer function payable

* fix: review

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Set LayerZero recipients in deploy (SC-1038) (sparkdotfi#129)

* feat: setLayerzeroRecipients in deploy

* fix: review

* fix: build

* fix: align

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Add missing approval (SC-1035) (sparkdotfi#123)

* fix: add missing approval

* add comments

* fix: comments

* fix: comments

* fix: comment

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Reuse approveData in CurveLib (sparkdotfi#131)

* update

* remove script

* update

* chore: remove irrelevant deployments

* test: skip arbitrum deployment tests

* adjust deployment inputs

* reorg

* change staging psm address

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>
Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>
Co-authored-by: supercontracts <bonjour.tabish@gmail.com>
Co-authored-by: Dom <18601956+hacker-DOM@users.noreply.github.com>
kevinlichan referenced this pull request in grove-labs/grove-alm-controller Jul 17, 2025
* feat: Add and rename audits (#96)

* feat: add cantina

* fix: change all names

* feat: Refactor staging deployments scripting to work for full deployment on Base and Arbitrum (#97)

* feat: do initial refactor

* feat: initial deploy script working

* feat: update with working script

* feat: staging deployment working locally

* fix: cleanup

* feat: update to add full input files

* feat: add arbitrum test coverage

* feat: add more testing and update arbitrum file

* fix: update to remove deps from output, updagte lib

* feat: add live staging contracts

* fix: update sub and blocks

* feat: add release jsons

* fix: add mainnet staing

* fix: arb filename

* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* fix: Update swap rate limit calculation (#94)

* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* feat: initial logic working

* feat: update to add testing

* fix: cleanup

---------

Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>

* feat: Update staging PSM addresses, fix morpho usdc staging address (#98)

* feat: update addresses

* fix: logs

* fix: rm unconfigured psms

* feat: Add v1.4.0 audits (#99)

* fix: rm redundant audits, add chainsecurity

* feat: add cantina audit

* feat: Deploy v1.4.0 staging (#103)

* feat: deploy v1.4.0 staging

* fix: newlines

* fix: update testing

* feat: Update testing to use USDT pools, focus on USDT approval functionality (#101)

* fix: rm redundant audits, add chainsecurity

* feat: add cantina audit

* fix: refactor tests

* test: add allowance assertions

* test: add coverage for swap rate limits

* fix: update to use higher swaps

* refactor: Remove `setRateLimitData` from RateLimitHelpers (SC-962) (sparkdotfi#108)

* refactor: Split out Curve and PSM logic into libraries (SC-971) (#104)

* refactor: Init library to take multiple relayers (SC 961) (sparkdotfi#109)

* refactor: Spin out logic of CCTP into a library (SC-970) (#105)

* feat: Adds forceApprove logic (SC-978) (sparkdotfi#110)

* feat: Deploy Unichain (SC-992)

* cleanup: Remove BUIDL redeem facility (SC 994)

* chore: Change `CENTRIFUGE_REQUEST_ID` var to constant (sparkdotfi#118)

* chore: change var to constant

* use internal

* feat: Add LayerZero integration (SC-982) (sparkdotfi#119)

* feat: layerzero integration

* fix review

* change note

* fix followup review

* add success tests

* fix review

* add gas cost test

* chore: linting

* add tests for setter functions

* chore: linting

* chore: linting

* fix: Update README (sparkdotfi#121)

* fix: Order params consistently (sparkdotfi#122)

* fix: interface (sparkdotfi#124)

* fix: Use more robust `_approve` (SC-1036) (sparkdotfi#126)

* feat: add requires

* fix: add full test coverage

* feat: Gas optimize `approve` (SC-1037) (sparkdotfi#128)

* feat: add requires

* fix: add full test coverage

* feat: reuse `approveData` in (Mainnet|Foreign)Controller._approve.

* fix: typo (causing compilation error).

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* Minor issues (#14 from audit) (SC-1032) (sparkdotfi#130)

* chore: rm `IMetaMorpho` imports in MainnetController.sol.

* chore: rm `AccessControl` import in CurveLib.sol.

* chore: rm `RateLimitHelpers` import in PSMLib.sol.

* fix: `multiplied` spelling.

* chore: change IERC(20|4626) to openzeppelin.

* chore: rm import from ForeignController.sol.

* fix: alphabetical ordering.

* fix: re-order imports.

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Make `transferTokenLayerZero` payable (SC-1039) (sparkdotfi#127)

* fix: make transfer function payable

* fix: review

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Set LayerZero recipients in deploy (SC-1038) (sparkdotfi#129)

* feat: setLayerzeroRecipients in deploy

* fix: review

* fix: build

* fix: align

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Add missing approval (SC-1035) (sparkdotfi#123)

* fix: add missing approval

* add comments

* fix: comments

* fix: comments

* fix: comment

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Reuse approveData in CurveLib (sparkdotfi#131)

* update

* remove script

* update

* chore: remove irrelevant deployments

* test: skip arbitrum deployment tests

* adjust deployment inputs

* reorg

* change staging psm address

* feat: add Centrifuge functions to ForeignController

* test: add ForeignController tests on fake Avalanche (ETH Mainnet)

* refactor: add minor fixes

* remove transfer

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>
Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>
Co-authored-by: supercontracts <bonjour.tabish@gmail.com>
Co-authored-by: Dom <18601956+hacker-DOM@users.noreply.github.com>
barrutko referenced this pull request in grove-labs/grove-alm-controller Jul 25, 2025
* Add arbitrum deployment (#84)

* add arbitrum deployment

* newline

* feat: Add and rename audits (#96)

* feat: add cantina

* fix: change all names

* feat: Refactor staging deployments scripting to work for full deployment on Base and Arbitrum (#97)

* feat: do initial refactor

* feat: initial deploy script working

* feat: update with working script

* feat: staging deployment working locally

* fix: cleanup

* feat: update to add full input files

* feat: add arbitrum test coverage

* feat: add more testing and update arbitrum file

* fix: update to remove deps from output, updagte lib

* feat: add live staging contracts

* fix: update sub and blocks

* feat: add release jsons

* fix: add mainnet staing

* fix: arb filename

* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* fix: Update swap rate limit calculation (#94)

* feat: Add audits (#26)

* feat: add audits

* fix: update file

* fix: update staging test

* fix: Update Centrifuge tests (#25)

* Adapt to latest vault address

* Update block number

* Remove unused setUp

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* feat: Add Curve support, remove Morpho allocator logic (SC-938)  (#23)

* feat: add basic curve deposit/withdraw

* feat: Refactor to use internal functions and modifiers (#24)

* feat: refactor to use internal functions and modifiers

* fix: use view

* fix: move helpers

* fix: rm todo

* feat: Add DaiUsds swaps (SC-940) (#22)

* feat: add dai usds swaps

* fix: rm rate limits

* test: add testing for failure modes

* feat: tests all passing

* fix: update broken staging test

* test: add invalid order coverage, cleanup

* fix: rm morpho functionality

* fix: rm morpho

* feat: tests passing

* fix: rm console

* feat: refactor to use rlusd pool

* feat: refactor to use new slippages, remove tokens params

* feat: add remove liquidity working

* feat: tests passing

* fix: rm console

* fix: update remaining fixes

* fix: reorder some code, add zero slippage test coverage

* fix: update test names

* feat: add simplified calculation

* fix: rm unused function

* fix: formatting

* fix: update slippage

* fix: comment

* fix: cache param

* fix: update spacing

* feat: Update to round up for rate limits and minimums (SC-955) (#31)

* feat: Use `get_virtual_price` (SC-959) (#29)

* feat: add comments

* feat: add virtual price

* feat: add stress test

* feat: add starting fuzz tests

* fix: delete fuzz test

* fix: add comments

* fix: update comments

* fix: Add line about transferAsset (#33)

* feat: Add swap rate limiting in `addLiquidityCurve` (SC-952) (#30)

* feat: add initial structure

* feat: add rate limit for swap

* feat: tests passing

* fix: ordering and test

* fix: update optimizer runs

* fix:  update comment

* feat: Add index input validation (SC-960) (#34)

* feat: add index input validation

* feat: update to add testing

* ifx: update to use n coins

* feat: initial logic working

* feat: update to add testing

* fix: cleanup

---------

Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>

* feat: Update staging PSM addresses, fix morpho usdc staging address (#98)

* feat: update addresses

* fix: logs

* fix: rm unconfigured psms

* feat: Add v1.4.0 audits (#99)

* fix: rm redundant audits, add chainsecurity

* feat: add cantina audit

* feat: Deploy v1.4.0 staging (#103)

* feat: deploy v1.4.0 staging

* fix: newlines

* fix: update testing

* feat: Update testing to use USDT pools, focus on USDT approval functionality (#101)

* fix: rm redundant audits, add chainsecurity

* feat: add cantina audit

* fix: refactor tests

* test: add allowance assertions

* test: add coverage for swap rate limits

* fix: update to use higher swaps

* refactor: Remove `setRateLimitData` from RateLimitHelpers (SC-962) (sparkdotfi#108)

* refactor: Split out Curve and PSM logic into libraries (SC-971) (#104)

* refactor: Init library to take multiple relayers (SC 961) (sparkdotfi#109)

* refactor: Spin out logic of CCTP into a library (SC-970) (#105)

* deploy optimism (sparkdotfi#111)

* feat: Adds forceApprove logic (SC-978) (sparkdotfi#110)

* feat: Deploy Unichain (SC-992)

* cleanup: Remove BUIDL redeem facility (SC 994)

* chore: Change `CENTRIFUGE_REQUEST_ID` var to constant (sparkdotfi#118)

* chore: change var to constant

* use internal

* feat: Add LayerZero integration (SC-982) (sparkdotfi#119)

* feat: layerzero integration

* fix review

* change note

* fix followup review

* add success tests

* fix review

* add gas cost test

* chore: linting

* add tests for setter functions

* chore: linting

* chore: linting

* fix: Update README (sparkdotfi#121)

* fix: Order params consistently (sparkdotfi#122)

* fix: interface (sparkdotfi#124)

* fix: Use more robust `_approve` (SC-1036) (sparkdotfi#126)

* feat: add requires

* fix: add full test coverage

* feat: Gas optimize `approve` (SC-1037) (sparkdotfi#128)

* feat: add requires

* fix: add full test coverage

* feat: reuse `approveData` in (Mainnet|Foreign)Controller._approve.

* fix: typo (causing compilation error).

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* Minor issues (#14 from audit) (SC-1032) (sparkdotfi#130)

* chore: rm `IMetaMorpho` imports in MainnetController.sol.

* chore: rm `AccessControl` import in CurveLib.sol.

* chore: rm `RateLimitHelpers` import in PSMLib.sol.

* fix: `multiplied` spelling.

* chore: change IERC(20|4626) to openzeppelin.

* chore: rm import from ForeignController.sol.

* fix: alphabetical ordering.

* fix: re-order imports.

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Make `transferTokenLayerZero` payable (SC-1039) (sparkdotfi#127)

* fix: make transfer function payable

* fix: review

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* feat: Set LayerZero recipients in deploy (SC-1038) (sparkdotfi#129)

* feat: setLayerzeroRecipients in deploy

* fix: review

* fix: build

* fix: align

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Add missing approval (SC-1035) (sparkdotfi#123)

* fix: add missing approval

* add comments

* fix: comments

* fix: comments

* fix: comment

---------

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: Reuse approveData in CurveLib (sparkdotfi#131)

* feat: Add v1.5 audit reports (SC-1044) (sparkdotfi#132)

* feat: add cantina audit

* fix: update spark-address-registry

* feat: add new audits

* fix: rm ds store files and add to gitignore

* feat: bring back superstate & maple; remove centrifuge crosschain transfers

* cleanup deployments

---------

Co-authored-by: Sam MacPherson <xylom44@gmail.com>
Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>
Co-authored-by: Jeroen <1748621+hieronx@users.noreply.github.com>
Co-authored-by: supercontracts <bonjour.tabish@gmail.com>
Co-authored-by: Dom <18601956+hacker-DOM@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants