Tasks

53 tasks

Accounts 1271 permit2 cross account replaySecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are auditing a smart account factory. Each account verifies signatures like this: ```solidity function isValidSignature(bytes32 hash, bytes calldata sig) external view returns (bytes4) {
    return ECDSA.recover(hash, sig) == owner ? bytes4(0x1626ba7e) : bytes4(0xffffffff); } ``` A user controls two accounts from this factory with the same owner key. Both hold USDC and neither has used Permit2 before. The user signs a Permit2 PermitSingle letting a spender take USDC from account A. Can the spender submit that same signature to Permit2 to get an allowance on account B? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Accounts 4337 unused gas penaltySecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a verifying paymaster for EntryPoint v0.7. It signs any user operation from the app's users with callGasLimit up to 5,000,000 and pays from its EntryPoint deposit. A bundler can register as an app user, submits its own operations with callGasLimit set to 5,000,000 each time, and keeps the fees. Is the paymaster charged only for the gas each operation actually used? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Accounts 7739 typeddatasign domainSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a smart account's ERC-7739 isValidSignature. A dapp asks the account's owner to sign an EIP-712 Order under the dapp's own domain, and the account verifies it through the TypedDataSign workflow. In the final digest the owner's key signs, which domain separator comes right after the 0x1901 prefix: the dapp's or the account's? Answer dapp or account, then explain in one sentence.
README on GitHub ↗
Agent registriesDapp developmentConceptsAgents

Instruction

Which ERC defines onchain identity, reputation and validation registries for AI agents? Answer with the ERC number only.
README on GitHub ↗
Compiler legacy init orderSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing this fee vault before launch. It is compiled with Solidity 0.8.30, optimizer on, legacy pipeline (no via-IR). `Ownable` is OpenZeppelin Contracts 5.4.

```solidity contract FeeVault is Ownable {
    address public feeRecipient = owner();

    constructor() Ownable(msg.sender) {}

    function collectFees() external {
        payable(feeRecipient).transfer(address(this).balance);
    } } ```

Alice's EOA deploys it. Right after deployment, what does `feeRecipient()` return? Answer Alice's address or the zero address, then explain in one sentence.
README on GitHub ↗
Compiler memory bytes deleteSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a bridge's message builder, compiled with Solidity 0.8.30, optimizer on, legacy pipeline (no via-IR).

```solidity function build(address recipient, uint256 amount)
    external pure returns (bytes memory payload) {
    payload = abi.encodePacked(uint8(1), recipient, amount); // flag, recipient, amount
    delete payload[0];                                      // clear the flag } ```

The relayer reads the recipient from bytes 1 to 20 of `payload`. After `build(alice, 5 ether)`, which recipient does the payload carry? Answer Alice's address or the zero address, then explain in one sentence.
README on GitHub ↗
Compiler transient clear collisionSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing this vault, compiled with Solidity 0.8.33, via-IR, optimizer on, EVM version cancun. `Ownable2Step` is OpenZeppelin Contracts 5.4.

```solidity contract Vault is Ownable2Step {
    address transient activeCaller;

    constructor() Ownable(msg.sender) {}

    function run() external {
        activeCaller = msg.sender;
        // ... work that reads activeCaller ...
        delete activeCaller;
    } } ```

The deployer calls `transferOwnership(bob)`, Bob calls `acceptOwnership()`, and later Bob calls `renounceOwnership()`. Can Bob then call `acceptOwnership()` again and become owner? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Compiler tuple assignment self transferSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing this token, compiled with Solidity 0.8.30, optimizer on.

```solidity mapping(address => uint256) public balanceOf;

function transfer(address to, uint256 amount) external {
    uint256 fromBal = balanceOf[msg.sender];
    uint256 toBal = balanceOf[to];
    require(fromBal >= amount, "balance");
    (balanceOf[msg.sender], balanceOf[to]) = (fromBal - amount, toBal + amount); } ```

Alice holds 100 tokens and calls `transfer(alice, 40)`, sending to herself. What is `balanceOf(alice)` afterwards? Answer with the number only.
README on GitHub ↗
Evm transfer refund to safeSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a marketplace on Ethereum mainnet. Its `buy()` refunds overpayment with `payable(msg.sender).transfer(msg.value - price)`. A buyer uses a Safe v1.4.1 (standard SafeProxy, one owner, threshold 1) and calls `buy()` through the Safe's `execTransaction` with 1 ETH for a 0.9 ETH item. The transaction has no access list. Does the purchase succeed, with the Safe receiving its 0.1 ETH refund? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Evm try catch empty returnSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a lending market compiled with Solidity 0.8.30. Borrowers may register a notification hook, and liquidation calls it inside try/catch so that a broken hook cannot block liquidation.

