OriginProtocol / OriginProtocol/origin-dollar

Editable OUSD Input

Open
#656 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dapp enhancement P3
Dominant language
Solidity
Stars
152
Forks
115
Avg merge
3d 20h
Merged PRs (30d)
17

Description

We've been discussing in various places whether or not both sides of the swap form should have editable dropdowns for the currency selection (notice that OUSD is fixed). The initial arguments for it were that (1) Uniswap allows the user to change the currency on either side of the equation and (2) it's not obvious that the arrow should be clicked to flip the elements. We addressed the latter by making OUSD one of the options for the input so that the user could cause them to flip by changing the top one (or clicking the arrow). The argument against making both editable was that the current version effectively communicates that OUSD must be involved in the swap. We don't currently support swapping USDC for USDT in our DApp. I guess there's no reason why we can't do that, it just seems like unnecessary engineering work without much benefit. There's not really any reason for users to come to our DApp for swaps that don't involve our contracts. They might as well just go to Uniswap's DApp because our contracts require OUSD to be involved by design.

I subsequently realized that it's a little frustrating for the DApp to be presumptuous about what the user wants when the selections aren't applicable after the flip. Making both sides editable would go hand-in-hand with supporting empty selections.

I could go either way on this but wanted to document it for us to revisit.

Screen Shot 2021-08-21 at 12 28 28 PM

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are identified. Start by locating the swap form and reviewing the existing currency-selection behavior alongside the linked Loom recording. Before implementation, settle whether both sides should be editable and whether empty selections are supported; the issue has no concrete acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.