Releases: SmarDex-Ecosystem/usdn-contracts
Releases · SmarDex-Ecosystem/usdn-contracts
v1.0.1
1.0.1 (2025-02-07)
Features
- add longFarming in scanRoles (#857) (a7b1a85)
- add the Balancer.fi adaptor of the wusdn token (#859) (1b66219)
- change version (#858) (baf6d8a)
- mainnet balancer adapter deployment (#860) (f6867f0)
- mainnet deployment (#853) (f9171be)
- remove slither (#863) (1fafc13)
- script: gnosis tx builder (#847) (3ecf7f6)
Bug Fixes
- logs-analysis-script: fix wrong abi being used and update default addresses (#856) (726a339)
- script: revoke middleware admin role (#851) (df57127)
Documentation
Code Refactoring
v1.0.0
v0.24.2
0.24.2 (2025-01-15)
Features
- _triggerRebalancer: add a minimum acceptable value for the accMultiplier (#828) (12d21a4)
- add initial wsteth price on mock middleware (#822) (a8edb49)
- add verification in setLowLatencyDelay (#827) (d158b45)
- deployment: update script to handle early wUSDN deployment (#818) (d5f2663)
- doc: add a script to fix the generated doc (#816) (bd06319)
- protocol: add rewards for the burnSdex() caller (#794) (68a188d)
- protocol: change default SDEX burn ratio to 5% (#782) (6fb341d)
- reduce library sizes (#840) (d88ecb1)
- script: update deployment script to handle safe ownership (#803) (cd865c2)
- script: upgrade script for tenderly v0.24.0 deployment (#776) (30413c5)
- sdex-fees: SDEX fees are now held by the protocol (#790) (95abb9f)
- small fixes (#812) (382a15b)
- wusdn: add redemption rate function (#821) (7e21277)
Bug Fixes
- callback argument (#789) (6c4a956)
- handleNegativeBalances: add check if balances are still negative (#823) (02d59df)
- long: avoid edge case underflow in validateOpenPosition above max leverage (#832) (ebf0e67)
- middleware: relax round ID check (#825) (e270e09)
- open-max-leverage: fix wrong values being used for calculating the new pos value and total expo (#810) (e50a324)
- pause: apply the funding for the period between the last update timestamp and the pause (#811) (2856203)
- rebalancer: add amounts when position is pending and rebalancer liquidated (#809) (378c425)
- rebalancer: set the long balance to 0 if subtracting the pos value would underflow (#784) (9f24ad2)
- remove unused imports throughout the codebase (#813) (9898a54)
- triggerRebalancer: add the bonus when calculating the minimum position amount (#829) (d12cf1e)
- vault asset available with funding, deposit, withdrawal (#826) (dd4308b)
Miscellaneous Chores
- deploy: usdn token mainnet (#798) (15c2e3e)
- remove unused files and fix natspec in utils (#838) (b9a0228)
- update flake and trufflehog commands (#815) (7709b36)
- update licence year (#814) (622b7c5)
- upgrade: upgrade on tenderly from v0.24.0 to v0.24.1 (#788) (d79e83b)
- v2 add version and date on first page only (#808) (a10ad74)
- verify script (#662) (7340e1a)
- verify script handle tuple parameter (#795) (45a3374)
Code Refactoring
v0.24.1
0.24.1 (2024-12-11)
Features
- deployment: v0.24.0 on tenderly (#733) (639b268)
- script: new script to deploy the USDN token (#759) (b665277)
- whitepaper headlines (#745) (7466778)
Bug Fixes
- rebalancer: change condition on block.timestamp when initializing a close position (#764) (bfb991b)
- script: function clashes are now compared to common inheritance (#730) (5491102)
- test: wrong import path (#754) (144a83e)
- validate-open: liquidate the position if start price is below liqPriceWithoutPenaltyNorFunding (#766) (efd3fba)
Performance Improvements
Code Refactoring
- move logic and achieve full coverage for UsdnProtocolLongLibrary (#736) (b6504c9)
- rebalancer: remove unused attribute in the
InitiateCloseData
struct (#763) (a5f4871) - setters: update max limit for SDEX burn ratio (#771) (cc82961)
Build System
v0.24.0
0.24.0 (2024-11-26)
⚠ BREAKING CHANGES
- protocol: No constant is now exposed, but they all are in the constants library
Features
- add more validation on admin functions (#716) (79debf7)
- adding mapping to store an history of Rebalancer (#717) (d8e3725)
- deployement: deploy v0.23.0 (#720) (3b6a201)
- protocol: remove all constants getters (#724) (3dddf21)
- rebalancer: add reentrancy guards to all user functions (#725) (ee3021f)
- remove-blocked-pending-action: add
_onChainValidatorDeadline
to the delay (#719) (d0e3900)
Bug Fixes
- honor CEI pattern in
initiateDeposit
wrttransferCallback
(#702) (7116457) - limit condition when checking imbalance during withdrawal (#709) (880f7da)
- make docker-release compatible with router (#699) (62c23cc)
- oracle middleware interface (#731) (d94433a)
- perform liquidations with
lastPrice
in all cases (#722) (85618b2)
Performance Improvements
v0.23.0
0.23.0 (2024-11-21)
⚠ BREAKING CHANGES
- the
IUsdnProtocol.getActionablePendingActions
function takes two additional parameterslookAhead
andmaxIter
, theMAX_ACTIONABLE_PENDING_ACTIONS
constant has been replaced withMIN_ACTIONABLE_PENDING_ACTIONS_ITER
. IUsdnProtocol.validateOpenPosition
has a new return valueposId_
with the position ID which could have changed during execution.- initiateClose/validateClose/validateOpen now outputs an enum with 3 different values
- the
TimeLimitsUpdated
event now have a newcloseDelay
parameter, theTimeLimits
struct now have a newcloseDelay
parameter, allTimeLimits
struct parameters are now of typeuint64
- the order of arguments for
IUsdnProtocol.transferPositionOwnership
was changed
Features
- add
lookAhead
andmaxIter
parameters togetActionablePendingActions
(#701) (179f31e) - add reentrancy guard on
removeBlockedPendingAction
(#694) (e00de48) - change the return value of the initiateClose/validateClose/validateOpen functions (#692) (3689a02)
- delete pUSDN (#697) (81e23fa)
- protcol: stop fundings during pause period (#678) (dd6fbd7)
- protocol: add a condition on limits setter (#703) (386e67f)
- rebalancer close delay (#677) (b8685f2)
- remove the callbacks in the initialize function (#669) (dee780a)
- return potentially updated posId in
validateOpenPosition
(#706) (cd3a0e1) - validate-close: add remaining collateral to the vault when data.positionValue < 0 (#679) (b70c6ce)
Bug Fixes
- bad debt handling in open (#708) (972a700)
- change typo (#707) (a2691aa)
- getHighestPopulatedTick now always return the highest populated tick (#705) (ceba279)
- refund-security-deposit: add reentrency guard (#689) (a0cea30)
- trigger-rebalancer: clamp the vault balance to 0 when it's added to the pending balance vault (#711) (c4a4635)
Performance Improvements
Code Refactoring
v0.22.0
0.22.0 (2024-11-11)
⚠ BREAKING CHANGES
- delegated transfer position ownership (#661)
- rebalancer delegated initiate close (#640)
- change roles and add script to transfer ownership of the protocol (#650)
- remove the rebase interval (#653)
Features
- add pUSDN token (#668) (bce850b)
- assert limits on setters (#658) (f7c72d6)
- change roles and add script to transfer ownership of the protocol (#650) (b65c6b2)
- delegated transfer position ownership (#661) (7dae4f3)
- protocol: eip7201: Namespaced Storage Layout implementation (#666) (0373c02)
- rebalancer delegated initiate close (#640) (79c93da)
- script: calculate the deposit amount from the long one in the deployment script (#671) (b2e5815)
- script: refactor the protocol's deployment (#673) (8e9125e)
- tenderly deploy (#659) (ecb8bbd)
- version EIP712 doc (#649) (d8180e0)
- wusdn: revert when trying to wrap zero token (#660) (f8cfbb6)
Bug Fixes
- blocked-action: send the value of the blocked action to the to address rather than the vault (#672) (8a7b98c)
- deposit: add the vault fee to the vault balance to calculate the amount of shares to mint (#635) (8db4b48)
- long: calculate leverage using the liquidation price, excluding penalty and funding in validate open position (#665) (aaea6d6)
- pyth-oracle: add a check to revert if the expo of the unsafe price is positive (#652) (a10bdb7)
- rebalancer: notify the rebalancer when its tick has been liquidated (#642) (6d96c8e)
- remove the rebase interval (#653) (e5f0bce)
- remove-blocked-action: reset the tick penalty if the postiion was the last one in the tick (#655) (7212efd)
- remove-blocked-pending-action: account for the vault fees in the pending vault balance (#657) (47d5709)
- validate-open: liquidate the position if the price at T+24 is below the liquidation price (#639) (bb8825b)
- validate-withdrawal: avoid an underflow by sending what remains in the vault (#674) (afc3c2e)
- vault: use current totalShares in validate withdrawal (#638) (776c366)
v0.21.0
0.21.0 (2024-10-22)
⚠ BREAKING CHANGES
Features
- delegated initiate close (#629) (096404c)
- docker build (#614) (59622c1)
- eip712 integration (#624) (33a1e41)
- update build dependencies (#623) (4e2bfcc)
Bug Fixes
- calculate the original liquidation price without penalty and funding from the initiate in validate open position (#628) (7835be6)
- close: extrapolate trading expo to block timestamp (#608) (9a472ba)
- compare slippage against the adjusted price (#613) (b7789f0)
- fee open imbalance check (#616) (1ebcb5a)
- initiate-close: apply the position fee to the price before checking it against the min price (#630) (430a7a6)
- liquidation-rewards: convert the bonus in stEth (#632) (91fdb61)
- long: reset liquidation penalty in tick data on close (#615) (079a405)
- rebalancer: forward liquidator rewards to the msg.sender (#633) (7e28eeb)
- rebalancer: prevent a rebalancer trigger during a rebalancer initiateClosePosition call (#627) (4e541ff)
- runSlither in CI (#626) (aba54db)
- slither error on MockWstETH receive function (#620) (ffb8d5a)
- validate-open: fix the liquidation price check to include the penalty (#631) (4d6d383)