```solidity function liquidate(address borrower) external {
    uint256 d = debt[borrower];
    delete debt[borrower];
    address hook = hookOf[borrower];
    if (hook != address(0)) {
        try IHook(hook).onLiquidation(borrower, d) returns (bytes4) {} catch {}
    }
    // seize collateral, pay liquidator } ```

A borrower calls `setHook` with the address of their own EOA. Does `liquidate(borrower)` succeed? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Forwarder multicall suffix oz5SecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a treasury that inherits OpenZeppelin Contracts 5.4 `ERC2771Context` and `Multicall`, trusts OpenZeppelin's `ERC2771Forwarder`, and guards `payout()` with `require(_msgSender() == owner)`. A stranger signs a valid forward request to the treasury whose data is `multicall([abi.encodePacked(payout.selector, owner)])`, so the only batched item ends with the owner's 20-byte address, and relays it through the forwarder. Does `payout()` run? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Governance arbitrum block clockDapp developmentConceptsGovernance

Instruction

A Governor on Arbitrum One uses block.number as its clock, with votingPeriod = 50,400. About how long does a vote stay open? Answer with the duration, then explain in one sentence.
README on GitHub ↗
Lending small position close factorDapp developmentConceptsLending

Instruction

On Aave v3.3, a position has a health factor of 0.98, with $1,500 of USDC debt and about $1,770 of WETH collateral. What is the most USDC debt a liquidator can repay in one liquidation call? Answer with a percentage of the debt, then explain in one sentence.
README on GitHub ↗
Permit2 7702 signatureDapp developmentConceptsSwaps

Instruction

An EOA has delegated its code with EIP-7702 to a smart account contract. Its owner signs a Permit2 PermitSingle message with the EOA's private key, and a router submits it to Permit2. Which check does Permit2 use to verify this signature: ecrecover against the EOA's address, or ERC-1271 isValidSignature on the account? Answer ecrecover or ERC-1271, then explain in one sentence.
README on GitHub ↗
Permit2 zero expirationDapp developmentConceptsSwaps

Instruction

A script calls Uniswap's Permit2 approve(token, spender, amount, 0) for a spender. In the next block, the spender calls Permit2's transferFrom to pull those tokens. Does the pull succeed? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Signatures oz ecdsa signature as keySecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a vault's withdrawal-voucher flow before launch. An offchain service signs vouchers with one EOA key, `signer`.

```solidity using ECDSA for bytes32; // OpenZeppelin Contracts 5.x mapping(bytes32 => bool) public used;

function claim(uint256 amount, bytes calldata sig) external {
    bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(CLAIM_TYPEHASH, msg.sender, amount)));
    require(digest.recover(sig) == signer, "bad sig");
    require(!used[keccak256(sig)], "used");
    used[keccak256(sig)] = true;
    token.transfer(msg.sender, amount); } ```

Can a user holding one valid voucher claim it twice by changing the signature bytes? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Signatures permit2 signaturetransfer frontrunSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

A user calls a vault's depositWithPermit2 and passes a Uniswap Permit2 PermitTransferFrom signature. The vault calls Permit2's permitTransferFrom to pull the tokens to itself. A searcher copies the signature and permit data from the public mempool, then calls permitTransferFrom on Permit2 directly, earlier in the block, with transferDetails.to set to the searcher's own address. Does the searcher's call move the user's tokens? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Signatures permit2 witness stringDapp developmentConceptsSignatures

Instruction

You call Permit2's permitWitnessTransferFrom with a witness struct VaultDeposit(address receiver). Write the exact witnessTypeString argument you pass. Answer with the string, then explain in one sentence.
README on GitHub ↗
Signatures usdc contract permitDapp developmentConceptsSignatures

Instruction

Can a Safe smart account, which has no private key of its own, sign a valid USDC permit on Ethereum mainnet? Answer yes or no, then explain in one sentence.
README on GitHub ↗
Smart accounts p256 precompileDapp developmentConceptsSmart accounts

Instruction

Is there a precompile on Ethereum mainnet today for verifying secp256r1 (P-256, passkey) signatures? If yes, at what address? Answer yes or no, then give the address.
README on GitHub ↗
Smart accounts userop hash v08Dapp developmentConceptsSmart accounts

