Tsunami-Exchange / tsunami-contracts

Tsunami Exchange Smart Contracts (RIDE)
2 stars 3 forks source link

Test Smart-contract staking. Case 1 #2

Closed AndreKuren closed 2 years ago

AndreKuren commented 2 years ago

Testing vAMM v3 smart contract functions in TestNet - https://waves-dapp.com/3N8MgZkd4JL8iGz5XW18ua5BuCfXtoRoGe9

Error in scenario 1: Wallet address used: 3N3e3a9dVdE4HaCRfQWDDdQbMTLWZXMwdXr

In the new contract, sent to staking (10 TSN), added rewards ($50), checked that the payment is going (per minute ~ $0.03) when calling addRewards. Left for 8 hours. After 8 hours, without receiving rewards made a full unStake. then I call withdrawRewards - there is an error: Error: Error while executing account-script: No reward Next, I'm adding a new stake (5 TSN), and after a minute I call withdrawRewards, from the added 50 USDN I get $0.20, which is clearly more than 40 seconds, but much less than 8 hours of waiting steaking.

Expected behavior: After unStake and withdrawRewards is called, I should get the reward for 8 hours of shaking. Transaction references: Step 1 addRewards () https://testnet.wavesexplorer.com/tx/A17zo4r18AwG2p8HTeSfdsgNnrk9XovaMdigc6SDoSdo Step 2 stake () https://testnet.wavesexplorer.com/tx/7nLfb32Wej67KjivDN65GpoemJNcmowG6ab9vBo8Gxyn Step 3 withdrawRewards () https://testnet.wavesexplorer.com/tx/Ez9WfX3QLbDze8WKZNjdiZW9jhBcxVco3CuEVNs5Kv6L Step 4 unStake (10000000) https://testnet.wavesexplorer.com/tx/4R5V6LHVcu5ARx5LMfpED7gxA8tBZuGnxHqVNAq6zF7v Step 5 withdrawRewards () Error: Error while executing account-script: No reward Step 6 stake () https://testnet.wavesexplorer.com/tx/CcHw17szRaKdiytQ3az8wHr7TrhJ1xwK9YMKcxhrcgGX Step 7 withdrawRewards () https://testnet.wavesexplorer.com/tx/2ua7hkNJuecLn3Lmb2YijHaBjFfphgNeH8aMAW9AsYBs

AndreKuren commented 2 years ago

Test done. Success