// SPDX-License-Identifier: MIT | |
pragma solidity >=0.8.0; | |
import "solmate/tokens/ERC20.sol"; | |
contract MockERC20Fee is ERC20 { | |
// 2% fee for all transfers | |
uint256 internal feeRate = (2 / 100) * 1 ether; | |
constructor( | |
string memory name_, |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
import "forge-std/Test.sol"; | |
import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; | |
contract EnumerableMapTest is Test { | |
using EnumerableMap for EnumerableMap.AddressToUintMap; | |
EnumerableMap.AddressToUintMap map; |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.19; | |
library Execution { | |
function functionCallWithValue( | |
address to, | |
uint256 value, | |
bytes memory data | |
) internal returns (bytes memory) { | |
assembly { |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
import "forge-std/Test.sol"; | |
import "../../contracts/LSP0ERC725Account/LSP0ERC725Account.sol"; | |
contract Implementation { | |
// _pendingOwner is at slot 3 for LSP0ERC725Account | |
bytes32[3] __gap; | |
address _pendingOwner; |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
// From https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol | |
import {ERC20} from './ERC20.sol'; | |
contract Vault is ERC20 { | |
// Underlying asset | |
ERC20 public token; |
- OP Stack Documentation
- Optimism Bedrock Specs, relevant parts are:
- Overview
In the current market, yield farmers have only 2 options: either deposit into a yield aggregator that completely manages their money for them, making all the risk assessments and moving their money between protocols, or just run everything on their own, moving their money continuously between protocols, at most using an auto-compounder on a single vault for some automation.
However, not everyone has the same risk profile and thus fully managed aggregators won't fit everyone, while on the other hand there's a big market of people that don't like constantly having to manage their positions and shuffle their funds. These two options are the 2 extremes, either fully managed or DYI.
Because of this I believe there's a market for users that want some automation while being able to set their own risk profile.
I propose a protocol where users deposit funds along with policies on how those funds can be deployed, and then the protocol optimizes their position within those boundaries and automat