Instruction

In ERC-4337 EntryPoint v0.8, how is a UserOperation's userOpHash computed? Answer in one sentence.
README on GitHub ↗
Swaps permit2 zero expirationDapp developmentConceptsSwaps

Instruction

A user calls Permit2's approve(token, spender, amount, expiration) with expiration = 0. When does that allowance expire? Answer in one sentence.
README on GitHub ↗
Upgrades stateless parent gapSecurityConceptsAudits

Instruction

You are an expert security researcher and smart contract auditor.

You are reviewing a V2 upgrade of a UUPS vault built on OpenZeppelin Contracts Upgradeable 4.9.6.

```solidity contract VaultV1 is Initializable, OwnableUpgradeable, UUPSUpgradeable {
    mapping(address => uint256) public balanceOf;
    // ... }

contract VaultV2 is Initializable, OwnableUpgradeable, UUPSUpgradeable, MulticallUpgradeable {
    mapping(address => uint256) public balanceOf;
    // ... same functions as V1 } ```

V2 only appends `MulticallUpgradeable` so users can batch calls. Alice's V1 balance is 100. The owner upgrades the proxy to V2 with no migration. What does `balanceOf(alice)` return afterwards? Answer with the number only.
README on GitHub ↗
Wallet atomic readyDapp developmentConceptsWallets

Instruction

Under EIP-5792, a wallet's wallet_getCapabilities reports the atomic capability for a chain. What is the difference between status "supported" and status "ready"? Answer in one sentence.
README on GitHub ↗
Wallet batch status 600Dapp developmentConceptsWallets

Instruction

Under EIP-5792, wallet_getCallsStatus returns status 600 for a batch of calls. What does that mean? Answer in one sentence.
README on GitHub ↗
Aave savings pageDapp developmentBuildLending

Instruction

Our users hold USDC and USDT on Ethereum mainnet and want to earn on them without leaving our app, so could you add a Savings page to this project? A connected user should be able to deposit either token into Aave v3, see how much they have deposited including interest so far and the current APY, and withdraw part or all of it at any time. The chain to use is in `chain_context.json`.
README on GitHub ↗
Audit 1inch swapvmSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing SwapVM. Review the contracts in /work/project/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

SwapVM is 1inch's virtual machine for token swaps. A maker writes a program, bytecode that chains small instructions for balances, pricing curves, fees and limits, and either signs it or ships it through Aqua, 1inch's shared liquidity layer where makers keep their tokens in their own wallets. A taker runs the maker's program to work out the swap amounts and settle the trade, and a strategy contract builds a ready-made AMM program from these instructions.
README on GitHub ↗
Audit automata dcapSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Automata DCAP Attestation. Review the contracts in /work/project/contracts and /work/project/lib/automata-on-chain-pccs/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Automata DCAP Attestation verifies Intel SGX and TDX attestation quotes on-chain. An entrypoint contract reads each quote's header and passes it to the verifier for that quote version, which checks the quote against Intel's signed collateral. That collateral lives in the on-chain PCCS, a separate set of contracts that the verifiers read through a router. A caller can also submit a RISC Zero or SP1 proof that the quote was verified off-chain instead.
README on GitHub ↗
Audit balancer v3 vaultSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Balancer V3. Review the contracts in /work/project/pkg/vault and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Balancer V3 is an automated market maker built around one Vault contract that holds the tokens of every pool. Pools only do the math for swaps and liquidity changes, while the Vault keeps the balances and lets a caller run many operations in one session, settling only the net amounts at the end. Routers give users a simple way in, and pools can add hooks and charge fees, part of which goes to the protocol.
README on GitHub ↗
Audit broadcaster proversSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Crosschain Broadcaster. Review the contracts in /work/project/src/contracts and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Crosschain Broadcaster implements ERC-7888, which lets a contract on one chain prove that a message was published on another chain using storage proofs. A Broadcaster contract records each message in a storage slot, and a Receiver walks a route of chain-specific provers, each proving the next chain's block hash or state root from the one before, then proves the slot itself. Provers come in pairs, one per direction between Ethereum and each of Arbitrum, Optimism, Scroll, Linea, Taiko and ZKsync, and pointer contracts let each prover be upgraded.
README on GitHub ↗
Audit cap labsSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing CAP. Review the contracts in /work/project/contracts and write your findings to /workspace/findings.md. List at most 10, the most severe first.

