Comments (3)
This is over my head but fewer clicks = good!
from usm.
We use off-chain signatures for ERC20Permit and for Delegable.
The way this could be implemented is by creating an onboard
function in the frontend that collects the signatures to issue MAX permits for USM
to receive/burn USM and FUM, and submits them in a single transaction executed by Proxy
. The same process should collect the signatures to execute an addDelegate
of Proxy
by the user.
Be aware that right now an addDelegate
call or signature is required for each one of the four main USM functions. That's bad UX and I'm planning to fix it by coding a batchDelegateByPermit(address holder, address delegate, bytes4[] signature, uint expiry, uint8 v, bytes32 r, bytes32 s)
function in Delegable.sol
.
So the final process would be:
Click onboard:
-> USM Permit Signature
-> FUM Permit Signature
-> Proxy Delegate Signature
-> Submit Transaction
The UI can work with Ether by default. An option to use Weth if present could be added somewhere, which would involve a weth.approve(USM.address, MAX)
transaction by the user enabling the feature.
from usm.
Thanks, @albertocuestacanada. We may have to sync up when this comes around.
This is dependent on #30 being resolved first.
from usm.
Related Issues (20)
- Does IUSM need usmTotalSupply()? HOT 2
- Change OurUniswapV2TWAPOracle.latestPrice() to return cached price, not freshly calculated one HOT 1
- Maybe let user burn() USM even when the system is underwater, just redeeming at < 100%? HOT 1
- Maybe change event names from past participles (PriceChanged) to nouns (PriceChange)? HOT 2
- Get capitalization of acronyms/token names consistent in "USMView", "UsmWethProxy", "_burnUsm()", "onlyHolderOrDelegateOrFUM", etc HOT 1
- Double-check that 1. ETH pool can never return to 0, 2. ETH/USD price can never go to 0
- Decide whether to emit events when
- Decide whether to emit "xChanged" events when x didn't actually change HOT 1
- fumPrice shoots to an impractical high price if the fum total supply is very low HOT 4
- Think about how to choose constant params like BUY_SELL_ADJUSTMENTS_HALF_LIFE
- Combine mintBurnAdjustment and fundDefundAdjustment into a single buySellAdjustment
- Implement a proper on-chain limit order book for resting FUM buy limit orders (USM->FUM and/or ETH->FUM) HOT 2
- Make more state vars (and perhaps functions?) public HOT 1
- Are we emitting all the right events? HOT 1
- usmPrice()/fumPrice() should probably support side Mid (in addition to Buy/Sell)
- Maybe force latestPrice() callers to help update TWAP (ie, remove view fn latestPrice() and rename cacheLatestPrice() -> latestPrice()) HOT 1
- Is this project active? HOT 1
- Prevent users from losing funds by eg sending v2 USM to the v1 contract HOT 3
- Simplify minFumBuyPrice - we don't need to store it
- Autoexecutor idea HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usm.