Skip to content

Conversation

@ReflectiveChimp
Copy link
Contributor

@ReflectiveChimp ReflectiveChimp commented Nov 14, 2024

@kexleyBeefy

  • update forge-std to 1.94 (for vm.expectPartialRevert, requires latest version of foundry)
  • update BaseTestHarness/WrapperTest/ProdVaultTest to use newer forge-std
  • Add multi-hop support to BeefySwapper
  • Add more tests for BeefySwapper
  • Make BeefySwapper implement IBeefySwapper
  • Add ability to set slippage by asset (pair)? with default fallback
  • Add tests for slippage settings
  • Make upgradable via timelock
  • Add test for upgradability
  • Way to toggle oracle check by pair (aka allow minAmountOut=0)
  • Use roles granulary allow other accounts to set swap routes / oracles
  • Way to have multiple routes for same pair (for when main route is the same CLM pool doing the swap which happens when liquidity is withdrawn)
    • store in mapping(address => mapping(address => mapping(bytes32 => SwapInfo))) [input=>output=>routeId=>SwapInfo]
    • use a fixed bytes32 for default route or mapping(address => mapping(address => bytes32))) [input=>output=>defaultRouteId] to allow setting/changing
    • add mapping(address => mapping(address => mapping(address=> bytes32))) [input=>output=>msg.sender=>routeId] to set route id for pair for a specific sender (e.g. strategy address)
    • add methods to set/change/delete the aboves
  • Way to set min swap amount for each pair and/or route that takes account of decimals/prices of all tokens in the route, so strategies can read and not try to do a swap that will fail because it gets rounded down to zero
  • (Question) Is mapping(bytes32 => XXX) cheaper than mapping(address => mapping(address => XXX)), (where the bytes32 key is keccak256(abi.encodePacked(address,address)))?

update BaseTestHarness/WrapperTest/ProdVaultTest to use newer forge-std
Add more tests for BeefySwapper
Make BeefySwapper implement IBeefySwapper
@ReflectiveChimp ReflectiveChimp changed the title Add multi-hop support to BeefySwapper BeefySwapper v2 Nov 20, 2024
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.

1 participant