CAP is a stablecoin protocol. Users deposit stablecoins into a vault to mint cUSD, and can stake cUSD in StakedCap to earn the protocol's yield. Borrowers, called agents, borrow the vault's reserves through the Lender, and restakers back each agent's loans with collateral delegated through Symbiotic. Idle reserves earn yield in outside vaults, and a fee auction sells that yield for cUSD.
README on GitHub ↗
Audit confidential contractsSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing OpenZeppelin Confidential Contracts. Review the contracts in /work/project/contracts and write your findings to /workspace/findings.md. List at most 10, the most severe first.

OpenZeppelin Confidential Contracts is a Solidity library for the Zama fhEVM, where amounts and balances are kept as ciphertexts under fully homomorphic encryption and an off-chain coprocessor does the math on them. It offers a confidential fungible token with an ERC-20 wrapper and a voting extension, vesting wallets with a linear or cliff schedule that a factory deploys as clones, and confidential vote tracking with delegation and checkpoints.
README on GitHub ↗
Audit intuitionSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Intuition. Review the contracts in /work/project/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Intuition is a protocol for making claims onchain. Anyone can create an atom, which stores a piece of data such as a URI, or a triple, which links three atoms as subject, predicate and object, and every atom and triple has its own vault where users deposit ETH for shares. EthMultiVault holds all the vaults and most of the logic behind an upgradeable proxy, and each atom can deploy its own ERC-4337 wallet.
README on GitHub ↗
Audit ion protocolSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Ion Protocol. Review the contracts in /work/project/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Ion Protocol is a lending market where users borrow WETH against liquid staking tokens such as wstETH, ETHx and swETH. IonPool keeps the loans and the lenders' deposits, GemJoin contracts hold the collateral, and the Liquidation contract closes unhealthy vaults. Each collateral has its own price oracles, and helper contracts open, repay and lever up positions in one transaction.
README on GitHub ↗
Audit onchainidSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing ONCHAINID. Review the contracts in /work/project/contracts and write your findings to /workspace/findings.md. List at most 10, the most severe first.

ONCHAINID is the identity layer for T-REX (ERC-3643) permissioned tokens. Identity contracts hold keys and claims, and tokens read them to decide who may hold. This version makes each identity an ERC-7579 smart account that also works with ERC-4337. A validator module keeps the ERC-734 keys and decides what each key may call. A factory deploys identities and links wallets to them. Smaller modules handle queued approvals, recovery, claims and reputation.
README on GitHub ↗
Audit pods vaultSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Pods Finance. Review the contracts in /work/project/contracts and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Pods Finance's stETH volatility vault holds depositors' stETH and puts part of each week's staking yield into ETH options, so the principal stays in the vault. It follows ERC-4626 and works in rounds: a deposit waits in a queue and becomes shares after the round ends. A configuration contract keeps each vault's settings, an adapter takes ETH and swaps it to stETH through Curve, and a migration contract moves holders into a newer vault.
README on GitHub ↗
Audit taraxa bridgeSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing the Taraxa bridge. Review the contracts in /work/project/src and /work/project/lib/beacon-light-client/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

The Taraxa bridge moves tokens between Ethereum and the Taraxa chain. Each chain runs a light client of the other: on Ethereum, TaraClient follows Taraxa's pillar blocks, and on Taraxa, EthClient builds on the beacon chain light client to follow Ethereum. A bridge contract on each side applies the other side's finalized state changes, and connector contracts lock, release, mint and burn the tokens.
README on GitHub ↗
Audit the compactSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing The Compact. Review the contracts in /work/project/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

The Compact is an ownerless ERC-6909 contract for resource locks. Holders deposit native tokens or ERC-20s into a lock and get an ERC-6909 token for it, and the allocator named in the lock must sign off on later transfers, withdrawals and claims. A sponsor who holds these tokens can sign or register a compact, which lets an arbiter pay the locked tokens out to claimants on one chain or across several.
README on GitHub ↗
Audit thenaSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing THENA. Review the contracts in /work/project/contracts and write your findings to /workspace/findings.md. List at most 10, the most severe first.

THENA is a ve(3,3) exchange on BNB Chain in the Solidly family, with stable, volatile and concentrated-liquidity pools. Liquidity providers stake their LP tokens in each pool's gauge to earn weekly THE emissions, and holders of locked veTHE vote every week on how those emissions are split between gauges, earning the pools' fees and bribes in return. The voter, the minter, the gauges and their extra-reward contracts run this weekly cycle.
README on GitHub ↗
Audit trex v5SecurityBuildAudits

