skalenetwork/skale-network

[SIP-4] SKALE Fuel (S-Fuel) | Onboard Improvement

TheGreatAxios opened this issue · 1 comments

[SIP-4] SKALE S-Fuel Attainment via Gas Station

The Problem(s)

The current problems that exist regarding the initial attainment of S-Fuel is twofold: one for the developer and one for the users.

The Developers

 - Existing solutions include Proof-of-Work (PoW) and Custom Faucets
 - Proof-of-Work (PoW)
    - The Proof of Work solution provided by SKALE is strong, however, comes with its own difficulties whether it be the implementation into the build of a platform, or with the time complexity required. 
    - Custom Faucet
       - Implementing a Faucet itself is not that difficult, however, faucets generally can only be called by an external signer which does not necessarily solve this problem directly

The Users

 - Regardless of PoW or Faucet usage, users generally have to copy and paste an address or click on a button in order to attain S-Fuel which is counter intuitive to many platforms that are trying to abstract the blockchain parts away from users. Additionally, it may become painful for users if they are utilizing more than one SKALE dApp and have to consistently claim S-Fuel on multiple networks.

The Solution

The solution that I am proposing is similar to the Gas Station Network found on Ethereum. This solution would be auto-deployed on each SKALE chain. From here a simple script/function can be written that automatically signs a transaction on the client, sends it to the Gas Station which then forwards it on to a SKALE chain S-Fuel faucet which completes by sending S-Fuel to the original sender. This process contains three parts:

  1. Gas Station
  2. Faucet
  3. Client Script

By connecting the three pieces together, this would result in developers just adding the script to their initial onboarding and then immediately upon using the dApp the user can interact with the application.

Alternatives

The only alternative currently being is a faucet that doesn't require signing. To my current knowledge, a read-only (call) function cannot be used to make a function that can utilize the payable/transfer functionality in Ethereum. However, with SKALE V2 it may be possible to utilize an Oracle to run this external call.

Additional Context

  • Either the Gas Station or the Faucet should contain a whitelist that way S-Fuel can only be claimed by a user one time to avoid too much S-Fuel being allocated which would be a security vulnerability
  • A solution like this could give developers building dApps using other languages: Java, Dart, Ruby, etc. that have Web3 tie-ins the ability to easily integrate with SKALE without having to rely on JavaScript as the client tie-in could be ported very quickly to other languages

Resolution

The community has moved forward with the sFUEL Station:

Website: https://sfuel.dirtroad.dev || https://sfuel.skale.network
GitHub: https://github.com/Dirt-Road-Development/sfuel-station

Solution

Auto fill up users across all chains based on their lack of fuel using a shared PoW on the client.
Great solution to solve onboarding for new dApps as users are already familiar.

Adding Your Chain to the Station

  1. Visit https://github.com/Dirt-Road-Development/skale-pow-deployment
  2. Deploy the PoWSecure contract by following the steps in the README
  3. Reach out to me @TheGreatAxios or create a PR on the repo listed above