Skip to content

Commit

Permalink
wans market (#26)
Browse files Browse the repository at this point in the history
Co-authored-by: João Bruno - Balancer Labs <[email protected]>
  • Loading branch information
franzns and joaobrunoah authored Feb 5, 2025
1 parent 70800a1 commit c0d4ada
Showing 1 changed file with 33 additions and 0 deletions.
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;
}
}

0 comments on commit c0d4ada

Please sign in to comment.