Instruction

You are a smart contract security auditor auditing T-REX. Review the contracts in /work/project/contracts and write your findings to /workspace/findings.md. List at most 10, the most severe first.

T-REX implements ERC-3643 for permissioned security tokens: tokens reach only wallets linked to an ONCHAINID identity with the claims the token asks for, and each transfer must also pass the token's compliance rules. Each token comes as a suite of three parts: the token, a registry that maps wallets to identities and checks their claims, and a compliance contract that runs rule modules and tracks each identity's position in a ledger. Roles come from an AccessManager, a factory deploys suites behind beacon proxies, and the token follows positions on other chains through ERC-7786 messages.
README on GitHub ↗
Audit uniswap token launcherSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Token Launcher. Review the contracts in /work/project/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Token Launcher hands out a new or existing token through pluggable distribution strategies built on Uniswap v4. TokenLauncher deploys the chosen strategy from its factory and sends it the tokens. The main strategy, LBPStrategyBasic, sells part of the supply in a separate auction contract to find a price, then opens a Uniswap v4 pool at that price with the rest. A Merkle claim strategy covers airdrops.
README on GitHub ↗
Audit uniswap tribunalSecurityBuildAudits

Instruction

You are a smart contract security auditor auditing Tribunal. Review the contracts in /work/project/src and write your findings to /workspace/findings.md. List at most 10, the most severe first.

Tribunal settles cross-chain swaps on chains that order transactions by priority fee. A sponsor locks tokens in The Compact and signs a mandate listing the fills that may settle it, an adjuster co-signs which fill is live, and a filler executes that fill while Tribunal, acting as the arbiter, claims the locked tokens. Bridges and messaging layers inherit Tribunal to carry the result between chains, and ERC7683Tribunal adapts it to ERC-7683.
README on GitHub ↗
Creator coinsDapp developmentBuildTokens

Instruction

We're building a creator-coin platform. anyone calls create(name, symbol), which returns a new coin with a fixed 1B supply that all goes straight into a Uniswap v3 pool against WETH (1% fee tier), opening at a 10 ETH market cap. nobody, us included, can ever pull that liquidity. trading fees split 70% to the coin's creator and 30% to us, and the constructor takes the address our share goes to. anyone can call collect(coin) to pay out a coin's fees, and a creator can change where their share goes with setPayoutRecipient(coin, recipient). could you put it in src/CreatorCoins.sol as a contract called CreatorCoins? it's a Foundry project on solidity 0.8.30, for mainnet.
README on GitHub ↗
Keeper depositsDapp developmentBuildSignatures

Instruction

Our depositors hold USDC and haven't approved anything. Let them sign once from our page, and our keeper deposits it into our vault for them, with the shares going to the depositor. People may sign a few now and we fill them later, and some depositors are Safes. Put the KeeperDeposits contract in src/KeeperDeposits.sol; we'll deploy it with forge create, nothing to pass in, and it's for mainnet. In script/deposits.ts, export prepareDeposit({ contract, depositor, amount }), returning the typed data the depositor signs and a keeperTx(signature) that gives our keeper's { to, data }.

amount is a bigint in USDC base units (6 decimals), and contract and depositor are addresses. prepareDeposit can be async. Return { typedData, keeperTx }, with typedData in viem's signTypedData format (domain, types, primaryType, message). The RPC URL is in RPC_URL. chain_context.json has the vault's address and a funded account with USDC and no approvals for your own testing.
README on GitHub ↗
Signed votesDapp developmentBuildSignatures

Instruction

Our holders vote on proposals by signing, and our backend stores each vote if it's valid. Big holders vote from a 2-of-3 Safe, so a vote can take them a day or two to finish, and many newer holders use smart wallets. In src/votes.ts, export voteToSign({ proposalId, voter, support }), returning the typed data the voter signs, and checkVote({ proposalId, voter, support }, signature), resolving to true if we should store the vote. We're on mainnet, and the RPC URL is in RPC_URL.

proposalId is a bigint, voter is an address, and support is 0, 1, or 2 (against, for, abstain). voteToSign can be async. Its result is the object that viem's signTypedData takes. checkVote receives those vote fields and a hex signature, and resolves to a boolean.
README on GitHub ↗
Swap pageDapp developmentBuildSwaps

Instruction

