Releases: 0xIntuition/intuition-beta-contracts
v1.0.0
This release marks some important changes that happened as a result of the Hats Finance audit competition that happened from June 21st - July 5th.
These changes include:
- Standardization of fee names to singular across the repository (
protocolFee
,entryFee
,exitFee
) - Refactored event variable names and improved NatSpec for all events: Variable names are now more descriptive and explicit with their naming, we make a clear distinction between the
receiver
andsender
, and we also do not use the termsuser
andowner
in this context anymore to avoid any possible confusion (all changes are outlined in detail here) - Improved both Gitbook and NatSpec documentation related to our core contracts based on the feedback from Hats issues
- Added 2-step ownership transfer process for
AtomWallet
usingOwnable2StepUpgradeable
contract from OpenZeppelin as a base - Added an approval process to allow receivers to approve other addresses to be able to deposit on atom and triples on their behalf
- Improved time validation and custom error handling in
_validateSignature
inAtomWallet
- Improved our
CustomMulticall3
contract, and added its deployment to our deploy scripts - Added new events for important parameter changes to improve transparency and third party integrations:
OperationScheduled
,OperationCancelled
,AdminSet
,ProtocolMultisigSet
,MinDepositSet
,MinShareSet
,AtomUriMaxLengthSet
,AtomWalletInitialDepositAmountSet
,AtomCreationProtocolFeeSet
,TripleCreationProtocolFeeSet
,AtomDepositFractionOnTripleCreationSet
,AtomDepositFractionForTripleSet
,EntryFeeSet
,ExitFeeSet
,ProtocolFeeSet
andAtomWardenSet
- Added important configuration items (Cancun EVM version support, dependency versions are upgraded, etc.)
- Improved checks in
deployAtomWallet
, which it is now returning the deployed atom wallet address if trying to deploy it again, for better ERC-4337 compatibility - Miscellaneous improvements: Storage gaps, explicit
maxRedeem
checks, addedmaxDeposit
function for better ERC-4626 compatibility, minor gas optimizations, etc.
This release is the last one before the V1 protocol release and the official deployment on Base.
v0.5.0
This release continues to improve upon our testing tools and coverage by adding the automated security tools to detect the possible smart contract vulnerabilities:
- Slither (static analysis)
- Manticore (symbolic execution)
- Diligence Fuzzing (fuzz testing tools)
Moreover, custom multicall contract instance is now added as a utility contract to help with wider integrations with frontend and backend. To be more precise, our CustomMulticall3
contract enables us to create a triple with a brand new atom in a single transaction, or even to create 3 new atoms and a new triple comprised of them, also in a single transaction.
Finally, this release also includes some important refactoring, in particular related to variable naming when it comes to events and various fee names.
v0.4.0
Introduced significant improvements to our suite of invariant tests:
- Added the necessary assertions for the atom vault lifecycle (
createAtom
-->depositAtom
-->redeemAtom
) for both single vault and multi vault actors - Added the necessary assertions for the triple vault lifecycle (
createTriple
-->depositTriple
-->redeemTriple
) for both single vault and multi vault actors - Improved the solvency tests, for both the atom an triple vaults, as well as for the entire EthMultiVault contract
Also, use case tests for all of the major functions of the both atom and triple vault lifecycle were added, with the exception of redeemTriple
which will is expected to be included in the next release.
Finally, another major refactoring was conducted to ensure our contracts are following both the official Solidity style guide and the Solidity style guide by the Base team, with the refactoring encompassing also the interfaces, libraries and scripts.
v.0.3.0
Added the functionality in the AtomWallet
that checks if the ownership over the particular atom wallet has been claimed or not, and based on that returns the owner: the new owner (user) - if the ownership has been claimed, or the atomWarden's
address - if the ownership has not been claimed yet. This update also introduces the setAtomWarden
method in the EthMultiVault
contract, and In the case of atomWarden
address being updated, only the non-claimed atom wallets are affected and their new owner will be automatically updated.
v.0.2.0
Added the functionality in createTriple which instead of distributing both atomDepositFractionAmount
and the new static fee called tripleConfig.atomDepositFractionOnTripleCreation
in a way that just solely gets user shares in each atom, it instead uses atomDepositFractionAmount to give user shares in each atom, and now distributes this new static fee in a way that just increments the underlying atoms' totalAssets without giving user any shares, thus benefitting the atoms being used to compose triples.
// deposit assets into each underlying atom vault and mint shares for the receiver
if (atomDepositFraction > 0) {
_depositAtomFraction(
id,
msg.sender, // receiver
atomDepositFraction
);
}
for (uint256 i = 0; i < 3; i++) {
uint256 atomId = tripleAtomIds[i];
// increase the total assets in each underlying atom vault
_setVaultTotals(
atomId,
vaults[atomId].totalAssets + (tripleConfig.atomDepositFractionOnTripleCreation / 3),
vaults[atomId].totalShares
);
}
v0.1.0
- Updated Deposited event
/// @param sender initializer of the deposit
/// @param receiver beneficiary of the minted shares
/// @param vaultBalance total assets held in the vault
/// @param userAssetsAfterTotalFees total assets that go towards minting shares for the receiver
/// @param sharesForReceiver total shares transferred
/// @param entryFee total fee amount collected for entering the vault
/// @param id vault id
event Deposited(
address indexed sender,
address indexed receiver,
uint256 vaultBalance,
uint256 userAssetsAfterTotalFees,
uint256 sharesForReceiver,
uint256 entryFee,
uint256 id
);
- Updated Redeemed event:
/// @param sender initializer of the withdrawal
/// @param owner owner of the shares that were redeemed
/// @param vaultBalance total assets held in the vault
/// @param assetsForReceiver quantity of assets withdrawn by the receiver
/// @param shares quantity of shares redeemed
/// @param exitFee total fee amount collected for exiting the vault
/// @param id vault id
event Redeemed(
address indexed sender,
address indexed owner,
uint256 vaultBalance,
uint256 assetsForReceiver,
uint256 shares,
uint256 exitFee,
uint256 id
);
- New function getDepositSharesAndFees with new return values
/// @param assets amount of `assets` to calculate fees on (should always be msg.value - protocolFees)
/// @param id vault id to get corresponding fees for
/// @return totalAssetsDelta changes in vault's total assets
/// @return sharesForReceiver changes in vault's total shares (shares owed to receiver)
/// @return userAssetsAfterTotalFees amount of assets that goes towards minting shares for the receiver
/// @return entryFee amount of assets that would be charged for the entry fee
function getDepositSharesAndFees(uint256 assets, uint256 id)
public
view
returns (uint256, uint256, uint256, uint256)
{
....
return (totalAssetsDelta, sharesForReceiver, userAssetsAfterTotalFees, entryFee);
}