Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wans market #26

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Changes from all commits
Commits
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
33 changes: 33 additions & 0 deletions test/sonic/ERC4626SonicSiloWanS.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.24;

import "forge-std/Test.sol";

import { IERC4626 } from "@openzeppelin/contracts/interfaces/IERC4626.sol";

import { ERC4626WrapperBaseTest } from "../ERC4626WrapperBase.t.sol";

contract ERC4626SonicSiloV2WanSTest is ERC4626WrapperBaseTest {
function setUp() public override {
ERC4626WrapperBaseTest.setUp();

// By default Silo V2 uses 21 decimals for their ERC4626 implementation.
// Specifically to support balancer boosted pools, they've deployed markets with 18 decimals that truncate
// the last 3 decimal places. Since the additional 3 digits of precision are always 0 and only used as an
// additional layer of security against first deposit attacks, it does not impact the functioning of the market.
// As such, the conversion rate is 1:1000, which we account for here by overwriting underlyingToWrappedFactor
underlyingToWrappedFactor = 1000;
}

function setUpForkTestVariables() internal override {
network = "sonic";
overrideBlockNumber = 6634482;

// Silo V2's wS in wans/ws market (id 25)
wrapper = IERC4626(0x016C306e103FbF48EC24810D078C65aD13c5f11B);
// Donor of solvBTC
underlyingDonor = 0xE223C8e92AA91e966CA31d5C6590fF7167E25801;
amountToDonate = 50 * 1e18;
}
}