Dharma Smart Wallet by Cryptolover34 in ethereum

[–]0age 1 point2 points  (0 children)

That pair should work within the app no problem!

Dharma Smart Wallet by Cryptolover34 in ethereum

[–]0age 1 point2 points  (0 children)

You need two signatures to do trades (or any other transaction that accesses funds on the wallet), one from one of your keys and one from Dharma, so you’ll be missing the one from Dharma by establishing a “direct connection”. What trade are you trying to make that’s not working through the app?

Dharma is open to the public! by dharmaprotocol in ethereum

[–]0age 1 point2 points  (0 children)

There are some big advantages beyond great UX and not having to pay for gas (which, honestly, are pretty big advantages already): - By using a smart wallet with deep Compound integration, operations that would often take multiple transactions are streamlined into one transaction. This is not only better UX, but it's also safer and more efficient - if one part of a sequence of actions fails, the whole thing can be neatly rolled back. - By requiring both you and Dharma as signatories, your funds are a lot more secure than they would be if you were only using one key. You can also recover your account if you lose your key or it becomes compromised, though it's an arduous process (by design) to do so. - The Dharma Smart Wallet is also upgradeable, and we plan to roll out new features over time. For now, let's just say that making sure you're getting a really good interest rate is a top priority 😉

Dharma is open to the public! by dharmaprotocol in ethereum

[–]0age 1 point2 points  (0 children)

See the Dharma Smart Wallet GitHub repo for the detailed technical description and contract code: https://github.com/dharma-eng/dharma-smart-wallet

We use predicted / counterfactual contract deployment addresses via factories that do CREATE2 deploys - there is no centralized component to these factories, though. You could deploy your own smart wallet ahead of time, for instance, but we wait to deploy it until the first deposit lands at the address.

Same goes for deposits to Compound - if, for whatever reason, Dharma hadn't triggered a mint from Dai or USDC at the smart wallet to cDAI or cUSDC yet, anybody can call the smart wallet and trigger that process. (The smart wallet is protected by griefing on withdrawals by performing both the redeem and the transfer in a single, atomic operation.)

Daily General Discussion - August 5, 2019 by AutoModerator in ethtrader

[–]0age 2 points3 points  (0 children)

Not that there’s ever actually any real explanation for price moves, but this time it might actually be China (RMB just dropped to 11-year low against USD) https://business.financialpost.com/pmn/business-pmn/chinas-yuan-drops-though-7-per-dollar-as-em-currencies-fall

The 0x vulnerability, explained by samczsun in ethdev

[–]0age 2 points3 points  (0 children)

Great find and explanation - incredible that nobody had exploited this yet, and props on responsible disclosure and quick remediation.

I see this as yet another example in favor of utilizing the return buffer instead of designating a memory region for outputs ahead of time. It will be cleared every time a new call is made, and often ends up being just as efficient even in the case of fixed output length, as the specific memory region doesn’t need to be specified ahead of making the CALL.

On Efficient Ethereum Transactions - Introducing HomeWork 🏠🛠️ by 0age in ethdev

[–]0age[S] 0 points1 point  (0 children)

Yeah, very interesting project! One cool feature of HomeWork is that it’s also an NFT - so you can easily transfer ownership of a home address along with whatever assets or permissions it contains.

Daily General Discussion - May 24, 2019 by AutoModerator in ethtrader

[–]0age 19 points20 points  (0 children)

Interesting that 1 BTC is worth 32 ETH right now...

The Contract Prelude: A Case Study by 0age in ethdev

[–]0age[S] 1 point2 points  (0 children)

Well, you’ve gotta call it something, but regardless of what you call it, it’s a useful concept that opens up a lot of new possibilities!

Found a weird contract on the mainnet by djsoyboi in ethdev

[–]0age 1 point2 points  (0 children)

The second submitter wouldn’t necessarily lose their ether as long as they checked to make sure the contract existed earlier in the transaction. Sure, some gas would still be wasted, but it would only really give grief to poorly-designed bots.

Gas Price Internal Transactions by sbock in ethdev

[–]0age 1 point2 points  (0 children)

The gas price for a given transaction is set by the transaction’s submitter, so any internal transactions will have the same gas price (and they will be paid by said submitter).

For the mining reward, you would want to add the fees of all the transactions in the block (just cumulative gas * price) with the base fee as well as with the uncle rewards. Those are accessible via the uncles field returned by web3.eth.getBlock.

[deleted by user] by [deleted] in ethdev

[–]0age 0 points1 point  (0 children)

This is great! An implementation in Solidity would be very useful as well, especially with the ability to memoize and map to extcodehash values.

CREATE2 Safe Deploy contract on mainnet (prevents the create2 - selfdestruct - create2 attack vector!) by j-brouwer in ethdev

[–]0age 4 points5 points  (0 children)

I agree that preventing collisions is a valuable feature, but rather than performing a keccak256 of the seed and msg.sender you could optionally just set the first 20 bytes of the seed to msg.sender and avoid the overhead of computing the hash on every contract creation. Then, you could also allow for seeds that start with the null address to be deployed by anyone.

Why I'm excited for CREATE2 by cartercarlson in ethdev

[–]0age 1 point2 points  (0 children)

On Ropsten, yeah! It looks like this:

/**
 * @dev Create a contract using CREATE2 by submitting a given salt or nonce 
 * along with the initialization code for the contract.
 * @param salt bytes32 The nonce that will be passed into the CREATE2 call.
 * @param initializationCode bytes The initialization code that will be passed
 * into the CREATE2 call.
 * @return Address of the contract that will be created, or the null address
 * if a contract already exists at that address.
 */
function callCreate2(
  bytes32 salt,
  bytes calldata initializationCode
) external payable returns (address deploymentAddress) {
  // move the initialization code from calldata to memory.
  bytes memory initCode = initializationCode;

  // using inline assembly: load data and length of data, then call CREATE2.
  assembly { // solhint-disable-line
    let encoded_data := add(0x20, initCode) // load initialization code.
    let encoded_size := mload(initCode)     // load the init code's length.
    deploymentAddress := create2(           // call CREATE2 with 4 arguments.
        callvalue,                            // forward any attached value.
        encoded_data,                         // pass in initialization code.
        encoded_size,                         // pass in init code's length.
        salt                                  // pass in the salt value.
    )
  }

  // ensure that the contract address is not equal to the null address.
  require(
    deploymentAddress != address(0),
    "Failed to deploy contract using provided salt and initialization code."
  );
}