Skip to content

daomaker/stablecoin-farm-integrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DAO Maker Stablecoin Farms referral system

create your referrer id

Call function setReferrer with these parameters:

  • an arbitrary id 8-chars long
  • your address receiving fees
  • fee on user APR (max 30%, the base is 100%, not APR)

refer users

Call function deposit with these parameters:

  • amount to deposit
  • your referral id (8-char long string)

withdraw your fees

Users are charged fees when they withdraw (can be also done manually by calling chargeFees function). Part of their shares is redistributed to your fee receiving wallet. To withdraw them, simply call withdraw function.

get user deposited amounts, TVL

returns this object

{
    tvlTotal: "", //in $
	farms: [
		{
			address: "",
			tvl: "", //in $
			token: {
				image: "",
				name: "",
				address: ""
			}
		}
	]
}

returns this object

{
	<farmAddress>: {
		deposit: "", // sum of deposited amounts
		maxWithdrawable: "", // how much can user withdraw in total
		yield: "", 
		depositFee: "" // very small percentage, represents how much of deposited amount will be withdrawable right after depositing
	}
}

code examples

In this package there are included codes of deposit, withdraw and approve functions. You will probably need to modify it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published