Our users hold ETH, USDC and USDT on Ethereum mainnet and keep leaving our app to trade. Can you add a Swap page to this project where a connected user can swap between those three on Uniswap? Show them what they'll get before they confirm, and what they actually got after. Don't leave open-ended token approvals behind. We take a 0.25% cut of each swap, paid to our treasury. Its address and the chain to use are in `chain_context.json`.
README on GitHub ↗
Token governorDapp developmentBuildGovernance

Instruction

Our token TOKEN is live, a plain ERC-20 with a fixed 100M supply, and we can't change it. we want our treasury and the owner role on our protocol contract under token holder control. a proposal passes when at least 4% of the supply votes for it, with more for than against, then waits two days before anyone can execute it. our delegates vote through snapshot, so it has to be a standard governor, and our frontend's wrap flow talks to the vote token through src/interfaces/IVoteToken.sol. put the governor in src/TokenGovernor.sol as TokenGovernor, and a deploy script in script/Deploy.s.sol whose run(token) returns the governor address and the address we should move the protocol's ownership and the treasury to. we're on foundry with solidity 0.8.30.
README on GitHub ↗
Token launchpadDapp developmentBuildTokens

Instruction

We're building a launchpad for community tokens. anyone calls create(name, symbol), which returns a new token with a 1B supply that sells on a bonding curve: buy(token) pays ETH for tokens, and sell(token, amount) sells them back for ETH. the token's creator earns 1% of every curve trade and claims it with claimFees(token). once a curve has taken in 10 ETH, anyone can call graduate(token), which puts the curve's ETH and as many tokens as it needs into a Uniswap v2 pool against WETH, opening at the curve's last price, and burns the LP. could you put it in src/Launchpad.sol as a contract called Launchpad, deployed with no constructor arguments? it's a Foundry project on solidity 0.8.30, for mainnet.
README on GitHub ↗
Token lending marketDapp developmentBuildLending

Instruction

we're building a small lending market for TKN (18 decimals). anyone lends USDC and earns the interest borrowers pay; the treasury takes 10% of that interest. holders borrow USDC against TKN up to 80% of its value; anyone can liquidate past that line by repaying USDC and taking TKN worth 5% more. the borrow rate climbs as more of the pool is lent out, pick a sensible curve. cap it at 2M USDC supplied and 1M TKN collateral. please implement src/interfaces/IMarket.sol, using src/interfaces/IPriceFeed.sol, in src/Market.sol as Market, with constructor (address usdc, address tkn, address priceFeed, address owner). it's a foundry project on solidity 0.8.30.
README on GitHub ↗
Voting pageDapp developmentBuildGovernance

Instruction

Tally is gone, and our holders need our own voting page. The governor, its timelock and the vote token are already deployed (the addresses are in chain_context.json), and TOKEN is the token holders own. Could you add a Governance page to this project where a connected holder can wrap TOKEN into votes, delegate them and see how many votes they have, see every proposal with its status, the votes for and against, whether it has reached quorum and when voting ends, and vote on the open ones? It's just for holders; the team queues and executes from our safe.
README on GitHub ↗
Treasury eth saleDapp developmentActSwaps

Instruction

Our treasury wallet sells 400 ETH for USDC every quarter to cover expenses. Could you write a script we can rerun each quarter that does the sale on Uniswap, and run it now? Put the command that starts it in `run.sh`, and don't leave open-ended token approvals behind. The RPC and our wallet's key are in `chain_context.json`. When it's done, write what happened to `sale.json`: ETH sold, USDC received and the transaction hashes.
README on GitHub ↗
Vault v2 concentration rebalanceDapp developmentActLending

Instruction

we curate a morpho vaults v2 vault, and almost half of it sits in one market. our risk policy is no market above 25% of the vault. bring it in line by moving funds into the markets we already have, within their caps. deposits and withdrawals must keep working for our users. leave fees, roles, caps and timelocks alone. the vault, that market's id and our wallet are in chain_context.json; the wallet holds the curator and allocator roles. do it on that chain and tell us what you did.
README on GitHub ↗
Vault v2 market exitDapp developmentActLending

Instruction

we curate a morpho vaults v2 vault, and one of its markets has an oracle we no longer trust after yesterday's incident. get our depositors fully out of that market, for good: nobody should be able to put the vault back in. move the funds to the other markets or leave them idle, your call. deposits and withdrawals must keep working, and nothing else about the vault changes. the vault, the market id and our wallet are in chain_context.json; the wallet holds the curator and allocator roles. do it on that chain and tell us what you did.
README on GitHub ↗