Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
bc1db34
fix: use pending gain in liquityv2 stability pool
rajko-z Apr 24, 2026
8f3dd3c
fix: curveUsdHealthRatioTrigger unsafe cast
rajko-z Apr 24, 2026
b58b2c6
fix: bytes transient storage quadratic memory expansion
rajko-z Apr 25, 2026
04b72b3
feat: improve stETH fl action handling and tests
rajko-z Apr 27, 2026
6e37165
fix: use new curve usd flash address
rajko-z Apr 27, 2026
34bdb13
feat: remove unnecessary eth transfer in FLAction
rajko-z Apr 28, 2026
a22c7d9
feat: improve FLAction documentation regarding fees and return values
rajko-z Apr 28, 2026
f2216cb
fix: use full fl amount with any potential uniswapV3 fee as return value
rajko-z Apr 28, 2026
abdce27
docs: add comment to RecipeExecutor explaining the semantic of flash …
rajko-z Apr 28, 2026
7b8f4d9
refactor: use _ for morpho fl function params naming
rajko-z Apr 28, 2026
cac3602
feat: improve natspec in TokenPriceHelpers
rajko-z May 7, 2026
1643aaf
feat: add sanity checks to token helpers for division by 0
rajko-z May 7, 2026
a480598
fix: add wbtc special case to getRoundInfo for consistency
rajko-z May 7, 2026
073de27
feat: add sanity try catch if WBTC/BTC feed is unavailable
rajko-z May 11, 2026
51bfb28
feat: add additional selector check to TxSaverExecutor
rajko-z Apr 24, 2026
37eb37e
docs: additionaly explain trust model in TxSaverExecutor
rajko-z Apr 25, 2026
a1edbf2
docs: add comment explaining multiple fee takings for TxSaver recipe
rajko-z Apr 25, 2026
6830156
docs: explain additional offchain validations for TxSaver
rajko-z Apr 25, 2026
6aeced2
docs: add comment explaning txSaver order injection
rajko-z Apr 24, 2026
54fd16c
fix: use correct bytes4 param in IDFSRegistry interface
rajko-z May 7, 2026
7344602
refactor: add interfaces to exchange and wrappers registries
rajko-z Apr 29, 2026
6fa49a9
refactor: add interface for TokenGroupRegistry
rajko-z Apr 29, 2026
b8eefe2
feat: improve natspec for on-chain and off-chain wrappers
rajko-z May 3, 2026
48e89c4
refactor: rename DFSExchangeHelper to DFSWrapperHelper
rajko-z May 3, 2026
1e12dd8
refactor: remove DFSWrapperHelper from DFSExchangeCore
rajko-z May 11, 2026
40ea829
docs: add natspec to DFSWrapperHelper
rajko-z May 11, 2026
1f7d5d4
docs: add missing natspec for price scaling on price triggers
rajko-z May 6, 2026
005a767
docs: fix sub param mapping range
rajko-z May 7, 2026
062e6ec
feat: match gas calc for txsaver and automation with sanity checks
rajko-z Apr 25, 2026
763c93a
refactor: add natspec and improve code quality for exchange actions
rajko-z Apr 29, 2026
143f3ab
docs: add comment explaining offhchain swap reverts and fallback
rajko-z Apr 29, 2026
60cec91
fix: use correct from address when using type(uint256).max in sell ac…
rajko-z Apr 29, 2026
7aeeb03
fix: pipe LimitSell return value with fee taken
rajko-z May 3, 2026
1cb9176
feat: use cancun transient storage for limit sell strategies
rajko-z May 3, 2026
df9d054
fix: support eth <-> weth flow in sell actions
rajko-z May 3, 2026
90d4fb5
refactor: add common sell library
rajko-z May 3, 2026
6459272
feat: introduce GasCostLib
rajko-z May 5, 2026
9f854df
feat: abstract fee taking
rajko-z May 5, 2026
e3e0dbb
feat: add slippage sanity check to LSVSell
rajko-z May 7, 2026
313b819
feat: add additional sanity check for same assets sell
rajko-z May 10, 2026
8f8eb39
docs: explain zero fee taking when price is 0
rajko-z May 10, 2026
e92623e
feat: don't perform price lookup for ETH_ADDR as well
rajko-z May 10, 2026
26eeb82
refactor: deprecate old curveusd advanced actions
rajko-z May 11, 2026
1aae12e
refactor: remove unused curveusdhelper functions
rajko-z May 12, 2026
41db162
feat: add sanity checks to advanced curveusd actions
rajko-z May 12, 2026
27e5f99
feat: add sanity checks for advanced llamalend actions
rajko-z May 12, 2026
ebeb710
test: fix tx-saver tests
rajko-z May 12, 2026
d159c25
fix: remove DAI from aaveV3 flashloan tests
rajko-z May 12, 2026
7e508ff
fix: lsv sell tests
rajko-z May 12, 2026
e5020fc
fix: onchain wrappers tests
rajko-z May 12, 2026
7a33285
test: adapt offchain js exchange tests
rajko-z May 13, 2026
2994320
test: remove old tests for curveusd advanced actions
rajko-z May 14, 2026
927fbb8
test: update tests
milosdjurica May 14, 2026
0cbb8ea
fix: remove unused function from interface
milosdjurica May 14, 2026
ad653c5
refactor: deprecate unused gasFeeCalc action
rajko-z May 14, 2026
8054b4a
refactor: deprecate unused TokenBalanceTrigger
rajko-z May 14, 2026
f7c9611
refactor: remove unused references of bytes transient storage addr
rajko-z May 14, 2026
7954a8a
docs: improve natspec for transient storage actions
rajko-z May 14, 2026
76703da
Merge pull request #581 from defisaver/refactor/deprecate-unused-cont…
rajko-z May 26, 2026
147d1a4
Merge pull request #580 from defisaver/fix/js-tests
rajko-z May 26, 2026
ae91103
Merge pull request #579 from defisaver/fix/advanced-curveusd-llamalen…
rajko-z May 26, 2026
ab013f8
Merge pull request #574 from defisaver/improvement/add-exchange-inter…
rajko-z May 26, 2026
d915bb6
Merge pull request #573 from defisaver/fix/dfs-registry-interface
rajko-z May 26, 2026
1058b8a
Merge pull request #572 from defisaver/feat/tx-saver-improvements
rajko-z May 26, 2026
55ff9a8
test: reorder interfaces and abstract fl fee taking for FL actions tests
rajko-z May 26, 2026
be5a71c
Merge pull request #570 from defisaver/feat/fl-action-improvements
rajko-z May 26, 2026
58d8bcc
Merge pull request #569 from defisaver/fix/bytes-transient-storage-me…
rajko-z May 26, 2026
c98a1a7
Merge pull request #568 from defisaver/feat/curveusd-health-trigger-u…
rajko-z May 26, 2026
b73f3ea
Merge pull request #578 from defisaver/refactor/deprecate-old-curveus…
rajko-z May 26, 2026
ba08f26
Merge pull request #577 from defisaver/fix/exchange-bug-fixes-and-imp…
rajko-z May 26, 2026
a1ea807
feat: improve readability of transient storage contracts
rajko-z May 26, 2026
89115bc
test: add CHUNK_SIZE to TxSaverBytesTransientStorage test
rajko-z May 26, 2026
72baf02
feat: improve comments for no fee taking inside DFSSell
rajko-z May 26, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ contract LiquityV2SPDeposit is ActionBase, LiquityV2Helper {
function _spDeposit(Params memory _params) internal returns (uint256, bytes memory) {
IStabilityPool pool = IStabilityPool(IAddressesRegistry(_params.market).stabilityPool());

uint256 boldGain = _params.doClaim ? pool.getDepositorYieldGain(address(this)) : 0;
uint256 boldGain =
_params.doClaim ? pool.getDepositorYieldGainWithPending(address(this)) : 0;

uint256 collGain = _params.doClaim
? pool.getDepositorCollGain(address(this)) + pool.stashedColl(address(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ contract LiquityV2SPWithdraw is ActionBase, LiquityV2Helper {
function _spWithdraw(Params memory _params) internal returns (uint256, bytes memory) {
IStabilityPool pool = IStabilityPool(IAddressesRegistry(_params.market).stabilityPool());

uint256 boldGain = _params.doClaim ? pool.getDepositorYieldGain(address(this)) : 0;
uint256 boldGain =
_params.doClaim ? pool.getDepositorYieldGainWithPending(address(this)) : 0;

uint256 collGain = _params.doClaim
? pool.getDepositorCollGain(address(this)) + pool.stashedColl(address(this))
Expand Down
2 changes: 1 addition & 1 deletion contracts/views/LiquityV2View.sol
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ contract LiquityV2View is LiquityV2Helper {
compoundedBOLD = stabilityPool.getCompoundedBoldDeposit(_depositor);
collGain =
stabilityPool.getDepositorCollGain(_depositor) + stabilityPool.stashedColl(_depositor);
boldGain = stabilityPool.getDepositorYieldGain(_depositor);
boldGain = stabilityPool.getDepositorYieldGainWithPending(_depositor);
}

function getDebtInFront(address _market, uint256 _troveId, uint256 _acc, uint256 _iterations)
Expand Down
4 changes: 4 additions & 0 deletions test-sol/actions/liquityV2/LiquityV2SPDeposit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ contract TestLiquityV2SPDeposit is LiquityV2ExecuteActions, LiquityV2Utils {
);

wallet.execute(address(cut), vars.executeActionCallData, 0);
vm.warp(block.timestamp + 30 days);

(vars.compoundedBOLD, vars.collGain, vars.boldGain) =
viewContract.getDepositorInfo(address(_market), walletAddr);
Expand Down Expand Up @@ -145,6 +146,9 @@ contract TestLiquityV2SPDeposit is LiquityV2ExecuteActions, LiquityV2Utils {
vars.senderBoldBalanceAfter,
vars.senderBoldBalanceBefore - vars.depositAmount + vars.boldGain
);

assertEq(balanceOf(BOLD, walletAddr), 0);
assertEq(balanceOf(vars.collToken, walletAddr), 0);
assertEq(vars.compoundedBOLDAfter, vars.compoundedBOLD + vars.depositAmount);
assertEq(vars.collGainAfter, 0);
assertEq(vars.boldGainAfter, 0);
Expand Down
4 changes: 4 additions & 0 deletions test-sol/actions/liquityV2/LiquityV2SPWithdraw.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ contract TestLiquityV2SPWithdraw is LiquityV2ExecuteActions, LiquityV2Utils {

_simulateCollGain(_vars.stabilityPool, _vars.simulatedCollGain, _vars.collToken, walletAddr);

vm.warp(block.timestamp + 30 days);

_vars.senderCollBalanceBefore = balanceOf(_vars.collToken, sender);

_vars.senderBoldBalanceBefore = balanceOf(BOLD, sender);
Expand Down Expand Up @@ -225,6 +227,8 @@ contract TestLiquityV2SPWithdraw is LiquityV2ExecuteActions, LiquityV2Utils {
_vars.senderBoldBalanceAfter,
_vars.senderBoldBalanceBefore + _vars.withdrawAmount + _vars.boldGain
);
assertEq(balanceOf(BOLD, walletAddr), 0);
assertEq(balanceOf(_vars.collToken, walletAddr), 0);
assertEq(_vars.collGainAfter, 0);
assertEq(_vars.boldGainAfter, 0);
}
Expand Down