A method of treating a hydrocarbon-bearing formation, the method comprising: contacting the hydrocarbon-bearing formation with a treatment composition comprising solvent and a fluorinated amphoteric compound, wherein the hydrocarbon-bearing formation comprises carbonate, and wherein the fluorinated amphoteric compound is selected from the group consisting of: (a) (b) Rf-Q-Z (c) a compound comprising: a first divalent unit represented by and a second divalent unit represented by formula and (d) combinations thereof; wherein Rf is independently fluoroalkyl having up to 10 carbon atoms or a polyfluoropolyether group; each Rf 1 is independently fluoroalkyl having up to 10 carbon atoms or a polyfluoropolyether group; X is -SO 2 - or -C -; Y is -N 2, -N + 3, or -N + 3 A-, wherein A- is a counter anion; Y' is -P 2, -O-P 2, -SO 3 M, -O-SO 3 M, or -CO 2 M, wherein M is hydrogen, a counter cation, a free anion, or a bond to the hydrocarbon-bearing formation; each Q is independently -SO 2 -N(R')-W-, -C -N(R')-W-, alkylene, arylalkylene, or arylene, wherein alkylene and arylalkylene are each optionally interrupted by -0-, -S-, -SO 2 - or -C -; each W is independently alkylene, arylalkylene, or arylene, wherein alkylene and arylalkylene are each optionally interrupted by -O- or -S- and optionally substituted by hydroxyl; Z is -N + 2 -V-SO 3 M, or -N + 2 -V-CO 2 M, wherein M is hydrogen, a counter cation, a free anion, or a bond to the hydrocarbon-bearing formation; each V is independently alkylene, arylalkylene, or arylene, wherein alkylene and arylalkylene are each optionally interrupted by -O- or -S- and optionally substituted by hydroxyl; each R is independently hydrogen, alkyl, or aryl, wherein alkyl may optionally be interrupted by -O- or substituted with hydroxyl or aryl, or two R groups taken together with the N atom to which they are attached can form a heterocyclic ring having up to six carbon atoms and optionally containing -O- or -S-; R' is hydrogen, alkyl having up to 6 carbon atoms, or aryl; each R 1 is independently hydrogen or methyl; and each Q 1 is independently -O-, -S-, or -N(R")-, wherein R" is hydrogen or alkyl having up to 6 carbon atoms. contacting the hydrocarbon-bearing formation with a treatment composition comprising solvent and a fluorinated amphoteric compound, wherein the hydrocarbon-bearing formation comprises carbonate, and wherein the fluorinated amphoteric compound is selected from the group consisting of: (a) (b) Rf-Q-Z (c) a compound comprising: a first divalent unit represented by and a second divalent unit represented by formula and (d) combinations thereof; (a) (b) Rf-Q-Z (c) a compound comprising: a first divalent unit represented by and a second divalent unit represented by formula and a first divalent unit represented by and a second divalent unit represented by formula and (d) combinations thereof; Rf is independently fluoroalkyl having up to 10 carbon atoms or a polyfluoropolyether group; each Rf 1 is independently fluoroalkyl having up to 10 carbon atoms or a polyfluoropolyether group; X is -SO 2 - or -C -; Y is -N 2, -N + 3, or -N + 3 A-, wherein A- is a counter anion; Y' is -P 2, -O-P 2, -SO 3 M, -O-SO 3 M, or -CO 2 M, wherein M is hydrogen, a counter cation, a free anion, or a bond to the hydrocarbon-bearing formation; each Q is independently -SO 2 -N(R')-W-, -C -N(R')-W-, alkylene, arylalkylene, or arylene, wherein alkylene and arylalkylene are each optionally interrupted by -0-, -S-, -SO 2 - or -C -; each W is independently alkylene, arylalkylene, or arylene, wherein alkylene and arylalkylene are each optionally interrupted by -O- or -S- and optionally substituted by hydroxyl; Z is -N + 2 -V-SO 3 M, or -N + 2 -V-CO 2 M, wherein M is hydrogen, a counter cation, a free anion, or a bond to the hydrocarbon-bearing formation; each V is independently alkylene, arylalkylene, or arylene, wherein alkylene and arylalkylene are each optionally interrupted by -O- or -S- and optionally substituted by hydroxyl; each R is independently hydrogen, alkyl, or aryl, wherein alkyl may optionally be interrupted by -O- or substituted with hydroxyl or aryl, or two R groups taken together with the N atom to which they are attached can form a heterocyclic ring having up to six carbon atoms and optionally containing -O- or -S-; R' is hydrogen, alkyl having up to 6 carbon atoms, or aryl; each R 1 is independently hydrogen or methyl; and each Q 1 is independently -O-, -S-, or -N(R")-, wherein R" is hydrogen or alkyl having up to 6 carbon atoms.