Smart Rewarding

Smart rewarding project for Waves online hackaton.

We are happy to introduce Smart Salary Processor for Software developers. It manages salary payments for your employees according to their productivity

All you have to do is provide GitHub repository name, developers Waves wallets, and amount of money you want to spend on salaries

Smart salary processor will check amount of commits of each of developer and spread provided money in proportion of completed job with transactions protected by Waves smart contract.

Please try online demo https://smart-rewarding.firebaseapp.com/

6 Likes

Потому что мы Noxbox

1 Like

I’ve seen you post in Russian several times now
Please use English on this forum so everyone understands.

2 Likes

I have auto translate on website,all launch translate

You might want to translate before you post because most people don’t have the auto translate.

Smart Incentive Project for Waves Online Hackaton.
Smart contracts will be used as Escrow and decide to reward side or return money to the owner.
Possible options for use: The school rewards the best students for excellent estimates (data received from the publicly high school official)
The manufacturer rewards people for a sleep scatle (data collected from the public control card of the heart rate) The owner of the product awards the code developers for fixing in the repository (data collected from the GITHUB)

1 Like

Prototype is done and ready for review and testing at https://smart-rewarding.firebaseapp.com/

project repository https://github.com/Lipnevich/smart-rewarding

Actual smartcontract

let signature = base58’${currentWallet.keyPair.publicKey}’;

match tx { case tx:TransferTransaction =>
{
let employerAddress = addressFromPublicKey(tx.senderPk);
let dateKey = toBase58String(addressFromRecipient(tx.recipient).bytes);
let salary = extract(getLong(employerAddress, dateKey));
if((salary == tx.amount)
&& sigVerify(tx.bodyBytes, tx.proofs[0], signature)) then true else false
} case _ => false }

What is the point for a smart contract here?

An user who makes a transfer sets a salaries and then checks it with smart contract… The same functionality can be achived with simple transfer transactions without loss of functionality, but less redundancy.

Hello deemru!
Yup, it is easier to just create transaction, but it is tottally unsafety. Smart Rewarding Processor may be faked and your money will be sent to some hacker’s wallet instead of wallets of your employees.

So processor create protection first as stored data + smart contract almost for free (0.01 Waves). And only after that user may send salaries safety.

For real life application there are should be two money transfer from user. One in 0.01 Waves for contract (user may verify wallets and amounts in Waves explorer) and another one for salaries. This step was skipped in order to simplify demonstration process

@Lipnevich, “totaly unsafety”? Wow.

As of now, it is obvious, the safety is the same.

Your app set data by data transactions, you assume that it may be faked, then what prevents the faked app to do whatever it want to? Nothing.

To make sense, your smart needs an approval mechanism by another account, but not the same one.

Moreover, your script doesn’t have a mechanism to fallback.

Your script locks account only to pay salaries to fixed addresses and fixed amount.

It is a very dangerous script.

Thank you for your reviewing!
Fixed!
Now there is one more step - salary amount input.

  1. Send only 0.01 Waves for data smart contract creation.
  2. Enter whole team salary amount
  3. Check that smart contract and data are correct in Waves blockchain
  4. Send salary amount and reward your developers

With this solution no need to trust any approval mechanism since data is human readable
for everyone in Waves blockchain and employer may check it in a few seconds by himself

@Lipnevich, thanks for fix which reveals my points even more.

What should i do with these locked 8.0 Waves?

https://testnet.wavesexplorer.com/address/3N8UWk4onXvMiDNEZ4syaVDEUYcYfZ8mAgd

Oh, that’s easy. Please send it to the same wallets as stored in your account’s data with the same amount and avoid to send additional money to this wallet as it was created for salary processing, not for your own needs

@Lipnevich, i don’t understand why you’re standing on your own. If it’s just to participate on the hackathon, it’s ok. The app works. But on the other side, if we talk about the idea, your Smart Rewarding does’t look so smart for now.

Could you please explain more your point of view? For me Smart Rewarding looks invulnerable now. Or should we ask someone from Waves team take a part in this discusion?

Maybe @ikardanov share his opinion about it?

But pointing to the problems of others is just something to offer something to your
Thank you and your fix

I wanted to protest, but the generated addresses are incorrect !!!Screenshotasfz0E

I thought really that something is sensible and it does not work.:slightly_frowning_face:

Please make sure you are using test Waves blockchain.