Aug 30, 2021

CakeDeFi - Earn passive income by staking your crypto and forget about it

Warning: There is absolutely no financial advice on this or on any other pages of this blog.

Old way of earning from crypto

It's been a while having my crypto sit quietly in my crypto wallet. As an non-savvy crypto owner, mining and trading crypto is most I know about how one can earn from crypto.

Crypto Staking Experiment with Cake DeFi

"Staking" has been a new term to my early this year (of 2021). It's nowadays an easier approach to generate revenue with your available crypto without the need of hunting for expensive GPU (for mining) and additional payment monthly electricity bill.

My first staking experience was started with CakeDeFi (affiliate link)

My first experiment started 4 months ago (April 2021), I transferred 20 DFI to my partner. And then she directly put them all into "Staking" with auto-compound and she forgot about it until she received an email today.

20 DFI + staking became USD106


In this case:

20DFI worth approximate USD75 (4 months ago)

20DFI + staking (auto-compound) = ~USD106 (August same year)


Looking at the chart below, I picked the peak value point on April as example. Compared to the highlighted value, it has lower price today at the time of this writing (USD2.79 / DFI). The value of staking with autocompound compensated the drop in USD value, while still profit from the extra DFI token earned from staking.


USD price changes of DFI



How does earning from staking work?

When you stake your DFI, you get paid with DFI twice a day. 
Here's come the best part, all you need to do, in short, stake your DFI and forget about it.

You have an option to enable "auto-compound" and let it to continue to stake with all the new earning without having to manually add them after every earning cycle. Which it also means, we can just stake now and forget about it until you login again next time to find out how much you've gained in your asset, but just remember to enable "auto-compound" option.

DFI Staking - auto-compound setting


The following is an example about daily earning:

Auto-compound (staking) & Earning



See the result for yourself first

Okay, since the very first transaction would usually require you spend hardearned money to get started . Please don't simply believe that anyone can just earn a fortune out from this.
Risk is always there, for a non-savvy crypto owner, I'd usually start small (where it won't hurt a bit if I lost all of it) until I've gain enough confidence to make a big decision. Trust no one until you see for yourself first.

This isn't a financial advisor post, please DO NOT read or treat it like one. I'm not any certified financial advisor, I'm just sharing my good experience with what've achieved with CakeDeFi. If you are a owner of crypto already, then you may have already know the how's its volatility affect its value, so please be warned, do it only what you think you capable of, never overdo anything. Like the old saying, never put all your eggs in one basket.

If you are interested to get an account, you can use this CakeDefi affiliate link and get extra USD$30 worth of DFI after you sign up & make your first $50 deposit.

How does it looks like inside?

Liquidity Mining (risky, due to the volatility value changes - Impermanent Loss)

Impermanent Loss happens because you add liquidity in pair (BTC - DFI as example below).
Either of the crypto drop or rise in value, the other paired crypto would need to increase or reduce itself to breakeven and to maintain the initial share you have started with.


Interface for Staking DFI
This one is straight forward. You'll need to swap your token into DFI, and start staking.
You'll get staking reward every day, and "auto-compound" option will help you auto-stake the daily earnings, so you are staking with the most DFI you have available (to maintain highest earning capability).



Have fun staking!

Aug 17, 2021

Unit test on Angular with Jasmine, test case executed randomly

 Problems

If your written unit test is written in an order that has test like:
expect(modalCtrlSpy.dismiss.calls.count()).toBe(1);

The "count()" is accumulated throughout the test cases from the start until the end of a "described" scenario. If test cases get executed without following the order as written test, it fails due to "count()" result get accumulated differently across the test. It can't match the "expected" accumulated result if test run randomly.

Solution

In the karma.conf.js file, add "random: false" under client.jasmine object to prevent test case being executed randomly.



Jul 24, 2021

Folding@Home - Contribute idle computer processing power to science research

Folding@Home

What is Folding at Home (or in shortform, fah)

It is a project that allow user to contribute their processing power during computer is in idle status. The contributed processing power will be used by fah program to help scientist finding cure for deceases, and processing power donor would get some compensation in return in crypto form (different options available too).

If you don't have any GPU, CPU alone is enough to get you started with the folding.


Kalium Wallet
What do you get in return?

Yes, contributing idle processing power will still consume electricity, contributor might think about getting compensated for the power consumption at home.

And here's the example of compensation I received so far. Meanwhile, I'm not into contributing to earn, that's not my purpose, and so shouldn't you. Otherwise, you'll be hunted by annoying inner voice which get you keep checking at the compensation figure every single day or worse every single hour.


Banano & Kalium Wallet

In the picture at the right, the transactions list is what I've received from contributing to FAH as a Banano team. 

How to do it?

  1. Get an address (a long text that as your ID) from any listed wallet on https://kalium.banano.cc/ (I picked kalium)
  2. visit bananominer site to get started with your address.
  3. enter required info into https://client.foldingathome.org/ (after FAH installation is completed)
  4. setup a passkey that let F@H know that the contribution is from you, this will earn you more bonus (they claim so, but i haven't able to check how much more bonus you'll get with passkey attached).


Lastly, I've seen topic about getting payout in dogecoin, but I haven't manage to find any reliable guide to try with. So I think it's still best to stick with banano team, as it's been number 1 ranked team until these days at the time of this writing.


Banano Team, the number 1 FAH contributor

To learn about available projects and the stats of their servers which you'll be contribute your processing power, please find the useful links below:
https://folding.lar.systems/projects/
https://foldingathome.org/statistics/

Accessibility (a18y) - Minimum Touch Target Size (48dp)

Udacity Course: Web Accessibility

https://classroom.udacity.com/courses/ud891/lessons/8085130355/concepts/80878907040923


Minimum touch size for mobile screen: 48dp



WCAG: https://webaim.org/standards/wcag/checklist#sc1.4.4

Jan 14, 2021

Troubleshooting: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

I am a Ionic Capacitor user, I didn’t know since when my android build keep failing and no clue what’s the cause.


And I keep getting these errors when I run “npx cap add android”:

	
Syncing GradleError running gradle sync Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

… #skipped verbose error messages

FAILURE: Build failed with an exception.


* What went wrong:
Could not initialize class org.codehaus.groovy.reflection.ReflectionCache


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
BUILD FAILED in 21s

Unable to infer default Android SDK settings. This is fine, just run npx cap open android and import and sync gradle manually
	





The Solution

Firstly, you'll to know which java version is your android studio is using, find the info in "About Android Studio". 





Set environment variable to point JAVA_HOME to the path where openjdk version of "1.8.0_242-release” (or embedded jdk inside Android Studio app folder) located. On Mac, it's usually 

/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home


MacOS (Android Studio 4.1.1):

export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"


jenv User:

You can add Android Studio embedded openjdk path to your jenv and then switch to your prefered java version with jenv local VERSION_NO for local or  jenv global VERSION_NO for system wide.
jenv add "/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"

Window:

Add/update environment variable JAVA_HOME and point it to path where the correct version of openjdk extracted.