marigold-dev / marigold-dev/gas-station
Protect credits routes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Due to comment here : https://github.com/marigold-dev/gas-station/pull/1#issuecomment-1764792460
We need to protect " update credits " route from malicious API call.
Currently, a user can update "virtually" credits on database.
The proposition is to :
- ask for operation hash on `PUT /credits` endpoint
- check if the transfer between the customer address and the vault is finalised
- wait blocks confirmation (2 blocks)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the PUT /credits endpoint and read the linked pull-request discussion for the security context. Trace how the customer-to-vault transfer is checked, then define completion as requiring an operation hash, confirming the transfer is finalized, and waiting for two block confirmations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, blockchain, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100