Skip to content

Conversation

@avniculae
Copy link

@avniculae avniculae commented Jul 17, 2025

  • modifies existing v3 deployment scripts to deploy horizon specific contracts as well: RwaAToken implementation, RwaATokenManager.
  • creates script to deploy the horizon instance, together with tests
  • introduces payload for Phase 1 Horizon listings, together with tests

avniculae and others added 25 commits May 15, 2025 09:37
* feat: initial rwa atoken impl

* feat: rwa atoken transfer tests

* feat: more rwa atoken transfer tests

* fix: address comments

* feat: one more test

* fix: lint

* fix: address comments

* Update src/contracts/protocol/libraries/helpers/Errors.sol

Co-authored-by: dhairya <[email protected]>

* feat: add transferOnLiquidation tests

* fix: transfer on liquidation restriction

* Update src/contracts/protocol/tokenization/RWAAToken.sol

Co-authored-by: YBM <[email protected]>

* Update src/contracts/protocol/tokenization/RWAAToken.sol

Co-authored-by: YBM <[email protected]>

* feat: address comments (forceTransfer)

* fix: return in forceTransfer

* fix: IRWAAToken docs

* feat: rwa liquidation tests

* Update tests/protocol/tokenization/RwaATokenTransfers.t.sol

Co-authored-by: YBM <[email protected]>

* Update src/contracts/interfaces/IRWAAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* fix: address comments

* Update src/contracts/interfaces/IRWAAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* feat: support for non-rebasing tokens

* fix: v3 tests naming

* fix: address comments

* feat: rename rwa atoken impl

* feat: compute liq calculations

* fix: add rwa atoken docs

* fix: testing setup fixes

* fix: transfer tests

* feat: block transferOnLiquidation

* fix: address comments

* fix: add comment

* Update tests/protocol/pool/Pool.Liquidations.Rwa.t.sol

Co-authored-by: YBM <[email protected]>

* Update tests/protocol/pool/Pool.Liquidations.Rwa.t.sol

Co-authored-by: YBM <[email protected]>

* fix: address comments

* fix: comment

* Update src/contracts/interfaces/IRwaAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/protocol/tokenization/RwaAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* Update tests/protocol/pool/Pool.Liquidations.Rwa.t.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/protocol/tokenization/RwaAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* feat: address comments

* fix: existing tests

* fix: address comments

* fix: address comments

* fix: comments

* fix: comments

* fix: proxy admin assume

* feat: update gas report

---------

Co-authored-by: dhairya <[email protected]>
Co-authored-by: YBM <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
* feat: initial rwa atoken impl

* feat: rwa atoken transfer tests

* feat: more rwa atoken transfer tests

* fix: address comments

* feat: one more test

* fix: lint

* fix: address comments

* Update src/contracts/protocol/libraries/helpers/Errors.sol

Co-authored-by: dhairya <[email protected]>

* feat: add transferOnLiquidation tests

* fix: transfer on liquidation restriction

* Update src/contracts/protocol/tokenization/RWAAToken.sol

Co-authored-by: YBM <[email protected]>

* Update src/contracts/protocol/tokenization/RWAAToken.sol

Co-authored-by: YBM <[email protected]>

* feat: address comments (forceTransfer)

* fix: return in forceTransfer

* fix: IRWAAToken docs

* feat: rwa liquidation tests

* feat: restrict supply onBehalfOf

* Update tests/protocol/tokenization/RwaATokenTransfers.t.sol

Co-authored-by: YBM <[email protected]>

* Update src/contracts/interfaces/IRWAAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* fix: address comments

* Update src/contracts/interfaces/IRWAAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* feat: support for non-rebasing tokens

* fix: v3 tests naming

* fix: address comments

* feat: rename rwa atoken impl

* feat: restrict supply onBehalfOf

* test: add fuzz tests

* chore: comments

* test: supplyWithPermit fail

* test: more scenarios around supplyWIthPermit

* chore: pr comments, natspec

* fix: resolve override

* fix: rename error

* feat: compute liq calculations

* fix: add rwa atoken docs

* fix: testing setup fixes

* fix: transfer tests

* feat: block transferOnLiquidation

* fix: address comments

* fix: add comment

* Update tests/protocol/pool/Pool.Liquidations.Rwa.t.sol

Co-authored-by: YBM <[email protected]>

* Update tests/protocol/pool/Pool.Liquidations.Rwa.t.sol

Co-authored-by: YBM <[email protected]>

* fix: address comments

* fix: comment

* Update src/contracts/interfaces/IRwaAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/protocol/tokenization/RwaAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* Update tests/protocol/pool/Pool.Liquidations.Rwa.t.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/protocol/tokenization/RwaAToken.sol

Co-authored-by: miguelmtz <[email protected]>

* feat: address comments

* fix: existing tests

* fix: address comments

* fix: address comments

* fix: comments

* fix: comments

* fix: proxy admin assume

* feat: update gas report

