Giter VIP home page Giter VIP logo

safe-protocol's Issues

Enhance test coverage

We've been moving fast so broad swathes of our prototype code is untested. Once we have the time we should spend some time writing a bunch of tests.

Meaningful solidity errors

When a solidity contract function is invoked, ethers first attempts to estimate the gas needed for the transaction. If the function errors, a generic Error: cannot estimate gas; transaction may fail or may require manual gas limit error is thrown.

One workaround is to specify the gasLimit override for every function call. That's pretty cumbersome and easy to forget.

Is there a better way to avoid the generic errors and see useful revert reasons?

Handle unresponsive Alice

If Alice is unresponsive then Bob has to wait for the ticket to expire before being able to process the next transfer.

This is a pretty severe DoS vulnerability for Bob.

Colin started exploring a solution here

Consider mapping of multiple L2 tokens to the same L1 token

I think so? When an erc20 token is moved from L1 to L2, some "migration" contract either locks up or burns L1 erc20 tokens. Multiple of those "migration" contracts can exist for a token type.

It is likely not critical to think about this for the prototype. But I do want to flag this limitation.

Originally posted by @kerzhner in #98 (comment)

Enhance test suite

Add a basic set of tests that ensure that the protocol works as expected.

We should add a basic unit test for the L2 functionality.

Enforce yarn version

If not possible, add a note to the README.

Older yarn versions format yarn.lock differently than newer yarn versions.

Set up auto-formatting

We have a nice, consistent pattern across our other repos of setting up prettier.js to format according to some rules. (The rules can almost be arbitrary -- it doesn't matter).

Not having prettier auto-format on save means more cognitive overhead when developing, and more noise in change sets.

Switch prototype to erc20 tokens

The current prototype supports eth transfers. We'd prefer to do a head-to-head comparison against other protocols using ERC20 tokens, which is more representative of the real-world demand. In addition, the gas cost of sending eth is quite complicated: there are three ways of sending eth, and the often recommended way has a complex cost calculation.

There is little benefit in the prototype supporting multiple token types, so we will specialize the prototype to ERC20 tokens.

Get rough L2 gas benchmarks

We should get an estimate of gas usage for our L2 contracts.

One thing to keep in mind is that L2 gas may be calculated differently than L1. So we may need to get a gas estimate using the OVM or AVM.

Create more realistic testing scenario

Note that since each swap involves the same two parties, this leads to an unrealistic benchmark. In the real world, we would expect many ERC20 transfers from one party (the LP) to many parties (users).

In the real world, there might be some repeated users, of course...

Originally posted by @andrewgordstewart in #93 (comment)

Ecosystem background research

  1. Read through contracts of 2 products comparable to SAFE.
  2. What features do these products support that SAFE does not? Are these essential features for a cross-chain product? If so, what is the difficulty level of adding these features to SAFE?

Embed paper in repo

The readme links to our Notion document. Our notion document isn't readible to persons outside of our organization.

Whatever PDF version is included in the submission should probably live in-repo and be the target of that readme link.

Add support for L1<->L2 token mapping to L2 contract

Currently our L2 and L1 contract use the same token contract.

In reality the token address will be different between L1 and L2, so we need a mechanism to map from one token address to another.

It makes sense to do this on L2 as gas costs will be much cheaper than L1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.