* chore: pr comments

* chore: address pr comments

* fix: small refactor

---------

Co-authored-by: Alexandru Niculae <[email protected]>
Co-authored-by: dhairya <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
…ngTo (#4)

* tests: block mintToTreasury

* chore: update borrowable on existing test buidl

* refactor: approve immediately before repay

* fix: mintToTreasury test cleanup

* feat: block transferUnderlyingTo

* feat: flashloan tests for transferUnderlyingTo

* refactor: PoolRwaTests cleanup

* fix: address comments

* fix: refactor testing setup

* fix: add supply test

* Update src/contracts/interfaces/IRwaAToken.sol

---------

Co-authored-by: Alexandru Niculae <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
* feat: initial rwa atoken manager impl

* feat: rwa atoken manager tests

* Update src/contracts/interfaces/IRwaATokenManager.sol

Co-authored-by: YBM <[email protected]>

* Update src/contracts/interfaces/IRwaATokenManager.sol

Co-authored-by: YBM <[email protected]>

* fi: rwa atoken manager docs

* Update tests/protocol/configuration/RwaATokenManager.t.sol

Co-authored-by: YBM <[email protected]>

* fix: address comments

* fix: comments

* fix: address comments

* fix: address comments

* feat: validate authorizedTransfer validates transfer

* fix: compiler warnings

* fix: rename transfer roles

* Update src/contracts/interfaces/IRwaATokenManager.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/interfaces/IRwaATokenManager.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/interfaces/IRwaATokenManager.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/interfaces/IRwaATokenManager.sol

Co-authored-by: miguelmtz <[email protected]>

* fix: rename transfer role

* Update src/contracts/misc/RwaATokenManager.sol

Co-authored-by: miguelmtz <[email protected]>

* Update src/contracts/interfaces/IRwaATokenManager.sol

Co-authored-by: miguelmtz <[email protected]>

* fix: comments

---------

Co-authored-by: YBM <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
* feat: init docs; final natspec updates

* doc: cleanup

* chore: address pr comments

* chore: pr comments

* chore: pr comments
* feat: move targeted rwa pool tests

* feat: rwa pool tests

* feat: rwa tokenization tests

* feat: add rwa rescueTokens tests

* feat: add rwa gas tests

* fix: gas snapshots

* fix: address comments

* feat: clean up atoken mocks

* fix: fn order

* fix: address comments

* fix: fuzz tests

* fix: comment

* fix: comments

* feat: horizon tests restructure

* fix: Fix typo

* fix: Fix typo

* Update tests/protocol/horizon/Pool.Horizon.t.sol

Co-authored-by: miguelmtz <[email protected]>

* Update tests/protocol/horizon/Pool.Horizon.t.sol

Co-authored-by: miguelmtz <[email protected]>

* fix: small tests fixes

* fix: mock atoken instance cleanup

* fix: mocks cleanup

* fix: cleanup

---------

Co-authored-by: miguelmtzinf <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
* fix: [I-02]

* fix: [I-03]

* fix: [I-05]

* fix: [I-06]

* fix: import file paths

* fix: [I-07]

* Update docs/Horizon/Horizon-overview.md

Co-authored-by: YBM <[email protected]>

* Update docs/Horizon/Horizon-overview.md

Co-authored-by: YBM <[email protected]>

* Update docs/Horizon/Horizon-overview.md

Co-authored-by: YBM <[email protected]>

* Update docs/Horizon/Horizon-overview.md

Co-authored-by: YBM <[email protected]>

* fix: docs

* fix: docs

---------

Co-authored-by: YBM <[email protected]>
* Add Certora formal verification work

* fix: Fix typos

---------

Co-authored-by: Nissan Levi <[email protected]>
@avniculae avniculae force-pushed the feat/horizon-rwa-deployment branch from d3cba41 to b5f9f3d Compare August 12, 2025 12:06
@avniculae avniculae force-pushed the feat/horizon-rwa-deployment branch from b5f9f3d to 419d0d9 Compare August 12, 2025 12:09
certora-run[bot]

This comment was marked as spam.

certora-run[bot]

This comment was marked as spam.

certora-run[bot]

This comment was marked as spam.

certora-run[bot]

This comment was marked as spam.

certora-run[bot]

This comment was marked as spam.

certora-run[bot]

This comment was marked as spam.

certora-run[bot]

This comment was marked as spam.

certora-run[bot]

This comment was marked as spam.

@avniculae avniculae merged commit efc0ad9 into main Aug 13, 2025
7 checks passed
@avniculae avniculae deleted the feat/horizon-rwa-deployment branch August 13, 2025 08:25
@avniculae avniculae restored the feat/horizon-rwa-deployment branch August 13, 2025 12:08
Copy link

@certora-run certora-run bot left a comment

Choose a reason for hiding this comment

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

Verification Results

  • Group ID: eb089271-6a12-4bfe-a006-263cf0ee5bed
Job Result VERIFIED Link
VariableDebtToken.conf 15 Link
UserConfiguration.conf 13 Link
stableRemoved.conf 2 Link
RwaAToken.conf 13 Link
ReserveConfiguration.conf 19 Link
NEW-pool-simple-properties.conf --rule_sanity none --rule cannotBorrowZeroAmount 1 Link
NEW-pool-simple-properties.conf --rule_sanity none --rule cannotBorrowOnReserveDisabledForBorrowing 1 Link
NEW-pool-simple-properties.conf --rule_sanity none --rule cannotBorrowOnInactiveReserve 1 Link
NEW-pool-simple-properties.conf --rule_sanity none --rule cannotBorrowOnFrozenReserve 1 Link
NEW-pool-simple-properties.conf --rule cannotWithdrawZeroAmount 1 Link
NEW-pool-simple-properties.conf --rule cannotWithdrawFromInactiveReserve 1 Link
NEW-pool-simple-properties.conf --rule cannotDepositZeroAmount 1 Link
NEW-pool-simple-properties.conf --rule cannotDepositInInactiveReserve 1 Link
NEW-pool-simple-properties.conf --rule cannotDepositInFrozenReserve 1 Link
NEW-pool-no-summarizations.conf 3 Link
EModeConfiguration.conf 5 Link
AToken.conf 13 Link

Copy link

@certora-run certora-run bot left a comment

Choose a reason for hiding this comment

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

Verification Results

  • Group ID: 26252431-af24-4740-8d37-f44b09f5f5c2
Job Result VERIFIED Link
verifyStataToken.conf --rule totalClaimableRewards_stable 2 Link
verifyStataToken.conf --rule totalAssets_stable 2 Link
verifyStataToken.conf --rule solvency_total_asset_geq_total_supply 2 Link
verifyStataToken.conf --rule solvency_positive_total_supply_only_if_positive_asset 2 Link
verifyStataToken.conf --rule singleAssetAccruedRewards 2 Link
verifyStataToken.conf --rule rewardsTotalDeclinesOnlyByClaim 0 Link
verifyStataToken.conf --rule rewardsConsistencyWhenSufficientRewardsExist 2 Link
verifyStataToken.conf --rule rewardsConsistencyWhenInsufficientRewards 2 Link
verifyStataToken.conf --rule getClaimableRewards_stable 2 Link
verifyStataToken.conf --rule getClaimableRewards_stable_after_refreshRewardTokens 2 Link
verifyStataToken.conf --rule getClaimableRewards_stable_after_deposit 2 Link
verifyStataToken.conf --rule getClaimableRewardsBefore_leq_claimed_claimRewardsOnBehalf 2 Link
verifyERC4626Extended.conf --rule redeemSum 2 Link
verifyERC4626Extended.conf --rule redeemATokensSum 2 Link
verifyERC4626DepositSummarization.conf --rule depositCheckIndexGRayAssert1 depositATokensCheckIndexGRayAssert1 depositWithPermitCheckIndexGRayAssert1 depositCheckIndexERayAssert1 depositATokensCheckIndexERayAssert1 depositWithPermitCheckIndexERayAssert1 7 Link
verifyERC4626.conf --rule maxMintMustntRevert maxDepositMustntRevert maxRedeemMustntRevert maxWithdrawMustntRevert totalAssetsMustntRevert 6 Link
verifyDoubleClaim.conf --rule prevent_duplicate_reward_claiming_single_reward_sufficient 2 Link
verifyDoubleClaim.conf --rule prevent_duplicate_reward_claiming_single_reward_insufficient 2 Link
verifyAToken.conf --rule aTokenBalanceIsFixed_for_collectAndUpdateRewards aTokenBalanceIsFixed_for_claimRewards aTokenBalanceIsFixed_for_claimRewardsOnBehalf 4 Link
verifyAToken.conf --rule aTokenBalanceIsFixed_for_claimSingleRewardOnBehalf aTokenBalanceIsFixed_for_claimRewardsToSelf 3 Link
tWithPermitCheckIndexGRayAssert2 depositCheckIndexERayAssert2 depositATokensCheckIndexERayAssert2 depositWithPermitCheckIndexERayAssert2 mintCheckIndexGRayUpperBound mintCheckIndexGRayLowerBound mintCheckIndexEqualsRay 10 Link
ToAssetsCheck convertToSharesCheck toAssetsDoesNotRevert sharesConversionRoundedDown toSharesDoesNotRevert previewDepositAmountCheck maxRedeemCompliance maxWithdrawConversionCompliance previewMintIndependentOfAllowance 23 Link
ingRange previewRedeemRoundingRange amountConversionPreserved sharesConversionPreserved accountsJoiningSplittingIsLimited convertSumOfAssetsPreserved previewDepositSameAsDeposit previewMintSameAsMint maxDepositConstant 10 Link

@avniculae avniculae deleted the feat/horizon-rwa-deployment branch August 21, 2025 13:24
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.

5 participants